Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shortcontentitem.py
diff options
context:
space:
mode:
authorDaniel Francis <francis@sugarlabs.org>2013-01-02 23:39:34 (GMT)
committer Daniel Francis <francis@sugarlabs.org>2013-01-02 23:39:34 (GMT)
commitcb6082321b3c54eb1fc69900f68d4827bf061ee9 (patch)
treed4d8c67acced7754dd36066741f669273040f9cc /shortcontentitem.py
parent1265546eda5b8ba30a5e430c50ad08f15b31c692 (diff)
Port to Gtk3
Signed-off-by: Daniel Francis <francis@sugarlabs.org>
Diffstat (limited to 'shortcontentitem.py')
-rw-r--r--shortcontentitem.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/shortcontentitem.py b/shortcontentitem.py
index 1c757c7..7197b14 100644
--- a/shortcontentitem.py
+++ b/shortcontentitem.py
@@ -18,8 +18,8 @@
import logging
logger = logging.getLogger('option')
-import gobject
-import gtk
+from gi.repository import GObject
+from gi.repository import Gtk
from item import Item
import stock
@@ -29,12 +29,12 @@ class ShortContentItem(Item):
def __init__(self, parent=None, stock_id=None, important=False):
Item.__init__(self, stock_id, important)
- self.content = gtk.EventBox()
+ self.content = Gtk.EventBox()
self.parent = parent
self.separator = None
def get_tool_item(self):
- self.toolitem = gtk.ToolItem()
+ self.toolitem = Gtk.ToolItem()
self.toolitem.add(self.content)
self.setup_tooltip()
return self.toolitem
@@ -44,16 +44,15 @@ class ShortContentItem(Item):
title = self.tooltip
else:
title = stock.get_label(self.stock_id)
- window = gtk.Dialog(title, self.parent)
+ window = Gtk.Dialog(title, self.parent)
window.set_modal(False)
window.set_decorated(True)
- window.set_has_separator(False)
window.set_border_width(10)
if self.toolitem:
self.toolitem.remove(self.content)
if self.separator:
self.separator.hide()
- window.vbox.pack_start(self.content)
+ window.vbox.pack_start(self.content, True, True, 0)
self.content.show()
window.connect('delete-event', self.destroy_window)
window.show()