static void remove_from_displayed (EmpathyRosterView *self, EmpathyRosterContact *contact) { g_hash_table_remove (self->priv->displayed_contacts, contact); check_if_empty (self); }
static void update_group_widgets (EmpathyRosterView *self, EmpathyRosterGroup *group, EmpathyRosterContact *contact, gboolean add) { guint old_count, count; old_count = empathy_roster_group_get_widgets_count (group); if (add) count = empathy_roster_group_add_widget (group, GTK_WIDGET (contact)); else count = empathy_roster_group_remove_widget (group, GTK_WIDGET (contact)); if (count != old_count) { gtk_list_box_row_changed (GTK_LIST_BOX_ROW (group)); check_if_empty (self); } }
void Checker::process_file() { srchilite::RegexRuleFactory rule_factory; srchilite::LangDefManager lang_def_manager(&rule_factory); srchilite::SourceHighlighter highlighter( lang_def_manager.getHighlightState(LANG_PATH, file_language.second)); srchilite::FormatterManager manager( PseudoFormatterPtr(new PseudoFormatter(token_types, tokens, env.current_line_index))); manager.addFormatter("cbracket_open", new_formatter("cbracket_open")); manager.addFormatter("cbracket_close", new_formatter("cbracket_close")); manager.addFormatter("pasbracket_open", new_formatter("pasbracket_open")); manager.addFormatter("pasbracket_close", new_formatter("pasbracket_close")); manager.addFormatter("keyword", new_formatter("keyword")); manager.addFormatter("number", new_formatter("number")); manager.addFormatter("label", new_formatter("label")); manager.addFormatter("preproc", new_formatter("preproc")); manager.addFormatter("comment", new_formatter("comment")); manager.addFormatter("string", new_formatter("string")); manager.addFormatter("specialchar", new_formatter("string")); manager.addFormatter("symbol", new_formatter("symbol")); manager.addFormatter("type", new_formatter("type")); manager.addFormatter("usertype", new_formatter("classname")); manager.addFormatter("classname", new_formatter("classname")); manager.addFormatter("function", new_formatter("function")); manager.addFormatter("identifier", new_formatter("identifier")); manager.addFormatter("case", new_formatter("case")); manager.addFormatter("of", new_formatter("of")); manager.addFormatter("typeblock", new_formatter("typeblock")); manager.addFormatter("varblock", new_formatter("varblock")); manager.addFormatter("keyword_declaring_varblock", new_formatter("keyword_declaring_varblock")); manager.addFormatter("keyword_declaring_func", new_formatter("keyword_declaring_func")); manager.addFormatter( "keyword_with_following_operation", new_formatter("keyword_with_following_operation")); manager.addFormatter( "keyword_with_following_operation_after_braces", new_formatter("keyword_with_following_operation_after_braces")); manager.addFormatter("switch_labels", new_formatter("switch_labels")); manager.addFormatter("semicolon", new_formatter("semicolon")); manager.addFormatter("brace", new_formatter("brace")); manager.addFormatter("bracket", new_formatter("bracket")); highlighter.setFormatterManager(&manager); srchilite::FormatterParams params; highlighter.setFormatterParams(¶ms); for(env.current_line_index = 0; file_to_process.good(); ++env.current_line_index) { getline(file_to_process, env.current_line); check_line_length(); check_if_empty(); lines.push_back(LineInfo(env.current_line, env.current_line.size(), 0, 0, 0)); if(env.current_line.size() != 0) { params.start = 0; highlighter.highlightParagraph(env.current_line); }; } check_newline_at_eof(); calculate_expected_depth(); if(settings.indentation_policy != IP_IGNORE) check_indentation(); process_tokens(); }