aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-06-03 02:36:17 +0800
committerChristian Persch <chpe@src.gnome.org>2004-06-03 02:36:17 +0800
commitd877b95ce51e828ea503b815909610522c32def1 (patch)
tree59db9185fe531b462e0dc5a15b63a1b07c0334be /src
parent5b889ee42088eb4ec97677efae63897ef29e8047 (diff)
downloadgsoc2013-epiphany-d877b95ce51e828ea503b815909610522c32def1.tar.gz
gsoc2013-epiphany-d877b95ce51e828ea503b815909610522c32def1.tar.zst
gsoc2013-epiphany-d877b95ce51e828ea503b815909610522c32def1.zip
Move the "Exit Fullscreen" popup to the right in RTL locale. Fixes bug
2004-06-02 Christian Persch <chpe@cvs.gnome.org> * src/ephy-window.c: (update_exit_fullscreen_popup_position): Move the "Exit Fullscreen" popup to the right in RTL locale. Fixes bug #140828.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-window.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 4819afee8..585e82cb4 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -423,13 +423,13 @@ add_widget (GtkUIManager *merge, GtkWidget *widget, EphyWindow *window)
static void
update_exit_fullscreen_popup_position (EphyWindow *window)
{
+ GtkWidget *popup = window->priv->exit_fullscreen_popup;
GdkRectangle screen_rect;
- int popup_height;
+ int popup_width, popup_height;
- g_return_if_fail (window->priv->exit_fullscreen_popup != NULL);
+ g_return_if_fail (popup != NULL);
- gtk_window_get_size (GTK_WINDOW (window->priv->exit_fullscreen_popup),
- NULL, &popup_height);
+ gtk_window_get_size (GTK_WINDOW (popup), &popup_width, &popup_height);
gdk_screen_get_monitor_geometry (gdk_screen_get_default (),
gdk_screen_get_monitor_at_window
@@ -437,8 +437,17 @@ update_exit_fullscreen_popup_position (EphyWindow *window)
GTK_WIDGET (window)->window),
&screen_rect);
- gtk_window_move (GTK_WINDOW (window->priv->exit_fullscreen_popup),
- screen_rect.x, screen_rect.height - popup_height);
+ if (gtk_widget_get_direction (popup) == GTK_TEXT_DIR_RTL)
+ {
+ gtk_window_move (GTK_WINDOW (popup),
+ screen_rect.x + screen_rect.width - popup_width,
+ screen_rect.height - popup_height);
+ }
+ else
+ {
+ gtk_window_move (GTK_WINDOW (popup),
+ screen_rect.x, screen_rect.height - popup_height);
+ }
}
static void