diff options
author | V.Barkov <[email protected]> | 2016-11-20 09:36:10 +0300 |
---|---|---|
committer | V.Barkov <[email protected]> | 2016-11-20 09:36:10 +0300 |
commit | 206d27c66761cedebec8bedcaa91bf9f08846095 (patch) | |
tree | 33d97b7ecc39bb50a26bcb5a745e462dd5624d63 /pluma/dialogs/pluma-search-dialog.c | |
parent | 49be92055f3f3319b9149b991d5b55a5ba99d453 (diff) | |
download | pluma-206d27c66761cedebec8bedcaa91bf9f08846095.tar.bz2 pluma-206d27c66761cedebec8bedcaa91bf9f08846095.tar.xz |
Implemented regexp finding
Diffstat (limited to 'pluma/dialogs/pluma-search-dialog.c')
-rwxr-xr-x | pluma/dialogs/pluma-search-dialog.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pluma/dialogs/pluma-search-dialog.c b/pluma/dialogs/pluma-search-dialog.c index 329e1721..6263b937 100755 --- a/pluma/dialogs/pluma-search-dialog.c +++ b/pluma/dialogs/pluma-search-dialog.c @@ -68,6 +68,7 @@ struct _PlumaSearchDialogPrivate GtkWidget *replace_entry; GtkWidget *replace_text_entry; GtkWidget *match_case_checkbutton; + GtkWidget *match_regex_checkbutton; GtkWidget *entire_word_checkbutton; GtkWidget *backwards_checkbutton; GtkWidget *wrap_around_checkbutton; @@ -352,6 +353,7 @@ pluma_search_dialog_init (PlumaSearchDialog *dlg) "search_label", &dlg->priv->search_label, "replace_with_label", &dlg->priv->replace_label, "match_case_checkbutton", &dlg->priv->match_case_checkbutton, + "match_regex_checkbutton",&dlg->priv->match_regex_checkbutton, "entire_word_checkbutton", &dlg->priv->entire_word_checkbutton, "search_backwards_checkbutton", &dlg->priv->backwards_checkbutton, "wrap_around_checkbutton", &dlg->priv->wrap_around_checkbutton, @@ -583,6 +585,24 @@ pluma_search_dialog_get_match_case (PlumaSearchDialog *dialog) } void +pluma_search_dialog_set_match_regex (PlumaSearchDialog *dialog, + gboolean match_case) +{ + g_return_if_fail (PLUMA_IS_SEARCH_DIALOG (dialog)); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->priv->match_regex_checkbutton), + match_case); +} + +gboolean +pluma_search_dialog_get_match_regex (PlumaSearchDialog *dialog) +{ + g_return_val_if_fail (PLUMA_IS_SEARCH_DIALOG (dialog), FALSE); + + return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->priv->match_regex_checkbutton)); +} + +void pluma_search_dialog_set_entire_word (PlumaSearchDialog *dialog, gboolean entire_word) { |