hotssh r18 - trunk/hotssh/hotvte
- From: walters svn gnome org
- To: svn-commits-list gnome org
- Subject: hotssh r18 - trunk/hotssh/hotvte
- Date: Tue, 8 Jul 2008 13:20:56 +0000 (UTC)
Author: walters
Date: Tue Jul 8 13:20:56 2008
New Revision: 18
URL: http://svn.gnome.org/viewvc/hotssh?rev=18&view=rev
Log:
Add Quit menuitem, move Close to more standard place
Modified:
trunk/hotssh/hotvte/vtewindow.py
Modified: trunk/hotssh/hotvte/vtewindow.py
==============================================================================
--- trunk/hotssh/hotvte/vtewindow.py (original)
+++ trunk/hotssh/hotvte/vtewindow.py Tue Jul 8 13:20:56 2008
@@ -51,6 +51,10 @@
return self.__title
class VteWindow(gtk.Window):
+ __gsignals__ = {
+ "shutdown" : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ()),
+ }
+
ascii_nums = [long(x+ord('0')) for x in xrange(10)]
def __init__(self, factory=None, title=None, icon_name=None, **kwargs):
super(VteWindow, self).__init__()
@@ -75,6 +79,8 @@
<menuitem action='DetachTab'/>
<separator/>
<menuitem action='Close'/>
+ <separator/>
+ <menuitem action='Quit'/>
</menu>
<menu action='EditMenu'>
<menuitem action='Copy'/>
@@ -87,7 +93,7 @@
<placeholder name='ViewAdditions'/>
</menu>
<placeholder name='TermAppAdditions'/>
- <menu action='ToolsMenu'>
+ <menu action='HelpMenu'>
<menuitem action='About'/>
</menu>
</menubar>
@@ -218,12 +224,14 @@
('TabSearch', None, '_Search Tabs', '<control><shift>L', 'Search across tab names', self.__quickswitch_tab_cb),
('Close', gtk.STOCK_CLOSE, _('_Close'), '<control><shift>W',
'Close the current tab', self.__close_cb),
+ ('Quit', gtk.STOCK_QUIT, _('_Quit'), '<control><shift>Q',
+ 'Quit application', self.__quit_cb),
('EditMenu', None, _('Edit')),
('Copy', gtk.STOCK_COPY, _('_Copy'), '<control><shift>C', 'Copy selected text', self.__copy_cb),
('Paste', gtk.STOCK_PASTE, _('_Paste'), '<control><shift>V', 'Paste text', self.__paste_cb),
('ViewMenu', None, _('View')),
- ('ToolsMenu', None, _('Tools')),
- ('About', gtk.STOCK_ABOUT, _('_About'), None, 'About HotVTE', self.__help_about_cb),
+ ('HelpMenu', None, _('Help')),
+ ('About', gtk.STOCK_ABOUT, _('_About'), None, 'About this application', self.__help_about_cb),
]
ag.add_actions(actions)
self.__ui = gtk.UIManager()
@@ -270,6 +278,9 @@
def __close_cb(self, action):
self.__remove_page_widget(self.__notebook.get_nth_page(self.__notebook.get_current_page()))
+
+ def __quit_cb(self, action):
+ self.emit('shutdown')
def __on_widget_close(self, widget):
self.__remove_page_widget(widget)
@@ -278,11 +289,8 @@
self._do_about()
def _do_about(self):
- from hotwire_ui.aboutdialog import HotwireAboutDialog
- dialog = HotwireAboutDialog()
- dialog.run()
- dialog.destroy()
-
+ raise NotImplementedError()
+
def get_tabs(self):
return self.__notebook.get_children()
@@ -375,6 +383,7 @@
win = self.__klass(factory=self, is_initial=is_initial, **kwargs)
win.connect('notify::is-active', self.__on_window_active)
win.connect('destroy', self.__on_win_destroy)
+ win.connect('shutdown', self.__on_win_shutdown)
self.__windows.add(win)
return win
@@ -406,6 +415,10 @@
self.emit('shutdown')
gtk.main_quit()
+ def __on_win_shutdown(self, win):
+ self.emit('shutdown')
+ gtk.main_quit()
+
class UiProxy(dbus.service.Object):
def __init__(self, factory, bus_name, ui_iface, ui_opath):
super(UiProxy, self).__init__(dbus.service.BusName(bus_name, bus=dbus.SessionBus()), ui_opath)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]