summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-07-28 17:12:31 +0200
committerraveit65 <[email protected]>2016-08-03 11:13:18 +0200
commit51342af82a752eaa1e036424766ee5950261cc3e (patch)
tree1476cb2d164f8b2860244ddfe4f56226aef6a721
parent9ae231e5c19852ef17710d98b07e39b8453073b3 (diff)
downloadmate-panel-51342af82a752eaa1e036424766ee5950261cc3e.tar.bz2
mate-panel-51342af82a752eaa1e036424766ee5950261cc3e.tar.xz
GTK+-3.0 panel-properties: port to GtkGrid
-rw-r--r--mate-panel/panel-properties-dialog.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/mate-panel/panel-properties-dialog.c b/mate-panel/panel-properties-dialog.c
index de113812..a75f4b58 100644
--- a/mate-panel/panel-properties-dialog.c
+++ b/mate-panel/panel-properties-dialog.c
@@ -813,7 +813,11 @@ static void
panel_properties_dialog_remove_orientation_combo (PanelPropertiesDialog *dialog)
{
GtkContainer *container = GTK_CONTAINER (dialog->general_table);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkGrid *grid = GTK_GRID (dialog->general_table);
+#else
GtkTable *table = GTK_TABLE (dialog->general_table);
+#endif
g_object_ref (dialog->size_label);
g_object_ref (dialog->size_widgets);
@@ -827,10 +831,17 @@ panel_properties_dialog_remove_orientation_combo (PanelPropertiesDialog *dialog)
gtk_container_remove (container, dialog->icon_label);
gtk_container_remove (container, dialog->icon_align);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_grid_attach (grid, dialog->size_label, 0, 1, 1, 1);
+ gtk_grid_attach (grid, dialog->size_widgets, 1, 1, 1, 1);
+ gtk_grid_attach (grid, dialog->icon_label, 0, 2, 1, 1);
+ gtk_grid_attach (grid, dialog->icon_align, 1, 2, 1, 1);
+#else
gtk_table_attach_defaults (table, dialog->size_label, 0, 1, 1, 2);
gtk_table_attach_defaults (table, dialog->size_widgets, 1, 2, 1, 2);
gtk_table_attach_defaults (table, dialog->icon_label, 0, 1, 2, 3);
gtk_table_attach_defaults (table, dialog->icon_align, 1, 2, 2, 3);
+#endif
dialog->orientation_label = NULL;
dialog->orientation_combo = NULL;
@@ -839,7 +850,9 @@ panel_properties_dialog_remove_orientation_combo (PanelPropertiesDialog *dialog)
g_object_unref (dialog->icon_label);
g_object_unref (dialog->icon_align);
+#if !GTK_CHECK_VERSION (3, 0, 0)
gtk_table_resize (table, 3, 2);
+#endif
}
static void
@@ -854,7 +867,9 @@ panel_properties_dialog_remove_icon_chooser (PanelPropertiesDialog *dialog)
dialog->icon_align = NULL;
dialog->icon_chooser = NULL;
+#if !GTK_CHECK_VERSION (3, 0, 0)
gtk_table_resize (GTK_TABLE (dialog->general_table), 3, 2);
+#endif
}
static void