cheese r1172 - in trunk: . src
- From: yairhr svn gnome org
- To: svn-commits-list gnome org
- Subject: cheese r1172 - in trunk: . src
- Date: Wed, 14 Jan 2009 20:54:48 +0000 (UTC)
Author: yairhr
Date: Wed Jan 14 20:54:48 2009
New Revision: 1172
URL: http://svn.gnome.org/viewvc/cheese?rev=1172&view=rev
Log:
2009-01-14 Yair Hershkovitz <yairhr gmail com>
* src/eog-thumb-nav.c:
Reverse icon view scroll buttons scroll direction for RTL locales.
Closes bug #566197.
Modified:
trunk/ChangeLog
trunk/src/eog-thumb-nav.c
Modified: trunk/src/eog-thumb-nav.c
==============================================================================
--- trunk/src/eog-thumb-nav.c (original)
+++ trunk/src/eog-thumb-nav.c Wed Jan 14 20:54:48 2009
@@ -97,11 +97,13 @@
{
EogThumbNav *nav;
EogThumbNavPrivate *priv;
+ gboolean ltr;
nav = EOG_THUMB_NAV (user_data);
priv = EOG_THUMB_NAV_GET_PRIVATE (nav);
+ ltr = gtk_widget_get_direction (priv->sw) == GTK_TEXT_DIR_LTR;
- gtk_widget_set_sensitive (priv->button_right,
+ gtk_widget_set_sensitive (ltr ? priv->button_right : priv->button_left,
adj->value < adj->upper - adj->page_size);
}
@@ -110,13 +112,15 @@
{
EogThumbNav *nav;
EogThumbNavPrivate *priv;
+ gboolean ltr;
nav = EOG_THUMB_NAV (user_data);
priv = EOG_THUMB_NAV_GET_PRIVATE (nav);
+ ltr = gtk_widget_get_direction (priv->sw) == GTK_TEXT_DIR_LTR;
- gtk_widget_set_sensitive (priv->button_left, adj->value > 0);
+ gtk_widget_set_sensitive (ltr ? priv->button_left : priv->button_right, adj->value > 0);
- gtk_widget_set_sensitive (priv->button_right,
+ gtk_widget_set_sensitive (ltr ? priv->button_right : priv->button_left,
adj->value < adj->upper - adj->page_size);
}
@@ -164,7 +168,9 @@
{
nav->priv->scroll_pos = 0;
- nav->priv->scroll_dir = (GTK_WIDGET (button) == nav->priv->button_right);
+ nav->priv->scroll_dir = gtk_widget_get_direction (GTK_WIDGET (button)) == GTK_TEXT_DIR_LTR ?
+ GTK_WIDGET (button) == nav->priv->button_right :
+ GTK_WIDGET (button) == nav->priv->button_left;
eog_thumb_nav_scroll_step (nav);
}
@@ -172,7 +178,9 @@
static void
eog_thumb_nav_start_scroll (GtkButton *button, EogThumbNav *nav)
{
- nav->priv->scroll_dir = (GTK_WIDGET (button) == nav->priv->button_right);
+ nav->priv->scroll_dir = gtk_widget_get_direction (GTK_WIDGET (button)) == GTK_TEXT_DIR_LTR ?
+ GTK_WIDGET (button) == nav->priv->button_right :
+ GTK_WIDGET (button) == nav->priv->button_left;
nav->priv->scroll_id = g_timeout_add (EOG_THUMB_NAV_SCROLL_TIMEOUT,
eog_thumb_nav_scroll_step,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]