ekiga r6069 - in trunk: . lib/gui



Author: dsandras
Date: Sun Mar 16 17:43:36 2008
New Revision: 6069
URL: http://svn.gnome.org/viewvc/ekiga?rev=6069&view=rev

Log:
When secondary-text is empty, do not try displaying anything in order
not to have uncentered text.


Modified:
   trunk/ChangeLog
   trunk/lib/gui/gm-cell-renderer-bitext.c

Modified: trunk/lib/gui/gm-cell-renderer-bitext.c
==============================================================================
--- trunk/lib/gui/gm-cell-renderer-bitext.c	(original)
+++ trunk/lib/gui/gm-cell-renderer-bitext.c	Sun Mar 16 17:43:36 2008
@@ -105,9 +105,14 @@
   attr_size->end_index = (guint) - 1;
   pango_attr_list_insert (attr_list, attr_size);
 
-  str = g_strdup_printf ("%s\n%s",
-			 renderer->priv->primary_text,
-			 renderer->priv->secondary_text);
+  if (renderer->priv->secondary_text && strcmp (renderer->priv->secondary_text, ""))
+    str = g_strdup_printf ("%s\n%s",
+                           renderer->priv->primary_text,
+                           renderer->priv->secondary_text);
+  else
+    str = g_strdup_printf ("%s",
+                           renderer->priv->primary_text);
+
   g_object_set (renderer,
 		"visible", TRUE,
 		"weight", PANGO_WEIGHT_NORMAL,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]