[gedit] Define the plugin manager in the ui file



commit 0f8bca7bc71693ce77511bb17f42eab157f78585
Author: Paolo Borelli <pborelli gnome org>
Date:   Fri Mar 21 19:25:14 2014 +0100

    Define the plugin manager in the ui file

 gedit/gedit-preferences-dialog.c  |   21 ++++-----------------
 gedit/gedit-preferences-dialog.ui |    8 ++++----
 2 files changed, 8 insertions(+), 21 deletions(-)
---
diff --git a/gedit/gedit-preferences-dialog.c b/gedit/gedit-preferences-dialog.c
index 3c54af0..2cd97b7 100644
--- a/gedit/gedit-preferences-dialog.c
+++ b/gedit/gedit-preferences-dialog.c
@@ -29,7 +29,6 @@
 
 #include <glib/gi18n.h>
 #include <glib/gstdio.h>
-#include <libpeas-gtk/peas-gtk-plugin-manager.h>
 #include <gtksourceview/gtksource.h>
 
 #include "gedit-preferences-dialog.h"
@@ -112,8 +111,8 @@ struct _GeditPreferencesDialogPrivate
        GtkWidget       *highlight_current_line_checkbutton;
        GtkWidget       *bracket_matching_checkbutton;
 
-       /* Plugins manager */
-       GtkWidget       *plugin_manager_place_holder;
+       /* Plugin manager */
+       GtkWidget       *plugin_manager;
 };
 
 G_DEFINE_TYPE_WITH_PRIVATE (GeditPreferencesDialog, gedit_preferences_dialog, GTK_TYPE_WINDOW)
@@ -167,7 +166,7 @@ gedit_preferences_dialog_class_init (GeditPreferencesDialogClass *klass)
        gtk_widget_class_bind_template_child_private (widget_class, GeditPreferencesDialog, 
install_scheme_button);
        gtk_widget_class_bind_template_child_private (widget_class, GeditPreferencesDialog, 
uninstall_scheme_button);
        gtk_widget_class_bind_template_child_private (widget_class, GeditPreferencesDialog, schemes_toolbar);
-       gtk_widget_class_bind_template_child_private (widget_class, GeditPreferencesDialog, 
plugin_manager_place_holder);
+       gtk_widget_class_bind_template_child_private (widget_class, GeditPreferencesDialog, plugin_manager);
 }
 
 static void
@@ -1047,19 +1046,7 @@ setup_font_colors_page (GeditPreferencesDialog *dlg)
 static void
 setup_plugins_page (GeditPreferencesDialog *dlg)
 {
-       GtkWidget *page_content;
-
-       gedit_debug (DEBUG_PREFS);
-
-       page_content = peas_gtk_plugin_manager_new (NULL);
-       gtk_widget_set_vexpand (GTK_WIDGET (page_content), TRUE);
-       gtk_widget_set_hexpand (GTK_WIDGET (page_content), TRUE);
-       g_return_if_fail (page_content != NULL);
-
-       gtk_container_add (GTK_CONTAINER (dlg->priv->plugin_manager_place_holder),
-                          page_content);
-
-       gtk_widget_show_all (page_content);
+       gtk_widget_show_all (dlg->priv->plugin_manager);
 }
 
 static void
diff --git a/gedit/gedit-preferences-dialog.ui b/gedit/gedit-preferences-dialog.ui
index 66e6ada..362e834 100644
--- a/gedit/gedit-preferences-dialog.ui
+++ b/gedit/gedit-preferences-dialog.ui
@@ -861,13 +861,13 @@
           </packing>
         </child>
         <child>
-          <object class="GtkGrid" id="plugin_manager_place_holder">
+          <object class="PeasGtkPluginManager" id="plugin_manager">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
             <property name="border_width">12</property>
-            <child>
-              <placeholder/>
-            </child>
+            <property name="orientation">vertical</property>
           </object>
           <packing>
             <property name="tab_expand">True</property>


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