fix image loading for context menu and reverse split behaviour. Fixes LP #201795

This commit is contained in:
Chris Jones 2008-06-04 12:34:33 +01:00
parent 36d4654979
commit 320744fe1a
1 changed files with 12 additions and 11 deletions

View File

@ -735,19 +735,20 @@ text/plain
if not self.terminator._zoomed: if not self.terminator._zoomed:
str_horiz = _("Split H_orizontally") str_horiz = _("Split H_orizontally")
str_vert = _("Split V_ertically") str_vert = _("Split V_ertically")
try:
item = gtk.ImageMenuItem (str_horiz) item = gtk.ImageMenuItem (str_horiz)
item.set_property('image', self.terminator.icon_theme.load_icon (APP_NAME + '_horiz', 16, 0)) item_image = gtk.Image ()
except: item_image.set_from_icon_name (APP_NAME + '_horiz', gtk.ICON_SIZE_MENU)
item = gtk.MenuItem (str_horiz) item.set_image (item_image)
item.connect ("activate", lambda menu_item: self.terminator.splitaxis (self, False)) item.connect ("activate", lambda menu_item: self.terminator.splitaxis (self, False))
menu.append (item) menu.append (item)
try:
item = gtk.ImageMenuItem (str_vert) item = gtk.ImageMenuItem (str_vert)
item.set_property('image', self.terminator.icon_theme.load_icon (APP_NAME + '_vert', 16, 0)) item_image = gtk.Image ()
except: item_image.set_from_icon_name (APP_NAME + '_vert', gtk.ICON_SIZE_MENU)
item = gtk.MenuItem (str_vert) item.set_image (item_image)
item.connect ("activate", lambda menu_item: self.terminator.splitaxis (self, True)) item.connect ("activate", lambda menu_item: self.terminator.splitaxis (self, True))
menu.append (item) menu.append (item)
@ -1279,7 +1280,7 @@ class Terminator:
# create a new terminal and parent pane. # create a new terminal and parent pane.
terminal = TerminatorTerm (self, self.profile, None, widget.get_cwd()) terminal = TerminatorTerm (self, self.profile, None, widget.get_cwd())
pos = vertical and "bottom" or "right" pos = vertical and "right" or "bottom"
self.add(widget, terminal, pos) self.add(widget, terminal, pos)
terminal.show () terminal.show ()
terminal.spawn_child () terminal.spawn_child ()