void feedlist_selection_changed (nodePtr node) { debug_enter ("feedlist_selection_changed"); debug1 (DEBUG_GUI, "new selected node: %s", node?node_get_title (node):"none"); if (node != SELECTED) { /* When the user selects a feed in the feed list we assume that he got notified of the new items or isn't interested in the event anymore... */ if (0 != feedlist->priv->newCount) feedlist_reset_new_item_count (); /* Unload visible items. */ itemlist_unload (TRUE); /* Load items of new selected node. */ SELECTED = node; if (SELECTED) { itemlist_set_view_mode (node_get_view_mode (SELECTED)); itemlist_load (SELECTED); } else { itemview_clear (); } } debug_exit ("feedlist_selection_changed"); }
/** * The "Hide read items" button has been clicked. Here we change the * preference and, if the selected node is a folder, we reload the * itemlist. The item selection is lost by this. */ void on_folderhidereadbtn_toggled (GtkToggleButton *togglebutton, gpointer user_data) { nodePtr displayedNode; gboolean enabled; displayedNode = itemlist_get_displayed_node (); enabled = gtk_toggle_button_get_active (togglebutton); conf_set_bool_value (FOLDER_DISPLAY_HIDE_READ, enabled); if (displayedNode && IS_FOLDER (displayedNode)) { itemlist_unload (FALSE); itemlist_load (displayedNode); /* Note: For simplicity when toggling this preference we accept that the current item selection is lost. */ } }