[accerciser/pygi] Using pango with introspection
- From: Javier HernÃndez AntÃnez <jhernandez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [accerciser/pygi] Using pango with introspection
- Date: Thu, 25 Aug 2011 18:38:30 +0000 (UTC)
commit 6ae8d78042915b0b25c6848681cbddeea7254735
Author: Javier HernÃndez <jhernandez emergya es>
Date: Thu Aug 25 19:54:06 2011 +0200
Using pango with introspection
plugins/event_monitor.py | 4 ++--
plugins/interface_view.py | 2 +-
plugins/ipython_view.py | 5 +++--
src/lib/accerciser/plugin/base_plugin.py | 1 -
src/lib/accerciser/plugin/message.py | 6 +++---
5 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/plugins/event_monitor.py b/plugins/event_monitor.py
index 012cd84..16ca1ff 100644
--- a/plugins/event_monitor.py
+++ b/plugins/event_monitor.py
@@ -15,13 +15,13 @@ import gi
from gi.repository import Gtk as gtk
from gi.repository import Gdk as gdk
from gi.repository import GObject
+from gi.repository import Pango
import pyatspi
import os.path
import gettext, os, sys, locale
from accerciser.plugin import ViewportPlugin
from accerciser.i18n import _, N_, DOMAIN
-import pango
UI_FILE = os.path.join(os.path.dirname(__file__),
'event_monitor.ui')
@@ -364,7 +364,7 @@ class EventMonitor(ViewportPlugin):
hyperlink = self.monitor_buffer.create_tag(
None,
foreground='blue',
- underline=pango.UNDERLINE_SINGLE)
+ underline=Pango.Underline.SINGLE)
hyperlink.connect('event', self._onLinkClicked)
hyperlink.set_data('acc', acc)
hyperlink.set_data('islink', True)
diff --git a/plugins/interface_view.py b/plugins/interface_view.py
index d93eebf..b7767b3 100644
--- a/plugins/interface_view.py
+++ b/plugins/interface_view.py
@@ -19,7 +19,7 @@ from gi.repository.GLib import markup_escape_text
import pyatspi
import os.path
-import pango
+
from accerciser.plugin import ViewportPlugin
from accerciser.icons import getIcon
from accerciser.i18n import _, N_, DOMAIN
diff --git a/plugins/ipython_view.py b/plugins/ipython_view.py
index a0427d1..bfa3d7d 100755
--- a/plugins/ipython_view.py
+++ b/plugins/ipython_view.py
@@ -17,11 +17,12 @@ import gi
from gi.repository import Gtk as gtk
from gi.repository import Gdk as gdk
from gi.repository import GObject
+from gi.repository import Pango
import re
import sys
import os
-import pango
+
from StringIO import StringIO
try:
@@ -273,7 +274,7 @@ class ConsoleView(gtk.TextView):
Initialize console view.
'''
gtk.TextView.__init__(self)
- self.modify_font(pango.FontDescription('Mono'))
+ self.modify_font(Pango.FontDescription('Mono'))
self.set_cursor_visible(True)
self.text_buffer = self.get_buffer()
self.mark = self.text_buffer.create_mark('scroll_mark',
diff --git a/src/lib/accerciser/plugin/base_plugin.py b/src/lib/accerciser/plugin/base_plugin.py
index 0d94a88..a13784e 100644
--- a/src/lib/accerciser/plugin/base_plugin.py
+++ b/src/lib/accerciser/plugin/base_plugin.py
@@ -16,7 +16,6 @@ import gi
from gi.repository import Gtk as gtk
from accerciser.tools import Tools
import traceback
-import pango
class Plugin(Tools):
'''
diff --git a/src/lib/accerciser/plugin/message.py b/src/lib/accerciser/plugin/message.py
index 0a92370..c8dd434 100644
--- a/src/lib/accerciser/plugin/message.py
+++ b/src/lib/accerciser/plugin/message.py
@@ -15,8 +15,8 @@ import gi
from gi.repository import Gtk as gtk
from gi.repository import GObject
+from gi.repository import Pango
-import pango
from accerciser.i18n import _
class MessageManager(GObject.GObject):
@@ -282,12 +282,12 @@ class PluginErrorMessage(PluginMessage):
gtk.IconSize.SMALL_TOOLBAR)
hbox.pack_start(image, False, False, 0)
label = gtk.Label()
- label.set_ellipsize(pango.ELLIPSIZE_END)
+ label.set_ellipsize(Pango.EllipsizeMode.END)
label.set_selectable(True)
label.set_markup('<b>%s</b>' % error_message)
hbox.pack_start(label, True, True, 0)
label = gtk.Label(details)
- label.set_ellipsize(pango.ELLIPSIZE_END)
+ label.set_ellipsize(Pango.EllipsizeMode.END)
label.set_selectable(True)
self.vbox.add(label)
self.add_button(gtk.STOCK_CLEAR, gtk.ResponseType.CLOSE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]