Skip to content
Browse files

pulling in stuff from some other spot on github

  • Loading branch information...
1 parent a8c4db7 commit fba2d0a2335d613d0b19f4d86a1ef9348e7a1039 @aeischeid committed Oct 19, 2011
Showing with 5 additions and 10 deletions.
  1. +3 −6 zencoding/plugin.py
  2. +2 −4 zencoding/zen_dialog.py
View
9 zencoding/plugin.py
@@ -4,11 +4,8 @@
#
# Author Franck Marcia (franck.marcia@gmail.com)
#
-
-import gedit, os
-
-from gi.repository import GObject
-from gi.repository import Gtk
+from gi.repository import Gedit, GObject, Gtk
+import os
from zen_editor import ZenEditor
zencoding_ui_str = """
@@ -38,7 +35,7 @@
</ui>
"""
-class ZenCodingPlugin(gedit.Plugin):
+class ZenCodingPlugin(Gedit.Plugin):
"""A Gedit plugin to implement Zen Coding's HTML and CSS shorthand expander."""
def activate(self, window):
View
6 zencoding/zen_dialog.py
@@ -2,8 +2,6 @@
@author Franck Marcia (franck.marcia@gmail.com)
'''
-import gi
-gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
class ZenDialog():
@@ -16,7 +14,7 @@ def __init__(self, editor, x, y, callback, text=""):
self.abbreviation = text
self.callback = callback
- self.window = Gtk.Window(Gtk.WindowType.TOPLEVEL)
+ self.window = Gtk.Window(type=Gtk.WindowType.TOPLEVEL)
self.window.set_decorated(False)
self.window.connect("destroy", self.quit)
self.window.connect("focus-out-event", self.focus_lost)
@@ -82,7 +80,7 @@ def main(editor, window, callback, text=""):
insert = editor.buffer.get_iter_at_offset(offset_start)
location = editor.view.get_iter_location(insert)
window = editor.view.get_window(Gtk.TextWindowType.TEXT)
- xo, yo = window.get_origin()
+ thing, xo, yo = window.get_origin()
xb, yb = editor.view.buffer_to_window_coords(Gtk.TextWindowType.TEXT, location.x + location.width, location.y)
# Open dialog at coordinates with eventual text.

0 comments on commit fba2d0a

Please sign in to comment.
Something went wrong with that request. Please try again.