[empathy] empathy-account: add a --assistant option to force having assistant
- From: Xavier Claessens <xclaesse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] empathy-account: add a --assistant option to force having assistant
- Date: Mon, 26 Sep 2011 10:35:18 +0000 (UTC)
commit 07ff682cb420c1ee458f2115d7693d2861f40db6
Author: Xavier Claessens <xclaesse gmail com>
Date: Fri Sep 23 11:54:47 2011 +0200
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
src/empathy-accounts-common.c | 3 ++-
src/empathy-accounts-common.h | 1 +
src/empathy-accounts.c | 11 ++++++++---
3 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/src/empathy-accounts-common.c b/src/empathy-accounts-common.c
index 8932fdb..23ea5f5 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 c7f3666..002d783 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 165dd05..3cad967 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 }
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]