[Xfce4-commits] <terminal:master> Use PACKAGE_NAME instead of g_get_prgname().
Nick Schermer
noreply at xfce.org
Sun Dec 23 22:38:06 CET 2012
Updating branch refs/heads/master
to 9d0ac1ce8e73c9b975a04e82e90158efe8847dd1 (commit)
from c9df087789346e7ac238aaf2429a1d2a65926224 (commit)
commit 9d0ac1ce8e73c9b975a04e82e90158efe8847dd1
Author: Nick Schermer <nick at xfce.org>
Date: Sun Dec 23 21:15:34 2012 +0100
Use PACKAGE_NAME instead of g_get_prgname().
terminal/main.c | 16 ++++++++--------
terminal/terminal-app.c | 3 +--
terminal/terminal-dialogs.c | 2 +-
3 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/terminal/main.c b/terminal/main.c
index a14b081..3494474 100644
--- a/terminal/main.c
+++ b/terminal/main.c
@@ -32,6 +32,8 @@
#include <terminal/terminal-gdbus.h>
+
+
static void
colortable_sub (const gchar *bright,
guint start)
@@ -68,6 +70,8 @@ colortable_sub (const gchar *bright,
}
}
+
+
static void
colortable (void)
{
@@ -91,14 +95,12 @@ colortable (void)
static void
usage (void)
{
- gchar *name = g_get_prgname ();
-
/* set locale for the translations below */
gtk_set_locale ();
g_print ("%s\n"
" %s [%s...]\n\n",
- _("Usage:"), name, _("OPTION"));
+ _("Usage:"), PACKAGE_NAME, _("OPTION"));
g_print ("%s:\n"
" -h, --help; -V, --version; --disable-server; --color-table;\n"
@@ -142,11 +144,9 @@ usage (void)
_("icon"));
g_print (_("See the %s man page for full explanation of the options above."),
- name);
+ PACKAGE_NAME);
g_print ("\n\n");
-
- g_free (name);
}
@@ -268,7 +268,7 @@ main (int argc, char **argv)
msg = error->message;
/* options were not parsed succesfully, don't try that again below */
- g_printerr ("%s: %s\n", g_get_prgname (), msg);
+ g_printerr ("%s: %s\n", PACKAGE_NAME, msg);
g_error_free (error);
g_strfreev (nargv);
return EXIT_FAILURE;
@@ -309,7 +309,7 @@ main (int argc, char **argv)
if (!terminal_app_process (app, nargv, nargc, &error))
{
/* parsing one of the arguments failed */
- g_printerr ("%s: %s\n", g_get_prgname (), error->message);
+ g_printerr ("%s: %s\n", PACKAGE_NAME, error->message);
g_error_free (error);
g_object_unref (G_OBJECT (app));
g_strfreev (nargv);
diff --git a/terminal/terminal-app.c b/terminal/terminal-app.c
index 181163c..6c85945 100644
--- a/terminal/terminal-app.c
+++ b/terminal/terminal-app.c
@@ -90,7 +90,6 @@ struct _TerminalApp
guint accel_map_load_id;
guint accel_map_save_id;
GtkAccelMap *accel_map;
-
};
@@ -201,7 +200,7 @@ terminal_app_update_accels (TerminalApp *app)
gtk_settings_set_string_property (gtk_settings_get_default (),
"gtk-menu-bar-accel", accel,
- g_get_prgname ());
+ PACKAGE_NAME);
}
diff --git a/terminal/terminal-dialogs.c b/terminal/terminal-dialogs.c
index 946501d..bb109e5 100644
--- a/terminal/terminal-dialogs.c
+++ b/terminal/terminal-dialogs.c
@@ -77,7 +77,7 @@ terminal_dialogs_show_about (GtkWindow *parent)
"Copyright \302\251 2007-2012 Nick Schermer",
"license", XFCE_LICENSE_GPL,
"logo-icon-name", "utilities-terminal",
- "program-name", g_get_prgname (),
+ "program-name", PACKAGE_NAME,
"translator-credits", _("translator-credits"),
"version", PACKAGE_VERSION,
"website", "http://goodies.xfce.org/projects/applications/terminal",
More information about the Xfce4-commits
mailing list