Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/edittoolbar.py
diff options
context:
space:
mode:
authorManuel Quiñones <manuq@laptop.org>2011-11-25 02:00:52 (GMT)
committer Manuel Quiñones <manuq@laptop.org>2011-11-25 02:00:52 (GMT)
commitdec602fda0890bdbfb121107b9bb39f7954a9cd5 (patch)
treeb570a56bf29d76801347934ffa74feb2451de7e7 /edittoolbar.py
parent6cd0ba03d5494b144a6c05dcc59f7ce9d39e6939 (diff)
Port from PyGTK to PyGI, renaming
Was done running the pygi-convert.sh script. Signed-off-by: Manuel Quiñones <manuq@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
Diffstat (limited to 'edittoolbar.py')
-rw-r--r--edittoolbar.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/edittoolbar.py b/edittoolbar.py
index f0cdb1a..d5f0286 100644
--- a/edittoolbar.py
+++ b/edittoolbar.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-import gtk
+from gi.repository import Gtk
from gettext import gettext as _
from xpcom.components import interfaces
@@ -64,13 +64,13 @@ class EditToolbar(activity.EditToolbar):
logging.debug('observe: %r %r %r' % (subject, topic, data))
"""
- separator = gtk.SeparatorToolItem()
+ separator = Gtk.SeparatorToolItem()
separator.set_draw(False)
separator.set_expand(True)
self.insert(separator, -1)
separator.show()
- search_item = gtk.ToolItem()
+ search_item = Gtk.ToolItem()
self.search_entry = iconentry.IconEntry()
self.search_entry.set_icon_from_name(iconentry.ICON_ENTRY_PRIMARY,
'system-search')
@@ -78,7 +78,7 @@ class EditToolbar(activity.EditToolbar):
self.search_entry.connect('activate', self.__search_entry_activate_cb)
self.search_entry.connect('changed', self.__search_entry_changed_cb)
- width = int(gtk.gdk.screen_width() / 3)
+ width = int(Gdk.Screen.width() / 3)
self.search_entry.set_size_request(width, -1)
search_item.add(self.search_entry)
@@ -135,12 +135,12 @@ class EditToolbar(activity.EditToolbar):
if found == interfaces.nsITypeAheadFind.FIND_NOTFOUND:
self._prev.props.sensitive = False
self._next.props.sensitive = False
- entry.modify_text(gtk.STATE_NORMAL,
+ entry.modify_text(Gtk.StateType.NORMAL,
style.COLOR_BUTTON_GREY.get_gdk_color())
else:
self._prev.props.sensitive = True
self._next.props.sensitive = True
- entry.modify_text(gtk.STATE_NORMAL,
+ entry.modify_text(Gtk.StateType.NORMAL,
style.COLOR_BLACK.get_gdk_color())
def __find_previous_cb(self, button):