aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@src.gnome.org>2008-04-19 19:18:56 +0800
committerFrederic Peters <fpeters@src.gnome.org>2008-04-19 19:18:56 +0800
commitee5a0b876a796f762195addeb43ef41e6bdd4013 (patch)
tree781e372a57244006edf1826b53f288f2df2537fe /src
parentbf655521d919fb42e04018f517539e5850bd48a1 (diff)
downloadgsoc2013-empathy-ee5a0b876a796f762195addeb43ef41e6bdd4013.tar
gsoc2013-empathy-ee5a0b876a796f762195addeb43ef41e6bdd4013.tar.gz
gsoc2013-empathy-ee5a0b876a796f762195addeb43ef41e6bdd4013.tar.bz2
gsoc2013-empathy-ee5a0b876a796f762195addeb43ef41e6bdd4013.tar.lz
gsoc2013-empathy-ee5a0b876a796f762195addeb43ef41e6bdd4013.tar.xz
gsoc2013-empathy-ee5a0b876a796f762195addeb43ef41e6bdd4013.tar.zst
gsoc2013-empathy-ee5a0b876a796f762195addeb43ef41e6bdd4013.zip
Added a --no-connect option. Fixes: #526208. (Frederic Peters)
svn path=/trunk/; revision=965
Diffstat (limited to 'src')
-rw-r--r--src/empathy.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/empathy.c b/src/empathy.c
index bd76eed13..11eb3c5d7 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -376,7 +376,15 @@ main (int argc, char *argv[])
EmpathyIdle *idle;
EmpathyChandler *chandler;
gboolean autoconnect = TRUE;
+ gboolean no_connect = FALSE;
GError *error = NULL;
+ GOptionEntry options[] = {
+ { "no-connect", 'n',
+ 0, G_OPTION_ARG_NONE, &no_connect,
+ N_("Don't connect on startup"),
+ NULL },
+ { NULL }
+ };
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
@@ -386,7 +394,7 @@ main (int argc, char *argv[])
if (!gtk_init_with_args (&argc, &argv,
_("- Empathy Instant Messenger"),
- NULL, GETTEXT_PACKAGE, &error)) {
+ options, GETTEXT_PACKAGE, &error)) {
empathy_debug (DEBUG_DOMAIN, error->message);
return EXIT_FAILURE;
}
@@ -444,7 +452,7 @@ main (int argc, char *argv[])
empathy_conf_get_bool (empathy_conf_get(),
EMPATHY_PREFS_AUTOCONNECT,
&autoconnect);
- if (autoconnect &&
+ if (autoconnect && ! no_connect &&
empathy_idle_get_state (idle) <= MC_PRESENCE_OFFLINE) {
empathy_idle_set_state (idle, MC_PRESENCE_AVAILABLE);
}