[grisbi-cvs] grisbi/src fenetre_principale.c,1.112,1.113

Mickaƫl Remars mykeul at users.sourceforge.net
Wed May 27 23:39:28 CEST 2009


Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22595

Modified Files:
	fenetre_principale.c 
Log Message:
Fix the bug 579

Index: fenetre_principale.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/fenetre_principale.c,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -d -r1.112 -r1.113
--- fenetre_principale.c	10 May 2009 13:06:56 -0000	1.112
+++ fenetre_principale.c	27 May 2009 21:39:26 -0000	1.113
@@ -328,6 +328,21 @@
 
 
 
+/**
+ * Update one of the heading bar label with a new text.
+ *
+ * \param label	Label to update.
+ * \param text	String to display in headings bar.
+ *
+ */
+void gsb_gui_headings_private_update_label_markup ( GtkLabel *label, const gchar *text )
+{
+    gchar* escstr = g_markup_escape_text ( text, -1 );
+    gchar* tmpstr = g_strconcat ( "<b>", escstr, "</b>", NULL );
+    gtk_label_set_markup ( label, tmpstr );
+    g_free ( tmpstr );
+    g_free ( escstr );
+}
 
 /**
  * Update headings bar with a new title and a new suffix.
@@ -338,12 +353,8 @@
  */
 void gsb_gui_headings_update ( gchar * title, gchar * suffix )
 {
-    gchar* tmpstr = g_strconcat ( "<b>", title, "</b>", NULL );
-    gtk_label_set_markup ( GTK_LABEL(headings_title), tmpstr);
-    g_free ( tmpstr );
-    tmpstr = g_strconcat ( "<b>", suffix, "</b>", NULL );
-    gtk_label_set_markup ( GTK_LABEL(headings_suffix), tmpstr);
-    g_free ( tmpstr );
+    gsb_gui_headings_private_update_label_markup ( GTK_LABEL(headings_title), title );
+    gsb_gui_headings_update_suffix ( suffix );
 }
 
 /**
@@ -354,9 +365,7 @@
  */
 void gsb_gui_headings_update_suffix ( gchar * suffix )
 {
-    gchar* tmpstr = g_strconcat ( "<b>", suffix, "</b>", NULL );
-    gtk_label_set_markup ( GTK_LABEL(headings_suffix), tmpstr );
-    g_free ( tmpstr );
+    gsb_gui_headings_private_update_label_markup ( GTK_LABEL(headings_suffix), suffix );
 }
 
 



More information about the cvs mailing list