aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2003-12-17 21:51:32 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2003-12-17 21:51:32 +0800
commit8116a43344d472e00101c6357fac13b3970a19e7 (patch)
treedc51fd6d204f861386a301baca867061b9e02ccb /calendar/gui
parent31641a0c2b522d5ac1da0a0764eadfce92400412 (diff)
downloadgsoc2013-evolution-8116a43344d472e00101c6357fac13b3970a19e7.tar.gz
gsoc2013-evolution-8116a43344d472e00101c6357fac13b3970a19e7.tar.zst
gsoc2013-evolution-8116a43344d472e00101c6357fac13b3970a19e7.zip
made it public.
2003-12-17 Rodrigo Moya <rodrigo@ximian.com> * gui/tasks-control.[ch] (tasks_control_sensitize_commands): made it public. * gui/tasks-component.c (update_uri_for_primary_selection): call tasks_control_sensitize_commands() when the primary selection changes. svn path=/trunk/; revision=23963
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/tasks-component.c8
-rw-r--r--calendar/gui/tasks-control.c8
-rw-r--r--calendar/gui/tasks-control.h8
3 files changed, 15 insertions, 9 deletions
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index bda28845e2..0fa40303ff 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -181,6 +181,8 @@ update_uri_for_primary_selection (TasksComponent *component)
TasksComponentPrivate *priv;
ESource *source;
char *uri;
+ ECalendarTable *cal_table;
+ ETable *etable;
priv = component->priv;
@@ -192,7 +194,11 @@ update_uri_for_primary_selection (TasksComponent *component)
uri = e_source_get_uri (source);
e_tasks_set_default_uri (priv->tasks, uri);
g_free (uri);
-
+
+ cal_table = e_tasks_get_calendar_table (priv->tasks);
+ etable = e_calendar_table_get_table (cal_table);
+ tasks_control_sensitize_commands (priv->view_control, priv->tasks, e_table_selected_count (etable));
+
/* Save the selection for next time we start up */
calendar_config_set_primary_tasks (e_source_peek_uid (source));
}
diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c
index 0c0a3bd202..d2139a5bbb 100644
--- a/calendar/gui/tasks-control.c
+++ b/calendar/gui/tasks-control.c
@@ -230,8 +230,8 @@ tasks_control_activate_cb (BonoboControl *control,
/* Sensitizes the UI Component menu/toolbar commands based on the number of
* selected tasks.
*/
-static void
-sensitize_commands (ETasks *tasks, BonoboControl *control, int n_selected)
+void
+tasks_control_sensitize_commands (BonoboControl *control, ETasks *tasks, int n_selected)
{
BonoboUIComponent *uic;
gboolean read_only = TRUE;
@@ -271,7 +271,7 @@ selection_changed_cb (ETasks *tasks, int n_selected, gpointer data)
control = BONOBO_CONTROL (data);
- sensitize_commands (tasks, control, n_selected);
+ tasks_control_sensitize_commands (control, tasks, n_selected);
}
static BonoboUIVerb verbs [] = {
@@ -325,7 +325,7 @@ tasks_control_activate (BonoboControl *control, ETasks *tasks)
etable = e_calendar_table_get_table (cal_table);
n_selected = e_table_selected_count (etable);
- sensitize_commands (tasks, control, n_selected);
+ tasks_control_sensitize_commands (control, tasks, n_selected);
bonobo_ui_component_thaw (uic, NULL);
diff --git a/calendar/gui/tasks-control.h b/calendar/gui/tasks-control.h
index eca68c3f0a..97938ec613 100644
--- a/calendar/gui/tasks-control.h
+++ b/calendar/gui/tasks-control.h
@@ -26,9 +26,9 @@
#include "e-tasks.h"
-BonoboControl *tasks_control_new (void);
-void tasks_control_activate (BonoboControl *control, ETasks *tasks);
-void tasks_control_deactivate (BonoboControl *control, ETasks *tasks);
-
+BonoboControl *tasks_control_new (void);
+void tasks_control_activate (BonoboControl *control, ETasks *tasks);
+void tasks_control_deactivate (BonoboControl *control, ETasks *tasks);
+void tasks_control_sensitize_commands (BonoboControl *control, ETasks *tasks, int n_selected);
#endif /* _TASKS_CONTROL_H_ */