cheese r914 - in branches/cheese-dbus: . client data src



Author: dgsiegel
Date: Wed Aug 13 14:36:29 2008
New Revision: 914
URL: http://svn.gnome.org/viewvc/cheese?rev=914&view=rev

Log:
bring the dbus branch up to date


Modified:
   branches/cheese-dbus/ChangeLog
   branches/cheese-dbus/client/client-bindings.h
   branches/cheese-dbus/client/dbus_client.c
   branches/cheese-dbus/data/org.gnome.Cheese.service.in
   branches/cheese-dbus/src/cheese-dbus-glue.h
   branches/cheese-dbus/src/cheese-dbus-infos.xml
   branches/cheese-dbus/src/cheese-dbus.c
   branches/cheese-dbus/src/cheese-dbus.h
   branches/cheese-dbus/src/cheese-webcam.c
   branches/cheese-dbus/src/cheese-window.c
   branches/cheese-dbus/src/cheese-window.h
   branches/cheese-dbus/src/cheese.c

Modified: branches/cheese-dbus/client/client-bindings.h
==============================================================================
--- branches/cheese-dbus/client/client-bindings.h	(original)
+++ branches/cheese-dbus/client/client-bindings.h	Wed Aug 13 14:36:29 2008
@@ -14,10 +14,10 @@
 inline
 #endif
 gboolean
-org_gnome_Cheese_activate (DBusGProxy *proxy, const char * IN_message, GError **error)
+org_gnome_Cheese_activate (DBusGProxy *proxy, GError **error)
 
 {
-  return dbus_g_proxy_call (proxy, "activate", error, G_TYPE_STRING, IN_message, G_TYPE_INVALID, G_TYPE_INVALID);
+  return dbus_g_proxy_call (proxy, "activate", error, G_TYPE_INVALID, G_TYPE_INVALID);
 }
 
 typedef void (*org_gnome_Cheese_activate_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
@@ -37,14 +37,14 @@
 inline
 #endif
 DBusGProxyCall*
-org_gnome_Cheese_activate_async (DBusGProxy *proxy, const char * IN_message, org_gnome_Cheese_activate_reply callback, gpointer userdata)
+org_gnome_Cheese_activate_async (DBusGProxy *proxy, org_gnome_Cheese_activate_reply callback, gpointer userdata)
 
 {
   DBusGAsyncData *stuff;
   stuff = g_new (DBusGAsyncData, 1);
   stuff->cb = G_CALLBACK (callback);
   stuff->userdata = userdata;
-  return dbus_g_proxy_begin_call (proxy, "activate", org_gnome_Cheese_activate_async_callback, stuff, g_free, G_TYPE_STRING, IN_message, G_TYPE_INVALID);
+  return dbus_g_proxy_begin_call (proxy, "activate", org_gnome_Cheese_activate_async_callback, stuff, g_free, G_TYPE_INVALID);
 }
 #endif /* defined DBUS_GLIB_CLIENT_WRAPPERS_org_gnome_Cheese */
 

Modified: branches/cheese-dbus/client/dbus_client.c
==============================================================================
--- branches/cheese-dbus/client/dbus_client.c	(original)
+++ branches/cheese-dbus/client/dbus_client.c	Wed Aug 13 14:36:29 2008
@@ -102,7 +102,7 @@
   //if(!dbus_g_proxy_call (proxy, "EchoString", &error, G_TYPE_STRING, "The string we want echo-ed", G_TYPE_INVALID, G_TYPE_STRING, &result, G_TYPE_INVALID))
   //if (!dbus_g_proxy_call (proxy, "ListNames", &error, G_TYPE_INVALID, G_TYPE_STRV, &result, G_TYPE_INVALID))
   //if(!dbus_g_proxy_call (proxy, "GetStatus", &error, G_TYPE_INVALID, G_TYPE_STRING, &result, G_TYPE_INVALID))
-  if(!org_gnome_Cheese_activate (proxy, "activate plz", &error))
+  if(!org_gnome_Cheese_activate (proxy, &error))
   {
     /* Method failed, the GError is set, let's warn everyone */
     g_warning ("Woops remote method failed: %s", error->message);

Modified: branches/cheese-dbus/data/org.gnome.Cheese.service.in
==============================================================================
--- branches/cheese-dbus/data/org.gnome.Cheese.service.in	(original)
+++ branches/cheese-dbus/data/org.gnome.Cheese.service.in	Wed Aug 13 14:36:29 2008
@@ -1,3 +1,3 @@
 [D-BUS Service]
 Name=org.gnome.Cheese
-Exec=/usr/bin/cheese
+Exec=/usr/bin/cheese -s

Modified: branches/cheese-dbus/src/cheese-dbus-glue.h
==============================================================================
--- branches/cheese-dbus/src/cheese-dbus-glue.h	(original)
+++ branches/cheese-dbus/src/cheese-dbus-glue.h	Wed Aug 13 14:36:29 2008
@@ -53,32 +53,31 @@
 #endif /* !G_ENABLE_DEBUG */
 
 
-/* BOOLEAN:STRING,POINTER (/tmp/dbus-binding-tool-c-marshallers.EVERDU:1) */
-extern void dbus_glib_marshal_cheese_dbus_BOOLEAN__STRING_POINTER (GClosure     *closure,
-                                                                   GValue       *return_value,
-                                                                   guint         n_param_values,
-                                                                   const GValue *param_values,
-                                                                   gpointer      invocation_hint,
-                                                                   gpointer      marshal_data);
+/* BOOLEAN:POINTER (/tmp/dbus-binding-tool-c-marshallers.DAGIFU:1) */
+extern void dbus_glib_marshal_cheese_dbus_BOOLEAN__POINTER (GClosure     *closure,
+                                                            GValue       *return_value,
+                                                            guint         n_param_values,
+                                                            const GValue *param_values,
+                                                            gpointer      invocation_hint,
+                                                            gpointer      marshal_data);
 void
-dbus_glib_marshal_cheese_dbus_BOOLEAN__STRING_POINTER (GClosure     *closure,
-                                                       GValue       *return_value G_GNUC_UNUSED,
-                                                       guint         n_param_values,
-                                                       const GValue *param_values,
-                                                       gpointer      invocation_hint G_GNUC_UNUSED,
-                                                       gpointer      marshal_data)
+dbus_glib_marshal_cheese_dbus_BOOLEAN__POINTER (GClosure     *closure,
+                                                GValue       *return_value G_GNUC_UNUSED,
+                                                guint         n_param_values,
+                                                const GValue *param_values,
+                                                gpointer      invocation_hint G_GNUC_UNUSED,
+                                                gpointer      marshal_data)
 {
-  typedef gboolean (*GMarshalFunc_BOOLEAN__STRING_POINTER) (gpointer     data1,
-                                                            gpointer     arg_1,
-                                                            gpointer     arg_2,
-                                                            gpointer     data2);
-  register GMarshalFunc_BOOLEAN__STRING_POINTER callback;
+  typedef gboolean (*GMarshalFunc_BOOLEAN__POINTER) (gpointer     data1,
+                                                     gpointer     arg_1,
+                                                     gpointer     data2);
+  register GMarshalFunc_BOOLEAN__POINTER callback;
   register GCClosure *cc = (GCClosure*) closure;
   register gpointer data1, data2;
   gboolean v_return;
 
   g_return_if_fail (return_value != NULL);
-  g_return_if_fail (n_param_values == 3);
+  g_return_if_fail (n_param_values == 2);
 
   if (G_CCLOSURE_SWAP_DATA (closure))
     {
@@ -90,11 +89,10 @@
       data1 = g_value_peek_pointer (param_values + 0);
       data2 = closure->data;
     }
-  callback = (GMarshalFunc_BOOLEAN__STRING_POINTER) (marshal_data ? marshal_data : cc->callback);
+  callback = (GMarshalFunc_BOOLEAN__POINTER) (marshal_data ? marshal_data : cc->callback);
 
   v_return = callback (data1,
-                       g_marshal_value_peek_string (param_values + 1),
-                       g_marshal_value_peek_pointer (param_values + 2),
+                       g_marshal_value_peek_pointer (param_values + 1),
                        data2);
 
   g_value_set_boolean (return_value, v_return);
@@ -106,14 +104,14 @@
 
 #include <dbus/dbus-glib.h>
 static const DBusGMethodInfo dbus_glib_cheese_dbus_methods[] = {
-  { (GCallback) cheese_dbus_activate, dbus_glib_marshal_cheese_dbus_BOOLEAN__STRING_POINTER, 0 },
+  { (GCallback) cheese_dbus_activate, dbus_glib_marshal_cheese_dbus_BOOLEAN__POINTER, 0 },
 };
 
 const DBusGObjectInfo dbus_glib_cheese_dbus_object_info = {
   0,
   dbus_glib_cheese_dbus_methods,
   1,
-"org.gnome.Cheese\0activate\0S\0message\0I\0s\0\0\0",
+"org.gnome.Cheese\0activate\0S\0\0\0",
 "org.gnome.Cheese\0photoSaved\0\0",
 "\0"
 };

Modified: branches/cheese-dbus/src/cheese-dbus-infos.xml
==============================================================================
--- branches/cheese-dbus/src/cheese-dbus-infos.xml	(original)
+++ branches/cheese-dbus/src/cheese-dbus-infos.xml	Wed Aug 13 14:36:29 2008
@@ -4,7 +4,6 @@
 	<interface name="org.gnome.Cheese">
 		<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="cheese_dbus"/>
 		<method name="activate">
-			<arg type="s" name="message" direction="in" />
 		</method>
 		<signal name="photoSaved">
 		  <arg type="s" name="path" />

Modified: branches/cheese-dbus/src/cheese-dbus.c
==============================================================================
--- branches/cheese-dbus/src/cheese-dbus.c	(original)
+++ branches/cheese-dbus/src/cheese-dbus.c	Wed Aug 13 14:36:29 2008
@@ -42,24 +42,34 @@
 
 static guint cheese_dbus_signals [LAST_SIGNAL];
 
+CheeseWindow *window;
+
 G_DEFINE_TYPE (CheeseDbus, cheese_dbus, G_TYPE_OBJECT);
 
+void
+cheese_dbus_set_window (CheeseWindow *cheese_window)
+{
+  if (cheese_window != NULL)
+    window = cheese_window;
+}
+
 gboolean
-cheese_dbus_activate (char * message)
+cheese_dbus_activate (void)
 {  
-  g_message ("cheese_dbus has been activated with: %s", message);
-  g_print ("blabla");
+  cheese_window_make_slim (window, TRUE);
+  window->dbus_active = TRUE;
   return TRUE;
 }
 
 void
 cheese_dbus_emit_signal (CheeseDbus *server, char *path)
 {
-  g_message ("emit signal: %s", path);
   g_signal_emit (server, cheese_dbus_signals[PHOTO_SAVED], 0, path);
-  
-  //quit cheese after emitting the signal
-  exit (0);
+  if (window->slim_mode == TRUE)
+    //quit cheese after emitting the signal
+    exit (0);
+  else
+    cheese_window_make_slim (window, FALSE);
 }
 
 void
@@ -114,6 +124,15 @@
 		g_warning("Unable to register service: %s", error->message);
 		g_error_free (error);
 	}
+	
+	/*check if there is already a instance running -> exit*/
+	if (request_ret == DBUS_REQUEST_NAME_REPLY_EXISTS ||
+		 request_ret == DBUS_REQUEST_NAME_REPLY_IN_QUEUE)
+	{
+	  g_warning ("Another instance of cheese is already running!");
+		exit (1);
+	}
+
 	g_object_unref (driver_proxy);
 	
 	

Modified: branches/cheese-dbus/src/cheese-dbus.h
==============================================================================
--- branches/cheese-dbus/src/cheese-dbus.h	(original)
+++ branches/cheese-dbus/src/cheese-dbus.h	Wed Aug 13 14:36:29 2008
@@ -36,8 +36,9 @@
   void (* photo_saved) (char * path);
 }CheeseDbusClass;
 
-typedef struct {
+typedef struct _CheeseDbus{
 	GObject parent;
+	struct _CheeseWindow *window;
 }CheeseDbus;
 
 
@@ -54,9 +55,11 @@
 CheeseDbus *
 cheese_dbus_new (void);
 gboolean
-cheese_dbus_activate (char *);
+cheese_dbus_activate (void);
 void
 cheese_dbus_emit_signal (CheeseDbus *, char *);
+void
+cheese_dbus_set_window (struct _CheeseWindow *);
 
 G_END_DECLS
 

Modified: branches/cheese-dbus/src/cheese-webcam.c
==============================================================================
--- branches/cheese-dbus/src/cheese-webcam.c	(original)
+++ branches/cheese-dbus/src/cheese-webcam.c	Wed Aug 13 14:36:29 2008
@@ -35,7 +35,6 @@
 
 #include "cheese-webcam.h"
 #include "cheese-flash.h"
-#include "cheese-dbus.h"
 
 G_DEFINE_TYPE (CheeseWebcam, cheese_webcam, G_TYPE_OBJECT)
 

Modified: branches/cheese-dbus/src/cheese-window.c
==============================================================================
--- branches/cheese-dbus/src/cheese-window.c	(original)
+++ branches/cheese-dbus/src/cheese-window.c	Wed Aug 13 14:36:29 2008
@@ -23,118 +23,7 @@
 #include "cheese-config.h"
 #endif
 
-#include <string.h>
-
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <gdk/gdkkeysyms.h>
-#include <glib.h>
-#include <glib/gi18n.h>
-#include <gio/gio.h>
-
-#include <gst/interfaces/xoverlay.h>
-#include <gtk/gtk.h>
-#include <libebook/e-book.h>
-
-#ifdef HILDON
-#include <hildon/hildon-program.h>
-#endif
-
-#include "cheese-countdown.h"
-#include "cheese-effect-chooser.h"
-#include "cheese-fileutil.h"
-#include "cheese-gconf.h"
-#include "cheese-thumb-view.h"
 #include "cheese-window.h"
-#include "ephy-spinner.h"
-#include "gst-audio-play.h"
-#include "gedit-message-area.h"
-#include "cheese-no-camera.h"
-#include "cheese-prefs-dialog.h"
-#include "cheese-dbus.h"
-
-#define SHUTTER_SOUNDS 5
-
-typedef enum
-{
-  WEBCAM_MODE_PHOTO,
-  WEBCAM_MODE_VIDEO
-} WebcamMode;
-
-typedef struct 
-{
-  gboolean recording;
-
-  char *video_filename;
-  char *photo_filename;
-
-  int counter;
-
-  CheeseWebcam *webcam;
-  WebcamMode webcam_mode;
-  CheeseGConf *gconf;
-  CheeseFileUtil *fileutil;
-  CheeseDbus *server;
-
-  GtkWidget *window;
-  GtkWidget *notebook;
-  GtkWidget *notebook_bar;
-
-  GtkWidget *main_vbox;
-  GtkWidget *video_vbox;
-
-  GtkWidget *effect_frame;
-  GtkWidget *effect_chooser;
-  GtkWidget *throbber_frame;
-  GtkWidget *throbber;
-  GtkWidget *countdown_frame;
-  GtkWidget *countdown;
-  GtkWidget *message_area_frame;
-  GtkWidget *message_area;
-
-  GtkWidget *button_effects;
-  GtkWidget *button_photo;
-  GtkWidget *button_video;
-
-  GtkWidget *image_take_photo;
-  GtkWidget *label_effects;
-  GtkWidget *label_photo;
-  GtkWidget *label_take_photo;
-  GtkWidget *label_video;
-
-  GtkWidget *thumb_scrollwindow;
-  GtkWidget *thumb_view;
-  GtkWidget *thumb_view_popup_menu;
-
-  GtkWidget *screen;
-  GtkWidget *take_picture;
-
-#ifdef HILDON
-   d
-   GtkWidget *main_hbox;
-   GtkWidget *subwindow;
-#endif      
-
-  GtkActionGroup *actions_account_photo;
-  GtkActionGroup *actions_countdown;
-  GtkActionGroup *actions_effects;
-  GtkActionGroup *actions_preferences;
-  GtkActionGroup *actions_file;
-  GtkActionGroup *actions_sendto;
-  GtkActionGroup *actions_flickr;
-  GtkActionGroup *actions_fspot;
-  GtkActionGroup *actions_mail;
-  GtkActionGroup *actions_main;
-  GtkActionGroup *actions_photo;
-  GtkActionGroup *actions_toggle;
-  GtkActionGroup *actions_video;
-
-  GtkUIManager *ui_manager;
-
-  int audio_play_counter;
-  GRand *rand;
-
-} CheeseWindow;
-
 
 /* Make url in about dialog clickable */
 static void
@@ -205,6 +94,31 @@
 }
 
 static void
+cheese_window_make_fullscreen (CheeseWindow *cheese_window)
+{
+  gtk_window_fullscreen (GTK_WINDOW (cheese_window->window));
+}
+
+//TODO (builder or gtkdialog??)
+gboolean
+cheese_window_show_preview (CheeseWindow *cheese_window)
+{
+  /*GtkBuilder* builder;
+  GError *error=NULL;
+  if (cheese_window->photo_filename != NULL)
+  {
+    builder = gtk_builder_new ();
+    gtk_builder_add_from_file (builder, PACKAGE_DATADIR"/cheese_preview.ui", &error);
+    
+    if (error)
+    {
+      g_error ("building ui from %s failed: %s", PACKAGE_DATADIR"/cheese_preview.ui", error->message);
+      g_clear_error (&error);
+    }*/
+    return FALSE;
+}
+
+static void
 cheese_window_photo_saved_cb (CheeseWebcam *webcam, CheeseWindow *cheese_window)
 {
   //notify DBUS
@@ -214,6 +128,9 @@
   g_free (cheese_window->photo_filename);
   cheese_window->photo_filename = NULL;
   gtk_widget_set_sensitive (cheese_window->take_picture, TRUE);
+  
+  //fullscreen experimental
+  //cheese_window_make_fullscreen (cheese_window);
 }
 
 static void
@@ -1448,14 +1365,46 @@
 }
 
 void
-cheese_window_init ()
+cheese_window_make_slim (CheeseWindow *cheese_window, gboolean slim)
+{
+  GtkAction *action;
+  if (slim){
+    gtk_widget_hide (cheese_window->thumb_view);
+    gtk_widget_hide (cheese_window->thumb_scrollwindow);
+    gtk_widget_hide (cheese_window->button_video);
+    gtk_widget_hide (cheese_window->button_photo);
+  }else{
+    gtk_widget_show_all (cheese_window->window);
+  }
+  
+  //activate, deactivate menu items
+  action = gtk_ui_manager_get_action (cheese_window->ui_manager, "/MainMenu/Cheese/TakeVideo");
+  gtk_action_set_visible (action, !slim);
+  action = gtk_ui_manager_get_action (cheese_window->ui_manager, "/MainMenu/Cheese/Video");
+  gtk_action_set_visible (action, !slim);
+  action = gtk_ui_manager_get_action (cheese_window->ui_manager, "/MainMenu/Cheese/Photo");
+  gtk_action_set_visible (action, !slim);
+  action = gtk_ui_manager_get_action (cheese_window->ui_manager, "/MainMenu/Edit/MoveToTrash");
+  gtk_action_set_visible (action, !slim);
+  action = gtk_ui_manager_get_action (cheese_window->ui_manager, "/MainMenu/Edit/RemoveAll");
+  gtk_action_set_visible (action, !slim);
+}
+
+void
+cheese_window_init (gboolean slim)
 {
   CheeseWindow *cheese_window;
 
   cheese_window = g_new0 (CheeseWindow, 1);
 
   cheese_window->gconf = cheese_gconf_new ();
+  
   cheese_window->server = cheese_dbus_new ();
+  //save the cheese_window in cheese_dbus to have access to it (bad style)
+  cheese_dbus_set_window (cheese_window);
+  cheese_window->dbus_active = FALSE;
+  cheese_window->slim_mode = slim;
+  
   cheese_window->audio_play_counter = 0;
   cheese_window->rand = g_rand_new ();
   cheese_window->fileutil = cheese_fileutil_new ();

Modified: branches/cheese-dbus/src/cheese-window.h
==============================================================================
--- branches/cheese-dbus/src/cheese-window.h	(original)
+++ branches/cheese-dbus/src/cheese-window.h	Wed Aug 13 14:36:29 2008
@@ -22,7 +22,121 @@
 
 #include <gtk/gtk.h>
 
+#include <string.h>
 
-void cheese_window_init (void);
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdkkeysyms.h>
+#include <glib.h>
+#include <glib/gi18n.h>
+#include <gio/gio.h>
+
+#include <gst/interfaces/xoverlay.h>
+#include <gtk/gtk.h>
+#include <libebook/e-book.h>
+
+#ifdef HILDON
+#include <hildon/hildon-program.h>
+#endif
+
+#include "cheese-countdown.h"
+#include "cheese-effect-chooser.h"
+#include "cheese-fileutil.h"
+#include "cheese-gconf.h"
+#include "cheese-thumb-view.h"
+#include "ephy-spinner.h"
+#include "gst-audio-play.h"
+#include "gedit-message-area.h"
+#include "cheese-no-camera.h"
+#include "cheese-prefs-dialog.h"
+#include "cheese-dbus.h"
+
+#define SHUTTER_SOUNDS 5
+
+typedef enum
+{
+  WEBCAM_MODE_PHOTO,
+  WEBCAM_MODE_VIDEO
+} WebcamMode;
+
+typedef struct _CheeseWindow
+{
+  gboolean recording;
+
+  char *video_filename;
+  char *photo_filename;
+
+  int counter;
+
+  CheeseWebcam *webcam;
+  WebcamMode webcam_mode;
+  CheeseGConf *gconf;
+  CheeseFileUtil *fileutil;
+  struct _CheeseDbus *server;
+  gboolean dbus_active;
+  gboolean slim_mode;
+
+  GtkWidget *window;
+  GtkWidget *notebook;
+  GtkWidget *notebook_bar;
+
+  GtkWidget *main_vbox;
+  GtkWidget *video_vbox;
+
+  GtkWidget *effect_frame;
+  GtkWidget *effect_chooser;
+  GtkWidget *throbber_frame;
+  GtkWidget *throbber;
+  GtkWidget *countdown_frame;
+  GtkWidget *countdown;
+  GtkWidget *message_area_frame;
+  GtkWidget *message_area;
+
+  GtkWidget *button_effects;
+  GtkWidget *button_photo;
+  GtkWidget *button_video;
+
+  GtkWidget *image_take_photo;
+  GtkWidget *label_effects;
+  GtkWidget *label_photo;
+  GtkWidget *label_take_photo;
+  GtkWidget *label_video;
+
+  GtkWidget *thumb_scrollwindow;
+  GtkWidget *thumb_view;
+  GtkWidget *thumb_view_popup_menu;
+
+  GtkWidget *screen;
+  GtkWidget *take_picture;
+
+#ifdef HILDON
+   d
+   GtkWidget *main_hbox;
+   GtkWidget *subwindow;
+#endif      
+
+  GtkActionGroup *actions_account_photo;
+  GtkActionGroup *actions_countdown;
+  GtkActionGroup *actions_effects;
+  GtkActionGroup *actions_preferences;
+  GtkActionGroup *actions_file;
+  GtkActionGroup *actions_sendto;
+  GtkActionGroup *actions_flickr;
+  GtkActionGroup *actions_fspot;
+  GtkActionGroup *actions_mail;
+  GtkActionGroup *actions_main;
+  GtkActionGroup *actions_photo;
+  GtkActionGroup *actions_toggle;
+  GtkActionGroup *actions_video;
+
+  GtkUIManager *ui_manager;
+
+  int audio_play_counter;
+  GRand *rand;
+
+} CheeseWindow;
+
+void cheese_window_init (gboolean);
+void cheese_window_make_slim (CheeseWindow *, gboolean);
+gboolean cheese_window_show_preview (CheeseWindow *);
 
 #endif /* __CHEESE_WINDOW_H__ */

Modified: branches/cheese-dbus/src/cheese.c
==============================================================================
--- branches/cheese-dbus/src/cheese.c	(original)
+++ branches/cheese-dbus/src/cheese.c	Wed Aug 13 14:36:29 2008
@@ -36,6 +36,7 @@
 {
   gboolean verbose;
   char *hal_device_id;
+  gboolean slim;
 } CheeseOptions;
 
 void cheese_print_handler(char *string)
@@ -79,6 +80,7 @@
   GOptionEntry options[] = {
     { "verbose", 'v', 0, G_OPTION_ARG_NONE, &CheeseOptions.verbose, _("Be verbose"), NULL},
     { "hal-device", 'd', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &CheeseOptions.hal_device_id, NULL, NULL},
+    { "slim", 's', 0, G_OPTION_ARG_NONE, &CheeseOptions.slim, _("Slim Mode"), NULL},
     { NULL }
   };
   CheeseOptions.hal_device_id = NULL;
@@ -99,6 +101,10 @@
   g_option_context_parse(context, &argc, &argv, NULL);
   g_option_context_free(context);
 
+  //DEBUG
+  g_message ("slim = %i", CheeseOptions.slim);
+  g_message ("verbose =%i", CheeseOptions.verbose);
+  
   gtk_init (&argc, &argv);
   gst_init (&argc, &argv);
 
@@ -111,7 +117,7 @@
   gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
                                      APPNAME_DATA_DIR G_DIR_SEPARATOR_S "icons");
 
-  cheese_window_init ();
+  cheese_window_init (CheeseOptions.slim);
   
   gdk_threads_enter ();
   gtk_main ();



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