summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-30 22:57:52 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-30 22:57:52 +0000
commit8bacacdf800eb344096c9754ec46e4c1acbd4b4a (patch)
treef9aaf9d6aa5b984b0ead2d2fd31568d5b4464ce1 /chrome/browser/gtk
parent4465980abb5516b9cf56682119a441f90bd2e072 (diff)
downloadchromium_src-8bacacdf800eb344096c9754ec46e4c1acbd4b4a.zip
chromium_src-8bacacdf800eb344096c9754ec46e4c1acbd4b4a.tar.gz
chromium_src-8bacacdf800eb344096c9754ec46e4c1acbd4b4a.tar.bz2
GTK: Bidify the status bubble.
BUG=17632 Review URL: http://codereview.chromium.org/159664 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22114 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r--chrome/browser/gtk/tab_contents_container_gtk.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/chrome/browser/gtk/tab_contents_container_gtk.cc b/chrome/browser/gtk/tab_contents_container_gtk.cc
index 5517f68..f6cbb2e 100644
--- a/chrome/browser/gtk/tab_contents_container_gtk.cc
+++ b/chrome/browser/gtk/tab_contents_container_gtk.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/gtk/tab_contents_container_gtk.h"
+#include "app/l10n_util.h"
#include "base/gfx/native_widget_types.h"
#include "chrome/browser/gtk/gtk_floating_container.h"
#include "chrome/browser/gtk/status_bubble_gtk.h"
@@ -168,25 +169,26 @@ void TabContentsContainerGtk::OnFixedSizeAllocate(
void TabContentsContainerGtk::OnSetFloatingPosition(
GtkFloatingContainer* floating_container, GtkAllocation* allocation,
TabContentsContainerGtk* tab_contents_container) {
- GtkWidget* widget = tab_contents_container->status_bubble_->widget();
+ GtkWidget* status = tab_contents_container->status_bubble_->widget();
// Look at the size request of the status bubble and tell the
// GtkFloatingContainer where we want it positioned.
GtkRequisition requisition;
- gtk_widget_size_request(widget, &requisition);
+ gtk_widget_size_request(status, &requisition);
GValue value = { 0, };
g_value_init(&value, G_TYPE_INT);
- g_value_set_int(&value, 0);
- // TODO(erg): Since we're absolutely positioning stuff, we probably have to
- // do manual RTL right here.
+ if (l10n_util::GetTextDirection() == l10n_util::LEFT_TO_RIGHT)
+ g_value_set_int(&value, 0);
+ else
+ g_value_set_int(&value, allocation->width - requisition.width);
gtk_container_child_set_property(GTK_CONTAINER(floating_container),
- widget, "x", &value);
+ status, "x", &value);
int child_y = std::max(
allocation->y + allocation->height - requisition.height, 0);
g_value_set_int(&value, child_y);
gtk_container_child_set_property(GTK_CONTAINER(floating_container),
- widget, "y", &value);
+ status, "y", &value);
g_value_unset(&value);
}