aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShakti Sen <shprasad@novell.com>2005-07-22 15:38:37 +0800
committerShakti Prasad Sen <shaktis@src.gnome.org>2005-07-22 15:38:37 +0800
commitf29491124b132b0baf7582f482f749c018661717 (patch)
treec9919d289ca87af5a7c9d93cf841b5132bdbeca9
parent3bf056fc656becfb2da3088911770d2e76c9a3b5 (diff)
downloadgsoc2013-evolution-f29491124b132b0baf7582f482f749c018661717.tar
gsoc2013-evolution-f29491124b132b0baf7582f482f749c018661717.tar.gz
gsoc2013-evolution-f29491124b132b0baf7582f482f749c018661717.tar.bz2
gsoc2013-evolution-f29491124b132b0baf7582f482f749c018661717.tar.lz
gsoc2013-evolution-f29491124b132b0baf7582f482f749c018661717.tar.xz
gsoc2013-evolution-f29491124b132b0baf7582f482f749c018661717.tar.zst
gsoc2013-evolution-f29491124b132b0baf7582f482f749c018661717.zip
Creating the tasks-menu. Activated/deactivated the menu. In brief, added
2005-07-21 Shakti Sen <shprasad@novell.com> * gui/e-tasks.c (e_tasks_init): Creating the tasks-menu. * gui/tasks-control.c (tasks_control_activate, tasks_control_deactivate): Activated/deactivated the menu. In brief, added support for 'Tasks' menu creation. Fixes bug #310985. svn path=/trunk/; revision=29841
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/gui/e-tasks.c15
-rw-r--r--calendar/gui/tasks-control.c3
3 files changed, 27 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 43e9008dfc..e6415044e8 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,12 @@
+2005-07-21 Shakti Sen <shprasad@novell.com>
+
+ * gui/e-tasks.c (e_tasks_init): Creating the tasks-menu.
+ * gui/tasks-control.c (tasks_control_activate,
+ tasks_control_deactivate): Activated/deactivated the menu.
+ In brief, added support for 'Tasks' menu creation.
+
+ Fixes bug #310985.
+
2005-07-21 Chenthill Palanisamy <pchenthill@novell.com>
Fixes #309602
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
index 00b6212124..d7851290ad 100644
--- a/calendar/gui/e-tasks.c
+++ b/calendar/gui/e-tasks.c
@@ -54,6 +54,7 @@
#include "e-cal-component-preview.h"
#include "e-tasks.h"
#include "common/authentication.h"
+#include "e-cal-menu.h"
/* Private part of the GnomeCalendar structure */
@@ -74,6 +75,9 @@ struct _ETasksPrivate {
/* Calendar search bar for tasks */
GtkWidget *search_bar;
+ /* Tasks menu */
+ ECalMenu *tasks_menu;
+
/* Paned widget */
GtkWidget *paned;
@@ -97,6 +101,7 @@ static void update_view (ETasks *tasks);
static void config_categories_changed_cb (EConfigListener *config_listener, const char *key, gpointer user_data);
static void backend_error_cb (ECal *client, const char *message, gpointer data);
+ECalMenu *gnome_tasks_get_tasks_menu (ETasks *tasks);
/* Signal IDs */
enum {
@@ -161,6 +166,15 @@ table_cursor_change_cb (ETable *etable, int row, gpointer data)
g_object_unref (comp);
}
+ECalMenu *
+gnome_tasks_get_tasks_menu (ETasks *tasks)
+{
+ g_return_val_if_fail (E_IS_TASKS (tasks), NULL);
+
+ return tasks->priv->tasks_menu;
+}
+
+
/* Callback used when the selection changes in the table. */
static void
table_selection_change_cb (ETable *etable, gpointer data)
@@ -654,6 +668,7 @@ e_tasks_init (ETasks *tasks)
priv->current_uid = NULL;
priv->sexp = g_strdup ("#t");
priv->default_client = NULL;
+ priv->tasks_menu = e_cal_menu_new ("org.gnome.evolution.tasks.view");
update_view (tasks);
}
diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c
index e3f3358e9f..27a378d439 100644
--- a/calendar/gui/tasks-control.c
+++ b/calendar/gui/tasks-control.c
@@ -53,6 +53,7 @@
#include "print.h"
#include "tasks-control.h"
#include "evolution-shell-component-utils.h"
+#include "e-util/e-menu.h"
#define FIXED_MARGIN .05
@@ -235,6 +236,7 @@ tasks_control_activate (BonoboControl *control, ETasks *tasks)
g_signal_connect (tasks, "selection_changed", G_CALLBACK (selection_changed_cb), control);
+ e_menu_activate ((EMenu *)gnome_tasks_get_tasks_menu (tasks), uic, 1);
cal_table = e_tasks_get_calendar_table (tasks);
etable = e_calendar_table_get_table (cal_table);
n_selected = e_table_selected_count (etable);
@@ -259,6 +261,7 @@ tasks_control_deactivate (BonoboControl *control, ETasks *tasks)
g_assert (uic != NULL);
+ e_menu_activate ((EMenu *)gnome_tasks_get_tasks_menu (tasks), uic, 0);
e_tasks_set_ui_component (tasks, NULL);
e_tasks_discard_view_menus (tasks);