aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-10-28 14:57:16 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2011-10-28 14:57:16 +0800
commite10818e57080f0c45797adb407234a07f81d571b (patch)
tree6383dc7c0a16dc7f2f9656972a0ec881af509bed
parent3b00a09f5d1cdee956c847c664dfde21a20f952b (diff)
parent1cd6e8253a3be284b8578fd9ea37016d0197d61b (diff)
downloadgsoc2013-empathy-e10818e57080f0c45797adb407234a07f81d571b.tar
gsoc2013-empathy-e10818e57080f0c45797adb407234a07f81d571b.tar.gz
gsoc2013-empathy-e10818e57080f0c45797adb407234a07f81d571b.tar.bz2
gsoc2013-empathy-e10818e57080f0c45797adb407234a07f81d571b.tar.lz
gsoc2013-empathy-e10818e57080f0c45797adb407234a07f81d571b.tar.xz
gsoc2013-empathy-e10818e57080f0c45797adb407234a07f81d571b.tar.zst
gsoc2013-empathy-e10818e57080f0c45797adb407234a07f81d571b.zip
Merge branch 'ui-work'
-rw-r--r--src/empathy-accounts-dialog.c51
1 files changed, 17 insertions, 34 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index ccda20079..d1c7e1204 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -2177,8 +2177,8 @@ accounts_dialog_build_ui (EmpathyAccountsDialog *dialog)
GtkBuilder *gui;
gchar *filename;
EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
- GtkWidget *content_area;
- GtkWidget *action_area, *vbox, *hbox, *align;
+ GtkWidget *content_area, *action_area;
+ GtkWidget *grid;
GtkWidget *alig;
GtkWidget *sw, *toolbar;
GtkStyleContext *context;
@@ -2264,36 +2264,20 @@ accounts_dialog_build_ui (EmpathyAccountsDialog *dialog)
priv->infobar);
gtk_widget_show (priv->infobar);
- content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (priv->infobar));
+ grid = gtk_grid_new ();
+ gtk_container_add (
+ GTK_CONTAINER (gtk_info_bar_get_content_area (
+ GTK_INFO_BAR (priv->infobar))),
+ grid);
priv->image_type = gtk_image_new_from_stock (GTK_STOCK_CUT,
GTK_ICON_SIZE_DIALOG);
gtk_misc_set_alignment (GTK_MISC (priv->image_type), 0.0, 0.5);
- gtk_box_pack_start (GTK_BOX (content_area), priv->image_type, FALSE, FALSE, 0);
- gtk_widget_show (priv->image_type);
-
- vbox = gtk_vbox_new (FALSE, 6);
- gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
- gtk_widget_show (vbox);
+ gtk_grid_attach (GTK_GRID (grid), priv->image_type, 0, 0, 1, 2);
/* first row */
- align = gtk_alignment_new (0.5, 0.0, 0.0, 0.0);
- gtk_widget_show (align);
-
priv->label_name = gtk_label_new (NULL);
- gtk_container_add (GTK_CONTAINER (align), priv->label_name);
- gtk_widget_show (priv->label_name);
-
- gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
-
- /* second row */
- align = gtk_alignment_new (0.5, 0.0, 0.0, 0.0);
- gtk_widget_show (align);
- hbox = gtk_hbox_new (FALSE, 6);
- gtk_widget_show (hbox);
- gtk_container_add (GTK_CONTAINER (align), hbox);
-
- gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
+ gtk_grid_attach (GTK_GRID (grid), priv->label_name, 1, 0, 3, 1);
/* set up spinner */
priv->throbber = gtk_spinner_new ();
@@ -2304,21 +2288,20 @@ accounts_dialog_build_ui (EmpathyAccountsDialog *dialog)
priv->label_status = gtk_label_new (NULL);
gtk_label_set_line_wrap (GTK_LABEL (priv->label_status), TRUE);
- gtk_widget_show (priv->label_status);
+ gtk_widget_set_hexpand (priv->label_status, TRUE);
- gtk_box_pack_start (GTK_BOX (hbox), priv->throbber, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), priv->image_status, FALSE, FALSE, 3);
- gtk_box_pack_start (GTK_BOX (hbox), priv->label_status, TRUE, TRUE, 0);
+ gtk_grid_attach (GTK_GRID (grid), priv->throbber, 1, 1, 1, 1);
+ gtk_grid_attach (GTK_GRID (grid), priv->image_status, 2, 1, 1, 1);
+ gtk_grid_attach (GTK_GRID (grid), priv->label_status, 3, 1, 1, 1);
/* enabled switch */
- align = gtk_alignment_new (0.5, 0.5, 1., 0.);
- gtk_box_pack_start (GTK_BOX (content_area), align, FALSE, TRUE, 0);
-
priv->enabled_switch = gtk_switch_new ();
- gtk_container_add (GTK_CONTAINER (align), priv->enabled_switch);
+ gtk_widget_set_valign (priv->enabled_switch, GTK_ALIGN_CENTER);
g_signal_connect (priv->enabled_switch, "notify::active",
G_CALLBACK (accounts_dialog_enable_switch_active_cb), dialog);
- gtk_widget_show_all (align);
+ gtk_grid_attach (GTK_GRID (grid), priv->enabled_switch, 4, 0, 1, 2);
+
+ gtk_widget_show_all (grid);
/* Tweak the dialog */
gtk_window_set_title (GTK_WINDOW (dialog), _("Messaging and VoIP Accounts"));