aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-07-04 17:41:34 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-07-04 17:41:34 +0800
commitd7c566bf16a8265a29d6c858f0cbf89667cf64fd (patch)
treeb7e57c51180287df01d104021316758cd177b61f /libempathy-gtk
parentc4f40f9520864dc07fa7ea15da4a4d37c562ac81 (diff)
downloadgsoc2013-empathy-d7c566bf16a8265a29d6c858f0cbf89667cf64fd.tar
gsoc2013-empathy-d7c566bf16a8265a29d6c858f0cbf89667cf64fd.tar.gz
gsoc2013-empathy-d7c566bf16a8265a29d6c858f0cbf89667cf64fd.tar.bz2
gsoc2013-empathy-d7c566bf16a8265a29d6c858f0cbf89667cf64fd.tar.lz
gsoc2013-empathy-d7c566bf16a8265a29d6c858f0cbf89667cf64fd.tar.xz
gsoc2013-empathy-d7c566bf16a8265a29d6c858f0cbf89667cf64fd.tar.zst
gsoc2013-empathy-d7c566bf16a8265a29d6c858f0cbf89667cf64fd.zip
Select the bugged account upon a failed connection. Fixes bug #536984 (Jonny Lamb).
When a connection fails, a box in the main window appears with an "Edit Account" button. Clicking this button takes you to the account editor, but does nothing else. This patch moves the selection to the bugged account, for convenience. Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk> git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1192 4ee84921-47dd-4033-b63a-18d7a039a3e4
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-accounts-dialog.c10
-rw-r--r--libempathy-gtk/empathy-accounts-dialog.h5
2 files changed, 12 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-accounts-dialog.c b/libempathy-gtk/empathy-accounts-dialog.c
index 177fc6fe8..a148ed24f 100644
--- a/libempathy-gtk/empathy-accounts-dialog.c
+++ b/libempathy-gtk/empathy-accounts-dialog.c
@@ -1003,7 +1003,8 @@ accounts_dialog_destroy_cb (GtkWidget *widget,
}
GtkWidget *
-empathy_accounts_dialog_show (GtkWindow *parent)
+empathy_accounts_dialog_show (GtkWindow *parent,
+ McAccount *selected_account)
{
static EmpathyAccountsDialog *dialog = NULL;
GladeXML *glade;
@@ -1086,7 +1087,12 @@ empathy_accounts_dialog_show (GtkWindow *parent)
accounts_dialog_model_setup (dialog);
accounts_dialog_setup (dialog);
- accounts_dialog_model_select_first (dialog);
+
+ if (selected_account) {
+ accounts_dialog_model_set_selected (dialog, selected_account);
+ } else {
+ accounts_dialog_model_select_first (dialog);
+ }
if (parent) {
gtk_window_set_transient_for (GTK_WINDOW (dialog->window),
diff --git a/libempathy-gtk/empathy-accounts-dialog.h b/libempathy-gtk/empathy-accounts-dialog.h
index d76a4dd12..369b2f75b 100644
--- a/libempathy-gtk/empathy-accounts-dialog.h
+++ b/libempathy-gtk/empathy-accounts-dialog.h
@@ -27,9 +27,12 @@
#include <gtk/gtkwidget.h>
+#include <libmissioncontrol/mc-account.h>
+
G_BEGIN_DECLS
-GtkWidget *empathy_accounts_dialog_show (GtkWindow *parent);
+GtkWidget *empathy_accounts_dialog_show (GtkWindow *parent,
+ McAccount *selected_account);
G_END_DECLS