ekiga r7575 - trunk/lib/engine/framework



Author: jpuydt
Date: Sun Jan 18 16:49:17 2009
New Revision: 7575
URL: http://svn.gnome.org/viewvc/ekiga?rev=7575&view=rev

Log:
Added --kickstart-disabled option, which allows to disable some parts of ekiga

Modified:
   trunk/lib/engine/framework/kickstart.cpp

Modified: trunk/lib/engine/framework/kickstart.cpp
==============================================================================
--- trunk/lib/engine/framework/kickstart.cpp	(original)
+++ trunk/lib/engine/framework/kickstart.cpp	Sun Jan 18 16:49:17 2009
@@ -88,11 +88,22 @@
   std::list<std::string> disabled;
   bool went_on;
 
-//   disabled.push_back ("AVAHI");
-//   disabled.push_back ("AVAHIPUB");
-//   disabled.push_back ("EVOLUTION");
-//   disabled.push_back ("LDAP");
-//   disabled.push_back ("HISTORY");
+  for (int arg = 2; arg <= *argc; arg++) {
+
+    std::string argument = (*argv)[arg - 1];
+    if (argument.find ("--kickstart-disabled=") == 0) {
+
+      std::string::size_type last_pos = argument.find_first_of ('=') + 1;
+      std::string::size_type pos = argument.find_first_of (',', last_pos);
+
+      while (pos != std::string::npos || last_pos != std::string::npos) {
+
+	disabled.push_back (argument.substr (last_pos, pos - last_pos));
+	last_pos = argument.find_first_not_of (',', pos);
+	pos = argument.find_first_of (',', last_pos);
+      }
+    }
+  }
 
   // this makes sure we loop only if something needs to be done
   went_on = !(blanks.empty () && partials.empty ());



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