Commit 58edf0b4 authored by Cosimo Cecchi's avatar Cosimo Cecchi
Browse files

filter-manager: port GtkTable -> GtkGrid

parent 87372200
......@@ -452,7 +452,7 @@ on_tree_selection_changed (GtkTreeSelection *selection, LogviewFilterManager *ma
static void
logview_filter_manager_init (LogviewFilterManager *manager)
{
GtkWidget *table;
GtkWidget *grid;
GtkWidget *scrolled_window;
GtkTreeViewColumn *column;
GtkCellRenderer *text_renderer;
......@@ -476,7 +476,9 @@ logview_filter_manager_init (LogviewFilterManager *manager)
G_TYPE_OBJECT));
logview_filter_manager_update_model (manager);
table = gtk_table_new (3, 2, FALSE);
grid = gtk_grid_new ();
gtk_container_set_border_width (GTK_CONTAINER (grid), 5);
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
......@@ -519,20 +521,31 @@ logview_filter_manager_init (LogviewFilterManager *manager)
"changed", G_CALLBACK (on_tree_selection_changed),
manager);
gtk_table_attach_defaults (GTK_TABLE (table),
scrolled_window,
0, 1, 0, 3);
gtk_table_attach (GTK_TABLE (table),
priv->add_button,
1, 2, 0, 1, GTK_FILL, 0, 5, 5);
gtk_table_attach (GTK_TABLE (table),
priv->edit_button,
1, 2, 1, 2, GTK_FILL, 0, 5, 5);
gtk_table_attach (GTK_TABLE (table),
priv->remove_button,
1, 2, 2, 3, GTK_FILL, 0, 5, 5);
gtk_grid_set_column_spacing (GTK_GRID (grid), 10);
gtk_grid_set_row_spacing (GTK_GRID (grid), 10);
gtk_widget_set_hexpand (scrolled_window, TRUE);
gtk_widget_set_vexpand (scrolled_window, TRUE);
gtk_grid_attach (GTK_GRID (grid), scrolled_window,
0, 0, 1, 3);
gtk_widget_set_valign (priv->add_button,
GTK_ALIGN_CENTER);
gtk_widget_set_valign (priv->edit_button,
GTK_ALIGN_CENTER);
gtk_widget_set_valign (priv->remove_button,
GTK_ALIGN_CENTER);
gtk_grid_attach (GTK_GRID (grid), priv->add_button,
1, 0, 1, 1);
gtk_grid_attach_next_to (GTK_GRID (grid), priv->edit_button,
priv->add_button, GTK_POS_BOTTOM,
1, 1);
gtk_grid_attach_next_to (GTK_GRID (grid), priv->remove_button,
priv->edit_button, GTK_POS_BOTTOM,
1, 1);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (manager))),
table, TRUE, TRUE, 5);
grid, TRUE, TRUE, 5);
gtk_widget_show_all (GTK_WIDGET (manager));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment