Re: [evolution-patches] Patch for bug #310985 (separate patches for Calendar and Exchange components)



On Wed, 2005-07-20 at 18:28 +0530, shakti wrote:
> ===================================================================
> RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
> retrieving revision 1.2771
> diff -u -p -r1.2771 ChangeLog
> --- ChangeLog   20 Jul 2005 05:38:50 -0000      1.2771
> +++ ChangeLog   20 Jul 2005 12:45:24 -0000
> @@ -1,3 +1,12 @@
> +2005-07-20  Shakti Sen <shprasad novell com>
> +
> +       * gui/tasks-component.c (tasks_component_init): Creating
> tasks-menu.
> +       * gui/tasks-control.c (tasks_control_activate): Activating
> the 
> +       task-menu.
> +       In brief, added support for 'menu controler' for 'Tasks'. 
> +
> +       Fixes bug #310985.
> +
>  2005-07-20  Chenthill Palanisamy  <pchenthill novell com>
>  
>         Fixes #309680
> Index: gui/tasks-component.c
> ===================================================================
> RCS file: /cvs/gnome/evolution/calendar/gui/tasks-component.c,v
> retrieving revision 1.88
> diff -u -p -r1.88 tasks-component.c
> --- gui/tasks-component.c       23 Jun 2005 09:11:05 -0000      1.88
> +++ gui/tasks-component.c       20 Jul 2005 12:45:28 -0000
> @@ -50,6 +50,7 @@
>  #include "misc/e-info-label.h"
>  #include "e-util/e-error.h"
>  #include "e-util/e-icon-factory.h"
> +#include "e-cal-menu.h"
>  
>  #define CREATE_TASK_ID               "task"
>  #define CREATE_TASK_ASSIGNED_ID      "task-assigned"
> @@ -113,6 +114,8 @@ struct _TasksComponentPrivate {
>         ECal *create_ecal;
>         
>         GList *notifications;
> +       
> +       ECalMenu    *tasks_menu;
>  };
>  
>  static void
> @@ -1286,6 +1289,7 @@ tasks_component_init (TasksComponent *co
>         priv->config_directory = g_build_filename (g_get_home_dir (),
>                                                    ".evolution",
> "tasks", "config",
>                                                    NULL);
> +       priv->tasks_menu =  e_cal_menu_new
> ("org.gnome.evolution.tasks.view");
>         
>         component->priv = priv;
>         ensure_sources (component);
> @@ -1310,6 +1314,12 @@ tasks_component_peek (void)
>         }
>  
>         return component;
> +}
> +
> +ECalMenu *
> +get_tasks_menu (TasksComponent *component)
> +{
> +       return component->priv->tasks_menu;
>  }

If this is to exist, it MUST be namespaced.

But anyway you can't do this, so it doesn't need to exist anymore.
 
>  const char *
> Index: gui/tasks-control.c
> ===================================================================
> RCS file: /cvs/gnome/evolution/calendar/gui/tasks-control.c,v
> retrieving revision 1.79
> diff -u -p -r1.79 tasks-control.c
> --- gui/tasks-control.c 21 Jan 2005 18:15:42 -0000      1.79
> +++ gui/tasks-control.c 20 Jul 2005 12:45:28 -0000
> @@ -53,6 +53,8 @@
>  #include "print.h"
>  #include "tasks-control.h"
>  #include "evolution-shell-component-utils.h"
> +#include "tasks-component.h"
> +#include "e-util/e-menu.h"
>  
>  #define FIXED_MARGIN                            .05
>  
> @@ -210,6 +212,7 @@ tasks_control_activate (BonoboControl *c
>         int n_selected;
>         ECalendarTable *cal_table;
>         ETable *etable;
> +       TasksComponent *task;
>  
>         uic = bonobo_control_get_ui_component (control);
>         g_assert (uic != NULL);
> @@ -239,6 +242,8 @@ tasks_control_activate (BonoboControl *c
>         etable = e_calendar_table_get_table (cal_table);
>         n_selected = e_table_selected_count (etable);
>  
> +       task = tasks_component_peek ();
> +       e_menu_activate ((EMenu *)get_tasks_menu (task), uic, 1);

No this is no good.  You need one e-cal-menu object per view. You cannot
have a global one.  You can have multiple windows open (file->new
window).

Just copy the calendar code exactly, dont try to do something different.

>         tasks_control_sensitize_commands (control, tasks, n_selected);
>  
>         bonobo_ui_component_thaw (uic, NULL);
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]