aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2011-09-23 17:54:47 +0800
committerXavier Claessens <xclaesse@gmail.com>2011-09-26 18:34:46 +0800
commit07ff682cb420c1ee458f2115d7693d2861f40db6 (patch)
tree8a1a4b0bb52bcca5783764cd77a7e83000020f55 /src
parent175e46dd48b3906e59df36b9faa469565783e28d (diff)
downloadgsoc2013-empathy-07ff682cb420c1ee458f2115d7693d2861f40db6.tar
gsoc2013-empathy-07ff682cb420c1ee458f2115d7693d2861f40db6.tar.gz
gsoc2013-empathy-07ff682cb420c1ee458f2115d7693d2861f40db6.tar.bz2
gsoc2013-empathy-07ff682cb420c1ee458f2115d7693d2861f40db6.tar.lz
gsoc2013-empathy-07ff682cb420c1ee458f2115d7693d2861f40db6.tar.xz
gsoc2013-empathy-07ff682cb420c1ee458f2115d7693d2861f40db6.tar.zst
gsoc2013-empathy-07ff682cb420c1ee458f2115d7693d2861f40db6.zip
empathy-account: add a --assistant option to force having assistant
This makes easier to test it https://bugzilla.gnome.org/show_bug.cgi?id=646630
Diffstat (limited to 'src')
-rw-r--r--src/empathy-accounts-common.c3
-rw-r--r--src/empathy-accounts-common.h1
-rw-r--r--src/empathy-accounts.c11
3 files changed, 11 insertions, 4 deletions
diff --git a/src/empathy-accounts-common.c b/src/empathy-accounts-common.c
index 8932fdbbc..23ea5f508 100644
--- a/src/empathy-accounts-common.c
+++ b/src/empathy-accounts-common.c
@@ -132,12 +132,13 @@ out:
void
empathy_accounts_show_accounts_ui (TpAccountManager *manager,
TpAccount *account,
+ gboolean assistant,
GCallback window_destroyed_cb)
{
g_return_if_fail (TP_IS_ACCOUNT_MANAGER (manager));
g_return_if_fail (!account || TP_IS_ACCOUNT (account));
- if (empathy_accounts_has_non_salut_accounts (manager))
+ if (empathy_accounts_has_non_salut_accounts (manager) && !assistant)
{
do_show_accounts_ui (manager, account, window_destroyed_cb);
}
diff --git a/src/empathy-accounts-common.h b/src/empathy-accounts-common.h
index c7f36661b..002d78323 100644
--- a/src/empathy-accounts-common.h
+++ b/src/empathy-accounts-common.h
@@ -28,6 +28,7 @@ gboolean empathy_accounts_has_accounts (TpAccountManager *manager);
void empathy_accounts_show_accounts_ui (TpAccountManager *manager,
TpAccount *account,
+ gboolean assistant,
GCallback window_destroyed_cb);
#endif /* __EMPATHY_ACCOUNTS_COMMON_H__ */
diff --git a/src/empathy-accounts.c b/src/empathy-accounts.c
index 165dd052f..3cad96744 100644
--- a/src/empathy-accounts.c
+++ b/src/empathy-accounts.c
@@ -55,6 +55,7 @@ static gboolean only_if_needed = FALSE;
static gboolean hidden = FALSE;
static gchar *selected_account_name = NULL;
static gboolean account_manager_prepared = FALSE;
+static gboolean assistant = FALSE;
static void
account_prepare_cb (GObject *source_object,
@@ -73,7 +74,7 @@ account_prepare_cb (GObject *source_object,
account = NULL;
}
- empathy_accounts_show_accounts_ui (manager, account,
+ empathy_accounts_show_accounts_ui (manager, account, assistant,
G_CALLBACK (gtk_main_quit));
}
@@ -84,7 +85,7 @@ maybe_show_accounts_ui (TpAccountManager *manager)
(only_if_needed && empathy_accounts_has_non_salut_accounts (manager)))
gtk_main_quit ();
else
- empathy_accounts_show_accounts_ui (manager, NULL, gtk_main_quit);
+ empathy_accounts_show_accounts_ui (manager, NULL, assistant, gtk_main_quit);
}
static void
@@ -156,7 +157,7 @@ app_command_line_cb (GApplication *app,
TpAccountManager *account_manager;
account_manager = tp_account_manager_dup ();
- empathy_accounts_show_accounts_ui (account_manager, NULL,
+ empathy_accounts_show_accounts_ui (account_manager, NULL, assistant,
G_CALLBACK (gtk_main_quit));
g_object_unref (account_manager);
@@ -191,6 +192,10 @@ local_cmdline (GApplication *app,
N_("Initially select given account (eg, "
"gabble/jabber/foo_40example_2eorg0)"),
N_("<account-id>") },
+ { "assistant", 'a',
+ 0, G_OPTION_ARG_NONE, &assistant,
+ N_("Show account assistant"),
+ NULL },
{ NULL }
};