[rhythmbox] Don't handle RTL icons manually for GTK+ >= 3.12
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] Don't handle RTL icons manually for GTK+ >= 3.12
- Date: Sun, 6 Sep 2015 10:55:23 +0000 (UTC)
commit bb170987b1c6169d650b38041628e9364554e0a1
Author: Mario Sanchez Prada <mario endlessm com>
Date: Fri Aug 14 17:36:30 2015 +0100
Don't handle RTL icons manually for GTK+ >= 3.12
The filenames for icons in RTL languages has changed slightly after
GTK+ 3.12, including now the '-rtl' part after '-symbolic', and not
before as it used to be. Also, since that version on, GTK+ handles
this automatically, so there's no need to explicitly request the
RTL version of the icons files from the application.
This patch bumps the version GTK+ and forgets about manually requesting
the RTL versions of those icons since GTK+ will do that from now on.
https://bugzilla.gnome.org/show_bug.cgi?id=753359
configure.ac | 2 +-
shell/rb-shell.c | 20 ++++----------------
widgets/rb-entry-view.c | 6 +-----
3 files changed, 6 insertions(+), 22 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 52b4d84..4457182 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,7 +42,7 @@ m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
AC_C_BIGENDIAN
AC_CHECK_SIZEOF(long)
-GTK_REQS=3.6.0
+GTK_REQS=3.12.0
GST_REQS=1.0.0
GDK_PIXBUF_REQS=2.18.0
diff --git a/shell/rb-shell.c b/shell/rb-shell.c
index be50082..7338d20 100644
--- a/shell/rb-shell.c
+++ b/shell/rb-shell.c
@@ -730,7 +730,6 @@ construct_load_ui (RBShell *shell)
GtkWidget *menu_button;
GtkWidget *image;
GMenuModel *model;
- gboolean rtl;
rb_debug ("shell: loading ui");
rb_profile_start ("loading ui");
@@ -740,21 +739,14 @@ construct_load_ui (RBShell *shell)
shell->priv->play_button = GTK_WIDGET (gtk_builder_get_object (builder, "play-button"));
- rtl = (gtk_widget_get_direction (shell->priv->play_button) == GTK_TEXT_DIR_RTL);
image = gtk_button_get_image (GTK_BUTTON (gtk_builder_get_object (builder, "next-button")));
- gtk_image_set_from_icon_name (GTK_IMAGE (image),
- rtl ? "media-skip-forward-rtl-symbolic" : "media-skip-forward-symbolic",
- GTK_ICON_SIZE_LARGE_TOOLBAR);
+ gtk_image_set_from_icon_name (GTK_IMAGE (image), "media-skip-forward-symbolic",
GTK_ICON_SIZE_LARGE_TOOLBAR);
image = gtk_button_get_image (GTK_BUTTON (gtk_builder_get_object (builder, "previous-button")));
- gtk_image_set_from_icon_name (GTK_IMAGE (image),
- rtl ? "media-skip-backward-rtl-symbolic" :
"media-skip-backward-symbolic",
- GTK_ICON_SIZE_LARGE_TOOLBAR);
+ gtk_image_set_from_icon_name (GTK_IMAGE (image), "media-skip-backward-symbolic",
GTK_ICON_SIZE_LARGE_TOOLBAR);
image = gtk_button_get_image (GTK_BUTTON (gtk_builder_get_object (builder, "play-button")));
- gtk_image_set_from_icon_name (GTK_IMAGE (image),
- rtl ? "media-playback-start-rtl-symbolic" :
"media-playback-start-symbolic",
- GTK_ICON_SIZE_LARGE_TOOLBAR);
+ gtk_image_set_from_icon_name (GTK_IMAGE (image), "media-playback-start-symbolic",
GTK_ICON_SIZE_LARGE_TOOLBAR);
/* this seems a bit unnecessary */
gtk_actionable_set_action_target_value (GTK_ACTIONABLE (gtk_builder_get_object (builder,
"shuffle-button")),
@@ -2296,11 +2288,7 @@ rb_shell_playing_changed_cb (RBShellPlayer *player, gboolean playing, RBShell *s
tooltip = _("Stop playback");
}
} else {
- if (gtk_widget_get_direction (image) == GTK_TEXT_DIR_RTL) {
- icon_name = "media-playback-start-rtl-symbolic";
- } else {
- icon_name = "media-playback-start-symbolic";
- }
+ icon_name = "media-playback-start-symbolic";
tooltip = _("Start playback");
}
gtk_image_set_from_icon_name (GTK_IMAGE (image), icon_name, GTK_ICON_SIZE_LARGE_TOOLBAR);
diff --git a/widgets/rb-entry-view.c b/widgets/rb-entry-view.c
index 734b127..ccff48f 100644
--- a/widgets/rb-entry-view.c
+++ b/widgets/rb-entry-view.c
@@ -837,11 +837,7 @@ rb_entry_view_playing_cell_data_func (GtkTreeViewColumn *column,
if (entry == view->priv->playing_entry) {
switch (view->priv->playing_state) {
case RB_ENTRY_VIEW_PLAYING:
- if (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL) {
- name = "media-playback-start-rtl-symbolic";
- } else {
- name = "media-playback-start-symbolic";
- }
+ name = "media-playback-start-symbolic";
break;
case RB_ENTRY_VIEW_PAUSED:
name = "media-playback-pause-symbolic";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]