[byzanz] Remove all traces of looping code



commit a3978664642a3f0309640e05804a213135c51485
Author: Benjamin Otte <otte gnome org>
Date:   Wed Aug 26 12:57:45 2009 +0200

    Remove all traces of looping code
    
    Looping is the default for GIF images. It will not be settable in the
    future because different encoders will have different (hardcoded)
    settings for it.
    Also, you always want things to loop anyway.

 src/byzanz-record.1 |    3 ---
 src/byzanzapplet.c  |    2 +-
 src/byzanzsession.c |    5 ++---
 src/byzanzsession.h |    2 --
 src/record.c        |    4 +---
 5 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/src/byzanz-record.1 b/src/byzanz-record.1
index 7c9b2a4..ba52acc 100644
--- a/src/byzanz-record.1
+++ b/src/byzanz-record.1
@@ -33,9 +33,6 @@ Duration of animation (default: 10 seconds)
 \fB\-\-delay\fR=\fISECS\fR
 Delay before start (default: 1 second)
 .TP
-\fB\-l\fR, \fB\-\-loop\fR
-Let the animation loop
-.TP
 \fB\-c\fR, \fB\-\-cursor\fR
 Record mouse cursor
 .TP
diff --git a/src/byzanzapplet.c b/src/byzanzapplet.c
index 9bba3a5..3979b7b 100644
--- a/src/byzanzapplet.c
+++ b/src/byzanzapplet.c
@@ -183,7 +183,7 @@ panel_applet_start_response (GtkWidget *dialog, int response, AppletPrivate *pri
   if (window == NULL)
     goto out2;
 
-  priv->rec = byzanz_session_new (file, window, &area, TRUE, TRUE);
+  priv->rec = byzanz_session_new (file, window, &area, TRUE);
   g_signal_connect_swapped (priv->rec, "notify", G_CALLBACK (byzanz_applet_session_notify), priv);
   
   byzanz_session_start (priv->rec);
diff --git a/src/byzanzsession.c b/src/byzanzsession.c
index 28e1296..7d800ba 100644
--- a/src/byzanzsession.c
+++ b/src/byzanzsession.c
@@ -256,7 +256,6 @@ byzanz_session_init (ByzanzSession *session)
  * @file: file to record to. Any existing file will be overwritten.
  * @window: window to record
  * @area: area of window that should be recorded
- * @loop: if the resulting animation should loop
  * @record_cursor: if the cursor image should be recorded
  *
  * Creates a new #ByzanzSession and initializes all basic variables. 
@@ -268,7 +267,7 @@ byzanz_session_init (ByzanzSession *session)
  **/
 ByzanzSession *
 byzanz_session_new (GFile *file, GdkWindow *window, GdkRectangle *area,
-    gboolean loop, gboolean record_cursor)
+    gboolean record_cursor)
 {
   g_return_val_if_fail (G_IS_FILE (file), NULL);
   g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
@@ -278,7 +277,7 @@ byzanz_session_new (GFile *file, GdkWindow *window, GdkRectangle *area,
   g_return_val_if_fail (area->width > 0, NULL);
   g_return_val_if_fail (area->height > 0, NULL);
   
-  /* FIXME: handle looping and mouse cursor */
+  /* FIXME: handle mouse cursor */
 
   return g_object_new (BYZANZ_TYPE_SESSION, "file", file, "window", window, "area", area, NULL);
 }
diff --git a/src/byzanzsession.h b/src/byzanzsession.h
index c36fb24..02b1ae4 100644
--- a/src/byzanzsession.h
+++ b/src/byzanzsession.h
@@ -41,7 +41,6 @@ struct _ByzanzSession {
   
   /*< private >*/
   /* properties */
-  gboolean		loop;		/* wether the resulting gif should loop */
   GFile *               file;           /* file we're saving to */
   GdkRectangle          area;           /* area of window to record */
   GdkWindow *           window;         /* window to record */
@@ -63,7 +62,6 @@ GType		        byzanz_session_get_type		(void) G_GNUC_CONST;
 ByzanzSession * 	byzanz_session_new		(GFile *                file,
 							 GdkWindow *		window,
 							 GdkRectangle *		area,
-							 gboolean		loop,
 							 gboolean		record_cursor);
 void			byzanz_session_start		(ByzanzSession *	session);
 void			byzanz_session_stop		(ByzanzSession *	session);
diff --git a/src/record.c b/src/record.c
index f8fecfa..7ab9e86 100644
--- a/src/record.c
+++ b/src/record.c
@@ -27,7 +27,6 @@
 
 static int duration = 10;
 static int delay = 1;
-static gboolean loop = FALSE;
 static gboolean cursor = FALSE;
 static gboolean verbose = FALSE;
 static GdkRectangle area = { 0, 0, G_MAXINT / 2, G_MAXINT / 2 };
@@ -36,7 +35,6 @@ static GOptionEntry entries[] =
 {
   { "duration", 'd', 0, G_OPTION_ARG_INT, &duration, N_("Duration of animation (default: 10 seconds)"), N_("SECS") },
   { "delay", 0, 0, G_OPTION_ARG_INT, &delay, N_("Delay before start (default: 1 second)"), N_("SECS") },
-  { "loop", 'l', 0, G_OPTION_ARG_NONE, &loop, N_("Let the animation loop"), NULL },
   { "cursor", 'c', 0, G_OPTION_ARG_NONE, &cursor, N_("Record mouse cursor"), NULL },
   { "x", 'x', 0, G_OPTION_ARG_INT, &area.x, N_("X coordinate of rectangle to record"), N_("PIXEL") },
   { "y", 'y', 0, G_OPTION_ARG_INT, &area.y, N_("Y coordinate of rectangle to record"), N_("PIXEL") },
@@ -122,7 +120,7 @@ main (int argc, char **argv)
   }
   file = g_file_new_for_commandline_arg (argv[1]);
   rec = byzanz_session_new (file, gdk_get_default_root_window (),
-      &area, loop, cursor);
+      &area, cursor);
   g_object_unref (file);
   if (rec == NULL) {
     g_print (_("Could not prepare recording.\n"



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