summaryrefslogtreecommitdiff
path: root/pluma/pluma-io-error-message-area.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-10-30 00:56:56 +0100
committerStefano Karapetsas <[email protected]>2013-10-30 00:56:56 +0100
commit7f0ccea48196a0da9523db3d566ee8020cd742a1 (patch)
tree4a66f87edcc70ca3949c750148df218c9a41ba28 /pluma/pluma-io-error-message-area.c
parent5f87f646777bf5b09610bbc6eed8fafd007f34c6 (diff)
downloadpluma-7f0ccea48196a0da9523db3d566ee8020cd742a1.tar.bz2
pluma-7f0ccea48196a0da9523db3d566ee8020cd742a1.tar.xz
pluma: Add GTK3 support
Diffstat (limited to 'pluma/pluma-io-error-message-area.c')
-rw-r--r--pluma/pluma-io-error-message-area.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/pluma/pluma-io-error-message-area.c b/pluma/pluma-io-error-message-area.c
index d6504634..38e19cca 100644
--- a/pluma/pluma-io-error-message-area.c
+++ b/pluma/pluma-io-error-message-area.c
@@ -144,7 +144,11 @@ 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);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_can_focus (primary_label, TRUE);
+#else
GTK_WIDGET_SET_FLAGS (primary_label, GTK_CAN_FOCUS);
+#endif
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
if (secondary_text != NULL)
@@ -154,7 +158,11 @@ set_message_area_text_and_icon (GtkWidget *message_area,
secondary_label = gtk_label_new (secondary_markup);
g_free (secondary_markup);
gtk_box_pack_start (GTK_BOX (vbox), secondary_label, TRUE, TRUE, 0);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_can_focus (secondary_label, TRUE);
+#else
GTK_WIDGET_SET_FLAGS (secondary_label, GTK_CAN_FOCUS);
+#endif
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);
@@ -570,7 +578,11 @@ create_conversion_error_message_area (const gchar *primary_text,
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);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_can_focus (primary_label, TRUE);
+#else
GTK_WIDGET_SET_FLAGS (primary_label, GTK_CAN_FOCUS);
+#endif
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
if (secondary_text != NULL)
@@ -580,7 +592,11 @@ create_conversion_error_message_area (const gchar *primary_text,
secondary_label = gtk_label_new (secondary_markup);
g_free (secondary_markup);
gtk_box_pack_start (GTK_BOX (vbox), secondary_label, TRUE, TRUE, 0);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_can_focus (secondary_label, TRUE);
+#else
GTK_WIDGET_SET_FLAGS (secondary_label, GTK_CAN_FOCUS);
+#endif
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);
@@ -853,7 +869,11 @@ pluma_file_already_open_warning_message_area_new (const gchar *uri)
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);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_can_focus (primary_label, TRUE);
+#else
GTK_WIDGET_SET_FLAGS (primary_label, GTK_CAN_FOCUS);
+#endif
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
secondary_text = _("pluma opened this instance of the file in a non-editable way. "
@@ -863,7 +883,11 @@ pluma_file_already_open_warning_message_area_new (const gchar *uri)
secondary_label = gtk_label_new (secondary_markup);
g_free (secondary_markup);
gtk_box_pack_start (GTK_BOX (vbox), secondary_label, TRUE, TRUE, 0);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_can_focus (secondary_label, TRUE);
+#else
GTK_WIDGET_SET_FLAGS (secondary_label, GTK_CAN_FOCUS);
+#endif
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);
@@ -959,7 +983,11 @@ pluma_externally_modified_saving_error_message_area_new (
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);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_can_focus (primary_label, TRUE);
+#else
GTK_WIDGET_SET_FLAGS (primary_label, GTK_CAN_FOCUS);
+#endif
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
secondary_text = _("If you save it, all the external changes could be lost. Save it anyway?");
@@ -968,7 +996,11 @@ pluma_externally_modified_saving_error_message_area_new (
secondary_label = gtk_label_new (secondary_markup);
g_free (secondary_markup);
gtk_box_pack_start (GTK_BOX (vbox), secondary_label, TRUE, TRUE, 0);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_can_focus (secondary_label, TRUE);
+#else
GTK_WIDGET_SET_FLAGS (secondary_label, GTK_CAN_FOCUS);
+#endif
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);
@@ -1069,7 +1101,11 @@ pluma_no_backup_saving_error_message_area_new (const gchar *uri,
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);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_can_focus (primary_label, TRUE);
+#else
GTK_WIDGET_SET_FLAGS (primary_label, GTK_CAN_FOCUS);
+#endif
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
secondary_text = _("pluma could not back up the old copy of the file before saving the new one. "
@@ -1080,7 +1116,11 @@ pluma_no_backup_saving_error_message_area_new (const gchar *uri,
secondary_label = gtk_label_new (secondary_markup);
g_free (secondary_markup);
gtk_box_pack_start (GTK_BOX (vbox), secondary_label, TRUE, TRUE, 0);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_can_focus (secondary_label, TRUE);
+#else
GTK_WIDGET_SET_FLAGS (secondary_label, GTK_CAN_FOCUS);
+#endif
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);