add run configuration wizard to help menu

This commit is contained in:
Marcos Pinto 2007-08-27 06:39:00 +00:00
parent e0442949b2
commit a71a6b8e1a
2 changed files with 29 additions and 0 deletions

View File

@ -1026,6 +1026,30 @@
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</widget> </widget>
</child> </child>
<child>
<widget class="GtkImageMenuItem" id="menuitem8">
<property name="visible">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="tooltip" translatable="yes">Runs the first-time configuration wizard</property>
<property name="label" translatable="yes">_Run Configuration Wizard</property>
<property name="use_underline">True</property>
<signal name="activate" handler="run_wizard"/>
<child internal-child="image">
<widget class="GtkImage" id="menu-item-image7">
<property name="visible">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="stock">gtk-preferences</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="separatormenuitem4">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</widget>
</child>
<child> <child>
<widget class="GtkImageMenuItem" id="menuitem4"> <widget class="GtkImageMenuItem" id="menuitem4">
<property name="visible">True</property> <property name="visible">True</property>

View File

@ -170,6 +170,7 @@ class DelugeGTK:
## Help Menu ## Help Menu
"show_about_dialog": self.show_about_dialog, "show_about_dialog": self.show_about_dialog,
"launchpad": self.launchpad, "launchpad": self.launchpad,
"run_wizard": self.run_wizard,
## Toolbar ## Toolbar
"tor_start": self.tor_start, "tor_start": self.tor_start,
"tor_pause": self.tor_pause, "tor_pause": self.tor_pause,
@ -673,6 +674,10 @@ class DelugeGTK:
def show_about_dialog(self, arg=None): def show_about_dialog(self, arg=None):
dialogs.show_about_dialog() dialogs.show_about_dialog()
def run_wizard(self, arg=None):
import wizard
wizard.WizardGTK()
def show_preferences_dialog(self): def show_preferences_dialog(self):
active_port = self.manager.get_state()['port'] active_port = self.manager.get_state()['port']
preferences_dialog = dialogs.PreferencesDlg(self.config, active_port, self.plugins) preferences_dialog = dialogs.PreferencesDlg(self.config, active_port, self.plugins)