[gnome-applets/wip/muktupavels/help-about: 6/9] charpick: use gp_applet_show_help
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets/wip/muktupavels/help-about: 6/9] charpick: use gp_applet_show_help
- Date: Fri, 3 Apr 2020 01:51:00 +0000 (UTC)
commit c23e31a3f8124477e272fb7a85ba3ae63403d5ab
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Apr 3 04:25:30 2020 +0300
charpick: use gp_applet_show_help
gnome-applets/charpick/charpick-applet.c | 14 +-------------
gnome-applets/charpick/properties.c | 21 ++-------------------
gnome-applets/ga-module.c | 1 +
3 files changed, 4 insertions(+), 32 deletions(-)
---
diff --git a/gnome-applets/charpick/charpick-applet.c b/gnome-applets/charpick/charpick-applet.c
index 6ede2c9e9..e1aad3b87 100644
--- a/gnome-applets/charpick/charpick-applet.c
+++ b/gnome-applets/charpick/charpick-applet.c
@@ -562,19 +562,7 @@ help_cb (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
{
- charpick_data *curr_data = (charpick_data *) user_data;
- GError *error = NULL;
-
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (curr_data)),
- "help:char-palette",
- gtk_get_current_event_time (),
- &error);
-
- if (error) { /* FIXME: the user needs to see this */
- g_warning ("help error: %s\n", error->message);
- g_error_free (error);
- error = NULL;
- }
+ gp_applet_show_help (GP_APPLET (user_data), NULL);
}
void
diff --git a/gnome-applets/charpick/properties.c b/gnome-applets/charpick/properties.c
index a16d02dd8..3cf9babec 100644
--- a/gnome-applets/charpick/properties.c
+++ b/gnome-applets/charpick/properties.c
@@ -470,33 +470,16 @@ static void default_chars_frame_create(charpick_data *curr_data)
return;
}
-static void
-phelp_cb (GtkDialog *dialog, gint tab, gpointer data)
-{
- GError *error = NULL;
-
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)),
- "help:char-palette/charpick-prefs",
- gtk_get_current_event_time (),
- &error);
-
- if (error) { /* FIXME: the user needs to see this */
- g_warning ("help error: %s\n", error->message);
- g_error_free (error);
- error = NULL;
- }
-}
-
static void
response_cb (GtkDialog *dialog, gint id, gpointer data)
{
charpick_data *curr_data = data;
if(id == GTK_RESPONSE_HELP){
- phelp_cb (dialog,id,data);
+ gp_applet_show_help (GP_APPLET (curr_data), "charpick-prefs");
return;
}
-
+
gtk_widget_destroy (curr_data->propwindow);
curr_data->propwindow = NULL;
diff --git a/gnome-applets/ga-module.c b/gnome-applets/ga-module.c
index 9a5c7ae7d..8362086ef 100644
--- a/gnome-applets/ga-module.c
+++ b/gnome-applets/ga-module.c
@@ -97,6 +97,7 @@ ga_get_applet_info (const char *id)
icon_name = "accessories-character-map";
about_func = charpick_applet_setup_about;
+ help_uri = "help:char-palette";
}
else if (g_strcmp0 (id, "command") == 0)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]