Re: [evolution-patches] Groupwise proxy: Handle store's offline state



You should check the url is not "" before trying to resolve it.

On Mon, 2005-08-22 at 07:55 +0530, Shreyas Sriniavasan wrote:
> +       if (!(store = (CamelOfflineStore *) camel_session_get_service
> (session, e_account_get_string(account, E_ACCOUNT_SOURCE_URL),
> CAMEL_PROVIDER_STORE, &ex))) {       
> +               camel_exception_clear (&ex);
> +               return NULL;
> +       } 

You should use strncmp here, not strstr, it's the prefix you're after.
Infact you should test if it is a groupwise account before trying to
resolve the store, to avoid unecessary extra processing.

+       if (g_strrstr (e_account_get_string(account,
E_ACCOUNT_SOURCE_URL), "groupwise://")) {


Is this really necessary?  Why not just desensitise the whole window?
Does the user really need this stuff they wont read anyway?  I guess it
depends on how groupwise works ... i dont think it's critical enough to
add that string this late, the 'account is enabled' one is close enough,
if either must be shown.

+                       priv->tab_dialog = gtk_vbox_new (TRUE, 10);
+                       label = gtk_label_new (_("The Proxy tab will be
available only when the account is online."));
+                       gtk_box_pack_start ((GtkBox *)priv->tab_dialog,
label, TRUE, TRUE, 10); 
+               }
+               else {
                        GtkWidget *label;
                        priv->tab_dialog = gtk_vbox_new (TRUE, 10);
                        label = gtk_label_new (_("The Proxy tab will be
available only when the account is enabled."));

-- 
adfa(evolution-2.4:20087): gtkhtml-WARNING **: cannot find icon:
'stock_insert-url' in gnome 



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