[cheese] remove countdown from libcheese
- From: Daniel G. Siegel <dgsiegel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese] remove countdown from libcheese
- Date: Sun, 30 Jan 2011 21:06:40 +0000 (UTC)
commit 5db963711d2528288be157cb63861404bb7e92a5
Author: daniel g. siegel <dgsiegel gnome org>
Date: Sun Jan 30 22:05:54 2011 +0100
remove countdown from libcheese
cheese uses the new countdown in src/cheese-countdown.vala
which prints the countdown directly on the clutter texture.
docs/reference/Makefile.am | 1 -
libcheese/Makefile.am | 2 -
libcheese/cheese-avatar-chooser.c | 49 +---
libcheese/cheese-countdown.c | 691 -------------------------------------
libcheese/cheese-countdown.h | 57 ---
po/POTFILES.in | 1 -
src/vapi/cheese-common.vapi | 2 -
7 files changed, 4 insertions(+), 799 deletions(-)
---
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 278f93f..ba627ab 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -53,7 +53,6 @@ CFILE_GLOB=$(top_srcdir)/libcheese/*.c
IGNORE_HFILES= \
cheese-camera-device.h \
cheese-camera.h \
- cheese-countdown.h \
cheese-fileutil.h \
cheese-flash.h \
cheese-widget-private.h \
diff --git a/libcheese/Makefile.am b/libcheese/Makefile.am
index c7a4c05..70b6d1a 100644
--- a/libcheese/Makefile.am
+++ b/libcheese/Makefile.am
@@ -39,8 +39,6 @@ libcheesecommon_la_SOURCES = \
cheese-camera-device-monitor.h \
cheese-flash.h \
cheese-flash.c \
- cheese-countdown.c \
- cheese-countdown.h \
cheese-effect.c \
cheese-effect.h \
$(BUILT_SOURCES)
diff --git a/libcheese/cheese-avatar-chooser.c b/libcheese/cheese-avatar-chooser.c
index a5e3f6d..6094514 100644
--- a/libcheese/cheese-avatar-chooser.c
+++ b/libcheese/cheese-avatar-chooser.c
@@ -24,7 +24,6 @@
#include "cheese-camera.h"
#include "cheese-widget-private.h"
-#include "cheese-countdown.h"
#include "cheese-flash.h"
#include "cheese-avatar-chooser.h"
#include "um-crop-area.h"
@@ -53,7 +52,6 @@ typedef struct
GtkWidget *image;
GtkWidget *take_button;
GtkWidget *take_again_button;
- GtkWidget *countdown;
CheeseFlash *flash;
gulong photo_taken_id;
} CheeseAvatarChooserPrivate;
@@ -89,10 +87,10 @@ cheese_widget_photo_taken_cb (CheeseCamera *camera,
}
static void
-picture_cb (gpointer data)
+take_button_clicked_cb (GtkButton *button,
+ CheeseAvatarChooser *chooser)
{
- CheeseAvatarChooser *chooser = CHEESE_AVATAR_CHOOSER (data);
- CheeseAvatarChooserPrivate *priv = CHEESE_AVATAR_CHOOSER_GET_PRIVATE (data);
+ CheeseAvatarChooserPrivate *priv = CHEESE_AVATAR_CHOOSER_GET_PRIVATE (chooser);
GObject *camera;
camera = cheese_widget_get_camera (CHEESE_WIDGET (priv->camera));
@@ -117,32 +115,6 @@ picture_cb (gpointer data)
}
static void
-hide_cb (gpointer data)
-{
- CheeseAvatarChooserPrivate *priv = CHEESE_AVATAR_CHOOSER_GET_PRIVATE (data);
-
- gtk_widget_hide (priv->countdown);
- gtk_widget_show (priv->take_button);
-}
-
-static void
-take_button_clicked_cb (GtkButton *button,
- CheeseAvatarChooser *chooser)
-{
- CheeseAvatarChooserPrivate *priv = CHEESE_AVATAR_CHOOSER_GET_PRIVATE (chooser);
- GtkAllocation allocation;
-
- gtk_widget_get_allocation (priv->take_button, &allocation);
- gtk_widget_hide (priv->take_button);
- gtk_widget_set_size_request (priv->countdown, -1, allocation.height);
- gtk_widget_show (priv->countdown);
- cheese_countdown_start (CHEESE_COUNTDOWN (priv->countdown),
- picture_cb,
- hide_cb,
- (gpointer) chooser);
-}
-
-static void
take_again_button_clicked_cb (GtkButton *button,
CheeseAvatarChooser *chooser)
{
@@ -258,10 +230,8 @@ cheese_avatar_chooser_init (CheeseAvatarChooser *chooser)
g_signal_connect (G_OBJECT (priv->take_button), "clicked",
G_CALLBACK (take_button_clicked_cb), chooser);
gtk_widget_set_sensitive (priv->take_button, FALSE);
- priv->countdown = cheese_countdown_new ();
- gtk_widget_set_no_show_all (priv->countdown, TRUE);
gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook),
- create_page (priv->camera, priv->take_button, priv->countdown),
+ create_page (priv->camera, priv->take_button, NULL),
gtk_label_new ("webcam"));
/* Image tab */
@@ -297,15 +267,6 @@ cheese_avatar_chooser_finalize (GObject *object)
}
static void
-cheese_avatar_chooser_response (GtkDialog *dialog, gint response_id)
-{
- CheeseAvatarChooserPrivate *priv = CHEESE_AVATAR_CHOOSER_GET_PRIVATE (dialog);
-
- if (priv && priv->countdown)
- cheese_countdown_cancel (CHEESE_COUNTDOWN (priv->countdown));
-}
-
-static void
cheese_avatar_chooser_get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
@@ -328,10 +289,8 @@ static void
cheese_avatar_chooser_class_init (CheeseAvatarChooserClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GtkDialogClass *dialog_class = GTK_DIALOG_CLASS (klass);
object_class->finalize = cheese_avatar_chooser_finalize;
- dialog_class->response = cheese_avatar_chooser_response;
object_class->get_property = cheese_avatar_chooser_get_property;
/**
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5518031..b1f534d 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -10,7 +10,6 @@ data/cheese.desktop.in.in
libcheese/cheese-avatar-chooser.c
libcheese/cheese-camera-device.c
libcheese/cheese-camera.c
-libcheese/cheese-countdown.c
libcheese/cheese-widget.c
src/cheese-countdown.vala
src/cheese-effects-manager.vala
diff --git a/src/vapi/cheese-common.vapi b/src/vapi/cheese-common.vapi
index c17260b..ecb8ccf 100644
--- a/src/vapi/cheese-common.vapi
+++ b/src/vapi/cheese-common.vapi
@@ -151,8 +151,6 @@ namespace Cheese
READY,
ERROR
}
- [CCode (cheader_filename = "cheese-countdown.h")]
- public delegate void cheese_countdown_cb_t ();
[CCode (cheader_filename = "cheese-fileutil.h")]
public const string PHOTO_NAME_SUFFIX;
[CCode (cheader_filename = "cheese-fileutil.h")]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]