Re: [gedit-list] Possible bug with configure dialog in plugins?



One other note, and this may be more of a Peas or Glade thing, but...

Since we now return a widget instead of a dialog, it is a little more difficult to use Glade to build the configure dialog. Peas does not like a widget with a parent and Glade doesn't like a widget without a parent. I have to manually go into the glade interface file and remove the top level window so that Gtk.Builder does not build a parent for the configure widget.

But, it's now working. Thanks!

On Sat, May 7, 2011 at 6:59 AM, Nacho <nacho resa gmail com> wrote:
Hey,

Yeah, now you need to implement PeasGtk.Configurable. See:
http://git.gnome.org/browse/gedit/tree/plugins/pythonconsole/pythonconsole/__init__.py#n34

Regards.

PS: I know we need to update the tutorial for this.

On Sat, May 7, 2011 at 3:49 PM, Micah Carrick <micah greentackle com> wrote:
I was going to submit a bug but I figured I would check here first.

I'm running Gedit 3.0.2 and the configure dialog doesn't seem to work for Python plugins. Neither is_configurable() nor create_configure_dialog() are being called. Here is a test:

from gi.repository import GObject, Gedit

class ConfigurePlugin(GObject.Object, Gedit.WindowActivatable):
    __gtype_name__ = "ConfigurePlugin"
    window = GObject.property(type=Gedit.Window)

    def __init__(self):
        GObject.Object.__init__(self)
    
    def create_configure_dialog(self):
        print "create_configure_dialog"
        return None
        
    def is_configurable(self):
        print "is_configurable"
        return False
        
    def do_activate(self):
        pass

    def do_deactivate(self):
        pass

    def do_update_state(self):
        pass



_______________________________________________
gedit-list mailing list
gedit-list gnome org
http://mail.gnome.org/mailman/listinfo/gedit-list





--
    Green Tackle - Environmentally Friendly Fishing Tackle
    www.GreenTackle.com

     Email: micah greentackle com
     Phone: 971.270.2206
     Toll Free: 877.580.9165
     Fax: 503.946.3106





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]