summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-05-19 14:52:18 +0200
committerinfirit <[email protected]>2014-05-19 18:37:37 +0200
commit51291bf1b29004ea4703845fc127cc1a4468b092 (patch)
treea6280641c96a58b9872e6c4e7835d5dd313667ca /plugins
parent53be5f994d2c52142debdfdaf089ae077389cfbd (diff)
downloadpluma-51291bf1b29004ea4703845fc127cc1a4468b092.tar.bz2
pluma-51291bf1b29004ea4703845fc127cc1a4468b092.tar.xz
Replace deprecated gtk widget function
The replacement functions are available since 2.18 GTK_WIDGET_HAS_FOCUS -> gtk_widget_has_focus GTK_WIDGET_VISIBLE -> gtk_widget_get_visible GTK_WIDGET_SET_FLAGS -> gtk_widget_set_*
Diffstat (limited to 'plugins')
-rw-r--r--plugins/checkupdate/pluma-check-update-plugin.c4
-rw-r--r--plugins/filebrowser/pluma-file-browser-utils.c8
-rw-r--r--plugins/filebrowser/pluma-file-browser-view.c4
-rwxr-xr-xplugins/spell/pluma-spell-checker-dialog.c4
4 files changed, 2 insertions, 18 deletions
diff --git a/plugins/checkupdate/pluma-check-update-plugin.c b/plugins/checkupdate/pluma-check-update-plugin.c
index b28991af..42cd2b41 100644
--- a/plugins/checkupdate/pluma-check-update-plugin.c
+++ b/plugins/checkupdate/pluma-check-update-plugin.c
@@ -186,7 +186,7 @@ set_message_area_text_and_icon (GtkWidget *message_area,
gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
gtk_misc_set_alignment (GTK_MISC (primary_label), 0, 0.5);
- GTK_WIDGET_SET_FLAGS (primary_label, GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (primary_label, TRUE);
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
if (secondary_text != NULL)
@@ -197,7 +197,7 @@ set_message_area_text_and_icon (GtkWidget *message_area,
g_free (secondary_markup);
gtk_widget_show (secondary_label);
gtk_box_pack_start (GTK_BOX (vbox), secondary_label, TRUE, TRUE, 0);
- GTK_WIDGET_SET_FLAGS (secondary_label, GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (secondary_label, TRUE);
gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
diff --git a/plugins/filebrowser/pluma-file-browser-utils.c b/plugins/filebrowser/pluma-file-browser-utils.c
index 86c64053..8c1b6a3b 100644
--- a/plugins/filebrowser/pluma-file-browser-utils.c
+++ b/plugins/filebrowser/pluma-file-browser-utils.c
@@ -170,11 +170,7 @@ pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window,
button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
gtk_widget_show (button);
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_can_default (button, TRUE);
-#else
- GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
-#endif
gtk_dialog_add_action_widget (GTK_DIALOG (dlg),
button,
GTK_RESPONSE_CANCEL);
@@ -188,11 +184,7 @@ pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window,
}
gtk_widget_show (button);
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_can_default (button, TRUE);
-#else
- GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
-#endif
gtk_dialog_add_action_widget (GTK_DIALOG (dlg),
button,
GTK_RESPONSE_OK);
diff --git a/plugins/filebrowser/pluma-file-browser-view.c b/plugins/filebrowser/pluma-file-browser-view.c
index 6092248c..bf8a11a1 100644
--- a/plugins/filebrowser/pluma-file-browser-view.c
+++ b/plugins/filebrowser/pluma-file-browser-view.c
@@ -642,11 +642,7 @@ key_press_event (GtkWidget *widget,
handled = FALSE;
break;
}
-#if GTK_CHECK_VERSION (3, 0, 0)
if (!gtk_widget_has_focus (widget)) {
-#else
- if (!GTK_WIDGET_HAS_FOCUS (widget)) {
-#endif
handled = FALSE;
break;
}
diff --git a/plugins/spell/pluma-spell-checker-dialog.c b/plugins/spell/pluma-spell-checker-dialog.c
index b41feaf7..a0d0b068 100755
--- a/plugins/spell/pluma-spell-checker-dialog.c
+++ b/plugins/spell/pluma-spell-checker-dialog.c
@@ -291,11 +291,7 @@ create_dialog (PlumaSpellCheckerDialog *dlg,
gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
/* Set default button */
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_can_default (dlg->change_button, TRUE);
-#else
- GTK_WIDGET_SET_FLAGS (dlg->change_button, GTK_CAN_DEFAULT);
-#endif
gtk_widget_grab_default (dlg->change_button);
gtk_entry_set_activates_default (GTK_ENTRY (dlg->word_entry), TRUE);