summaryrefslogtreecommitdiff
path: root/capplets
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-01-24 16:14:14 +0100
committerStefano Karapetsas <[email protected]>2014-01-24 16:14:14 +0100
commitca676076227ce05de2377a4fdae747e769465bd6 (patch)
tree90595f6824b00ae96ae62f4184cc3f9948b38ab9 /capplets
parentab448aa9ca1a2d697964aba7f31ebce0e1ed3147 (diff)
downloadmate-control-center-ca676076227ce05de2377a4fdae747e769465bd6.tar.bz2
mate-control-center-ca676076227ce05de2377a4fdae747e769465bd6.tar.xz
about-me: Add GTK3 support
Diffstat (limited to 'capplets')
-rw-r--r--capplets/about-me/e-image-chooser.c20
-rw-r--r--capplets/about-me/eel-alert-dialog.c2
-rw-r--r--capplets/about-me/mate-about-me-password.c4
-rw-r--r--capplets/about-me/mate-about-me-password.ui1
4 files changed, 24 insertions, 3 deletions
diff --git a/capplets/about-me/e-image-chooser.c b/capplets/about-me/e-image-chooser.c
index fecbad60..c9f35fc2 100644
--- a/capplets/about-me/e-image-chooser.c
+++ b/capplets/about-me/e-image-chooser.c
@@ -66,7 +66,11 @@ static void image_drag_data_received_cb (GtkWidget *widget,
GtkSelectionData *selection_data,
guint info, guint time, EImageChooser *chooser);
+#if GTK_CHECK_VERSION (3, 0, 0)
+static GObjectClass *parent_class = NULL;
+#else
static GtkObjectClass *parent_class = NULL;
+#endif
#define PARENT_TYPE GTK_TYPE_VBOX
enum DndTargetType {
@@ -124,7 +128,11 @@ e_image_chooser_class_init (EImageChooserClass *klass)
G_STRUCT_OFFSET (EImageChooserClass, changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
+#if GTK_CHECK_VERSION (3, 0, 0)
+ G_TYPE_NONE, 0);
+#else
GTK_TYPE_NONE, 0);
+#endif
object_class->dispose = e_image_chooser_dispose;
}
@@ -273,7 +281,11 @@ image_drag_motion_cb (GtkWidget *widget,
if (!chooser->priv->editable)
return FALSE;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ for (p = gdk_drag_context_list_targets (context); p; p = p->next) {
+#else
for (p = context->targets; p != NULL; p = p->next) {
+#endif
char *possible_type;
possible_type = gdk_atom_name (GDK_POINTER_TO_ATOM (p->data));
@@ -299,11 +311,19 @@ image_drag_drop_cb (GtkWidget *widget,
if (!chooser->priv->editable)
return FALSE;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ if (gdk_drag_context_list_targets (context) == NULL) {
+#else
if (context->targets == NULL) {
+#endif
return FALSE;
}
+#if GTK_CHECK_VERSION (3, 0, 0)
+ for (p = gdk_drag_context_list_targets (context); p; p = p->next) {
+#else
for (p = context->targets; p != NULL; p = p->next) {
+#endif
char *possible_type;
possible_type = gdk_atom_name (GDK_POINTER_TO_ATOM (p->data));
diff --git a/capplets/about-me/eel-alert-dialog.c b/capplets/about-me/eel-alert-dialog.c
index ccaaacbe..9efed13f 100644
--- a/capplets/about-me/eel-alert-dialog.c
+++ b/capplets/about-me/eel-alert-dialog.c
@@ -356,7 +356,9 @@ eel_alert_dialog_new (GtkWindow *parent,
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
+#if !GTK_CHECK_VERSION (3, 0, 0)
gtk_dialog_set_has_separator (dialog, FALSE);
+#endif
gtk_window_set_title (GTK_WINDOW (dialog),
(title != NULL) ? title : "");
diff --git a/capplets/about-me/mate-about-me-password.c b/capplets/about-me/mate-about-me-password.c
index 87bf084c..9c15524b 100644
--- a/capplets/about-me/mate-about-me-password.c
+++ b/capplets/about-me/mate-about-me-password.c
@@ -1065,12 +1065,12 @@ passdlg_init (PasswordDialog *pdialog, GtkWindow *parent)
/* Initialize accelerators */
gtk_widget_add_accelerator (GTK_WIDGET (pdialog->current_password),
"activate", group,
- GDK_Return, 0,
+ GDK_KEY_Return, 0,
0);
gtk_widget_add_accelerator (GTK_WIDGET (pdialog->new_password),
"activate", group,
- GDK_Return, 0,
+ GDK_KEY_Return, 0,
0);
/* Activate authenticate-button when enter is pressed in current-password */
diff --git a/capplets/about-me/mate-about-me-password.ui b/capplets/about-me/mate-about-me-password.ui
index b9c433a5..35de4cfa 100644
--- a/capplets/about-me/mate-about-me-password.ui
+++ b/capplets/about-me/mate-about-me-password.ui
@@ -7,7 +7,6 @@
<property name="title" translatable="yes">Change password</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
- <property name="has_separator">False</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox">
<property name="visible">True</property>