aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <descalante@igalia.com>2011-10-10 10:41:32 +0800
committerDiego Escalante Urrelo <descalante@igalia.com>2011-10-11 10:16:50 +0800
commit9c7b667eec694f9e5eff67263b849791b22992ae (patch)
tree2409dae166dd7ccd85a003f26ac220a5392384d9 /src
parent03347735a65b75cc0d40ee7ee9c17ee612584544 (diff)
downloadgsoc2013-epiphany-9c7b667eec694f9e5eff67263b849791b22992ae.tar
gsoc2013-epiphany-9c7b667eec694f9e5eff67263b849791b22992ae.tar.gz
gsoc2013-epiphany-9c7b667eec694f9e5eff67263b849791b22992ae.tar.bz2
gsoc2013-epiphany-9c7b667eec694f9e5eff67263b849791b22992ae.tar.lz
gsoc2013-epiphany-9c7b667eec694f9e5eff67263b849791b22992ae.tar.xz
gsoc2013-epiphany-9c7b667eec694f9e5eff67263b849791b22992ae.tar.zst
gsoc2013-epiphany-9c7b667eec694f9e5eff67263b849791b22992ae.zip
e-bookmark-properties: port to GtkGrid
GtkTable is deprecated. Bug #661347
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/ephy-bookmark-properties.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/bookmarks/ephy-bookmark-properties.c b/src/bookmarks/ephy-bookmark-properties.c
index 537ba88e8..af7d6375f 100644
--- a/src/bookmarks/ephy-bookmark-properties.c
+++ b/src/bookmarks/ephy-bookmark-properties.c
@@ -485,7 +485,7 @@ ephy_bookmark_properties_constructor (GType type,
GObject *object;
EphyBookmarkProperties *properties;
EphyBookmarkPropertiesPrivate *priv;
- GtkWidget *widget, *table, *label, *entry, *container;
+ GtkWidget *widget, *grid, *label, *entry, *container;
GtkWidget *content_area, *action_area;
GtkWindow *window;
GtkDialog *dialog;
@@ -530,12 +530,11 @@ ephy_bookmark_properties_constructor (GType type,
gtk_container_set_border_width (GTK_CONTAINER (properties), 5);
gtk_box_set_spacing (GTK_BOX (content_area), 2);
- table = gtk_table_new (4, 2, FALSE);
- gtk_table_set_row_spacings (GTK_TABLE (table), 6);
- gtk_table_set_col_spacings (GTK_TABLE (table), 12);
- gtk_table_set_col_spacing (GTK_TABLE (table), 1, 6);
- gtk_container_set_border_width (GTK_CONTAINER (table), 5);
- gtk_widget_show (table);
+ grid = gtk_grid_new ();
+ gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
+ gtk_grid_set_column_spacing (GTK_GRID (grid), 12);
+ gtk_container_set_border_width (GTK_CONTAINER (grid), 5);
+ gtk_widget_show (grid);
entry = gtk_entry_new ();
gtk_editable_set_editable (GTK_EDITABLE (entry), !lockdown);
@@ -551,8 +550,9 @@ ephy_bookmark_properties_constructor (GType type,
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
gtk_widget_show (label);
- gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0);
- gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, 0, 0, 0);
+ gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
+ gtk_grid_attach (GTK_GRID (grid), entry, 1, 0, 1, 1);
+ gtk_widget_set_hexpand (entry, TRUE);
entry = gtk_entry_new ();
gtk_editable_set_editable (GTK_EDITABLE (entry), !lockdown);
@@ -567,8 +567,9 @@ ephy_bookmark_properties_constructor (GType type,
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
gtk_widget_show (label);
- gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, 0, 0, 0);
- gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, 0, 0, 0);
+ gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
+ gtk_grid_attach (GTK_GRID (grid), entry, 1, 1, 1, 1);
+ gtk_widget_set_hexpand (entry, TRUE);
entry = ephy_topics_entry_new (priv->bookmarks, priv->bookmark);
gtk_editable_set_editable (GTK_EDITABLE (entry), !lockdown);
@@ -578,8 +579,9 @@ ephy_bookmark_properties_constructor (GType type,
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
gtk_widget_show (label);
- gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_FILL, 0, 0, 0);
- gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 2, 3, GTK_FILL | GTK_EXPAND, 0, 0, 0);
+ gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1);
+ gtk_grid_attach (GTK_GRID (grid), entry, 1, 2, 1, 1);
+ gtk_widget_set_hexpand (entry, TRUE);
widget = ephy_topics_palette_new (priv->bookmarks, priv->bookmark);
container = g_object_new (GTK_TYPE_SCROLLED_WINDOW,
@@ -601,9 +603,11 @@ ephy_bookmark_properties_constructor (GType type,
ephy_state_add_expander (widget, "bookmark_properties_list", FALSE);
gtk_container_add (GTK_CONTAINER (widget), container);
gtk_widget_show (widget);
- gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 3, 4, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0);
+ gtk_grid_attach (GTK_GRID (grid), widget, 1, 3, 1, 1);
+ gtk_widget_set_hexpand (widget, TRUE);
+ gtk_widget_set_vexpand (widget, TRUE);
- gtk_box_pack_start (GTK_BOX (content_area), table, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (content_area), grid, TRUE, TRUE, 0);
priv->warning = gtk_toggle_button_new ();
gtk_button_set_focus_on_click (GTK_BUTTON (priv->warning), FALSE);