Tweaks to Desktop File Manager prefs.

This commit is contained in:
Alex Dedul 2007-08-09 16:56:49 +00:00
parent fe95c9adbc
commit 12f28e33ae
2 changed files with 17 additions and 2 deletions

View File

@ -2297,6 +2297,7 @@ HTTP W/ Auth</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">radio_open_folder_stock</property>
<signal name="focus_in_event" handler="on_radio_open_folder_custom_focus_in_event"/>
</widget>
</child>
</widget>
@ -2318,11 +2319,12 @@ HTTP W/ Auth</property>
Nautilus
Thunar</property>
<child internal-child="entry">
<widget class="GtkEntry" id="comboboxentry-entry1">
<widget class="GtkEntry" id="combo_file_manager_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="editable">False</property>
<signal name="focus_in_event" handler="on_combo_file_manager_entry_focus_in_event"/>
</widget>
</child>
</widget>
@ -2343,6 +2345,7 @@ Thunar</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<signal name="focus_in_event" handler="on_txt_open_folder_location_focus_in_event"/>
</widget>
</child>
</widget>

View File

@ -47,7 +47,10 @@ class PreferencesDlg:
self.dialog.set_icon_from_file(common.get_pixmap("deluge32.png"))
self.glade.signal_autoconnect({
'toggle_ui': self.toggle_ui,
'on_btn_testport_clicked': self.TestPort
'on_btn_testport_clicked': self.TestPort,
'on_combo_file_manager_entry_focus_in_event': self.on_combo_file_manager_entry_focus_in_event,
'on_txt_open_folder_location_focus_in_event': self.on_txt_open_folder_location_focus_in_event,
'on_radio_open_folder_custom_focus_in_event': self.on_radio_open_folder_custom_focus_in_event
})
self.preferences = preferences
@ -287,6 +290,15 @@ class PreferencesDlg:
self.glade.get_widget('spin_port_min').set_sensitive(True)
self.glade.get_widget('spin_port_max').set_sensitive(True)
def on_combo_file_manager_entry_focus_in_event(self, widget, event):
self.glade.get_widget("radio_open_folder_stock").set_active(True)
def on_txt_open_folder_location_focus_in_event(self, widget, event):
self.glade.get_widget("radio_open_folder_custom").set_active(True)
def on_radio_open_folder_custom_focus_in_event(self, widget, event):
self.glade.get_widget("txt_open_folder_location").grab_focus()
class MergeDlg:
def __init__(self):
self.glade = gtk.glade.XML(common.get_glade_file("merge_dialog.glade"),