summaryrefslogtreecommitdiff
path: root/libmate-panel-applet
diff options
context:
space:
mode:
Diffstat (limited to 'libmate-panel-applet')
-rw-r--r--libmate-panel-applet/mate-panel-applet.c57
-rw-r--r--libmate-panel-applet/mate-panel-applet.h12
2 files changed, 55 insertions, 14 deletions
diff --git a/libmate-panel-applet/mate-panel-applet.c b/libmate-panel-applet/mate-panel-applet.c
index e4a61cf2..c83e5671 100644
--- a/libmate-panel-applet/mate-panel-applet.c
+++ b/libmate-panel-applet/mate-panel-applet.c
@@ -2290,17 +2290,13 @@ _mate_panel_applet_setup_x_error_handler (void)
_x_error_func = XSetErrorHandler (_x_error_handler);
}
-/**
- * mate_panel_applet_factory_main:
- * @factory_id: Factory ID.
- * @out_process: If the factory is on a separate process or not.
- * @applet_type: GType of the applet this factory creates.
- * @callback: (scope call): Callback to be called when a new applet is to be created.
- * @data: (closure): Callback data.
- *
- * Returns: 0 on success, 1 if there is an error.
- */
-int mate_panel_applet_factory_main(const gchar* factory_id, gboolean out_process, GType applet_type, MatePanelAppletFactoryCallback callback, gpointer user_data)
+static int
+_mate_panel_applet_factory_main_internal (const gchar *factory_id,
+ gboolean out_process,
+ GType applet_type,
+ MatePanelAppletFactoryCallback callback,
+ gpointer user_data)
+
{
MatePanelAppletFactory* factory;
GClosure* closure;
@@ -2335,6 +2331,45 @@ int mate_panel_applet_factory_main(const gchar* factory_id, gboolean out_process
}
/**
+ * panel_applet_factory_main:
+ * @factory_id: Factory ID.
+ * @applet_type: GType of the applet this factory creates.
+ * @callback: (scope call): Callback to be called when a new applet is to be created.
+ * @data: (closure): Callback data.
+ *
+ * Returns: 0 on success, 1 if there is an error.
+ */
+int
+mate_panel_applet_factory_main (const gchar *factory_id,
+ GType applet_type,
+ MatePanelAppletFactoryCallback callback,
+ gpointer user_data)
+{
+ return _mate_panel_applet_factory_main_internal (factory_id, TRUE, applet_type,
+ callback, user_data);
+}
+
+/**
+ * panel_applet_factory_setup_in_process: (skip)
+ * @factory_id: Factory ID.
+ * @applet_type: GType of the applet this factory creates.
+ * @callback: (scope call): Callback to be called when a new applet is to be created.
+ * @data: (closure): Callback data.
+ *
+ * Returns: 0 on success, 1 if there is an error.
+ */
+int
+mate_panel_applet_factory_setup_in_process (const gchar *factory_id,
+ GType applet_type,
+ MatePanelAppletFactoryCallback callback,
+ gpointer user_data)
+{
+ return _mate_panel_applet_factory_main_internal (factory_id, FALSE, applet_type,
+ callback, user_data);
+}
+
+
+/**
* mate_panel_applet_set_background_widget:
* @applet: a #PanelApplet.
* @widget: a #GtkWidget.
diff --git a/libmate-panel-applet/mate-panel-applet.h b/libmate-panel-applet/mate-panel-applet.h
index 1d6f15ee..6d747ca4 100644
--- a/libmate-panel-applet/mate-panel-applet.h
+++ b/libmate-panel-applet/mate-panel-applet.h
@@ -112,9 +112,14 @@ void mate_panel_applet_request_focus(MatePanelApplet* applet, guint32 timestamp)
void mate_panel_applet_setup_menu(MatePanelApplet* applet, const gchar* xml, GtkActionGroup* action_group);
void mate_panel_applet_setup_menu_from_file(MatePanelApplet* applet, const gchar* filename, GtkActionGroup* action_group);
-int mate_panel_applet_factory_main(const gchar* factory_id, gboolean out_process, GType applet_type, MatePanelAppletFactoryCallback callback, gpointer data);
+int mate_panel_applet_factory_main(const gchar* factory_id, GType applet_type, MatePanelAppletFactoryCallback callback, gpointer data);
gboolean _mate_panel_applet_shlib_factory(void);
+int panel_applet_factory_setup_in_process (const gchar *factory_id,
+ GType applet_type,
+ MatePanelAppletFactoryCallback callback,
+ gpointer data);
+
/*
* These macros are getting a bit unwieldy.
@@ -168,7 +173,7 @@ int main(int argc, char* argv[]) \
\
gtk_init (&argc, &argv); \
\
- retval = mate_panel_applet_factory_main (id, TRUE, type, callback, data); \
+ retval = mate_panel_applet_factory_main (id, type, callback, data); \
g_option_context_free (context); \
\
return retval; \
@@ -178,7 +183,8 @@ int main(int argc, char* argv[]) \
G_MODULE_EXPORT gint _mate_panel_applet_shlib_factory(void) \
{ \
_MATE_PANEL_APPLET_SETUP_GETTEXT(FALSE); \
- return mate_panel_applet_factory_main(id, FALSE, type, callback, data); \
+return mate_panel_applet_factory_setup_in_process (id, type, \
+ callback, data); \
}
#ifdef __cplusplus