~bcurtiswx/ubuntu/precise/empathy/3.4.2.1-0ubuntu1

« back to all changes in this revision

Viewing changes to src/empathy-account-assistant.c

  • Committer: Bazaar Package Importer
  • Author(s): Laurent Bigonville
  • Date: 2009-11-16 23:40:52 UTC
  • mfrom: (1.1.39 upstream)
  • mto: (6.3.7 experimental)
  • mto: This revision was merged to the branch mainline in revision 80.
  • Revision ID: james.westby@ubuntu.com-20091116234052-7hhwrpeln4mwdyw7
Tags: upstream-2.29.2
ImportĀ upstreamĀ versionĀ 2.29.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
225
225
  EmpathyAccountAssistant *self = user_data;
226
226
  EmpathyAccountAssistantPriv *priv = GET_PRIV (self);
227
227
 
228
 
  empathy_account_set_enabled_finish (EMPATHY_ACCOUNT (source),
 
228
  tp_account_set_enabled_finish (TP_ACCOUNT (source),
229
229
      result, &error);
230
230
 
231
231
  if (error)
249
249
  EmpathyAccountAssistant *self = user_data;
250
250
  EmpathyAccountAssistantPriv *priv = GET_PRIV (self);
251
251
  EmpathyAccountSettings *settings = EMPATHY_ACCOUNT_SETTINGS (source);
252
 
  EmpathyAccount *account;
 
252
  TpAccount *account;
 
253
  gchar *display_name;
253
254
 
254
255
  empathy_account_settings_apply_finish (settings, result, &error);
255
256
 
 
257
  /* set default display name */
 
258
  display_name = empathy_account_widget_get_default_display_name (
 
259
      priv->current_widget_object);
 
260
 
 
261
  empathy_account_settings_set_display_name_async (settings,
 
262
      display_name, NULL, NULL);
 
263
 
 
264
  g_free (display_name);
 
265
 
256
266
  priv->is_creating = FALSE;
257
267
 
258
268
  if (error != NULL)
265
275
 
266
276
  /* enable the newly created account */
267
277
  account = empathy_account_settings_get_account (settings);
268
 
  empathy_account_set_enabled_async (account, TRUE,
 
278
  tp_account_set_enabled_async (account, TRUE,
269
279
      account_assistant_account_enabled_cb, self);
270
280
}
271
281
 
930
940
}
931
941
 
932
942
GtkWidget *
933
 
empathy_account_assistant_new (GtkWindow *window)
 
943
empathy_account_assistant_show (GtkWindow *window)
934
944
{
935
 
  return g_object_new (EMPATHY_TYPE_ACCOUNT_ASSISTANT, "parent-window",
936
 
      window, NULL);
 
945
  static GtkWidget *dialog = NULL;
 
946
 
 
947
  if (dialog == NULL)
 
948
    {
 
949
      dialog =  g_object_new (EMPATHY_TYPE_ACCOUNT_ASSISTANT, "parent-window",
 
950
        window, NULL);
 
951
      g_object_add_weak_pointer (G_OBJECT (dialog), (gpointer *) &dialog);
 
952
    }
 
953
 
 
954
  gtk_window_present (GTK_WINDOW (dialog));
 
955
 
 
956
  return dialog;
937
957
}
 
958
 
 
959