mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-16 18:25:11 -06:00
Improve about dialog layout and contents
The main changes are - group version and build information together - increase size of application icon and name - A more complete copyright notice (including 'Copyright' and 'GnuCash') The default gtk provided about dialog widget won't allow for much more customization than that... Note the build info has been condensed and is now based on 'git describe' which returns a very concise, yet complete description of a commit starting from the last tag that precedes it. This info will also be used anywhere else the build info was displayed from now on, simplifying translations as well.
This commit is contained in:
parent
4be826055a
commit
998f1185c1
@ -4461,44 +4461,34 @@ gnc_main_window_cmd_help_about (GtkAction *action, GncMainWindow *window)
|
||||
|
||||
if (priv->about_dialog == NULL)
|
||||
{
|
||||
const gchar *fixed_message = _("The GnuCash personal finance manager. "
|
||||
"The GNU way to manage your money!");
|
||||
gchar *copyright = g_strdup_printf(_("© 1997-%s Contributors"),
|
||||
/* Translators: %s will be replaced with the current year */
|
||||
gchar *copyright = g_strdup_printf(_("Copyright © 1997-%s The GnuCash contributors."),
|
||||
GNC_VCS_REV_YEAR);
|
||||
gchar **authors = get_file_strsplit("AUTHORS");
|
||||
gchar **documenters = get_file_strsplit("DOCUMENTERS");
|
||||
gchar *license = get_file("LICENSE");
|
||||
gchar *message;
|
||||
gchar *version = NULL;
|
||||
gchar *vcs = NULL;
|
||||
GtkIconTheme *icon_theme = gtk_icon_theme_get_default ();
|
||||
GdkPixbuf *logo = gtk_icon_theme_load_icon (icon_theme,
|
||||
GNC_ICON_APP,
|
||||
48,
|
||||
128,
|
||||
GTK_ICON_LOOKUP_USE_BUILTIN,
|
||||
NULL);
|
||||
|
||||
|
||||
#ifdef GNC_VCS
|
||||
/* Development version */
|
||||
/* Translators: 1st %s is a fixed message, which is translated independently;
|
||||
2nd %s is the scm type (svn/svk/git/bzr);
|
||||
3rd %s is the scm revision number;
|
||||
4th %s is the build date */
|
||||
message = g_strdup_printf(_("%s\nThis copy was built from %s rev %s (commit date %s)."),
|
||||
fixed_message, GNC_VCS, GNC_VCS_REV,
|
||||
GNC_VCS_REV_DATE);
|
||||
vcs = GNC_VCS " ";
|
||||
#else
|
||||
/* Translators: 1st %s is a fixed message, which is translated independently;
|
||||
2nd %s is the scm (svn/svk/git/bzr) revision number;
|
||||
3rd %s is the build date */
|
||||
message = g_strdup_printf(_("%s\nThis copy was built from rev %s (commit date %s)."),
|
||||
fixed_message, GNC_VCS_REV,
|
||||
GNC_VCS_REV_DATE);
|
||||
vcs = "";
|
||||
#endif
|
||||
version = g_strdup_printf ("%s: %s\n%s: %s%s (%s)", _("Version"), VERSION,
|
||||
_("Build ID"), vcs, GNC_VCS_REV, GNC_VCS_REV_DATE);
|
||||
priv->about_dialog = gtk_about_dialog_new ();
|
||||
g_object_set (priv->about_dialog,
|
||||
"authors", authors,
|
||||
"documenters", documenters,
|
||||
"comments", message,
|
||||
"comments", _("Accounting for personal and small business finance."),
|
||||
"copyright", copyright,
|
||||
"license", license,
|
||||
"logo", logo,
|
||||
@ -4508,11 +4498,12 @@ gnc_main_window_cmd_help_about (GtkAction *action, GncMainWindow *window)
|
||||
* The string can have multiple rows, so you can also add a list of
|
||||
* contributors. */
|
||||
"translator-credits", _("translator_credits"),
|
||||
"version", VERSION,
|
||||
"version", version,
|
||||
"website", "http://www.gnucash.org",
|
||||
"website_label", _("Visit the GnuCash website."),
|
||||
NULL);
|
||||
|
||||
g_free(message);
|
||||
g_free(version);
|
||||
g_free(copyright);
|
||||
if (license) g_free(license);
|
||||
if (documenters) g_strfreev(documenters);
|
||||
|
@ -60,7 +60,7 @@ gnc_show_splash_screen (void)
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *version;
|
||||
GtkWidget *separator;
|
||||
gchar *ver_string, *markup;
|
||||
gchar *ver_string, *markup, *vcs;
|
||||
|
||||
if (splash) return;
|
||||
if (!gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL, GNC_PREF_SHOW_SPLASH)) return;
|
||||
@ -94,22 +94,13 @@ gnc_show_splash_screen (void)
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
|
||||
gtk_box_set_homogeneous (GTK_BOX (hbox), FALSE);
|
||||
#ifdef GNC_VCS
|
||||
/* Development version */
|
||||
/* Translators: 1st %s is the GnuCash version (eg 2.4.11);
|
||||
2nd %s is the scm type (svn/svk/git/bzr);
|
||||
3rd %s is the scm revision number;
|
||||
4th %s is the build date */
|
||||
ver_string = g_strdup_printf(_("Version: GnuCash-%s %s (rev %s, commit date %s)"),
|
||||
VERSION, GNC_VCS, GNC_VCS_REV,
|
||||
GNC_VCS_REV_DATE);
|
||||
vcs = GNC_VCS " ";
|
||||
#else
|
||||
/* Dist Tarball */
|
||||
/* Translators: 1st %s is the GnuCash version (eg 2.4.11);
|
||||
2nd %s is the scm (svn/svk/git/bzr) revision number;
|
||||
3rd %s is the build date */
|
||||
ver_string = g_strdup_printf(_("Version: GnuCash-%s (rev %s, commit date %s)"),
|
||||
VERSION, GNC_VCS_REV, GNC_VCS_REV_DATE);
|
||||
vcs = "";
|
||||
#endif
|
||||
ver_string = g_strdup_printf("%s: %s, %s: %s%s (%s)", _("Version"),
|
||||
VERSION, _("Build ID"), vcs, GNC_VCS_REV,
|
||||
GNC_VCS_REV_DATE);
|
||||
|
||||
version = gtk_label_new(NULL);
|
||||
markup = g_markup_printf_escaped(MARKUP_STRING, ver_string);
|
||||
|
@ -64,3 +64,8 @@ cursor button {
|
||||
background-color: mix (@register_cursor_bg_color, grey, 0.2);
|
||||
}
|
||||
|
||||
/* Some tweaks for the about dialog */
|
||||
dialog#GnuCash > box > box > label
|
||||
{
|
||||
font-size: 24px;
|
||||
}
|
||||
|
@ -425,9 +425,8 @@ load_user_config(void)
|
||||
static void
|
||||
gnc_parse_command_line(int *argc, char ***argv)
|
||||
{
|
||||
|
||||
GError *error = NULL;
|
||||
GOptionContext *context = g_option_context_new (_("- GnuCash personal and small business finance management"));
|
||||
GOptionContext *context = g_option_context_new (_("- GnuCash, accounting for personal and small business finance"));
|
||||
|
||||
g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
|
||||
g_option_context_add_group (context, gtk_get_option_group(FALSE));
|
||||
@ -439,35 +438,22 @@ gnc_parse_command_line(int *argc, char ***argv)
|
||||
exit (1);
|
||||
}
|
||||
g_option_context_free (context);
|
||||
|
||||
if (gnucash_show_version)
|
||||
{
|
||||
gchar *fixed_message;
|
||||
gchar *vcs;
|
||||
|
||||
if (is_development_version)
|
||||
{
|
||||
fixed_message = g_strdup_printf(_("GnuCash %s development version"), VERSION);
|
||||
|
||||
/* Translators: 1st %s is a fixed message, which is translated independently;
|
||||
2nd %s is the scm type (svn/svk/git/bzr);
|
||||
3rd %s is the scm revision number;
|
||||
4th %s is the build date */
|
||||
g_print ( _("%s\nThis copy was built from %s rev %s (commit date %s)."),
|
||||
fixed_message, GNC_VCS, GNC_VCS_REV,
|
||||
GNC_VCS_REV_DATE );
|
||||
}
|
||||
g_print (_("GnuCash %s development version"), VERSION);
|
||||
else
|
||||
{
|
||||
fixed_message = g_strdup_printf(_("GnuCash %s"), VERSION);
|
||||
g_print (_("GnuCash %s"), VERSION);
|
||||
|
||||
/* Translators: 1st %s is a fixed message, which is translated independently;
|
||||
2nd %s is the scm (svn/svk/git/bzr) revision number;
|
||||
3rd %s is the build date */
|
||||
g_print ( _("%s\nThis copy was built from rev %s (commit date %s)."),
|
||||
fixed_message, GNC_VCS_REV, GNC_VCS_REV_DATE );
|
||||
}
|
||||
g_print("\n");
|
||||
g_free (fixed_message);
|
||||
#ifdef GNC_VCS
|
||||
vcs = GNC_VCS " ";
|
||||
#else
|
||||
vcs = "";
|
||||
#endif
|
||||
g_print ("\n%s: %s%s (%s)\n",
|
||||
_("Build ID"), vcs, GNC_VCS_REV, GNC_VCS_REV_DATE);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,6 @@ then
|
||||
fi
|
||||
|
||||
# If we get here then this is NOT an svn checkout.
|
||||
|
||||
# Maybe it's git?
|
||||
real_gitdir="${real_srcdir}"/.git
|
||||
if test -d "${real_gitdir}"
|
||||
@ -126,7 +125,7 @@ then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
githead=`"$GIT_CMD" --git-dir "${real_gitdir}" log -1 --pretty=format:"%h" HEAD 2>/dev/null` # short hash only
|
||||
githead=$("$GIT_CMD" --git-dir "${real_gitdir}" describe)
|
||||
if test $? = 0 ; then
|
||||
/bin/echo -n $githead
|
||||
# Add a "+" to the hash if there deleted or modified files (not excluded by .gitignore and friends)
|
||||
|
Loading…
Reference in New Issue
Block a user