~lorenzo-carbonell/scope-youtube/precise

« back to all changes in this revision

Viewing changes to src/selectplayer.py

  • Committer: Lorenzo Carbonell
  • Date: 2013-01-03 12:35:09 UTC
  • Revision ID: lorenzo.carbonell.cerezo@gmail.com-20130103123509-9yt7a2uzz7cx9dhq

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
                self.vbox2 = Gtk.VBox(spacing = 5)
74
74
                self.vbox2.set_border_width(5)
75
75
                self.frame1.add(self.vbox2)
76
 
                table1 = Gtk.Table(9,2,True)
 
76
                table1 = Gtk.Table(10,2,True)
77
77
                self.vbox2.add(table1)
78
78
                #
79
79
                label1 = Gtk.Label.new(_('Select viewer')+':')
96
96
                table1.attach(self.radiobutton6,0,1,7,8)
97
97
                self.radiobutton7 = Gtk.RadioButton.new_with_label_from_widget(self.radiobutton0,_('Miro'))
98
98
                table1.attach(self.radiobutton7,0,1,8,9)
 
99
                self.radiobutton8 = Gtk.RadioButton.new_with_label_from_widget(self.radiobutton0,_('UMPlayer'))
 
100
                table1.attach(self.radiobutton8,0,1,9,10)
99
101
                #***************************************************************
100
102
                #
101
103
                download = Gio.File.new_for_path(preferences.DOWNLOAD[1])
105
107
                smplayer = Gio.File.new_for_path(preferences.SMPLAYER[1])
106
108
                yviewer = Gio.File.new_for_path(preferences.YVIEWER[1])
107
109
                miro = Gio.File.new_for_path(preferences.MIRO[1])
 
110
                umplayer = Gio.File.new_for_path(preferences.UMPLAYER[1])
108
111
                if not download.query_exists(None):
109
112
                        self.radiobutton1.set_sensitive(False)
110
113
                if not yviewer.query_exists(None):
119
122
                        self.radiobutton6.set_sensitive(False)
120
123
                if not miro.query_exists(None):
121
124
                        self.radiobutton7.set_sensitive(False)
 
125
                if not  umplayer.query_exists(None):
 
126
                        self.radiobutton8.set_sensitive(False)
122
127
                #
123
128
                self.frame2 = Gtk.Frame()
124
129
                self.vbox1.add(self.frame2)
206
211
                        command = preferences.SMPLAYER[2]%(url)
207
212
                elif cm.radiobutton7.get_active():
208
213
                        command = preferences.MIRO[2]%(url)
 
214
                elif cm.radiobutton8.get_active():
 
215
                        command = preferences.UMPLAYER[2]%(url)
209
216
        cm.hide()
210
217
        cm.destroy()
211
218
        if command:
212
 
                print run(command)
 
219
                print(run(command))
213
220
        else:
214
221
                webbrowser.open(url)
215
222
        exit(0)