[Gnucash-changes] r13539 - gnucash/trunk - Use a font size of "smaller" when printing to the splash

David Hampton hampton at cvs.gnucash.org
Wed Mar 8 01:13:29 EST 2006


Author: hampton
Date: 2006-03-08 01:13:28 -0500 (Wed, 08 Mar 2006)
New Revision: 13539
Trac: http://svn.gnucash.org/trac/changeset/13539

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/gnome-utils/gnc-splash.c
Log:
Use a font size of "smaller" when printing to the splash
screen. Should solve 104436 except for people running with huge system
fonts.


Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-03-08 05:47:36 UTC (rev 13538)
+++ gnucash/trunk/ChangeLog	2006-03-08 06:13:28 UTC (rev 13539)
@@ -1,5 +1,9 @@
 2006-03-07  David Hampton  <hampton at employees.org>
 
+	* src/gnome-utils/gnc-splash.c: Use a font size of "smaller" when
+	printing to the splash screen. Should solve 104436 except for
+	people running with huge system fonts.
+
 	* src/gnome-utils/gnc-tree-view-account.[ch]: Relabel column
 	titles from "XXX (Report)" to a label that includes the currency
 	mnemonic (e.g. "Total (EUR)"). Closes 118695.

Modified: gnucash/trunk/src/gnome-utils/gnc-splash.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-splash.c	2006-03-08 05:47:36 UTC (rev 13538)
+++ gnucash/trunk/src/gnome-utils/gnc-splash.c	2006-03-08 06:13:28 UTC (rev 13539)
@@ -29,6 +29,7 @@
 #include "gnc-splash.h"
 #include "gnc-version.h"
 
+#define MARKUP_STRING "<span size='small'>%s</span>"
 
 static GtkWidget * splash = NULL;
 static GtkWidget * progress = NULL;
@@ -57,7 +58,7 @@
   GtkWidget *vbox;
   GtkWidget *version;
   GtkWidget *separator;
-  gchar *ver_string;
+  gchar *ver_string, *markup;
 
   if (splash) return;
 
@@ -92,11 +93,18 @@
 			       VERSION, GNUCASH_SVN_REV, GNUCASH_BUILD_DATE);
 #endif
 
-  version = gtk_label_new (ver_string);
+  version = gtk_label_new(NULL);
+  markup = g_markup_printf_escaped(MARKUP_STRING, ver_string);
+  gtk_label_set_markup(GTK_LABEL(version), markup);
+  g_free(markup);
   g_free(ver_string);
   separator = gtk_hseparator_new();
-  progress = gtk_label_new(_("Loading..."));
 
+  progress = gtk_label_new(NULL);
+  markup = g_markup_printf_escaped(MARKUP_STRING, _("Loading..."));
+  gtk_label_set_markup(GTK_LABEL(progress), markup);
+  g_free(markup);
+
   gtk_container_add (GTK_CONTAINER (frame), pixmap);
   gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
   gtk_box_pack_start (GTK_BOX (vbox), version, FALSE, FALSE, 0);
@@ -127,9 +135,13 @@
 void
 gnc_update_splash_screen (const gchar *string)
 {
+  gchar *markup;
+
   if (progress)
   {
-    gtk_label_set_text (GTK_LABEL(progress), string);
+    markup = g_markup_printf_escaped(MARKUP_STRING, string);
+    gtk_label_set_markup (GTK_LABEL(progress), markup);
+    g_free (markup);
 
     /* make sure new text is up */
     while (gtk_events_pending ())



More information about the gnucash-changes mailing list