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
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);
......
......@@ -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;
}
......
......@@ -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
......
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