]> git.0d.be Git - empathy.git/commitdiff
[EmpathyContactSelectorDialog] switch from table_contents to VBox
authorDanielle Madeley <danielle.madeley@collabora.co.uk>
Fri, 18 Dec 2009 06:28:42 +0000 (17:28 +1100)
committerDanielle Madeley <danielle.madeley@collabora.co.uk>
Fri, 18 Dec 2009 23:48:55 +0000 (10:48 +1100)
This makes it more flexible to add other contents to the dialog.

libempathy-gtk/empathy-contact-selector-dialog.c
libempathy-gtk/empathy-contact-selector-dialog.h
libempathy-gtk/empathy-new-call-dialog.c

index 8f1ec149f22b50dbf769141359a23e27334d2d18..77eb7971f38faac013357fdf022d467bdb6d4d73 100644 (file)
@@ -272,6 +272,9 @@ empathy_contact_selector_dialog_init (EmpathyContactSelectorDialog *dialog)
   GtkEntryCompletion *completion;
   GtkListStore *model;
   GtkWidget *content_area;
+  GtkWidget *table_contact;
+
+  dialog->vbox = gtk_vbox_new (FALSE, 3);
 
   /* create a contact manager */
   priv->contact_manager = empathy_contact_manager_dup_singleton ();
@@ -279,7 +282,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", &dialog->table_contact,
+                "table_contact", &table_contact,
                 "account_chooser_label", &priv->account_chooser_label,
                 "entry_id", &priv->entry_id,
                 NULL);
@@ -290,7 +293,9 @@ empathy_contact_selector_dialog_init (EmpathyContactSelectorDialog *dialog)
       NULL);
 
   content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
-  gtk_container_add (GTK_CONTAINER (content_area), dialog->table_contact);
+  gtk_container_add (GTK_CONTAINER (content_area), dialog->vbox);
+  gtk_box_pack_start (GTK_BOX (dialog->vbox), table_contact, TRUE, TRUE, 0);
+  gtk_widget_show (dialog->vbox);
 
   gtk_dialog_add_button (GTK_DIALOG (dialog),
     GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
@@ -330,7 +335,7 @@ empathy_contact_selector_dialog_init (EmpathyContactSelectorDialog *dialog)
 
   /* Create account chooser */
   priv->account_chooser = empathy_account_chooser_new ();
-  gtk_table_attach_defaults (GTK_TABLE (dialog->table_contact),
+  gtk_table_attach_defaults (GTK_TABLE (table_contact),
            priv->account_chooser,
            1, 2, 0, 1);
   empathy_account_chooser_set_filter (
index e317cd7a457e0919b18a5baafc1d0042639f4f45..255d37ee142d335b401e2124341e7a6b266ba739 100644 (file)
@@ -50,8 +50,8 @@ struct _EmpathyContactSelectorDialog {
   GtkDialog parent;
 
   /* protected fields */
+  GtkWidget *vbox;
   GtkWidget *button_action;
-  GtkWidget *table_contact;
 };
 
 GType empathy_contact_selector_dialog_get_type (void);
index 67bfb589d8204d7cb7dc32137109618240bf79c7..2437b4978359bbb1eef1b87f3b74f96f4d0d039f 100644 (file)
@@ -177,8 +177,8 @@ empathy_new_call_dialog_init (EmpathyNewCallDialog *dialog)
   /* add video toggle */
   priv->check_video = gtk_check_button_new_with_mnemonic (_("Send _Video"));
 
-  gtk_table_attach_defaults (GTK_TABLE (parent->table_contact),
-      priv->check_video, 1, 2, 2, 3);
+  gtk_box_pack_end (GTK_BOX (parent->vbox), priv->check_video,
+      FALSE, TRUE, 0);
 
   gtk_widget_show (priv->check_video);