[gnome-panel] libgnome-panel: add GpInitialSetupDialogFunc
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] libgnome-panel: add GpInitialSetupDialogFunc
- Date: Sat, 15 Sep 2018 13:51:19 +0000 (UTC)
commit 887a696e2fb611d3d8394fc868120bdbc2e19e8f
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Sep 14 14:40:32 2018 +0300
libgnome-panel: add GpInitialSetupDialogFunc
And rename GpSetupAboutDialogFunc to GpAboutDialogFunc.
libgnome-panel/gp-applet-info-private.h | 16 +++++++-------
libgnome-panel/gp-applet-info.c | 20 ++++++++++++++++--
libgnome-panel/gp-applet-info.h | 37 ++++++++++++++++++++++-----------
3 files changed, 52 insertions(+), 21 deletions(-)
---
diff --git a/libgnome-panel/gp-applet-info-private.h b/libgnome-panel/gp-applet-info-private.h
index 3ccce0b87..4a1f111d0 100644
--- a/libgnome-panel/gp-applet-info-private.h
+++ b/libgnome-panel/gp-applet-info-private.h
@@ -24,16 +24,18 @@ G_BEGIN_DECLS
struct _GpAppletInfo
{
- GpGetAppletTypeFunc get_applet_type_func;
+ GpGetAppletTypeFunc get_applet_type_func;
- gchar *name;
- gchar *description;
- gchar *icon_name;
+ gchar *name;
+ gchar *description;
+ gchar *icon_name;
- gchar *help_uri;
- GpSetupAboutDialogFunc about_dialog_func;
+ GpInitialSetupDialogFunc initial_setup_dialog_func;
- gchar *backends;
+ gchar *help_uri;
+ GpAboutDialogFunc about_dialog_func;
+
+ gchar *backends;
};
void gp_applet_info_free (GpAppletInfo *info);
diff --git a/libgnome-panel/gp-applet-info.c b/libgnome-panel/gp-applet-info.c
index 1fab7cf85..7044fdb45 100644
--- a/libgnome-panel/gp-applet-info.c
+++ b/libgnome-panel/gp-applet-info.c
@@ -55,6 +55,8 @@ gp_applet_info_new (GpGetAppletTypeFunc func,
info->description = g_strdup (description);
info->icon_name = g_strdup (icon_name);
+ info->initial_setup_dialog_func = NULL;
+
info->help_uri = NULL;
info->about_dialog_func = NULL;
@@ -63,6 +65,20 @@ gp_applet_info_new (GpGetAppletTypeFunc func,
return info;
}
+/**
+ * gp_applet_info_set_initial_setup_dialog:
+ * @info: a #GpAppletInfo
+ * @func: the function to call to setup initial setup dialog
+ *
+ * Specifies a function to be used to setup initial setup dialog.
+ */
+void
+gp_applet_info_set_initial_setup_dialog (GpAppletInfo *info,
+ GpInitialSetupDialogFunc func)
+{
+ info->initial_setup_dialog_func = func;
+}
+
/**
* gp_applet_info_set_help_uri:
* @info: a #GpAppletInfo
@@ -86,8 +102,8 @@ gp_applet_info_set_help_uri (GpAppletInfo *info,
* Specifies a function to be used to setup about dialog.
*/
void
-gp_applet_info_set_about_dialog (GpAppletInfo *info,
- GpSetupAboutDialogFunc func)
+gp_applet_info_set_about_dialog (GpAppletInfo *info,
+ GpAboutDialogFunc func)
{
info->about_dialog_func = func;
}
diff --git a/libgnome-panel/gp-applet-info.h b/libgnome-panel/gp-applet-info.h
index 3ae9aee54..de192f82a 100644
--- a/libgnome-panel/gp-applet-info.h
+++ b/libgnome-panel/gp-applet-info.h
@@ -18,6 +18,8 @@
#ifndef GP_APPLET_INFO_H
#define GP_APPLET_INFO_H
+#include "gp-initial-setup-dialog.h"
+
#include <glib.h>
#include <gtk/gtk.h>
@@ -40,26 +42,37 @@ typedef struct _GpAppletInfo GpAppletInfo;
typedef GType (* GpGetAppletTypeFunc) (void);
/**
- * GpSetupAboutDialogFunc:
+ * GpInitialSetupDialogFunc:
+ * @dialog: a #GtkAboutDialog
+ *
+ * Function for setting up initial setup dialog.
+ */
+typedef void (* GpInitialSetupDialogFunc) (GpInitialSetupDialog *dialog);
+
+/**
+ * GpAboutDialogFunc:
* @dialog: a #GtkAboutDialog
*
* Function for setting up about dialog.
*/
-typedef void (* GpSetupAboutDialogFunc) (GtkAboutDialog *dialog);
+typedef void (* GpAboutDialogFunc) (GtkAboutDialog *dialog);
+
+GpAppletInfo *gp_applet_info_new (GpGetAppletTypeFunc func,
+ const gchar *name,
+ const gchar *description,
+ const gchar *icon_name);
-GpAppletInfo *gp_applet_info_new (GpGetAppletTypeFunc func,
- const gchar *name,
- const gchar *description,
- const gchar *icon_name);
+void gp_applet_info_set_initial_setup_dialog (GpAppletInfo *info,
+ GpInitialSetupDialogFunc func);
-void gp_applet_info_set_help_uri (GpAppletInfo *info,
- const gchar *help_uri);
+void gp_applet_info_set_help_uri (GpAppletInfo *info,
+ const gchar *help_uri);
-void gp_applet_info_set_about_dialog (GpAppletInfo *info,
- GpSetupAboutDialogFunc func);
+void gp_applet_info_set_about_dialog (GpAppletInfo *info,
+ GpAboutDialogFunc func);
-void gp_applet_info_set_backends (GpAppletInfo *info,
- const gchar *backends);
+void gp_applet_info_set_backends (GpAppletInfo *info,
+ const gchar *backends);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]