summaryrefslogtreecommitdiff
path: root/pluma/dialogs
diff options
context:
space:
mode:
authorV.Barkov <[email protected]>2016-11-20 09:36:10 +0300
committerV.Barkov <[email protected]>2016-11-20 09:36:10 +0300
commit206d27c66761cedebec8bedcaa91bf9f08846095 (patch)
tree33d97b7ecc39bb50a26bcb5a745e462dd5624d63 /pluma/dialogs
parent49be92055f3f3319b9149b991d5b55a5ba99d453 (diff)
downloadpluma-206d27c66761cedebec8bedcaa91bf9f08846095.tar.bz2
pluma-206d27c66761cedebec8bedcaa91bf9f08846095.tar.xz
Implemented regexp finding
Diffstat (limited to 'pluma/dialogs')
-rwxr-xr-xpluma/dialogs/pluma-search-dialog.c20
-rwxr-xr-xpluma/dialogs/pluma-search-dialog.h4
-rw-r--r--pluma/dialogs/pluma-search-dialog.ui27
3 files changed, 47 insertions, 4 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)
{
diff --git a/pluma/dialogs/pluma-search-dialog.h b/pluma/dialogs/pluma-search-dialog.h
index fb92efba..e6ebe8dc 100755
--- a/pluma/dialogs/pluma-search-dialog.h
+++ b/pluma/dialogs/pluma-search-dialog.h
@@ -111,6 +111,10 @@ void pluma_search_dialog_set_match_case (PlumaSearchDialog *dialog,
gboolean match_case);
gboolean pluma_search_dialog_get_match_case (PlumaSearchDialog *dialog);
+void pluma_search_dialog_set_match_regex (PlumaSearchDialog *dialog,
+ gboolean match_case);
+gboolean pluma_search_dialog_get_match_regex (PlumaSearchDialog *dialog);
+
void pluma_search_dialog_set_entire_word (PlumaSearchDialog *dialog,
gboolean entire_word);
gboolean pluma_search_dialog_get_entire_word (PlumaSearchDialog *dialog);
diff --git a/pluma/dialogs/pluma-search-dialog.ui b/pluma/dialogs/pluma-search-dialog.ui
index a1a37b5d..b7b70aca 100644
--- a/pluma/dialogs/pluma-search-dialog.ui
+++ b/pluma/dialogs/pluma-search-dialog.ui
@@ -181,6 +181,22 @@ Author: Wolfgang Ulbrich
</packing>
</child>
<child>
+ <object class="GtkCheckButton" id="match_regex_checkbutton">
+ <property name="label" translatable="yes">Match _regular expression</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="halign">start</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkCheckButton" id="entire_word_checkbutton">
<property name="label" translatable="yes">Match _entire word only</property>
<property name="visible">True</property>
@@ -193,7 +209,7 @@ Author: Wolfgang Ulbrich
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -209,7 +225,7 @@ Author: Wolfgang Ulbrich
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
@@ -226,7 +242,7 @@ Author: Wolfgang Ulbrich
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">3</property>
+ <property name="position">4</property>
</packing>
</child>
<child>
@@ -243,7 +259,7 @@ Author: Wolfgang Ulbrich
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">4</property>
+ <property name="position">5</property>
</packing>
</child>
</object>
@@ -268,5 +284,8 @@ Author: Wolfgang Ulbrich
<action-widget response="0">replace_button</action-widget>
<action-widget response="0">find_next_button</action-widget>
</action-widgets>
+ <child>
+ <placeholder/>
+ </child>
</object>
</interface>