#3002: Convert Deluge Plugins to GtkBuilder
-----------------------------+---------------------------
Reporter: Cas | Owner:
Type: feature-request | Status: new
Priority: trivial | Milestone: 2.0
Component: Plugin | Version: develop (git)
Keywords: |
-----------------------------+---------------------------
The plugins needs converting from libglade to Gtk Builder. It is a fairly
simply process with the following steps:
== Glade file conversion ==
1. Open `<filename>.glade` file in Glade 3.8.1 UI designer.
1. Choose `Edit | Preferences`
1. Change `Libglade` to `GtkBuilder` and `2.24` toolkit.
1. Then `File | Save As...` and change filename extension to `.ui`. (e.g.
`<filename>.ui`)
== !PyGtk code conversion ==
* Remove any `gtk.glade` imports
* Replace `glade.XML` with `Builder` instance and `add_from_file` method,
for example:
{{{#!diff
- self.glade = gtk.glade.XML(get_resource('<filename>.glade'))
+ self.builder = gtk.Builder()
+ self.builder.add_from_file(get_resource('<filename>.ui'))
}}}
* Ensure `.glade` files are renamed to `.ui` equivalents.
* Replace `glade.get_widget` with `builder.get_object`
* Replace `glade.signal_autoconnect` with `builder.connect_signals`
* If the naming of handler methods match the signals it is possible to
use `builder.connect_signals(self)` instead of specifying the mapping.
Also see: https://developer.gnome.org/gtk2/stable/gtk-migrating-
GtkBuilder.html
--
Ticket URL: <http://dev.deluge-torrent.org/ticket/3002>
Deluge <http://deluge-torrent.org/>
Deluge Project
--
You received this message because you are subscribed to the Google Groups
"Deluge Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/deluge-dev.
For more options, visit https://groups.google.com/d/optout.