Commit 8dd399cb authored by Fabien Parent's avatar Fabien Parent
Browse files

Move pre-defined file patterns into gsettings. This way the user can edit the...

Move pre-defined file patterns into gsettings. This way the user can edit the pattern via gconf if wanted.
Changes description of regex-patterns and substituion-patterns.
parent 675fc510
......@@ -39,6 +39,7 @@ const char *const conf_key_current_match_color = "current-match-color";
const char *const conf_key_fallback_encoding = "fallback-encoding";
const char *const conf_key_substitution_patterns = "substitution-patterns";
const char *const conf_key_regex_patterns = "regex-patterns";
const char *const conf_key_files_patterns = "files-patterns";
const char *const conf_key_window_width = "window-width";
const char *const conf_key_window_height = "window-height";
const char *const conf_key_window_position_x = "window-position-x";
......
......@@ -281,16 +281,14 @@ void MainWindow::initialize(const InitState& init)
button_multiple_ ->set_active(!init.no_global);
button_caseless_ ->set_active(init.ignorecase);
combo_entry_pattern_->append_text("*.[ch]");
combo_entry_pattern_->append_text("*.{c,cc,cpp,cxx,c++,C,h,hh,hpp,hxx,h++}");
combo_entry_pattern_->append_text("*.{ccg,hg}");
combo_entry_pattern_->append_text("*.idl");
combo_entry_pattern_->append_text("*.{java,jsp}");
combo_entry_pattern_->append_text("*.{pl,pm,cgi}");
combo_entry_pattern_->append_text("*.py");
combo_entry_pattern_->append_text("*.php[0-9]?");
combo_entry_pattern_->append_text("*.{html,htm,shtml,js,wml}");
combo_entry_pattern_->append_text("*.{xml,xsl,css,dtd,xsd}");
const std::list<Glib::ustring> patterns =
settings->get_string_array(conf_key_files_patterns);
for (std::list<Glib::ustring>::const_iterator pattern = patterns.begin();
pattern != patterns.end();
++pattern)
{
combo_entry_pattern_->append_text(*pattern);
}
if (init.feedback)
filetree_->signal_feedback.connect(&print_location);
......
<schemalist>
<schema id="org.regexxer" path="/apps/regexxer/">
<key name="files-patterns" type="as">
<default>['*.[ch]','*.{c,cc,cpp,cxx,c++,C,h,hh,hpp,hxx,h++}','*.{ccg,hg}','*.idl','*.{java,jsp}','*.{pl,pm,cgi}','*.py','*.php[0-9]?','*.{html,htm,shtml,js,wml}','*.{xml,xsl,css,dtd,xsd}']</default>
<_summary>File Patterns</_summary>
<_description>List of pre-defined patterns available in the 'Pattern' entry.</_description>
</key>
<key name="regex-patterns" type="as">
<default>[]</default>
<_summary>Regex Patterns</_summary>
<_description>List of last patterns used for the regex entry.</_description>
<_description>List of last patterns used in the 'Regex' entry.</_description>
</key>
<key name="substitution-patterns" type="as">
<default>[]</default>
<_summary>Regex Patterns</_summary>
<_description>List of last patterns used for the substitution entry.</_description>
<_description>List of last patterns used in the 'Substitution' entry.</_description>
</key>
<key name="textview-font" type="s">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment