]> git.0d.be Git - empathy.git/blobdiff - src/empathy-account-assistant.c
Do not construct a sentence for an assistant error string (GNOME bug 593257)
[empathy.git] / src / empathy-account-assistant.c
index e375aa72e3954ea7e2c64d93b5c40113e8436a81..68376733e7547e9a5f2b0e8d51dedbd47a43b2ef 100644 (file)
@@ -97,8 +97,7 @@ account_assistant_build_error_page (EmpathyAccountAssistant *self,
     GError *error, gint page_num)
 {
   GtkWidget *main_vbox, *w, *hbox;
-  GString *str;
-  char *message;
+  const char *message;
   PangoAttrList *list;
   EmpathyAccountAssistantPriv *priv = GET_PRIV (self);
 
@@ -115,24 +114,16 @@ account_assistant_build_error_page (EmpathyAccountAssistant *self,
   gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0);
   gtk_widget_show (w);
 
-  /* translators: this is followed by the "while ..." strings some lines
-   * down this file.
-   */
-  str = g_string_new (_("There has been an error "));
-
   if (page_num == PAGE_IMPORT)
-    /* translators: this follows the "There has been an error " string */
-    str = g_string_append (str, _("while importing the accounts."));
+    message = _("There has been an error while importing the accounts.");
   else if (page_num >= PAGE_ENTER_CREATE &&
       priv->first_resp == RESPONSE_ENTER_ACCOUNT)
-    /* translators: this follows the "There has been an error " string */
-    str = g_string_append (str, _("while parsing the account details."));
+    message = _("There has been an error while parsing the account details.");
   else if (page_num >= PAGE_ENTER_CREATE &&
       priv->first_resp == RESPONSE_CREATE_ACCOUNT)
-    /* translators: this follows the "There has been an error " string */
-    str = g_string_append (str, _("while creating the account."));
-
-  message = g_string_free (str, FALSE);
+    message = _("There has been an error while creating the account.");
+  else
+    message = _("There has been an error.")
 
   w = gtk_label_new (message);
   gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0);
@@ -144,7 +135,6 @@ account_assistant_build_error_page (EmpathyAccountAssistant *self,
   gtk_label_set_line_wrap (GTK_LABEL (w), TRUE);
   gtk_widget_show (w);
 
-  g_free (message);
   pango_attr_list_unref (list);
 
   message = g_markup_printf_escaped
@@ -157,7 +147,7 @@ account_assistant_build_error_page (EmpathyAccountAssistant *self,
   gtk_widget_show (w);
 
   w = gtk_label_new (_("You can either go back and try to enter your "
-          "accounts' details again or quit this wizard and add accounts "
+          "accounts' details again or quit this assistant and add accounts "
           "later from the Edit menu."));
   gtk_box_pack_start (GTK_BOX (main_vbox), w, FALSE, FALSE, 6);
   gtk_misc_set_alignment (GTK_MISC (w), 0, 0.5);
@@ -495,6 +485,7 @@ account_assistant_radio_choice_toggled_cb (GtkToggleButton *button,
 static GtkWidget *
 account_assistant_build_introduction_page (EmpathyAccountAssistant *self)
 {
+  EmpathyAccountAssistantPriv *priv = GET_PRIV (self);
   GtkWidget *main_vbox, *hbox_1, *w, *vbox_1;
   GtkWidget *radio = NULL;
   GdkPixbuf *pix;
@@ -563,6 +554,11 @@ account_assistant_build_introduction_page (EmpathyAccountAssistant *self)
 
       g_signal_connect (radio, "clicked",
           G_CALLBACK (account_assistant_radio_choice_toggled_cb), self);
+      priv->first_resp = RESPONSE_IMPORT;
+    }
+  else
+    {
+      priv->first_resp = RESPONSE_ENTER_ACCOUNT;
     }
 
   str = _("Yes, I'll enter my account details now");
@@ -910,9 +906,6 @@ empathy_account_assistant_init (EmpathyAccountAssistant *self)
       GTK_ASSISTANT_PAGE_INTRO);
   gtk_assistant_set_page_complete (assistant, page, TRUE);
 
-  /* set a default answer */
-  priv->first_resp = RESPONSE_IMPORT;
-
   /* second page (import accounts) */
   page = account_assistant_build_import_page (self);
   gtk_assistant_append_page (assistant, page);