aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/gui/e-memo-table.c22
-rw-r--r--calendar/gui/e-memo-table.h1
-rw-r--r--calendar/gui/e-task-table.c22
-rw-r--r--calendar/gui/e-task-table.h1
-rw-r--r--modules/calendar/e-memo-shell-view-private.c36
-rw-r--r--modules/calendar/e-task-shell-view-private.c50
6 files changed, 41 insertions, 91 deletions
diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c
index 459fff3e15..24eded5223 100644
--- a/calendar/gui/e-memo-table.c
+++ b/calendar/gui/e-memo-table.c
@@ -84,7 +84,6 @@ enum {
OPEN_COMPONENT,
POPUP_EVENT,
STATUS_MESSAGE,
- USER_CREATED,
LAST_SIGNAL
};
@@ -125,14 +124,6 @@ memo_table_emit_status_message (EMemoTable *memo_table,
g_signal_emit (memo_table, signal_id, 0, message, percent);
}
-static void
-memo_table_emit_user_created (EMemoTable *memo_table)
-{
- guint signal_id = signals[USER_CREATED];
-
- g_signal_emit (memo_table, signal_id, 0);
-}
-
/* Returns the current time, for the ECellDateEdit items.
FIXME: Should probably use the timezone of the item rather than the
current timezone, though that may be difficult to get from here. */
@@ -219,10 +210,6 @@ memo_table_set_model (EMemoTable *memo_table,
memo_table->priv->model = g_object_ref (model);
g_signal_connect_swapped (
- model, "row-appended",
- G_CALLBACK (memo_table_emit_user_created), memo_table);
-
- g_signal_connect_swapped (
model, "cal-view-progress",
G_CALLBACK (memo_table_model_cal_view_progress_cb),
memo_table);
@@ -1110,15 +1097,6 @@ memo_table_class_init (EMemoTableClass *class)
e_marshal_VOID__STRING_DOUBLE,
G_TYPE_NONE, 2,
G_TYPE_STRING, G_TYPE_DOUBLE);
-
- signals[USER_CREATED] = g_signal_new (
- "user-created",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (EMemoTableClass, user_created),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
}
static void
diff --git a/calendar/gui/e-memo-table.h b/calendar/gui/e-memo-table.h
index b0e4ba6a6a..4f52ad35e4 100644
--- a/calendar/gui/e-memo-table.h
+++ b/calendar/gui/e-memo-table.h
@@ -86,7 +86,6 @@ struct _EMemoTableClass {
void (*status_message) (EMemoTable *memo_table,
const gchar *message,
gdouble percent);
- void (*user_created) (EMemoTable *memo_table);
};
GType e_memo_table_get_type (void);
diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c
index ede56b7b89..e9f3645b30 100644
--- a/calendar/gui/e-task-table.c
+++ b/calendar/gui/e-task-table.c
@@ -87,7 +87,6 @@ enum {
OPEN_COMPONENT,
POPUP_EVENT,
STATUS_MESSAGE,
- USER_CREATED,
LAST_SIGNAL
};
@@ -132,14 +131,6 @@ task_table_emit_status_message (ETaskTable *task_table,
g_signal_emit (task_table, signal_id, 0, message, percent);
}
-static void
-task_table_emit_user_created (ETaskTable *task_table)
-{
- guint signal_id = signals[USER_CREATED];
-
- g_signal_emit (task_table, signal_id, 0);
-}
-
static gint
task_table_percent_compare_cb (gconstpointer a, gconstpointer b, gpointer cmp_cache)
{
@@ -297,10 +288,6 @@ task_table_set_model (ETaskTable *task_table,
task_table->priv->model = g_object_ref (model);
g_signal_connect_swapped (
- model, "row_appended",
- G_CALLBACK (task_table_emit_user_created), task_table);
-
- g_signal_connect_swapped (
model, "cal-view-progress",
G_CALLBACK (task_table_model_cal_view_progress_cb),
task_table);
@@ -1409,15 +1396,6 @@ task_table_class_init (ETaskTableClass *class)
e_marshal_VOID__STRING_DOUBLE,
G_TYPE_NONE, 2,
G_TYPE_STRING, G_TYPE_DOUBLE);
-
- signals[USER_CREATED] = g_signal_new (
- "user-created",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (ETaskTableClass, user_created),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
}
static void
diff --git a/calendar/gui/e-task-table.h b/calendar/gui/e-task-table.h
index a112e222f8..cf215fd449 100644
--- a/calendar/gui/e-task-table.h
+++ b/calendar/gui/e-task-table.h
@@ -84,7 +84,6 @@ struct _ETaskTableClass {
void (*status_message) (ETaskTable *task_table,
const gchar *message,
gdouble percent);
- void (*user_created) (ETaskTable *task_table);
};
GType e_task_table_get_type (void);
diff --git a/modules/calendar/e-memo-shell-view-private.c b/modules/calendar/e-memo-shell-view-private.c
index 9e2be0fe7d..2caa6ec2ed 100644
--- a/modules/calendar/e-memo-shell-view-private.c
+++ b/modules/calendar/e-memo-shell-view-private.c
@@ -24,27 +24,15 @@
#include "widgets/menus/gal-view-factory-etable.h"
static void
-memo_shell_view_table_popup_event_cb (EShellView *shell_view,
- GdkEventButton *event)
-{
- const gchar *widget_path;
-
- widget_path = "/memo-popup";
- e_shell_view_show_popup_menu (shell_view, widget_path, event);
-}
-
-static void
-memo_shell_view_table_user_created_cb (EMemoShellView *memo_shell_view,
- EMemoTable *memo_table)
+memo_shell_view_model_row_appended_cb (EMemoShellView *memo_shell_view,
+ ECalModel *model)
{
EMemoShellSidebar *memo_shell_sidebar;
- ECalModel *model;
ECal *client;
ESource *source;
/* This is the "Click to Add" handler. */
- model = e_memo_table_get_model (memo_table);
client = e_cal_model_get_default_client (model);
source = e_cal_get_source (client);
@@ -55,6 +43,16 @@ memo_shell_view_table_user_created_cb (EMemoShellView *memo_shell_view,
}
static void
+memo_shell_view_table_popup_event_cb (EShellView *shell_view,
+ GdkEventButton *event)
+{
+ const gchar *widget_path;
+
+ widget_path = "/memo-popup";
+ e_shell_view_show_popup_menu (shell_view, widget_path, event);
+}
+
+static void
memo_shell_view_selector_client_added_cb (EMemoShellView *memo_shell_view,
ECal *client)
{
@@ -202,6 +200,11 @@ e_memo_shell_view_private_constructed (EMemoShellView *memo_shell_view)
memo_shell_view);
g_signal_connect_swapped (
+ model, "row-appended",
+ G_CALLBACK (memo_shell_view_model_row_appended_cb),
+ memo_shell_view);
+
+ g_signal_connect_swapped (
memo_table, "open-component",
G_CALLBACK (e_memo_shell_view_open_memo),
memo_shell_view);
@@ -227,11 +230,6 @@ e_memo_shell_view_private_constructed (EMemoShellView *memo_shell_view)
memo_shell_view);
g_signal_connect_swapped (
- memo_table, "user-created",
- G_CALLBACK (memo_shell_view_table_user_created_cb),
- memo_shell_view);
-
- g_signal_connect_swapped (
model, "model-changed",
G_CALLBACK (e_memo_shell_view_update_sidebar),
memo_shell_view);
diff --git a/modules/calendar/e-task-shell-view-private.c b/modules/calendar/e-task-shell-view-private.c
index 4b04185d0d..1cdf6697ff 100644
--- a/modules/calendar/e-task-shell-view-private.c
+++ b/modules/calendar/e-task-shell-view-private.c
@@ -24,6 +24,25 @@
#include "widgets/menus/gal-view-factory-etable.h"
static void
+task_shell_view_model_row_appended_cb (ETaskShellView *task_shell_view,
+ ECalModel *model)
+{
+ ETaskShellSidebar *task_shell_sidebar;
+ ECal *client;
+ ESource *source;
+
+ /* This is the "Click to Add" handler. */
+
+ client = e_cal_model_get_default_client (model);
+ source = e_cal_get_source (client);
+
+ task_shell_sidebar = task_shell_view->priv->task_shell_sidebar;
+ e_task_shell_sidebar_add_source (task_shell_sidebar, source);
+
+ e_cal_model_add_client (model, client);
+}
+
+static void
task_shell_view_process_completed_tasks (ETaskShellView *task_shell_view)
{
ETaskShellContent *task_shell_content;
@@ -57,27 +76,6 @@ task_shell_view_table_popup_event_cb (EShellView *shell_view,
}
static void
-task_shell_view_table_user_created_cb (ETaskShellView *task_shell_view,
- ETaskTable *task_table)
-{
- ETaskShellSidebar *task_shell_sidebar;
- ECalModel *model;
- ECal *client;
- ESource *source;
-
- /* This is the "Click to Add" handler. */
-
- model = e_task_table_get_model (task_table);
- client = e_cal_model_get_default_client (model);
- source = e_cal_get_source (client);
-
- task_shell_sidebar = task_shell_view->priv->task_shell_sidebar;
- e_task_shell_sidebar_add_source (task_shell_sidebar, source);
-
- e_cal_model_add_client (model, client);
-}
-
-static void
task_shell_view_selector_client_added_cb (ETaskShellView *task_shell_view,
ECal *client)
{
@@ -254,6 +252,11 @@ e_task_shell_view_private_constructed (ETaskShellView *task_shell_view)
task_shell_view);
g_signal_connect_swapped (
+ model, "row-appended",
+ G_CALLBACK (task_shell_view_model_row_appended_cb),
+ task_shell_view);
+
+ g_signal_connect_swapped (
task_table, "open-component",
G_CALLBACK (e_task_shell_view_open_task),
task_shell_view);
@@ -279,11 +282,6 @@ e_task_shell_view_private_constructed (ETaskShellView *task_shell_view)
task_shell_view);
g_signal_connect_swapped (
- task_table, "user-created",
- G_CALLBACK (task_shell_view_table_user_created_cb),
- task_shell_view);
-
- g_signal_connect_swapped (
model, "model-changed",
G_CALLBACK (e_task_shell_view_update_sidebar),
task_shell_view);