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"); }
static void on_propdialog_response (GtkDialog *dialog, gint response_id, gpointer user_data) { SearchFolderDialog *sfd = SEARCH_FOLDER_DIALOG (user_data); if (response_id == GTK_RESPONSE_OK) { /* save new search folder settings */ node_set_title (sfd->priv->node, gtk_entry_get_text (GTK_ENTRY (sfd->priv->nameEntry))); rule_editor_save (sfd->priv->re, sfd->priv->vfolder->itemset); sfd->priv->vfolder->itemset->anyMatch = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (liferea_dialog_lookup (GTK_WIDGET (dialog), "anyRuleRadioBtn"))); /* update search folder */ itemview_clear (); vfolder_reset (sfd->priv->vfolder); itemlist_unload (FALSE); /* If we are finished editing a new search folder add it to the feed list */ if (!sfd->priv->node->parent) feedlist_node_added (sfd->priv->node); ui_node_update (sfd->priv->node->id); } gtk_widget_destroy (GTK_WIDGET (dialog)); }
void itemview_set_displayed_node (nodePtr node) { if (node == itemview->priv->node) return; itemview->priv->node = node; /* 1. Reset view state */ itemview_clear (); /* 2. And prepare HTML view */ htmlview_set_displayed_node (node); }