[nautilus] connect-server-dialog: Set the arrow icon according to locale's text direction



commit 90094de8023b89546ade9a234a733cdca207c5e4
Author: Yosef Or Boczko <yoseforb src gnome org>
Date:   Wed Mar 26 03:34:30 2014 +0200

    connect-server-dialog: Set the arrow icon according to locale's text direction
    
    https://bugzilla.gnome.org/show_bug.cgi?id=727066

 src/nautilus-connect-server-dialog.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-connect-server-dialog.c b/src/nautilus-connect-server-dialog.c
index aa10cbb..4a0f60c 100644
--- a/src/nautilus-connect-server-dialog.c
+++ b/src/nautilus-connect-server-dialog.c
@@ -235,10 +235,13 @@ static void
 check_uri_entry (NautilusConnectServerDialog *dialog)
 {
        guint length;
+       gboolean rtl;
        gboolean button_active = FALSE;
        gboolean icon_active = FALSE;
        const char *text = NULL;
 
+       rtl = gtk_widget_get_direction (GTK_WIDGET (dialog)) == GTK_TEXT_DIR_RTL;
+
        length = gtk_entry_get_text_length (GTK_ENTRY (dialog->details->uri_entry));
        if (length > 0) {
                GError *error = NULL;
@@ -257,7 +260,8 @@ check_uri_entry (NautilusConnectServerDialog *dialog)
        gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, button_active);
 
        g_object_set (dialog->details->uri_entry,
-                     "secondary-icon-name", icon_active ? "edit-clear-symbolic" : NULL,
+                     "secondary-icon-name", icon_active ? (rtl ? "edit-clear-rtl-symbolic" :
+                                                                 "edit-clear-symbolic") : NULL,
                      "secondary-icon-activatable", icon_active,
                      "secondary-icon-sensitive", icon_active,
                      NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]