[libpeas] [PeasUIConfigurable] Get rid of is_configurable()



commit 34d4cf7f4449fbd9271021b8ede3fa7e80fbe1e5
Author: Steve Frécinaux <code istique net>
Date:   Wed Jun 30 23:32:48 2010 +0200

    [PeasUIConfigurable] Get rid of is_configurable()

 docs/reference/libpeas-sections.txt |    1 -
 libpeasui/peas-ui-configurable.c    |   35 ++---------------------------------
 libpeasui/peas-ui-configurable.h    |    5 -----
 3 files changed, 2 insertions(+), 39 deletions(-)
---
diff --git a/docs/reference/libpeas-sections.txt b/docs/reference/libpeas-sections.txt
index e3ddc64..125d510 100644
--- a/docs/reference/libpeas-sections.txt
+++ b/docs/reference/libpeas-sections.txt
@@ -4,7 +4,6 @@
 PEAS_UI_CONFIGURABLE_IFACE
 PeasUIConfigurable
 PeasUIConfigurableInterface
-peas_ui_configurable_is_configurable
 peas_ui_configurable_create_configure_dialog
 <SUBSECTION Standard>
 PEAS_UI_CONFIGURABLE
diff --git a/libpeasui/peas-ui-configurable.c b/libpeasui/peas-ui-configurable.c
index 6b5b662..2334719 100644
--- a/libpeasui/peas-ui-configurable.c
+++ b/libpeasui/peas-ui-configurable.c
@@ -33,13 +33,10 @@
  * graphical interface for the user to configure the plugin through the
  * #PeasUIPluginManager: the #PeasUIPluginManager will make the â??Configure
  * Pluginâ?? button active when the selected plugin implements the
- * #PeasUIConfigurable interface and peas_ui_configurable_is_configurable()
- * returns %TRUE. See peas_ui_configurable_is_configurable().
+ * #PeasUIConfigurable interface.
  *
  * To do so, the plugin writer will just need to implement the
- * create_configure_dialog() method. You should not implement the
- * is_configurable() method, unless create_configure_dialog() is overwritten
- * but does not always return a valid #GtkWindow.
+ * create_configure_dialog() method.
  **/
 
 G_DEFINE_INTERFACE(PeasUIConfigurable, peas_ui_configurable, G_TYPE_OBJECT)
@@ -50,34 +47,6 @@ peas_ui_configurable_default_init (PeasUIConfigurableInterface *iface)
 }
 
 /**
- * peas_ui_configurable_is_configurable:
- * @configurable: A #PeasUIConfigurable
- *
- * Returns whether the plugin is configurable.
- *
- * The default implementation of the is_configurable() method will return %TRUE
- * if the create_configure_dialog() method was overriden, hence you won't
- * usually need to override this method.
- *
- * Returns: %TRUE if the plugin is configurable.
- */
-gboolean
-peas_ui_configurable_is_configurable (PeasUIConfigurable *configurable)
-{
-  PeasUIConfigurableInterface *iface;
-
-  g_return_val_if_fail (PEAS_UI_IS_CONFIGURABLE (configurable), FALSE);
-
-  iface = PEAS_UI_CONFIGURABLE_GET_IFACE (configurable);
- 
-  if (iface->is_configurable != NULL)
-    return iface->is_configurable (configurable);
-  
-  /* Default implementation */
-  return iface->create_configure_dialog != NULL;
-}
-
-/**
  * peas_ui_configurable_create_configure_dialog:
  * @configurable: A #PeasUIConfigurable
  *
diff --git a/libpeasui/peas-ui-configurable.h b/libpeasui/peas-ui-configurable.h
index f40d920..0106613 100644
--- a/libpeasui/peas-ui-configurable.h
+++ b/libpeasui/peas-ui-configurable.h
@@ -43,14 +43,9 @@ struct _PeasUIConfigurableInterface
   GTypeInterface g_iface;
 
   GtkWidget  *(*create_configure_dialog)  (PeasUIConfigurable  *configurable);
-
-  /* Plugins should usually not override this, it's handled automatically
-   * by the PeasPluginClass */
-  gboolean    (*is_configurable)          (PeasUIConfigurable  *configurable);
 };
 
 GType       peas_ui_configurable_get_type                (void);
-gboolean    peas_ui_configurable_is_configurable         (PeasUIConfigurable  *configurable);
 GtkWidget  *peas_ui_configurable_create_configure_dialog (PeasUIConfigurable  *configurable);
 
 G_END_DECLS



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