]> git.0d.be Git - empathy.git/commitdiff
individual-widget: adapt number of rows to the features needed
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 23 Aug 2010 12:39:08 +0000 (14:39 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 23 Aug 2010 12:42:23 +0000 (14:42 +0200)
libempathy-gtk/empathy-individual-widget.c

index e3c5d723c8dcce5935ba324042b158e07ab5c6e3..a42c5a999bd8057c2e1d07051c3c2d0d2c67b4bd 100644 (file)
@@ -1525,11 +1525,15 @@ individual_table_set_up (EmpathyIndividualWidget *self)
   EmpathyIndividualWidgetPriv *priv = GET_PRIV (self);
   GtkTable *table;
   guint current_row = 0;
+  guint nb_rows = 2;
 
   if (priv->flags & EMPATHY_INDIVIDUAL_WIDGET_EDIT_FAVOURITE)
-    table = GTK_TABLE (gtk_table_new (4, 3, FALSE));
-  else
-    table = GTK_TABLE (gtk_table_new (3, 3, FALSE));
+    nb_rows++;
+
+  if (priv->flags & EMPATHY_INDIVIDUAL_WIDGET_FOR_TOOLTIP)
+    nb_rows++;
+
+  table = GTK_TABLE (gtk_table_new (nb_rows, 3, FALSE));
   gtk_table_set_row_spacings (table, 6);
   gtk_table_set_col_spacings (table, 6);