diff --git a/images/pic2.png b/images/pic2.png index 30192e8..a2729d3 100644 Binary files a/images/pic2.png and b/images/pic2.png differ diff --git a/plugins/search_replace/plugin.py b/plugins/search_replace/plugin.py index 4bcbb12..87a993d 100644 --- a/plugins/search_replace/plugin.py +++ b/plugins/search_replace/plugin.py @@ -28,8 +28,8 @@ class Plugin(PluginBase): self.use_regex = False self.use_case_sensitive = False - self.use_selection_only_scan = False - self.use_fuzzy_search = False + self.use_only_in_selection = False + self.use_whole_word_search = False self.highlight_color = "#FBF719" self.text_color = "#000000" @@ -81,11 +81,11 @@ class Plugin(PluginBase): self._set_find_options_lbl() def tggle_selection_only_scan(self, widget): - self.use_selection_only_scan = not widget.get_active() + self.use_only_in_selection = not widget.get_active() self._set_find_options_lbl() - def tggle_fuzzy_search(self, widget): - self.use_fuzzy_search = not widget.get_active() + def tggle_whole_word_search(self, widget): + self.use_whole_word_search = not widget.get_active() self._set_find_options_lbl() def _set_find_options_lbl(self): @@ -111,6 +111,9 @@ class Plugin(PluginBase): buffer.remove_tag_by_name("search_tag", buffer.get_start_iter(), buffer.get_end_iter()) return search_tag + def find_next_entry(self, widget, eve, use_data = None): + ... + def search_for_string(self, widget): query = widget.get_text() buffer = self._active_src_view.get_buffer() @@ -153,14 +156,14 @@ class Plugin(PluginBase): - def find_next(self): + def find_next(self, widget): ... - def find_all(self): + def find_all(self, widget): ... - def replace_next(self): + def replace(self, widget): ... - def replace_all(self): + def replace_all(self, widget): ... diff --git a/plugins/search_replace/search_replace.glade b/plugins/search_replace/search_replace.glade index ba68b3e..3a9f9e5 100644 --- a/plugins/search_replace/search_replace.glade +++ b/plugins/search_replace/search_replace.glade @@ -7,6 +7,16 @@ False gtk-close + + True + False + ../../icons/only-in-selection.png + + + True + False + ../../icons/whole-word.png + False False @@ -92,12 +102,13 @@ - togglebutton True True False True Only In Selection + only-in-selection + True @@ -108,13 +119,14 @@ - togglebutton True True False True Whole Word - + whole-word + True + True @@ -176,6 +188,7 @@ 5 Find in current buffer + 0 @@ -211,6 +224,7 @@ 5 5 5 + 9 @@ -229,6 +243,7 @@ 10 5 5 + 8 @@ -245,6 +260,7 @@ 5 5 5 + 9 @@ -261,6 +277,7 @@ 5 5 5 + 8 diff --git a/user_config/usr/share/newton/icons/only-in-selection.png b/user_config/usr/share/newton/icons/only-in-selection.png new file mode 100644 index 0000000..3c35fc3 Binary files /dev/null and b/user_config/usr/share/newton/icons/only-in-selection.png differ diff --git a/user_config/usr/share/newton/icons/whole-word.png b/user_config/usr/share/newton/icons/whole-word.png new file mode 100644 index 0000000..d147682 Binary files /dev/null and b/user_config/usr/share/newton/icons/whole-word.png differ