empathy r965 - trunk/src



Author: fpeters
Date: Sat Apr 19 11:18:56 2008
New Revision: 965
URL: http://svn.gnome.org/viewvc/empathy?rev=965&view=rev

Log:
Added a --no-connect option.  Fixes: #526208.  (Frederic Peters)


Modified:
   trunk/src/empathy.c

Modified: trunk/src/empathy.c
==============================================================================
--- trunk/src/empathy.c	(original)
+++ trunk/src/empathy.c	Sat Apr 19 11:18:56 2008
@@ -376,7 +376,15 @@
 	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 @@
 
 	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 @@
 	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);
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]