Merge pull request #24 from bl0ckeduser/master
Fix search/replace of strings containing backslashes
This commit is contained in:
		@@ -74,6 +74,7 @@ struct _PlumaSearchDialogPrivate
 | 
			
		||||
	GtkWidget *entire_word_checkbutton;
 | 
			
		||||
	GtkWidget *backwards_checkbutton;
 | 
			
		||||
	GtkWidget *wrap_around_checkbutton;
 | 
			
		||||
	GtkWidget *parse_escapes_checkbutton;
 | 
			
		||||
	GtkWidget *find_button;
 | 
			
		||||
	GtkWidget *replace_button;
 | 
			
		||||
	GtkWidget *replace_all_button;
 | 
			
		||||
@@ -363,6 +364,7 @@ pluma_search_dialog_init (PlumaSearchDialog *dlg)
 | 
			
		||||
					  "entire_word_checkbutton", &dlg->priv->entire_word_checkbutton,
 | 
			
		||||
					  "search_backwards_checkbutton", &dlg->priv->backwards_checkbutton,
 | 
			
		||||
					  "wrap_around_checkbutton", &dlg->priv->wrap_around_checkbutton,
 | 
			
		||||
					  "parse_escapes_checkbutton", &dlg->priv->parse_escapes_checkbutton,
 | 
			
		||||
					  NULL);
 | 
			
		||||
	g_free (file);
 | 
			
		||||
 | 
			
		||||
@@ -638,3 +640,21 @@ pluma_search_dialog_get_wrap_around (PlumaSearchDialog *dialog)
 | 
			
		||||
 | 
			
		||||
	return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->priv->wrap_around_checkbutton));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
pluma_search_dialog_set_parse_escapes (PlumaSearchDialog *dialog,
 | 
			
		||||
				       gboolean           parse_escapes)
 | 
			
		||||
{
 | 
			
		||||
	g_return_if_fail (PLUMA_IS_SEARCH_DIALOG (dialog));
 | 
			
		||||
 | 
			
		||||
	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->priv->parse_escapes_checkbutton),
 | 
			
		||||
				      parse_escapes);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
gboolean
 | 
			
		||||
pluma_search_dialog_get_parse_escapes (PlumaSearchDialog *dialog)
 | 
			
		||||
{
 | 
			
		||||
	g_return_val_if_fail (PLUMA_IS_SEARCH_DIALOG (dialog), FALSE);
 | 
			
		||||
 | 
			
		||||
	return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->priv->parse_escapes_checkbutton));
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -123,6 +123,11 @@ void		 pluma_search_dialog_set_wrap_around	(PlumaSearchDialog *dialog,
 | 
			
		||||
							 gboolean           wrap_around);
 | 
			
		||||
gboolean	 pluma_search_dialog_get_wrap_around	(PlumaSearchDialog *dialog);
 | 
			
		||||
   
 | 
			
		||||
 | 
			
		||||
void		pluma_search_dialog_set_parse_escapes (PlumaSearchDialog *dialog,
 | 
			
		||||
                                    		       gboolean           parse_escapes);
 | 
			
		||||
gboolean	pluma_search_dialog_get_parse_escapes (PlumaSearchDialog *dialog);
 | 
			
		||||
 | 
			
		||||
G_END_DECLS
 | 
			
		||||
 | 
			
		||||
#endif  /* __PLUMA_SEARCH_DIALOG_H__  */
 | 
			
		||||
 
 | 
			
		||||
@@ -229,6 +229,24 @@
 | 
			
		||||
                    <property name="fill">False</property>
 | 
			
		||||
                  </packing>
 | 
			
		||||
                </child>
 | 
			
		||||
                <child>
 | 
			
		||||
                  <object class="GtkCheckButton" id="parse_escapes_checkbutton">
 | 
			
		||||
                    <property name="visible">True</property>
 | 
			
		||||
                    <property name="can_focus">True</property>
 | 
			
		||||
                    <property name="label" translatable="yes">_Parse escape sequences (e.g. \n)</property>
 | 
			
		||||
                    <property name="use_underline">True</property>
 | 
			
		||||
                    <property name="relief">GTK_RELIEF_NORMAL</property>
 | 
			
		||||
                    <property name="focus_on_click">True</property>
 | 
			
		||||
                    <property name="active">True</property>
 | 
			
		||||
                    <property name="inconsistent">False</property>
 | 
			
		||||
                    <property name="draw_indicator">True</property>
 | 
			
		||||
                  </object>
 | 
			
		||||
                  <packing>
 | 
			
		||||
                    <property name="padding">0</property>
 | 
			
		||||
                    <property name="expand">False</property>
 | 
			
		||||
                    <property name="fill">False</property>
 | 
			
		||||
                  </packing>
 | 
			
		||||
                </child>
 | 
			
		||||
              </object>
 | 
			
		||||
              <packing>
 | 
			
		||||
                <property name="padding">0</property>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user