[gtranslator: 1/3] Fix assistant



commit 58acfb12e26b045f214f5852e8fe004458eceb49
Author: Daniel GarcĂ­a Moreno <danigm wadobo com>
Date:   Wed Sep 5 19:19:50 2018 +0200

    Fix assistant
    
    The assistant wasn't working because there was two pages with the same
    title, and that was causing problems. I've renamed the languages fetcher
    page to "Language".
    
    I've also set this assistant as a modal window attached to the main
    window to show it centered and with the main window disabled and dark.

 src/gtr-assistant.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/src/gtr-assistant.c b/src/gtr-assistant.c
index bb4faf5b..308dd2a3 100644
--- a/src/gtr-assistant.c
+++ b/src/gtr-assistant.c
@@ -392,7 +392,7 @@ create_profiles_page2 (GtrAssistant * as)
                     as);
 
   gtk_assistant_append_page (GTK_ASSISTANT (as), priv->languages_fetcher);
-  gtk_assistant_set_page_title (GTK_ASSISTANT (as), priv->languages_fetcher, _("Profile"));
+  gtk_assistant_set_page_title (GTK_ASSISTANT (as), priv->languages_fetcher, _("Language"));
 }
 
 static void
@@ -468,14 +468,11 @@ gtr_show_assistant (GtrWindow * window)
       gtk_widget_show (GTK_WIDGET (assist));
     }
 
+  gtk_window_set_transient_for (GTK_WINDOW (assist), GTK_WINDOW (window));
+  gtk_window_set_attached_to (GTK_WINDOW (assist), GTK_WIDGET (window));
+  gtk_window_set_type_hint (GTK_WINDOW (assist), GDK_WINDOW_TYPE_HINT_DIALOG);
   /* Make asssitant modal preventing using application without profile */
   gtk_window_set_modal (GTK_WINDOW (assist), TRUE);
 
-  if (GTK_WINDOW (window) !=
-      gtk_window_get_transient_for (GTK_WINDOW (assist)))
-    {
-      gtk_window_set_transient_for (GTK_WINDOW (assist), GTK_WINDOW (window));
-    }
-
   gtk_window_present (GTK_WINDOW (assist));
 }


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