]> git.0d.be Git - empathy.git/blobdiff - src/empathy-accounts-dialog.c
Merge commit 'jtellier/confirm-lose-accounts-settings'
[empathy.git] / src / empathy-accounts-dialog.c
index 2b233258d9188049fe8dbc9841f56febcae2a87b..a00c1b5ebe8e82365f18e9f39523216a49bcf966 100644 (file)
@@ -60,7 +60,7 @@
 /* The primary text of the dialog shown to the user when he is about to lose
  * unsaved changes */
 #define PENDING_CHANGES_QUESTION_PRIMARY_TEXT \
-  "There are unsaved modification regarding your %s account."
+  _("There are unsaved modification regarding your %s account.")
 
 #define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyAccountsDialog)
 G_DEFINE_TYPE (EmpathyAccountsDialog, empathy_accounts_dialog, G_TYPE_OBJECT);
@@ -229,9 +229,11 @@ get_default_display_name (EmpathyAccountSettings *settings)
 
           /* To translators: The first parameter is the login id and the
            * second one is the server. The resulting string will be something
-           * like: "MyUserName on chat.freenode.net" */
-          default_display_name =
-              g_strdup_printf (_("%s on %s"), login_id, server);
+           * like: "MyUserName on chat.freenode.net".
+           * You should reverse the order of these arguments if the
+           * server should come before the login id in your locale.*/
+          default_display_name = g_strdup_printf (_("%1$s on %2$s"),
+              login_id, server);
         }
       else
         {
@@ -280,7 +282,14 @@ account_dialog_create_settings_widget (EmpathyAccountsDialog *dialog,
   EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
   gchar *icon_name;
 
-  priv->settings_widget = empathy_account_widget_get_widget (widget_object);
+  priv->setting_widget_object =
+      empathy_account_widget_new_for_protocol (settings, FALSE);
+
+  priv->settings_widget =
+      empathy_account_widget_get_widget (priv->setting_widget_object);
+
+  priv->settings_widget =
+      empathy_account_widget_get_widget (priv->setting_widget_object);
   g_signal_connect (priv->setting_widget_object, "account-created",
         G_CALLBACK (empathy_account_dialog_account_created_cb), dialog);
   g_signal_connect (priv->setting_widget_object, "cancelled",
@@ -481,19 +490,20 @@ accounts_dialog_button_add_clicked_cb (GtkWidget *button,
 
   if (accounts_dialog_has_pending_change (dialog, &account))
     {
-    gchar *question_dialog_primary_text = g_strdup_printf (
-        PENDING_CHANGES_QUESTION_PRIMARY_TEXT,
-        empathy_account_get_display_name (account));
-
-    accounts_dialog_show_question_dialog (dialog, question_dialog_primary_text,
-        "You are about to create a new account, which will discard\n"
-          "your changes. Are you sure you want to proceed?",
-        G_CALLBACK (accounts_dialog_add_pending_changes_response_cb),
-        dialog,
-        GTK_STOCK_CANCEL, GTK_RESPONSE_NO,
-        GTK_STOCK_DISCARD, GTK_RESPONSE_YES, NULL);
-
-    g_free (question_dialog_primary_text);
+      gchar *question_dialog_primary_text = g_strdup_printf (
+          PENDING_CHANGES_QUESTION_PRIMARY_TEXT,
+          empathy_account_get_display_name (account));
+
+      accounts_dialog_show_question_dialog (dialog,
+          question_dialog_primary_text,
+          _("You are about to create a new account, which will discard\n"
+              "your changes. Are you sure you want to proceed?"),
+          G_CALLBACK (accounts_dialog_add_pending_changes_response_cb),
+          dialog,
+          GTK_STOCK_CANCEL, GTK_RESPONSE_NO,
+          GTK_STOCK_DISCARD, GTK_RESPONSE_YES, NULL);
+
+      g_free (question_dialog_primary_text);
     }
   else
     {
@@ -962,9 +972,10 @@ accounts_dialog_account_selection_change (GtkTreeSelection *selection,
           PENDING_CHANGES_QUESTION_PRIMARY_TEXT,
           empathy_account_get_display_name (account));
 
-      accounts_dialog_show_question_dialog (dialog, question_dialog_primary_text,
-          "You are about to select another account, which will discard\n"
-            "your changes. Are you sure you want to proceed?",
+      accounts_dialog_show_question_dialog (dialog,
+          question_dialog_primary_text,
+          _("You are about to select another account, which will discard\n"
+              "your changes. Are you sure you want to proceed?"),
           G_CALLBACK (accounts_dialog_selection_change_response_cb),
           dialog,
           GTK_STOCK_CANCEL, GTK_RESPONSE_NO,
@@ -1449,9 +1460,10 @@ accounts_dialog_response_cb (GtkWidget *widget,
           PENDING_CHANGES_QUESTION_PRIMARY_TEXT,
           empathy_account_get_display_name (account));
 
-      accounts_dialog_show_question_dialog (dialog, question_dialog_primary_text,
-          "You are about to close the window, which will discard\n"
-            "your changes. Are you sure you want to proceed?",
+      accounts_dialog_show_question_dialog (dialog,
+          question_dialog_primary_text,
+          _("You are about to close the window, which will discard\n"
+              "your changes. Are you sure you want to proceed?"),
           G_CALLBACK (accounts_dialog_close_response_cb),
           widget,
           GTK_STOCK_CANCEL, GTK_RESPONSE_NO,