Made more buttons to use clicked signal.
This commit is contained in:
parent
ce513e5725
commit
a1c252dbbe
|
@ -127,7 +127,7 @@
|
|||
<property name="label">gtk-close</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">0</property>
|
||||
<signal name="clicked" handler="on_close_pressed"/>
|
||||
<signal name="clicked" handler="on_close_clicked"/>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
|
|
@ -73,8 +73,8 @@ class EventLogging:
|
|||
self.dialog = self.glade.get_widget("dialog")
|
||||
self.dialog.set_position(gtk.WIN_POS_CENTER)
|
||||
self.glade.signal_autoconnect({
|
||||
'on_button_cancel_pressed': self.cancel_pressed,
|
||||
'on_button_ok_pressed': self.ok_pressed
|
||||
'on_button_cancel_clicked': self.cancel_clicked,
|
||||
'on_button_ok_clicked': self.ok_clicked
|
||||
})
|
||||
self.viewport = gtk.Viewport()
|
||||
self.scrolledWindow = gtk.ScrolledWindow()
|
||||
|
@ -257,7 +257,7 @@ class EventLogging:
|
|||
else:
|
||||
self.manager.disconnect_event(event_id, self.tab_log.handle_event)
|
||||
|
||||
def ok_pressed(self, src):
|
||||
def ok_clicked(self, src):
|
||||
self.dialog.hide()
|
||||
self.update_config(self.manager.constants['EVENT_FINISHED'], self.glade.get_widget("chk_finished").get_active())
|
||||
self.config.set("enable_finished", self.glade.get_widget("chk_finished").get_active())
|
||||
|
@ -299,5 +299,5 @@ class EventLogging:
|
|||
self.tab_log.disable_log_files()
|
||||
self.config.set("enable_log_files", self.glade.get_widget("chk_log_files").get_active())
|
||||
|
||||
def cancel_pressed(self, src):
|
||||
def cancel_clicked(self, src):
|
||||
self.dialog.hide()
|
||||
|
|
|
@ -307,7 +307,7 @@
|
|||
<property name="label">gtk-cancel</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">0</property>
|
||||
<signal name="pressed" handler="on_button_cancel_pressed"/>
|
||||
<signal name="clicked" handler="on_button_cancel_clicked"/>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -316,7 +316,7 @@
|
|||
<property name="label">gtk-ok</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">1</property>
|
||||
<signal name="pressed" handler="on_button_ok_pressed"/>
|
||||
<signal name="clicked" handler="on_button_ok_clicked"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
|
|
|
@ -89,8 +89,8 @@ class plugin_SimpleRSS:
|
|||
"torrents_fcc_changed" : self.torrents_fcc_changed,
|
||||
"torrents_view_row_activated" : self.torrents_view_row_activated,
|
||||
"chkfeeds_clicked" : self.chkfeeds_clicked,
|
||||
"cancel_pressed" : self.dialog_cancel,
|
||||
"ok_pressed" : self.dialog_ok }
|
||||
"cancel_clicked" : self.dialog_cancel,
|
||||
"ok_clicked" : self.dialog_ok }
|
||||
glade.signal_autoconnect(dic)
|
||||
self.feeds_view.get_selection().set_select_function(self.row_clicked)
|
||||
self.timer = 0
|
||||
|
|
|
@ -217,7 +217,7 @@
|
|||
<property name="label">gtk-add</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">0</property>
|
||||
<signal name="pressed" handler="addfeed_clicked"/>
|
||||
<signal name="clicked" handler="addfeed_clicked"/>
|
||||
<signal name="activate" handler="addfeed_clicked"/>
|
||||
</widget>
|
||||
<packing>
|
||||
|
@ -348,7 +348,7 @@
|
|||
<property name="label">gtk-add</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">0</property>
|
||||
<signal name="pressed" handler="addfilter_clicked"/>
|
||||
<signal name="clicked" handler="addfilter_clicked"/>
|
||||
<signal name="activate" handler="addfilter_clicked"/>
|
||||
</widget>
|
||||
<packing>
|
||||
|
@ -858,7 +858,7 @@
|
|||
<property name="label">gtk-cancel</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">0</property>
|
||||
<signal name="pressed" handler="cancel_pressed"/>
|
||||
<signal name="clicked" handler="cancel_clicked"/>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -867,7 +867,7 @@
|
|||
<property name="label">gtk-ok</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">1</property>
|
||||
<signal name="pressed" handler="ok_pressed"/>
|
||||
<signal name="clicked" handler="ok_clicked"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
<property name="label">gtk-cancel</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">0</property>
|
||||
<signal name="pressed" handler="dialog_cancel"/>
|
||||
<signal name="clicked" handler="dialog_cancel"/>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -104,7 +104,7 @@
|
|||
<property name="label">gtk-ok</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">1</property>
|
||||
<signal name="pressed" handler="dialog_ok"/>
|
||||
<signal name="clicked" handler="dialog_ok"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
|
|
|
@ -55,8 +55,8 @@ class TorrentPeers:
|
|||
self.dialog = self.glade.get_widget("dialog")
|
||||
self.glade.signal_autoconnect({
|
||||
'toggle_ui': self.toggle_ui,
|
||||
'on_button_cancel_pressed': self.cancel_pressed,
|
||||
'on_button_ok_pressed': self.ok_pressed
|
||||
'on_button_cancel_clicked': self.cancel_clicked,
|
||||
'on_button_ok_clicked': self.ok_clicked
|
||||
})
|
||||
tree_view = gtk.TreeView()
|
||||
scrolled_window = gtk.ScrolledWindow()
|
||||
|
@ -155,7 +155,7 @@ class TorrentPeers:
|
|||
else:
|
||||
self.tab_peers.update_peer_store()
|
||||
|
||||
def ok_pressed(self, src):
|
||||
def ok_clicked(self, src):
|
||||
self.dialog.hide()
|
||||
|
||||
needs_store_update = False
|
||||
|
@ -173,5 +173,5 @@ class TorrentPeers:
|
|||
self.tab_peers.update_peer_store()
|
||||
self.tab_peers.ip_column_queue_resize()
|
||||
|
||||
def cancel_pressed(self, src):
|
||||
def cancel_clicked(self, src):
|
||||
self.dialog.hide()
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
<property name="label">gtk-cancel</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">0</property>
|
||||
<signal name="pressed" handler="on_button_cancel_pressed"/>
|
||||
<signal name="clicked" handler="on_button_cancel_clicked"/>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -97,7 +97,7 @@
|
|||
<property name="label">gtk-ok</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">1</property>
|
||||
<signal name="pressed" handler="on_button_ok_pressed"/>
|
||||
<signal name="clicked" handler="on_button_ok_clicked"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="label">gtk-add</property>
|
||||
<property name="use_stock">True</property>
|
||||
<signal name="pressed" handler="add_clicked"/>
|
||||
<signal name="clicked" handler="add_clicked"/>
|
||||
<signal name="activate" handler="add_clicked"/>
|
||||
</widget>
|
||||
<packing>
|
||||
|
|
|
@ -141,8 +141,10 @@ class PreferencesDlg:
|
|||
self.glade.get_widget('spin_port_min').set_sensitive(True)
|
||||
self.glade.get_widget('spin_port_max').set_sensitive(True)
|
||||
|
||||
self.glade.get_widget("ok_button").connect("clicked", self.ok_pressed, interface)
|
||||
self.glade.get_widget("cancel_button").connect("clicked", self.cancel_pressed)
|
||||
self.glade.get_widget("ok_button").connect("clicked",
|
||||
self.ok_clicked, interface)
|
||||
self.glade.get_widget("cancel_button").connect("clicked",
|
||||
self.cancel_clicked)
|
||||
|
||||
except KeyError:
|
||||
pass
|
||||
|
@ -150,7 +152,7 @@ class PreferencesDlg:
|
|||
self.dialog.set_transient_for(window)
|
||||
self.dialog.show()
|
||||
|
||||
def ok_pressed(self, source, interface):
|
||||
def ok_clicked(self, source, interface):
|
||||
self.dialog.hide()
|
||||
self.preferences.set("encin_state", self.glade.get_widget("combo_encin").get_active())
|
||||
self.preferences.set("encout_state", self.glade.get_widget("combo_encout").get_active())
|
||||
|
@ -214,7 +216,7 @@ class PreferencesDlg:
|
|||
interface.apply_prefs()
|
||||
interface.config.save()
|
||||
|
||||
def cancel_pressed(self, source):
|
||||
def cancel_clicked(self, source):
|
||||
self.dialog.hide()
|
||||
|
||||
def TestPort(self, widget):
|
||||
|
@ -337,7 +339,7 @@ class PluginDlg:
|
|||
name_col.set_expand(True)
|
||||
dgtk.add_toggle_column(self.view, _("Enabled"), 1, toggled_signal=self.plugin_toggled)
|
||||
signals = {'plugin_pref': self.plugin_pref,
|
||||
'on_close_pressed': self.close_pressed}
|
||||
'on_close_clicked': self.close_clicked}
|
||||
self.glade.signal_autoconnect(signals)
|
||||
self.plugins = plugins
|
||||
|
||||
|
@ -354,7 +356,7 @@ class PluginDlg:
|
|||
self.dialog.set_transient_for(window)
|
||||
self.dialog.show()
|
||||
|
||||
def close_pressed(self, source):
|
||||
def close_clicked(self, source):
|
||||
self.dialog.hide()
|
||||
|
||||
def old_clicked(self, path):
|
||||
|
|
|
@ -683,7 +683,7 @@ class DelugeGTK:
|
|||
def show_preferences_dialog(self):
|
||||
active_port = self.manager.get_state()['port']
|
||||
preferences_dialog = dialogs.PreferencesDlg(self.config, active_port)
|
||||
# Only apply the prefs if the user pressed OK in the prefs dialog
|
||||
# Only apply the prefs if the user clicked OK in the prefs dialog
|
||||
preferences_dialog.show(self, self.window)
|
||||
|
||||
def show_preferences_dialog_clicked(self, arg=None):
|
||||
|
|
Loading…
Reference in New Issue