[empathy] new-chatroom-dialog: use GtkGrid instead of GtkTable



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

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

 src/empathy-new-chatroom-dialog.c  |    8 +++---
 src/empathy-new-chatroom-dialog.ui |   37 +++++++++++++++--------------------
 2 files changed, 20 insertions(+), 25 deletions(-)
---
diff --git a/src/empathy-new-chatroom-dialog.c b/src/empathy-new-chatroom-dialog.c
index 29c8865..8176c48 100644
--- a/src/empathy-new-chatroom-dialog.c
+++ b/src/empathy-new-chatroom-dialog.c
@@ -57,7 +57,7 @@ typedef struct {
 
 	GtkWidget         *window;
 	GtkWidget         *vbox_widgets;
-	GtkWidget         *table_info;
+	GtkWidget         *table_grid;
 	GtkWidget         *label_account;
 	GtkWidget         *account_chooser;
 	GtkWidget         *label_server;
@@ -156,7 +156,7 @@ empathy_new_chatroom_dialog_show (GtkWindow *parent)
 	filename = empathy_file_lookup ("empathy-new-chatroom-dialog.ui", "src");
 	gui = empathy_builder_get_file (filename,
 				       "new_chatroom_dialog", &dialog->window,
-				       "table_info", &dialog->table_info,
+				       "table_grid", &dialog->table_grid,
 				       "label_account", &dialog->label_account,
 				       "label_server", &dialog->label_server,
 				       "label_room", &dialog->label_room,
@@ -210,9 +210,9 @@ empathy_new_chatroom_dialog_show (GtkWindow *parent)
 	empathy_account_chooser_set_filter (EMPATHY_ACCOUNT_CHOOSER (dialog->account_chooser),
 					    empathy_account_chooser_filter_supports_chatrooms,
 					    NULL);
-	gtk_table_attach_defaults (GTK_TABLE (dialog->table_info),
+	gtk_grid_attach (GTK_GRID (dialog->table_grid),
 				   dialog->account_chooser,
-				   1, 2, 0, 1);
+				   1, 0, 1, 1);
 	gtk_widget_show (dialog->account_chooser);
 
 	g_signal_connect (EMPATHY_ACCOUNT_CHOOSER (dialog->account_chooser), "ready",
diff --git a/src/empathy-new-chatroom-dialog.ui b/src/empathy-new-chatroom-dialog.ui
index 2db1244..e77ec60 100644
--- a/src/empathy-new-chatroom-dialog.ui
+++ b/src/empathy-new-chatroom-dialog.ui
@@ -72,13 +72,11 @@
             <property name="border_width">5</property>
             <property name="spacing">5</property>
             <child>
-              <object class="GtkTable" id="table_info">
+              <object class="GtkGrid" id="table_grid">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="n_rows">3</property>
-                <property name="n_columns">2</property>
-                <property name="column_spacing">5</property>
                 <property name="row_spacing">5</property>
+                <property name="column_spacing">5</property>
                 <child>
                   <object class="GtkEntry" id="entry_room">
                     <property name="visible">True</property>
@@ -89,10 +87,9 @@
                   </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="x_options">GTK_FILL</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
                   </packing>
                 </child>
                 <child>
@@ -105,9 +102,10 @@
                     <property name="mnemonic_widget">entry_room</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">GTK_FILL</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
                   </packing>
                 </child>
                 <child>
@@ -119,11 +117,9 @@
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
                     <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
                   </packing>
                 </child>
                 <child>
@@ -136,10 +132,10 @@
                     <property name="mnemonic_widget">entry_server</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
                   </packing>
                 </child>
                 <child>
@@ -150,13 +146,12 @@
                     <property name="label" translatable="yes">Account:</property>
                   </object>
                   <packing>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_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>
-                  <placeholder/>
-                </child>
               </object>
               <packing>
                 <property name="expand">False</property>



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