2005-10-26 [colin] 1.9.15cvs111
[claws.git] / src / news_gtk.c
index 52108e492c4b5a39eb35b36a20e67c7d60e9959d..eb67a4c729bcc53412d7860480f369f75cf57d3f 100644 (file)
@@ -42,8 +42,6 @@
 
 static void subscribe_newsgroup_cb(FolderView *folderview, guint action, GtkWidget *widget);
 static void unsubscribe_newsgroup_cb(FolderView *folderview, guint action, GtkWidget *widget);
-static void news_settings_cb(FolderView *folderview, guint action, GtkWidget *widget);
-static void remove_news_server_cb(FolderView *folderview, guint action, GtkWidget *widget);
 static void update_tree_cb(FolderView *folderview, guint action, GtkWidget *widget);
 static void download_cb(FolderView *folderview, guint action, GtkWidget *widget);
 static void sync_cb(FolderView *folderview, guint action, GtkWidget *widget);
@@ -58,9 +56,6 @@ static GtkItemFactoryEntry news_popup_entries[] =
        {N_("/---"),                            NULL, NULL,                      0, "<Separator>"},
        {N_("/_Check for new messages"),        NULL, update_tree_cb,            0, NULL},
        {N_("/---"),                            NULL, NULL,                      0, "<Separator>"},
-       {N_("/News _account settings"),         NULL, news_settings_cb,          0, NULL},
-       {N_("/Remove _news account"),           NULL, remove_news_server_cb,     0, NULL},
-       {N_("/---"),                            NULL, NULL,                      0, "<Separator>"},
 };
 
 static void set_sensitivity(GtkItemFactory *factory, FolderItem *item);
@@ -92,8 +87,6 @@ static void set_sensitivity(GtkItemFactory *factory, FolderItem *item)
 
        SET_SENS("/Subscribe to newsgroup...", folder_item_parent(item) == NULL);
        SET_SENS("/Unsubscribe newsgroup",     folder_item_parent(item) != NULL);
-       SET_SENS("/Remove news account",       folder_item_parent(item) == NULL);
-
        SET_SENS("/Check for new messages",    folder_item_parent(item) == NULL);
 
 #undef SET_SENS
@@ -225,63 +218,6 @@ static void unsubscribe_newsgroup_cb(FolderView *folderview, guint action,
        g_free(old_id);
 }
 
-static void news_settings_cb(FolderView *folderview, guint action, GtkWidget *widget)
-{
-       FolderItem *item;
-
-       item = folderview_get_selected_item(folderview);
-       if (item == NULL)
-               return;
-
-       account_open(item->folder->account);
-}
-
-static void remove_news_server_cb(FolderView *folderview, guint action,
-                                 GtkWidget *widget)
-{
-       GtkCTree *ctree = GTK_CTREE(folderview->ctree);
-       FolderItem *item;
-       PrefsAccount *account;
-       gchar *name;
-       gchar *message;
-       AlertValue avalue;
-
-       if (!folderview->selected) return;
-
-       item = gtk_ctree_node_get_row_data(ctree, folderview->selected);
-       g_return_if_fail(item != NULL);
-       g_return_if_fail(item->folder != NULL);
-       g_return_if_fail(FOLDER_TYPE(item->folder) == F_NEWS);
-       g_return_if_fail(item->folder->account != NULL);
-
-       name = trim_string(item->folder->name, 32);
-       message = g_strdup_printf(_("Really delete news account '%s'?"), name);
-       avalue = alertpanel_full(_("Delete news account"), message,
-                                GTK_STOCK_YES, GTK_STOCK_NO, NULL, FALSE,
-                                NULL, ALERT_WARNING, G_ALERTALTERNATE);
-       g_free(message);
-       g_free(name);
-
-       if (avalue != G_ALERTDEFAULT) return;
-
-       if (folderview->opened == folderview->selected ||
-           gtk_ctree_is_ancestor(ctree,
-                                 folderview->selected,
-                                 folderview->opened)) {
-               summary_clear_all(folderview->summaryview);
-               folderview->opened = NULL;
-       }
-
-       account = item->folder->account;
-       folderview_unselect(folderview);
-       summary_clear_all(folderview->summaryview);
-       folder_destroy(item->folder);
-       account_destroy(account);
-       account_set_menu();
-       main_window_reflect_prefs_all();
-       folder_write_list();
-}
-
 static void update_tree_cb(FolderView *folderview, guint action,
                           GtkWidget *widget)
 {