summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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