summaryrefslogtreecommitdiff
path: root/capplet
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-07-26 15:29:36 +0200
committerStefano Karapetsas <[email protected]>2013-07-26 15:29:36 +0200
commit165b40bbf65b538c5b642ee52d0280e5e9ad4e62 (patch)
tree03ccf6bc0737dcdf509f57866e8cd49411ae1045 /capplet
parent22223bf64027da1dbfb8435a7e410f146a94bbd8 (diff)
downloadmate-session-manager-165b40bbf65b538c5b642ee52d0280e5e9ad4e62.tar.bz2
mate-session-manager-165b40bbf65b538c5b642ee52d0280e5e9ad4e62.tar.xz
capplet: Add support for GTK3
Diffstat (limited to 'capplet')
-rw-r--r--capplet/gsm-app-dialog.c2
-rw-r--r--capplet/gsm-properties-dialog.c15
2 files changed, 17 insertions, 0 deletions
diff --git a/capplet/gsm-app-dialog.c b/capplet/gsm-app-dialog.c
index b4ca56a..133342c 100644
--- a/capplet/gsm-app-dialog.c
+++ b/capplet/gsm-app-dialog.c
@@ -182,7 +182,9 @@ setup_dialog (GsmAppDialog *dialog)
gtk_container_add (GTK_CONTAINER (content_area), widget);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
+#if !GTK_CHECK_VERSION (3, 0, 0)
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+#endif
gtk_window_set_icon_name (GTK_WINDOW (dialog), "mate-session-properties");
g_object_set (dialog,
diff --git a/capplet/gsm-properties-dialog.c b/capplet/gsm-properties-dialog.c
index 13829a0..6c5c8e8 100644
--- a/capplet/gsm-properties-dialog.c
+++ b/capplet/gsm-properties-dialog.c
@@ -603,6 +603,18 @@ setup_dialog (GsmPropertiesDialog *dialog)
/* we don't want to accept drags coming from this widget */
targetlist = gtk_drag_dest_get_target_list (GTK_WIDGET (treeview));
if (targetlist != NULL) {
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkTargetEntry *targets;
+ guint n_targets;
+ gint i;
+ targets = gtk_target_table_new_from_list (targetlist, &n_targets);
+ for (i = 0; i < n_targets; i++)
+ targets[i].flags = GTK_TARGET_OTHER_WIDGET;
+ targetlist = gtk_target_list_new (targets, n_targets);
+ gtk_drag_dest_set_target_list (GTK_WIDGET (treeview), targetlist);
+ gtk_target_list_unref (targetlist);
+ gtk_target_table_free (targets, n_targets);
+#else
GList *list;
list = targetlist->list;
while (list != NULL) {
@@ -611,6 +623,7 @@ setup_dialog (GsmPropertiesDialog *dialog)
targetpair->flags = GTK_TARGET_OTHER_WIDGET;
list = list->next;
}
+#endif
}
g_signal_connect (treeview, "drag_begin",
@@ -776,7 +789,9 @@ gsm_properties_dialog_init (GsmPropertiesDialog *dialog)
gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
gtk_box_set_spacing (GTK_BOX (content_area), 2);
+#if !GTK_CHECK_VERSION (3, 0, 0)
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+#endif
gtk_window_set_icon_name (GTK_WINDOW (dialog), "mate-session-properties");
gtk_window_set_title (GTK_WINDOW (dialog), _("Startup Applications Preferences"));
}