[evolution/kill-bonobo] Remove unused EActivity properties and subclasses.
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Subject: [evolution/kill-bonobo] Remove unused EActivity properties and subclasses.
- Date: Fri, 17 Jul 2009 20:52:27 +0000 (UTC)
commit f8b8692499922f1aefe6c673549d6cd9f13c7856
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Jul 17 15:58:11 2009 -0400
Remove unused EActivity properties and subclasses.
widgets/misc/Makefile.am | 2 -
widgets/misc/e-activity.c | 159 -----------------
widgets/misc/e-activity.h | 9 -
widgets/misc/e-file-activity.c | 365 ----------------------------------------
widgets/misc/e-file-activity.h | 83 ---------
5 files changed, 0 insertions(+), 618 deletions(-)
---
diff --git a/widgets/misc/Makefile.am b/widgets/misc/Makefile.am
index 284a914..c210393 100644
--- a/widgets/misc/Makefile.am
+++ b/widgets/misc/Makefile.am
@@ -60,7 +60,6 @@ widgetsinclude_HEADERS = \
e-combo-cell-editable.h \
e-cursors.h \
e-dateedit.h \
- e-file-activity.h \
e-gui-utils.h \
e-hinted-entry.h \
e-hsv-utils.h \
@@ -123,7 +122,6 @@ libemiscwidgets_la_SOURCES = \
e-combo-cell-editable.c \
e-cursors.c \
e-dateedit.c \
- e-file-activity.c \
e-gui-utils.c \
e-hinted-entry.c \
e-hsv-utils.c \
diff --git a/widgets/misc/e-activity.c b/widgets/misc/e-activity.c
index ac9a3d7..9f8faf7 100644
--- a/widgets/misc/e-activity.c
+++ b/widgets/misc/e-activity.c
@@ -35,11 +35,8 @@ struct _EActivityPrivate {
gchar *primary_text;
gchar *secondary_text;
gdouble percent;
- guint idle_id;
- GError *error;
guint allow_cancel : 1;
- guint blocking : 1;
guint cancelled : 1;
guint clickable : 1;
guint completed : 1;
@@ -48,7 +45,6 @@ struct _EActivityPrivate {
enum {
PROP_0,
PROP_ALLOW_CANCEL,
- PROP_BLOCKING,
PROP_CLICKABLE,
PROP_ICON_NAME,
PROP_PERCENT,
@@ -68,26 +64,6 @@ static gpointer parent_class;
static gulong signals[LAST_SIGNAL];
static gboolean
-activity_idle_cancel_cb (EActivity *activity)
-{
- activity->priv->idle_id = 0;
- e_activity_cancel (activity);
- g_object_unref (activity);
-
- return FALSE;
-}
-
-static gboolean
-activity_idle_complete_cb (EActivity *activity)
-{
- activity->priv->idle_id = 0;
- e_activity_complete (activity);
- g_object_unref (activity);
-
- return FALSE;
-}
-
-static gboolean
activity_describe_accumulator (GSignalInvocationHint *ihint,
GValue *return_accu,
const GValue *handler_return,
@@ -114,12 +90,6 @@ activity_set_property (GObject *object,
g_value_get_boolean (value));
return;
- case PROP_BLOCKING:
- e_activity_set_blocking (
- E_ACTIVITY (object),
- g_value_get_boolean (value));
- return;
-
case PROP_CLICKABLE:
e_activity_set_clickable (
E_ACTIVITY (object),
@@ -167,12 +137,6 @@ activity_get_property (GObject *object,
E_ACTIVITY (object)));
return;
- case PROP_BLOCKING:
- g_value_set_boolean (
- value, e_activity_get_blocking (
- E_ACTIVITY (object)));
- return;
-
case PROP_CLICKABLE:
g_value_set_boolean (
value, e_activity_get_clickable (
@@ -218,12 +182,6 @@ activity_finalize (GObject *object)
g_free (priv->primary_text);
g_free (priv->secondary_text);
- if (priv->idle_id > 0)
- g_source_remove (priv->idle_id);
-
- if (priv->error != NULL)
- g_error_free (priv->error);
-
/* Chain up to parent's finalize() method. */
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -232,22 +190,12 @@ static void
activity_cancelled (EActivity *activity)
{
activity->priv->cancelled = TRUE;
-
- if (activity->priv->idle_id > 0) {
- g_source_remove (activity->priv->idle_id);
- activity->priv->idle_id = 0;
- }
}
static void
activity_completed (EActivity *activity)
{
activity->priv->completed = TRUE;
-
- if (activity->priv->idle_id > 0) {
- g_source_remove (activity->priv->idle_id);
- activity->priv->idle_id = 0;
- }
}
static void
@@ -323,17 +271,6 @@ activity_class_init (EActivityClass *class)
g_object_class_install_property (
object_class,
- PROP_BLOCKING,
- g_param_spec_boolean (
- "blocking",
- NULL,
- NULL,
- TRUE,
- G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT));
-
- g_object_class_install_property (
- object_class,
PROP_CLICKABLE,
g_param_spec_boolean (
"clickable",
@@ -500,29 +437,6 @@ e_activity_cancel (EActivity *activity)
}
void
-e_activity_cancel_in_idle (EActivity *activity)
-{
- guint old_idle_id;
-
- g_return_if_fail (E_IS_ACTIVITY (activity));
-
- /* Be careful not to finalize the activity. Decrement the
- * reference count only after incrementing it, in case this
- * is the last reference. */
-
- old_idle_id = activity->priv->idle_id;
-
- activity->priv->idle_id = g_idle_add (
- (GSourceFunc) activity_idle_cancel_cb,
- g_object_ref (activity));
-
- if (old_idle_id > 0) {
- g_source_remove (old_idle_id);
- g_object_unref (activity);
- }
-}
-
-void
e_activity_complete (EActivity *activity)
{
g_return_if_fail (E_IS_ACTIVITY (activity));
@@ -537,29 +451,6 @@ e_activity_complete (EActivity *activity)
}
void
-e_activity_complete_in_idle (EActivity *activity)
-{
- guint old_idle_id;
-
- g_return_if_fail (E_IS_ACTIVITY (activity));
-
- /* Be careful not to finalize the activity. Decrement the
- * reference count only after incrementing it, in case this
- * is the last reference. */
-
- old_idle_id = activity->priv->idle_id;
-
- activity->priv->idle_id = g_idle_add (
- (GSourceFunc) activity_idle_complete_cb,
- g_object_ref (activity));
-
- if (old_idle_id > 0) {
- g_source_remove (old_idle_id);
- g_object_unref (activity);
- }
-}
-
-void
e_activity_clicked (EActivity *activity)
{
g_return_if_fail (E_IS_ACTIVITY (activity));
@@ -616,25 +507,6 @@ e_activity_set_allow_cancel (EActivity *activity,
}
gboolean
-e_activity_get_blocking (EActivity *activity)
-{
- g_return_val_if_fail (E_IS_ACTIVITY (activity), FALSE);
-
- return activity->priv->blocking;
-}
-
-void
-e_activity_set_blocking (EActivity *activity,
- gboolean blocking)
-{
- g_return_if_fail (E_IS_ACTIVITY (activity));
-
- activity->priv->blocking = blocking;
-
- g_object_notify (G_OBJECT (activity), "blocking");
-}
-
-gboolean
e_activity_get_clickable (EActivity *activity)
{
g_return_val_if_fail (E_IS_ACTIVITY (activity), FALSE);
@@ -731,34 +603,3 @@ e_activity_set_secondary_text (EActivity *activity,
g_object_notify (G_OBJECT (activity), "secondary-text");
}
-
-void
-e_activity_set_error (EActivity *activity,
- const GError *error)
-{
- g_return_if_fail (E_IS_ACTIVITY (activity));
-
- if (activity->priv->error != NULL) {
- g_error_free (activity->priv->error);
- activity->priv->error = NULL;
- }
-
- if (error != NULL)
- activity->priv->error = g_error_copy (error);
-}
-
-gboolean
-e_activity_propagate_error (EActivity *activity,
- GError **destination)
-{
- gboolean propagated;
-
- g_return_val_if_fail (E_IS_ACTIVITY (activity), FALSE);
-
- if ((propagated = (activity->priv->error != NULL))) {
- g_propagate_error (destination, activity->priv->error);
- activity->priv->error = NULL;
- }
-
- return propagated;
-}
diff --git a/widgets/misc/e-activity.h b/widgets/misc/e-activity.h
index aca2621..b396e3a 100644
--- a/widgets/misc/e-activity.h
+++ b/widgets/misc/e-activity.h
@@ -69,9 +69,7 @@ EActivity * e_activity_new (const gchar *primary_text);
EActivity * e_activity_newv (const gchar *format,
...) G_GNUC_PRINTF (1, 2);
void e_activity_cancel (EActivity *activity);
-void e_activity_cancel_in_idle (EActivity *activity);
void e_activity_complete (EActivity *activity);
-void e_activity_complete_in_idle (EActivity *activity);
void e_activity_clicked (EActivity *activity);
gchar * e_activity_describe (EActivity *activity);
gboolean e_activity_is_cancelled (EActivity *activity);
@@ -79,9 +77,6 @@ gboolean e_activity_is_completed (EActivity *activity);
gboolean e_activity_get_allow_cancel (EActivity *activity);
void e_activity_set_allow_cancel (EActivity *activity,
gboolean allow_cancel);
-gboolean e_activity_get_blocking (EActivity *activity);
-void e_activity_set_blocking (EActivity *activity,
- gboolean blocking);
gboolean e_activity_get_clickable (EActivity *activity);
void e_activity_set_clickable (EActivity *activity,
gboolean clickable);
@@ -97,10 +92,6 @@ void e_activity_set_primary_text (EActivity *activity,
const gchar * e_activity_get_secondary_text (EActivity *activity);
void e_activity_set_secondary_text (EActivity *activity,
const gchar *secondary_text);
-void e_activity_set_error (EActivity *activity,
- const GError *error);
-gboolean e_activity_propagate_error (EActivity *activity,
- GError **destination);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]