summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2015-12-17 15:44:57 +0100
committerWolfgang Ulbrich <[email protected]>2015-12-17 15:44:57 +0100
commit2fb2eec880db063eb6cdcf253528719e701ba7f0 (patch)
tree3524e2bf541bfd2cc833c552ea37f1965e425f3e
parentfd6a0407a4d60fc1801a77e66fed5e058cdfac59 (diff)
downloadmate-applets-2fb2eec880db063eb6cdcf253528719e701ba7f0.tar.bz2
mate-applets-2fb2eec880db063eb6cdcf253528719e701ba7f0.tar.xz
GTK3 charpick: fix deprecated usage of GtkMisk and GtkArrow
-rw-r--r--charpick/charpick.c15
-rw-r--r--charpick/properties.c8
2 files changed, 22 insertions, 1 deletions
diff --git a/charpick/charpick.c b/charpick/charpick.c
index 7ce43e9a..f7530392 100644
--- a/charpick/charpick.c
+++ b/charpick/charpick.c
@@ -471,6 +471,18 @@ build_table(charpick_data *p_curr_data)
switch (mate_panel_applet_get_orient (MATE_PANEL_APPLET (p_curr_data->applet))) {
case MATE_PANEL_APPLET_ORIENT_DOWN:
+#if GTK_CHECK_VERSION (3, 0, 0)
+ arrow = gtk_image_new_from_icon_name ("pan-down-symbolic", GTK_ICON_SIZE_MENU);
+ break;
+ case MATE_PANEL_APPLET_ORIENT_UP:
+ arrow = gtk_image_new_from_icon_name ("pan-up-symbolic", GTK_ICON_SIZE_MENU);
+ break;
+ case MATE_PANEL_APPLET_ORIENT_LEFT:
+ arrow = gtk_image_new_from_icon_name ("pan-start-symbolic", GTK_ICON_SIZE_MENU);
+ break;
+ case MATE_PANEL_APPLET_ORIENT_RIGHT:
+ arrow = gtk_image_new_from_icon_name ("pan-end-symbolic", GTK_ICON_SIZE_MENU);
+#else
arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_OUT);
break;
case MATE_PANEL_APPLET_ORIENT_UP:
@@ -480,7 +492,8 @@ build_table(charpick_data *p_curr_data)
arrow = gtk_arrow_new (GTK_ARROW_LEFT, GTK_SHADOW_OUT);
break;
case MATE_PANEL_APPLET_ORIENT_RIGHT:
- arrow = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_OUT);
+ arrow = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_OUT);
+#endif
break;
default:
g_assert_not_reached ();
diff --git a/charpick/properties.c b/charpick/properties.c
index c92001e4..2252131d 100644
--- a/charpick/properties.c
+++ b/charpick/properties.c
@@ -420,7 +420,11 @@ create_hig_catagory (GtkWidget *main_box, gchar *title)
tmp = g_strdup_printf ("<b>%s</b>", title);
label = gtk_label_new (NULL);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
+#else
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
gtk_label_set_markup (GTK_LABEL (label), tmp);
g_free (tmp);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
@@ -460,7 +464,11 @@ static void default_chars_frame_create(charpick_data *curr_data)
label = gtk_label_new_with_mnemonic(_("_Palettes:"));
gtk_box_pack_start(GTK_BOX(vbox3), label, FALSE, FALSE, 0);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
+#else
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
gtk_widget_show(label);
hbox = gtk_hbox_new (FALSE, 12);