X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-ui-dimming-rules.c;h=e044d9d1bd9b6d662ebaf6993041bd778e5e7c80;hp=b4db63248a2b4e3012599a01ba4deea0dd764ff9;hb=40e92875620a12ce1d34126c9a9c6bce97b21e6c;hpb=d6c282667a2757dee78d6916b676efb9db1bd3f8 diff --git a/src/modest-ui-dimming-rules.c b/src/modest-ui-dimming-rules.c index b4db632..e044d9d 100644 --- a/src/modest-ui-dimming-rules.c +++ b/src/modest-ui-dimming-rules.c @@ -80,18 +80,21 @@ modest_ui_dimming_rules_on_new_folder (ModestWindow *win, gpointer user_data) if (!parent_folder) return TRUE; - /* If it's the local account do not dim */ - if (modest_tny_folder_store_is_virtual_local_folders (parent_folder)) { - return FALSE; - } else if (TNY_IS_ACCOUNT (parent_folder)) { - /* If it's the MMC root folder then dim it */ - if (!strcmp (tny_account_get_id (TNY_ACCOUNT (parent_folder)), MODEST_MMC_ACCOUNT_ID)) { - dimmed = TRUE; - } else { - const gchar *proto_str = tny_account_get_proto (TNY_ACCOUNT (parent_folder)); - /* If it's POP then dim */ - dimmed = (modest_protocol_info_get_transport_store_protocol (proto_str) == - MODEST_PROTOCOL_STORE_POP) ? TRUE : FALSE; + if (TNY_IS_ACCOUNT (parent_folder)) { + /* If it's the local account then do not dim */ + if (modest_tny_account_is_virtual_local_folders ( + TNY_ACCOUNT (parent_folder))) + return FALSE; + else { + /* If it's the MMC root folder then dim it */ + if (!strcmp (tny_account_get_id (TNY_ACCOUNT (parent_folder)), MODEST_MMC_ACCOUNT_ID)) { + dimmed = TRUE; + } else { + const gchar *proto_str = tny_account_get_proto (TNY_ACCOUNT (parent_folder)); + /* If it's POP then dim */ + dimmed = (modest_protocol_info_get_transport_store_protocol (proto_str) == + MODEST_PROTOCOL_STORE_POP) ? TRUE : FALSE; + } } } else { /* TODO: the specs say that only one level of subfolder is allowed, is this true ? */