Commit 887a696e authored by Alberts Muktupāvels's avatar Alberts Muktupāvels

libgnome-panel: add GpInitialSetupDialogFunc

And rename GpSetupAboutDialogFunc to GpAboutDialogFunc.
parent 579c9e7a
Pipeline #30765 failed with stage
in 2 minutes and 43 seconds
...@@ -24,16 +24,18 @@ G_BEGIN_DECLS ...@@ -24,16 +24,18 @@ G_BEGIN_DECLS
struct _GpAppletInfo struct _GpAppletInfo
{ {
GpGetAppletTypeFunc get_applet_type_func; GpGetAppletTypeFunc get_applet_type_func;
gchar *name; gchar *name;
gchar *description; gchar *description;
gchar *icon_name; gchar *icon_name;
gchar *help_uri; GpInitialSetupDialogFunc initial_setup_dialog_func;
GpSetupAboutDialogFunc about_dialog_func;
gchar *backends; gchar *help_uri;
GpAboutDialogFunc about_dialog_func;
gchar *backends;
}; };
void gp_applet_info_free (GpAppletInfo *info); void gp_applet_info_free (GpAppletInfo *info);
......
...@@ -55,6 +55,8 @@ gp_applet_info_new (GpGetAppletTypeFunc func, ...@@ -55,6 +55,8 @@ gp_applet_info_new (GpGetAppletTypeFunc func,
info->description = g_strdup (description); info->description = g_strdup (description);
info->icon_name = g_strdup (icon_name); info->icon_name = g_strdup (icon_name);
info->initial_setup_dialog_func = NULL;
info->help_uri = NULL; info->help_uri = NULL;
info->about_dialog_func = NULL; info->about_dialog_func = NULL;
...@@ -63,6 +65,20 @@ gp_applet_info_new (GpGetAppletTypeFunc func, ...@@ -63,6 +65,20 @@ gp_applet_info_new (GpGetAppletTypeFunc func,
return info; 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: * gp_applet_info_set_help_uri:
* @info: a #GpAppletInfo * @info: a #GpAppletInfo
...@@ -86,8 +102,8 @@ gp_applet_info_set_help_uri (GpAppletInfo *info, ...@@ -86,8 +102,8 @@ gp_applet_info_set_help_uri (GpAppletInfo *info,
* Specifies a function to be used to setup about dialog. * Specifies a function to be used to setup about dialog.
*/ */
void void
gp_applet_info_set_about_dialog (GpAppletInfo *info, gp_applet_info_set_about_dialog (GpAppletInfo *info,
GpSetupAboutDialogFunc func) GpAboutDialogFunc func)
{ {
info->about_dialog_func = func; info->about_dialog_func = func;
} }
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
#ifndef GP_APPLET_INFO_H #ifndef GP_APPLET_INFO_H
#define GP_APPLET_INFO_H #define GP_APPLET_INFO_H
#include "gp-initial-setup-dialog.h"
#include <glib.h> #include <glib.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
...@@ -40,26 +42,37 @@ typedef struct _GpAppletInfo GpAppletInfo; ...@@ -40,26 +42,37 @@ typedef struct _GpAppletInfo GpAppletInfo;
typedef GType (* GpGetAppletTypeFunc) (void); 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 * @dialog: a #GtkAboutDialog
* *
* Function for setting up about dialog. * 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, void gp_applet_info_set_initial_setup_dialog (GpAppletInfo *info,
const gchar *name, GpInitialSetupDialogFunc func);
const gchar *description,
const gchar *icon_name);
void gp_applet_info_set_help_uri (GpAppletInfo *info, void gp_applet_info_set_help_uri (GpAppletInfo *info,
const gchar *help_uri); const gchar *help_uri);
void gp_applet_info_set_about_dialog (GpAppletInfo *info, void gp_applet_info_set_about_dialog (GpAppletInfo *info,
GpSetupAboutDialogFunc func); GpAboutDialogFunc func);
void gp_applet_info_set_backends (GpAppletInfo *info, void gp_applet_info_set_backends (GpAppletInfo *info,
const gchar *backends); const gchar *backends);
G_END_DECLS G_END_DECLS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment