[empathy] contact-selector-dialog: use GtkGrid instead of GtkTable



commit c6bf0e62fef15245abe442b7533002c393c820b2
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Thu Sep 29 13:32:36 2011 +0200

    contact-selector-dialog: use GtkGrid instead of GtkTable
    
    https://bugzilla.gnome.org/show_bug.cgi?id=660429

 libempathy-gtk/empathy-contact-selector-dialog.c  |   10 ++++----
 libempathy-gtk/empathy-contact-selector-dialog.ui |   23 ++++++++++-----------
 2 files changed, 16 insertions(+), 17 deletions(-)
---
diff --git a/libempathy-gtk/empathy-contact-selector-dialog.c b/libempathy-gtk/empathy-contact-selector-dialog.c
index 59d5e07..d436c3e 100644
--- a/libempathy-gtk/empathy-contact-selector-dialog.c
+++ b/libempathy-gtk/empathy-contact-selector-dialog.c
@@ -282,7 +282,7 @@ empathy_contact_selector_dialog_init (EmpathyContactSelectorDialog *dialog)
   gchar *filename;
   GtkEntryCompletion *completion;
   GtkWidget *content_area;
-  GtkWidget *table_contact;
+  GtkWidget *table_grid;
 
   dialog->vbox = gtk_vbox_new (FALSE, 3);
 
@@ -292,7 +292,7 @@ empathy_contact_selector_dialog_init (EmpathyContactSelectorDialog *dialog)
   filename = empathy_file_lookup ("empathy-contact-selector-dialog.ui",
           "libempathy-gtk");
   gui = empathy_builder_get_file (filename,
-                "table_contact", &table_contact,
+                "table_grid", &table_grid,
                 "account_chooser_label", &priv->account_chooser_label,
                 "entry_id", &priv->entry_id,
                 NULL);
@@ -302,7 +302,7 @@ empathy_contact_selector_dialog_init (EmpathyContactSelectorDialog *dialog)
 
   content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
   gtk_container_add (GTK_CONTAINER (content_area), dialog->vbox);
-  gtk_box_pack_start (GTK_BOX (dialog->vbox), table_contact, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (dialog->vbox), table_grid, TRUE, TRUE, 0);
   gtk_widget_show (dialog->vbox);
 
   gtk_dialog_add_button (GTK_DIALOG (dialog),
@@ -341,9 +341,9 @@ empathy_contact_selector_dialog_init (EmpathyContactSelectorDialog *dialog)
   /* Create account chooser */
   priv->show_account_chooser = TRUE;
   priv->account_chooser = empathy_account_chooser_new ();
-  gtk_table_attach_defaults (GTK_TABLE (table_contact),
+  gtk_grid_attach (GTK_GRID (table_grid),
            priv->account_chooser,
-           1, 2, 0, 1);
+           1, 0, 1, 1);
   empathy_account_chooser_set_filter (
       EMPATHY_ACCOUNT_CHOOSER (priv->account_chooser),
       account_chooser_filter,
diff --git a/libempathy-gtk/empathy-contact-selector-dialog.ui b/libempathy-gtk/empathy-contact-selector-dialog.ui
index daa8f6e..9b7f921 100644
--- a/libempathy-gtk/empathy-contact-selector-dialog.ui
+++ b/libempathy-gtk/empathy-contact-selector-dialog.ui
@@ -1,13 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
-  <object class="GtkTable" id="table_contact">
+  <object class="GtkGrid" id="table_grid">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
-    <property name="n_rows">2</property>
-    <property name="n_columns">2</property>
-    <property name="column_spacing">6</property>
     <property name="row_spacing">6</property>
+    <property name="column_spacing">6</property>
     <child>
       <object class="GtkLabel" id="account_chooser_label">
         <property name="visible">True</property>
@@ -16,7 +14,10 @@
         <property name="label" translatable="yes">Account:</property>
       </object>
       <packing>
-        <property name="x_options"></property>
+        <property name="left_attach">0</property>
+        <property name="top_attach">0</property>
+        <property name="width">1</property>
+        <property name="height">1</property>
       </packing>
     </child>
     <child>
@@ -27,9 +28,10 @@
         <property name="label" translatable="yes">Contact ID:</property>
       </object>
       <packing>
+        <property name="left_attach">0</property>
         <property name="top_attach">1</property>
-        <property name="bottom_attach">2</property>
-        <property name="x_options"></property>
+        <property name="width">1</property>
+        <property name="height">1</property>
       </packing>
     </child>
     <child>
@@ -41,13 +43,10 @@
       </object>
       <packing>
         <property name="left_attach">1</property>
-        <property name="right_attach">2</property>
         <property name="top_attach">1</property>
-        <property name="bottom_attach">2</property>
+        <property name="width">1</property>
+        <property name="height">1</property>
       </packing>
     </child>
-    <child>
-      <placeholder/>
-    </child>
   </object>
 </interface>



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