diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2003-12-17 21:36:07 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2003-12-17 21:36:07 +0800 |
commit | 31641a0c2b522d5ac1da0a0764eadfce92400412 (patch) | |
tree | 9a6f56b85e41f519dc1c81248b2cb027dfb3a25d /calendar/gui/tasks-component.c | |
parent | 2e449b7753660adbb8614a22fdf38e693e91ae86 (diff) | |
download | gsoc2013-evolution-31641a0c2b522d5ac1da0a0764eadfce92400412.tar.gz gsoc2013-evolution-31641a0c2b522d5ac1da0a0764eadfce92400412.tar.zst gsoc2013-evolution-31641a0c2b522d5ac1da0a0764eadfce92400412.zip |
call calendar_control_sensitize_calendar_commands when the primary
2003-12-17 Rodrigo Moya <rodrigo@ximian.com>
* gui/calendar-component.c (update_uri_for_primary_selection): call
calendar_control_sensitize_calendar_commands when the primary selection
changes.
(impl_createControls): keep the view_control in the private structure and
use control_factory_new_control() to create the control.
(control_activate_cb): removed unneeded function.
* gui/tasks-component.c (impl_createControls): use tasks_control_new to
create the tasks view control.
(control_activate_cb): removed unneeded function.
svn path=/trunk/; revision=23962
Diffstat (limited to 'calendar/gui/tasks-component.c')
-rw-r--r-- | calendar/gui/tasks-component.c | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c index db7864bdd7..bda28845e2 100644 --- a/calendar/gui/tasks-component.c +++ b/calendar/gui/tasks-component.c @@ -66,8 +66,10 @@ struct _TasksComponentPrivate { ETasks *tasks; GtkWidget *source_selector; + BonoboControl *view_control; + ECal *create_ecal; - + GList *notifications; }; @@ -478,17 +480,6 @@ impl_finalize (GObject *object) /* Evolution::Component CORBA methods */ static void -control_activate_cb (BonoboControl *control, gboolean activate, gpointer data) -{ - ETasks *tasks = data; - - if (activate) - tasks_control_activate (control, tasks); - else - tasks_control_deactivate (control, tasks); -} - -static void impl_createControls (PortableServer_Servant servant, Bonobo_Control *corba_sidebar_control, Bonobo_Control *corba_view_control, @@ -498,7 +489,7 @@ impl_createControls (PortableServer_Servant servant, TasksComponent *component = TASKS_COMPONENT (bonobo_object_from_servant (servant)); TasksComponentPrivate *priv; GtkWidget *selector_scrolled_window; - BonoboControl *sidebar_control, *view_control; + BonoboControl *sidebar_control; guint not; priv = component->priv; @@ -518,23 +509,14 @@ impl_createControls (PortableServer_Servant servant, sidebar_control = bonobo_control_new (selector_scrolled_window); /* create the tasks view */ - priv->tasks = E_TASKS (e_tasks_new ()); - if (!priv->tasks) { - g_warning (G_STRLOC ": could not create the control!"); - bonobo_exception_set (ev, ex_GNOME_Evolution_Component_Failed); - return; - } - - gtk_widget_show (GTK_WIDGET (priv->tasks)); - - view_control = bonobo_control_new (GTK_WIDGET (priv->tasks)); - if (!view_control) { + priv->view_control = tasks_control_new (); + if (!priv->view_control) { g_warning (G_STRLOC ": could not create the control!"); bonobo_exception_set (ev, ex_GNOME_Evolution_Component_Failed); return; } - g_signal_connect (view_control, "activate", G_CALLBACK (control_activate_cb), priv->tasks); + priv->tasks = (ETasks *) bonobo_control_get_widget (priv->view_control); g_signal_connect_object (priv->source_selector, "selection_changed", G_CALLBACK (source_selection_changed_cb), @@ -561,7 +543,7 @@ impl_createControls (PortableServer_Servant servant, /* Return the controls */ *corba_sidebar_control = CORBA_Object_duplicate (BONOBO_OBJREF (sidebar_control), ev); - *corba_view_control = CORBA_Object_duplicate (BONOBO_OBJREF (view_control), ev); + *corba_view_control = CORBA_Object_duplicate (BONOBO_OBJREF (priv->view_control), ev); /* The tasks component doesn't use the status bar so just return an empty label. */ { |