[gnome-calendar] manager: removed EVENT_CREATED signal
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] manager: removed EVENT_CREATED signal
- Date: Fri, 5 Dec 2014 13:22:42 +0000 (UTC)
commit 9188d37e53f18e133d155e02ff641aed75ab6681
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Thu Dec 4 22:52:44 2014 -0500
manager: removed EVENT_CREATED signal
Since we are opening edit-dialog on event creation directly, we don't
need this notification anymore.
src/gcal-manager.c | 29 +----------------------------
src/gcal-manager.h | 4 ----
src/gcal-window.c | 41 +----------------------------------------
3 files changed, 2 insertions(+), 72 deletions(-)
---
diff --git a/src/gcal-manager.c b/src/gcal-manager.c
index d99a1a1..7099e96 100644
--- a/src/gcal-manager.c
+++ b/src/gcal-manager.c
@@ -78,15 +78,6 @@ struct _MoveEventData
typedef struct _MoveEventData MoveEventData;
-/* Signal IDs */
-enum
-{
- EVENT_CREATED,
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL];
-
static void free_async_ops_data (AsyncOpsData *data);
static void load_source (GcalManager *manager,
@@ -335,12 +326,7 @@ on_event_created (GObject *source_object,
client = E_CAL_CLIENT (source_object);
error = NULL;
- if (e_cal_client_create_object_finish (client, result, &new_uid, &error))
- {
- g_signal_emit (data->manager, signals[EVENT_CREATED], 0,
- e_source_get_uid (data->source), new_uid);
- }
- else
+ if (!e_cal_client_create_object_finish (client, result, &new_uid, &error))
{
/* Some error */
g_warning ("Error creating object: %s", error->message);
@@ -432,19 +418,6 @@ static void
gcal_manager_class_init (GcalManagerClass *klass)
{
G_OBJECT_CLASS (klass)->finalize = gcal_manager_finalize;
-
- /* FIXME: check if this is really needed */
- signals[EVENT_CREATED] =
- g_signal_new ("event-created",
- GCAL_TYPE_MANAGER,
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (GcalManagerClass,
- event_created),
- NULL, NULL, NULL,
- G_TYPE_NONE,
- 2,
- G_TYPE_POINTER,
- G_TYPE_POINTER);
}
static void
diff --git a/src/gcal-manager.h b/src/gcal-manager.h
index 4e29ef0..b16a7f2 100644
--- a/src/gcal-manager.h
+++ b/src/gcal-manager.h
@@ -44,10 +44,6 @@ struct _GcalManager
struct _GcalManagerClass
{
GObjectClass parent_class;
-
- /* signals */
- void (* event_created) (GcalManager *manager, const gchar *source_uid, const gchar event_uid);
-
};
typedef struct
diff --git a/src/gcal-window.c b/src/gcal-window.c
index 589ea37..e9a2c31 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -209,12 +209,6 @@ static gboolean gcal_window_configure_event (GtkWidget *w
static gboolean gcal_window_state_event (GtkWidget *widget,
GdkEventWindowState *event);
-/* GcalManager signal handling */
-static void gcal_window_event_created (GcalManager *manager,
- const gchar *source_uid,
- const gchar *event_uid,
- gpointer user_data);
-
G_DEFINE_TYPE_WITH_PRIVATE (GcalWindow, gcal_window, GTK_TYPE_APPLICATION_WINDOW)
static gboolean
@@ -1303,32 +1297,6 @@ gcal_window_state_event (GtkWidget *widget,
return retval;
}
-static void
-gcal_window_event_created (GcalManager *manager,
- const gchar *source_uid,
- const gchar *event_uid,
- gpointer user_data)
-{
- GcalWindowPrivate *priv;
-
- priv = gcal_window_get_instance_private (GCAL_WINDOW (user_data));
-
- if (! priv->open_edit_dialog)
- return;
-
- priv->open_edit_dialog = FALSE;
-
- if (priv->edit_dialog == NULL)
- init_edit_dialog (GCAL_WINDOW (user_data));
-
- /* FIXME: use new GcalEditDialog API */
- /* gcal_edit_dialog_set_event (GCAL_EDIT_DIALOG (priv->edit_dialog), */
- /* source_uid, */
- /* event_uid); */
-
- gtk_dialog_run (GTK_DIALOG (priv->edit_dialog));
-}
-
/* Public API */
GtkWidget*
gcal_window_new_with_view (GcalApplication *app,
@@ -1353,14 +1321,7 @@ gcal_window_new_with_view (GcalApplication *app,
manager,
NULL);
- /* hooking signals */
- /* FIXME: remember to check if this is really needed */
- g_signal_connect (manager,
- "event-created",
- G_CALLBACK (gcal_window_event_created),
- win);
-
- /* init hack */
+ /* loading size */
load_geometry (win);
if (view_type == GCAL_WINDOW_VIEW_DAY)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]