From b8eda073ab24ed3571d9222ebce244c91590b60e Mon Sep 17 00:00:00 2001 From: Gerald Britton Date: Mon, 13 Apr 2009 20:04:30 +0000 Subject: [PATCH] _PluginDialogs.py: convert to use gtkbuilder instead of libglade svn: r12446 --- src/PluginUtils/_PluginDialogs.py | 21 +- src/glade/plugins.glade | 727 +++++++++++++++--------------- 2 files changed, 364 insertions(+), 384 deletions(-) diff --git a/src/PluginUtils/_PluginDialogs.py b/src/PluginUtils/_PluginDialogs.py index 5708b7974..a55066c43 100644 --- a/src/PluginUtils/_PluginDialogs.py +++ b/src/PluginUtils/_PluginDialogs.py @@ -85,15 +85,16 @@ class PluginDialog(ManagedWindow.ManagedWindow): self.state = state self.uistate = uistate - self.dialog = glade.XML(const.PLUGINS_GLADE, "report", "gramps") - self.dialog.signal_autoconnect({ + self.dialog = gtk.Builder() + self.dialog.add_from_file(const.PLUGINS_GLADE) + self.dialog.connect_signals({ "on_report_apply_clicked" : self.on_apply_clicked, "destroy_passed_object" : self.close, }) - self.tree = self.dialog.get_widget("tree") - window = self.dialog.get_widget("report") - self.title = self.dialog.get_widget("title") + self.tree = self.dialog.get_object("tree") + window = self.dialog.get_object("report") + self.title = self.dialog.get_object("title") self.set_window(window, self.title, msg ) @@ -104,15 +105,15 @@ class PluginDialog(ManagedWindow.ManagedWindow): self.tree.append_column(col) self.tree.set_model(self.store) - self.description = self.dialog.get_widget("description") + self.description = self.dialog.get_object("description") if label: self.description.set_text(label) - self.status = self.dialog.get_widget("report_status") + self.status = self.dialog.get_object("report_status") - self.author_name = self.dialog.get_widget("author_name") - self.author_email = self.dialog.get_widget("author_email") + self.author_name = self.dialog.get_object("author_name") + self.author_email = self.dialog.get_object("author_email") - self.apply_button = self.dialog.get_widget("apply") + self.apply_button = self.dialog.get_object("apply") if button_label: self.apply_button.set_label(button_label) else: diff --git a/src/glade/plugins.glade b/src/glade/plugins.glade index fa7981914..dc2aac5e1 100644 --- a/src/glade/plugins.glade +++ b/src/glade/plugins.glade @@ -1,374 +1,353 @@ - - - - - - - True - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - 600 - 400 - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - 6 - - - - True - True - True - gtk-close - True - GTK_RELIEF_NORMAL - True - - - - - - - True - Perform selected action - True - True - - True - GTK_RELIEF_NORMAL - True - - - - - - 6 - False - True - GTK_PACK_END - - - - - - True - True - 0 - - - - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - 200 - True - True - False - False - False - True - False - False - False - - - - - False - False - - - - - - True - False - 0 - - - - True - False - 0 - - - - True - - False - True - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 10 - 10 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - 20 - False - True - - - - - - True - Select a report from those available on the left. - False - False - GTK_JUSTIFY_LEFT - True - False - 0 - 0 - 10 - 20 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - 3 - 2 - False - 0 - 0 - - - - True - Status: - False - False - GTK_JUSTIFY_CENTER - False - False - 1 - 0.5 - 3 - 3 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 5 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 1 - 2 - 0 - 1 - - - - - - - True - Author: - False - False - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 3 - 3 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - Author's email: - False - False - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 3 - 3 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 2 - 3 - fill - - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 5 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 1 - 2 - 1 - 2 - fill - - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 5 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 1 - 2 - 2 - 3 - fill - - - - - - 0 - False - True - - - - - True - True - - - - - 0 - True - True - - - - - - - + + + + + True + + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + 600 + 400 + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + True + False + + + + True + False + 0 + + + True + GTK_BUTTONBOX_END + 6 + + + True + True + True + gtk-close + True + GTK_RELIEF_NORMAL + True + + + + + + True + Perform selected action + True + True + + True + GTK_RELIEF_NORMAL + True + + + + + + 6 + False + True + GTK_PACK_END + + + + + True + True + 0 + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + 200 + True + True + False + False + False + True + False + False + False + + + + + False + False + + + + + True + False + 0 + + + True + False + 0 + + + True + + False + True + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 10 + 10 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + True + True + + + + + 20 + False + True + + + + + True + Select a report from those available on the left. + False + False + GTK_JUSTIFY_LEFT + True + False + 0 + 0 + 10 + 20 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + True + True + + + + + 3 + 2 + False + 0 + 0 + + + True + Status: + False + False + GTK_JUSTIFY_CENTER + False + False + 1 + 0.5 + 3 + 3 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 5 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 0 + 1 + + + + + + True + Author: + False + False + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 3 + 3 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + True + Author's email: + False + False + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 3 + 3 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 5 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 1 + 2 + fill + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 5 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 2 + 3 + fill + + + + + + 0 + False + True + + + + + True + True + + + + + 0 + True + True + + + + + +