[gnome-applets/wip/muktupavels/help-about] drivemount: use gp_applet_show_about
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets/wip/muktupavels/help-about] drivemount: use gp_applet_show_about
- Date: Fri, 3 Apr 2020 14:23:51 +0000 (UTC)
commit 08b4986e65307b74335fe158d92260796f5e81d0
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Apr 3 15:34:11 2020 +0300
drivemount: use gp_applet_show_about
gnome-applets/drivemount/drivemount-applet.c | 53 ++++++++++++++++++----------
gnome-applets/drivemount/drivemount-applet.h | 2 ++
gnome-applets/ga-module.c | 2 ++
3 files changed, 38 insertions(+), 19 deletions(-)
---
diff --git a/gnome-applets/drivemount/drivemount-applet.c b/gnome-applets/drivemount/drivemount-applet.c
index 0317ca2c7..d0e2d6702 100644
--- a/gnome-applets/drivemount/drivemount-applet.c
+++ b/gnome-applets/drivemount/drivemount-applet.c
@@ -71,25 +71,7 @@ display_about_dialog (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
{
- const gchar *authors[] = {
- "James Henstridge <jamesh canonical com>",
- NULL
- };
- const gchar *documenters[] = {
- "Dan Mueth <muet alumni uchicago edu>",
- "John Fleck <jfleck inkstain net>",
- NULL
- };
-
- gtk_show_about_dialog (NULL,
- "version", VERSION,
- "copyright", "Copyright \xC2\xA9 2004 Canonical Ltd",
- "comments", _("Applet for mounting and unmounting block volumes."),
- "authors", authors,
- "documenters", documenters,
- "translator-credits", _("translator-credits"),
- "logo_icon_name", "media-floppy",
- NULL);
+ gp_applet_show_about (GP_APPLET (user_data));
}
static void
@@ -187,3 +169,36 @@ drivemount_applet_init (DrivemountApplet *self)
{
gp_applet_set_flags (GP_APPLET (self), GP_APPLET_FLAGS_EXPAND_MINOR);
}
+
+void
+drivemount_applet_setup_about (GtkAboutDialog *dialog)
+{
+ const char *comments;
+ const char **authors;
+ const char **documenters;
+ const char *copyright;
+
+ comments = _("Applet for mounting and unmounting block volumes.");
+
+ authors = (const char *[])
+ {
+ "James Henstridge <jamesh canonical com>",
+ NULL
+ };
+
+ documenters = (const char *[])
+ {
+ "Dan Mueth <muet alumni uchicago edu>",
+ "John Fleck <jfleck inkstain net>",
+ NULL
+ };
+
+ copyright = "Copyright \xC2\xA9 2004 Canonical Ltd";
+
+ gtk_about_dialog_set_comments (dialog, comments);
+
+ gtk_about_dialog_set_authors (dialog, authors);
+ gtk_about_dialog_set_documenters (dialog, documenters);
+ gtk_about_dialog_set_translator_credits (dialog, _("translator-credits"));
+ gtk_about_dialog_set_copyright (dialog, copyright);
+}
diff --git a/gnome-applets/drivemount/drivemount-applet.h b/gnome-applets/drivemount/drivemount-applet.h
index 567d9456f..1ecde709d 100644
--- a/gnome-applets/drivemount/drivemount-applet.h
+++ b/gnome-applets/drivemount/drivemount-applet.h
@@ -26,6 +26,8 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (DrivemountApplet, drivemount_applet,
DRIVEMOUNT, APPLET, GpApplet)
+void drivemount_applet_setup_about (GtkAboutDialog *dialog);
+
G_END_DECLS
#endif
diff --git a/gnome-applets/ga-module.c b/gnome-applets/ga-module.c
index 3e9f3e5e1..082adad03 100644
--- a/gnome-applets/ga-module.c
+++ b/gnome-applets/ga-module.c
@@ -126,6 +126,8 @@ ga_get_applet_info (const char *id)
name = _("Disk Mounter");
description = _("Mount local disks and devices");
icon_name = "media-floppy";
+
+ about_func = drivemount_applet_setup_about;
}
else if (g_strcmp0 (id, "geyes") == 0)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]