[gnome-applets/wip/muktupavels/help-about] mini-commander: 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] mini-commander: use gp_applet_show_about
- Date: Fri, 3 Apr 2020 14:24:26 +0000 (UTC)
commit 987376402efe2640b24f464c16e61023b0185ac4
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Apr 3 16:04:33 2020 +0300
mini-commander: use gp_applet_show_about
gnome-applets/ga-module.c | 2 +
gnome-applets/mini-commander/Makefile.am | 2 -
gnome-applets/mini-commander/about.c | 55 ----------------------
gnome-applets/mini-commander/about.h | 24 ----------
.../mini-commander/mini-commander-applet.c | 46 +++++++++++++++++-
.../mini-commander/mini-commander-applet.h | 2 +
po/POTFILES.in | 1 -
7 files changed, 49 insertions(+), 83 deletions(-)
---
diff --git a/gnome-applets/ga-module.c b/gnome-applets/ga-module.c
index 6ed326cd7..439ebb126 100644
--- a/gnome-applets/ga-module.c
+++ b/gnome-applets/ga-module.c
@@ -165,6 +165,8 @@ ga_get_applet_info (const char *id)
name = _("Command Line");
description = _("Mini-Commander");
icon_name = "gnome-mini-commander";
+
+ about_func = mini_commander_applet_setup_about;
}
else if (g_strcmp0 (id, "multiload") == 0)
{
diff --git a/gnome-applets/mini-commander/Makefile.am b/gnome-applets/mini-commander/Makefile.am
index 02ae02c83..e9775b005 100644
--- a/gnome-applets/mini-commander/Makefile.am
+++ b/gnome-applets/mini-commander/Makefile.am
@@ -14,8 +14,6 @@ libmini_commander_applet_la_CFLAGS = \
$(NULL)
libmini_commander_applet_la_SOURCES = \
- about.c \
- about.h \
cmd-completion.c \
cmd-completion.h\
command-line.c \
diff --git a/gnome-applets/mini-commander/mini-commander-applet.c
b/gnome-applets/mini-commander/mini-commander-applet.c
index 84a09d2b4..571b78f06 100644
--- a/gnome-applets/mini-commander/mini-commander-applet.c
+++ b/gnome-applets/mini-commander/mini-commander-applet.c
@@ -32,7 +32,6 @@
#include "mini-commander-applet-private.h"
#include "preferences.h"
#include "command-line.h"
-#include "about.h"
#include "help.h"
#include "gsettings.h"
@@ -49,6 +48,14 @@ G_DEFINE_TYPE (MiniCommanderApplet, mini_commander_applet, GP_TYPE_APPLET)
static gboolean icons_initialized = FALSE;
static GtkIconSize button_icon_size = 0;
+static void
+about_box (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ gp_applet_show_about (GP_APPLET (user_data));
+}
+
static const GActionEntry mini_commander_menu_actions [] = {
{ "preferences", mc_show_preferences, NULL, NULL, NULL },
{ "help", show_help, NULL, NULL, NULL },
@@ -419,3 +426,40 @@ static void
mini_commander_applet_init (MiniCommanderApplet *self)
{
}
+
+void
+mini_commander_applet_setup_about (GtkAboutDialog *dialog)
+{
+ const char *comments;
+ const char **authors;
+ const char **documenters;
+ const char *copyright;
+
+ comments = _("This GNOME applet adds a command line to "
+ "the panel. It features command completion, "
+ "command history, and changeable macros.");
+
+ authors = (const char *[])
+ {
+ "Oliver Maruhn <oliver maruhn com>",
+ "Mark McLoughlin <mark skynet ie>",
+ NULL
+ };
+
+ documenters = (const char *[])
+ {
+ "Dan Mueth <d-mueth uchicago edu>",
+ "Oliver Maruhn <oliver maruhn com>",
+ "Sun GNOME Documentation Team <gdocteam sun com>",
+ NULL
+ };
+
+ copyright = "\xc2\xa9 1998-2005 Oliver Maruhn and others";
+
+ 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/mini-commander/mini-commander-applet.h
b/gnome-applets/mini-commander/mini-commander-applet.h
index d17ee6681..6b4b40168 100644
--- a/gnome-applets/mini-commander/mini-commander-applet.h
+++ b/gnome-applets/mini-commander/mini-commander-applet.h
@@ -26,6 +26,8 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (MiniCommanderApplet, mini_commander_applet,
MINI_COMMANDER, APPLET, GpApplet)
+void mini_commander_applet_setup_about (GtkAboutDialog *dialog);
+
G_END_DECLS
#endif
diff --git a/po/POTFILES.in b/po/POTFILES.in
index f98963a15..ebe5af098 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -46,7 +46,6 @@ gnome-applets/gweather/gweather-dialog.c
gnome-applets/gweather/gweather-pref.c
gnome-applets/inhibit/inhibit-applet-menu.ui
gnome-applets/inhibit/inhibit-applet.c
-gnome-applets/mini-commander/about.c
gnome-applets/mini-commander/command-line.c
gnome-applets/mini-commander/help.c
gnome-applets/mini-commander/mini-commander-applet.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]