~ubuntu-branches/ubuntu/raring/oggconvert/raring

« back to all changes in this revision

Viewing changes to OggConvert/ocv_util.py

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2008-11-06 21:33:20 UTC
  • mfrom: (1.2.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20081106213320-thywgj4kswqg1p1w
Tags: 0.3.2-1ubuntu1
* Merge from Debian experimental, remaining Ubuntu changes:
  - Suggest gstreamer multiverse plugins.
* debian/patches/default_location:
  - Ubuntu provides a Videos directory in $HOME folders, place default
    "Save Folder" location there (LP: #209592).

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
import webbrowser
26
26
 
27
27
 
28
 
 
29
 
 
30
28
def timeremaining(elapsed, percent):
31
29
    """Returns a string with the remaining time for an operation.        
32
30
       elapsed: elapsed time for the operation so far (in seconds)
96
94
    if response ==gtk.RESPONSE_OK: return True
97
95
    else: return False
98
96
    
99
 
def dirac_warning(window=None):
100
 
    """
101
 
    Displays a warning box asking the user to make sure they realise Dirac is
102
 
    experimental.
103
 
    Returns True if the user chooses to continue, False otherwise
104
 
    """
105
 
    
106
 
    dialogue = gtk.MessageDialog(window, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING,
107
 
                 gtk.BUTTONS_NONE, _("Dirac encoding still experimental"))
108
 
                 
109
 
    dialogue.format_secondary_text(_("The Dirac encoder is still experimental. \
110
 
Files you convert with this version may not be viewable with future versions \
111
 
of the decoder."))
112
 
 
113
 
    dialogue.add_buttons(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, _("Contin_ue"), gtk.RESPONSE_OK)
114
 
    response = dialogue.run()
115
 
    dialogue.destroy()
116
 
    if response==gtk.RESPONSE_OK: return True
117
 
    else: return False
118
97
    
119
98
    
120
99
def cancel_check(window=None):
149
128
    dialogue.set_website(ocv_info.website)
150
129
    dialogue.set_license(ocv_info.licence) # Learn to spell, GTK!
151
130
    dialogue.set_translator_credits(_("translator-credits"))
 
131
 
 
132
    # Let's show off our lovely SVG logo
 
133
    logo = gtk.gdk.pixbuf_new_from_file_at_size(
 
134
            os.path.join(ocv_info.pixmappath,"oggconvert.svg"), 128, 128)
 
135
    dialogue.set_logo(logo)
152
136
    
153
137
    dialogue.run()
154
138
    dialogue.destroy()