2007-06-24 [colin] 2.9.2cvs73
[claws.git] / src / news_gtk.c
index 7eba093e09f863a6f8997a7cb228e3a15243176f..00f0951e633c6461b7ed85a2c3160e52e1f38340 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto & the Sylpheed-Claws Team
+ * Copyright (C) 1999-2007 Hiroyuki Yamamoto & the Claws Mail Team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -51,12 +51,12 @@ static GtkItemFactoryEntry news_popup_entries[] =
 {
        {N_("/_Subscribe to newsgroup..."),     NULL, subscribe_newsgroup_cb,    0, NULL},
        {N_("/_Unsubscribe newsgroup"),         NULL, unsubscribe_newsgroup_cb,  0, NULL},
-       {N_("/---"),                            NULL, NULL,                      0, "<Separator>"},
+       {"/---",                                NULL, NULL,                      0, "<Separator>"},
        {N_("/Synchronise"),                    NULL, sync_cb,          0, NULL},
        {N_("/Down_load messages"),             NULL, download_cb,               0, NULL},
-       {N_("/---"),                            NULL, NULL,                      0, "<Separator>"},
+       {"/---",                                NULL, NULL,                      0, "<Separator>"},
        {N_("/_Check for new messages"),        NULL, update_tree_cb,            0, NULL},
-       {N_("/---"),                            NULL, NULL,                      0, "<Separator>"},
+       {"/---",                                NULL, NULL,                      0, "<Separator>"},
 };
 
 static void set_sensitivity(GtkItemFactory *factory, FolderItem *item);
@@ -100,6 +100,9 @@ static void set_sensitivity(GtkItemFactory *factory, FolderItem *item)
                 folder_item_parent(item) == NULL 
                 && mainwin->lock_count == 0
                 && news_folder_locked(item->folder) == 0);
+       SET_SENS("/Synchronise",    
+                item ? (folder_item_parent(item) != NULL && folder_want_synchronise(item->folder))
+                        : FALSE);
 
 #undef SET_SENS
 }
@@ -296,7 +299,10 @@ void news_gtk_synchronise(FolderItem *item)
                gchar *name;
 
                name = trim_string(item->name, 32);
-               alertpanel_error(_("Error occurred while downloading messages in '%s'."), name);
+               if (prefs_common.no_recv_err_panel)
+                       log_error(LOG_PROTOCOL, _("Error occurred while downloading messages in '%s'."), name);
+               else
+                       alertpanel_error(_("Error occurred while downloading messages in '%s'."), name);
                g_free(name);
        }
        folder_set_ui_func(item->folder, NULL, NULL);