Re: [evolution-patches] calendar, mail and exchange: patch for bug #231968



The exchange part looks good. A few more comments below. Please
incorporate them and commit.

Thanks
-- Sarfraaz

On Thu, 2005-07-28 at 18:00 +0530, shakti wrote:
> Hi,
> 
> Sending one modified patch (exchange part). Please review it.
> 
> Thanks,
> Shakti
> 
> 
> Index: exchange-folder-permission.c
> ===================================================================
>         account = exchange_operations_get_exchange_account ();
>  
>         if (!account)
>                 return;
>  
> -       //folder = exchange_account_get_folder (account, target-
> >target->uri);
> -       //if (folder)
> -       //      exchange_permissions_dialog_new (account, folder,
> NULL);
> -#endif
> +       if (!target)
> +               return;
> 
> I guess we could club both the above statements as
> 
>  if (!account || !target)
>          return;
> 
> +
> +       if (target->model)
> +               model = E_CAL_MODEL (target->model);
> +
> +       ecal = e_cal_model_get_default_client (model);
> +       uri = (gchar *) e_cal_get_uri (ecal);
> +
> +       if (uri && !g_str_has_prefix (uri, "exchange://"))
> +               return;
> 
> You probably missed out on checking for uri being NULL here.
> 
> 
>  void
>  org_gnome_exchange_menu_tasks_permissions (EPlugin *ep,
> ECalMenuTargetSelect *target)
>  {
> 
> The handling for calendar and tasks seems to be the same here. We
> could just invoke the calendar method for tasks as well ?
> 
>  void
>  org_gnome_exchange_menu_ab_permissions (EPlugin *ep,
> EABMenuTargetSelect *target)
>  {
> +       ExchangeAccount *account = NULL;
> +       EFolder *folder = NULL;
> +       EBook *ebook = NULL;
> +       gchar *uri = NULL;
> +
> +       if (!target)
> +               return;
> +
> +       account = exchange_operations_get_exchange_account ();
> +
> +       if (!account)
> +               return;
> 
> Similar ... [ clubbing ]
>  
> 
> +       if (target->book)
> +               ebook = E_BOOK (target->book);
> +
> +       uri = (gchar *) e_book_get_uri (ebook);
> +
> +       if (uri && !g_str_has_prefix (uri, "exchange://"))
> +               return;
> +
> 
> Similar check for uri is needed here
> 
> 
> 





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