[libpeas] [PeasUIConfigurable] Rename create_configure_dialog() to _widget()



commit 23c78c45e58d80c2900b0d331fdbf73f9e1770c7
Author: Steve Frécinaux <code istique net>
Date:   Thu Jul 1 13:40:58 2010 +0200

    [PeasUIConfigurable] Rename create_configure_dialog() to _widget()
    
    We want to return a widget instead of a dialog, so plugin managers can
    do whatever they want with the widget instead of just being able to
    display a configuration dialog.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=621857

 docs/reference/libpeas-sections.txt                |    2 +-
 libpeasui/peas-ui-configurable.c                   |   12 ++++++------
 libpeasui/peas-ui-configurable.h                   |    4 ++--
 libpeasui/peas-ui-plugin-manager.c                 |    4 ++--
 .../helloworld/peasdemo-hello-world-plugin.c       |    4 ++--
 peas-demo/plugins/seedhello/seedhello.js           |    2 +-
 6 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/docs/reference/libpeas-sections.txt b/docs/reference/libpeas-sections.txt
index 125d510..dc9db77 100644
--- a/docs/reference/libpeas-sections.txt
+++ b/docs/reference/libpeas-sections.txt
@@ -4,7 +4,7 @@
 PEAS_UI_CONFIGURABLE_IFACE
 PeasUIConfigurable
 PeasUIConfigurableInterface
-peas_ui_configurable_create_configure_dialog
+peas_ui_configurable_create_configure_widget
 <SUBSECTION Standard>
 PEAS_UI_CONFIGURABLE
 PEAS_UI_IS_CONFIGURABLE
diff --git a/libpeasui/peas-ui-configurable.c b/libpeasui/peas-ui-configurable.c
index 2334719..85a6215 100644
--- a/libpeasui/peas-ui-configurable.c
+++ b/libpeasui/peas-ui-configurable.c
@@ -36,7 +36,7 @@
  * #PeasUIConfigurable interface.
  *
  * To do so, the plugin writer will just need to implement the
- * create_configure_dialog() method.
+ * create_configure_widget() method.
  **/
 
 G_DEFINE_INTERFACE(PeasUIConfigurable, peas_ui_configurable, G_TYPE_OBJECT)
@@ -47,17 +47,17 @@ peas_ui_configurable_default_init (PeasUIConfigurableInterface *iface)
 }
 
 /**
- * peas_ui_configurable_create_configure_dialog:
+ * peas_ui_configurable_create_configure_widget:
  * @configurable: A #PeasUIConfigurable
  *
- * Creates the configure dialog widget for the plugin.
+ * Creates the configure widget widget for the plugin.
  *
  * The default implementation returns %NULL.
  *
  * Returns: A #GtkWindow used for configuration.
  */
 GtkWidget *
-peas_ui_configurable_create_configure_dialog (PeasUIConfigurable  *configurable)
+peas_ui_configurable_create_configure_widget (PeasUIConfigurable  *configurable)
 {
   PeasUIConfigurableInterface *iface;
 
@@ -65,8 +65,8 @@ peas_ui_configurable_create_configure_dialog (PeasUIConfigurable  *configurable)
   
   iface = PEAS_UI_CONFIGURABLE_GET_IFACE (configurable);
 
-  if (G_LIKELY (iface->create_configure_dialog != NULL))
-    return iface->create_configure_dialog (configurable);
+  if (G_LIKELY (iface->create_configure_widget != NULL))
+    return iface->create_configure_widget (configurable);
 
   /* Default implementation */
   return NULL;
diff --git a/libpeasui/peas-ui-configurable.h b/libpeasui/peas-ui-configurable.h
index 0106613..0b54541 100644
--- a/libpeasui/peas-ui-configurable.h
+++ b/libpeasui/peas-ui-configurable.h
@@ -42,11 +42,11 @@ struct _PeasUIConfigurableInterface
 {
   GTypeInterface g_iface;
 
-  GtkWidget  *(*create_configure_dialog)  (PeasUIConfigurable  *configurable);
+  GtkWidget  *(*create_configure_widget)  (PeasUIConfigurable  *configurable);
 };
 
 GType       peas_ui_configurable_get_type                (void);
-GtkWidget  *peas_ui_configurable_create_configure_dialog (PeasUIConfigurable  *configurable);
+GtkWidget  *peas_ui_configurable_create_configure_widget (PeasUIConfigurable  *configurable);
 
 G_END_DECLS
 
diff --git a/libpeasui/peas-ui-plugin-manager.c b/libpeasui/peas-ui-plugin-manager.c
index 50a9c6a..6ec929c 100644
--- a/libpeasui/peas-ui-plugin-manager.c
+++ b/libpeasui/peas-ui-plugin-manager.c
@@ -209,9 +209,9 @@ configure_button_cb (GtkWidget           *button,
   exten = peas_engine_get_extension (pm->priv->engine, info, PEAS_UI_TYPE_CONFIGURABLE); 
   g_return_if_fail (exten != NULL);
 
-  g_debug ("Calling create_configure_dialog on %p", exten);
+  g_debug ("Calling create_configure_widget on %p", exten);
 
-  peas_extension_call (exten, "create_configure_dialog", &conf_dlg);
+  peas_extension_call (exten, "create_configure_widget", &conf_dlg);
   g_object_unref (exten);
   g_return_if_fail (conf_dlg != NULL);
 
diff --git a/peas-demo/plugins/helloworld/peasdemo-hello-world-plugin.c b/peas-demo/plugins/helloworld/peasdemo-hello-world-plugin.c
index c3d9076..73c1d97 100644
--- a/peas-demo/plugins/helloworld/peasdemo-hello-world-plugin.c
+++ b/peas-demo/plugins/helloworld/peasdemo-hello-world-plugin.c
@@ -114,7 +114,7 @@ on_configure_dialog_response (GtkDialog *dialog,
 }
 
 static GtkWidget *
-peasdemo_hello_world_plugin_create_configure_dialog (PeasUIConfigurable  *configurable)
+peasdemo_hello_world_plugin_create_configure_widget (PeasUIConfigurable  *configurable)
 {
   GtkWidget *dialog;
 
@@ -149,7 +149,7 @@ peas_activatable_iface_init (PeasActivatableInterface *iface)
 static void
 peas_ui_configurable_iface_init (PeasUIConfigurableInterface *iface)
 {
-  iface->create_configure_dialog = peasdemo_hello_world_plugin_create_configure_dialog;
+  iface->create_configure_widget = peasdemo_hello_world_plugin_create_configure_widget;
 }
 
 static void
diff --git a/peas-demo/plugins/seedhello/seedhello.js b/peas-demo/plugins/seedhello/seedhello.js
index 8484fdd..95d3705 100644
--- a/peas-demo/plugins/seedhello/seedhello.js
+++ b/peas-demo/plugins/seedhello/seedhello.js
@@ -22,7 +22,7 @@ activatable_extension = {
 };
 
 configurable_extension = {
-  create_configure_dialog: function () {
+  create_configure_widget: function () {
     var dialog = new Gtk.Dialog({ title: "Seedhello Config Dialog" });
     var label = new Gtk.Label({ label: "Example of configuration dialog for a Seed plugin" });
 



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