[gtranslator: 1/3] Remove Include fuzzy option in search and replace dialog
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator: 1/3] Remove Include fuzzy option in search and replace dialog
- Date: Mon, 15 Oct 2018 09:09:23 +0000 (UTC)
commit 1afa41022de09a5af32816d09deefa52c9d31820
Author: Daniel Mustieles <daniel mustieles contractor bbva com>
Date: Mon Oct 15 09:44:23 2018 +0200
Remove Include fuzzy option in search and replace dialog
src/gtr-actions-search.c | 12 ++++--------
src/gtr-search-dialog.c | 22 ----------------------
src/gtr-search-dialog.h | 5 -----
src/gtr-search-dialog.ui | 17 -----------------
4 files changed, 4 insertions(+), 52 deletions(-)
---
diff --git a/src/gtr-actions-search.c b/src/gtr-actions-search.c
index f13bad94..63adee08 100644
--- a/src/gtr-actions-search.c
+++ b/src/gtr-actions-search.c
@@ -92,7 +92,6 @@ last_search_data_set (LastSearchData * data, GtrSearchDialog * dialog)
data->original_text = gtr_search_dialog_get_original_text (dialog);
data->translated_text = gtr_search_dialog_get_translated_text (dialog);
- data->fuzzy_messages = gtr_search_dialog_get_fuzzy (dialog);
data->match_case = gtr_search_dialog_get_match_case (dialog);
data->entire_word = gtr_search_dialog_get_entire_word (dialog);
data->backwards = gtr_search_dialog_get_backwards (dialog);
@@ -121,7 +120,6 @@ search_dialog_set_last_options (GtrSearchDialog * dialog,
{
gtr_search_dialog_set_original_text (dialog, data->original_text);
gtr_search_dialog_set_translated_text (dialog, data->translated_text);
- gtr_search_dialog_set_fuzzy (dialog, data->fuzzy_messages);
gtr_search_dialog_set_match_case (dialog, data->match_case);
gtr_search_dialog_set_entire_word (dialog, data->entire_word);
gtr_search_dialog_set_backwards (dialog, data->backwards);
@@ -233,7 +231,7 @@ run_search (GtrView * view, gboolean follow)
static gboolean
find_in_list (GtrWindow * window,
GList * views,
- gboolean fuzzy, gboolean wrap_around, gboolean search_backwards)
+ gboolean wrap_around, gboolean search_backwards)
{
GtrTab *tab = gtr_window_get_active_tab (window);
GtrPo *po = gtr_tab_get_po (tab);
@@ -253,7 +251,7 @@ find_in_list (GtrWindow * window,
do
{
- if (gtr_msg_is_fuzzy (GTR_MSG (l->data)) && !fuzzy)
+ if (gtr_msg_is_fuzzy (GTR_MSG (l->data)) )
{
if (!search_backwards)
{
@@ -334,7 +332,6 @@ do_find (GtrSearchDialog * dialog, GtrWindow * window)
const gchar *entry_text;
gboolean original_text;
gboolean translated_text;
- gboolean fuzzy;
gboolean match_case;
gboolean entire_word;
gboolean wrap_around;
@@ -351,7 +348,6 @@ do_find (GtrSearchDialog * dialog, GtrWindow * window)
/* Views where find */
original_text = gtr_search_dialog_get_original_text (dialog);
translated_text = gtr_search_dialog_get_translated_text (dialog);
- fuzzy = gtr_search_dialog_get_fuzzy (dialog);
/* Flags */
match_case = gtr_search_dialog_get_match_case (dialog);
@@ -359,7 +355,7 @@ do_find (GtrSearchDialog * dialog, GtrWindow * window)
search_backwards = gtr_search_dialog_get_backwards (dialog);
wrap_around = gtr_search_dialog_get_wrap_around (dialog);
- if (!original_text && !translated_text && !fuzzy)
+ if (!original_text && !translated_text)
return;
/* Get textviews */
@@ -387,7 +383,7 @@ do_find (GtrSearchDialog * dialog, GtrWindow * window)
list = list->next;
}
- found = find_in_list (window, views, fuzzy, wrap_around, search_backwards);
+ found = find_in_list (window, views, wrap_around, search_backwards);
if (found)
phrase_found (window, 0);
diff --git a/src/gtr-search-dialog.c b/src/gtr-search-dialog.c
index 5cb97920..c9ae0309 100644
--- a/src/gtr-search-dialog.c
+++ b/src/gtr-search-dialog.c
@@ -64,7 +64,6 @@ typedef struct
GtkWidget *replace_text_entry;
GtkWidget *original_text_checkbutton;
GtkWidget *translated_text_checkbutton;
- GtkWidget *fuzzy_checkbutton;
GtkWidget *match_case_checkbutton;
GtkWidget *entire_word_checkbutton;
GtkWidget *backwards_checkbutton;
@@ -407,7 +406,6 @@ gtr_search_dialog_init (GtrSearchDialog * dlg)
priv->replace_label = GTK_WIDGET (gtk_builder_get_object (builder, "replace_with_label"));
priv->original_text_checkbutton = GTK_WIDGET (gtk_builder_get_object (builder,
"original_text_checkbutton"));
priv->translated_text_checkbutton = GTK_WIDGET (gtk_builder_get_object (builder,
"translated_text_checkbutton"));
- priv->fuzzy_checkbutton = GTK_WIDGET (gtk_builder_get_object (builder, "fuzzy_checkbutton"));
priv->match_case_checkbutton = GTK_WIDGET (gtk_builder_get_object (builder, "match_case_checkbutton"));
priv->entire_word_checkbutton = GTK_WIDGET (gtk_builder_get_object (builder, "entire_word_checkbutton"));
priv->backwards_checkbutton = GTK_WIDGET (gtk_builder_get_object (builder,
"search_backwards_checkbutton"));
@@ -649,26 +647,6 @@ gtr_search_dialog_get_translated_text (GtrSearchDialog * dialog)
return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->translated_text_checkbutton));
}
-void
-gtr_search_dialog_set_fuzzy (GtrSearchDialog * dialog, gboolean match_case)
-{
- GtrSearchDialogPrivate *priv = gtr_search_dialog_get_instance_private (dialog);
- g_return_if_fail (GTR_IS_SEARCH_DIALOG (dialog));
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
- (priv->fuzzy_checkbutton),
- match_case);
-}
-
-gboolean
-gtr_search_dialog_get_fuzzy (GtrSearchDialog * dialog)
-{
- GtrSearchDialogPrivate *priv = gtr_search_dialog_get_instance_private (dialog);
- g_return_val_if_fail (GTR_IS_SEARCH_DIALOG (dialog), FALSE);
-
- return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->fuzzy_checkbutton));
-}
-
void
gtr_search_dialog_set_match_case (GtrSearchDialog * dialog,
gboolean match_case)
diff --git a/src/gtr-search-dialog.h b/src/gtr-search-dialog.h
index 5659e520..fcce7b2e 100644
--- a/src/gtr-search-dialog.h
+++ b/src/gtr-search-dialog.h
@@ -112,11 +112,6 @@ gtr_search_dialog_get_original_text (GtrSearchDialog * dialog);
gboolean
gtr_search_dialog_get_translated_text (GtrSearchDialog * dialog);
- void gtr_search_dialog_set_fuzzy (GtrSearchDialog *
- dialog, gboolean match_case);
-
- gboolean gtr_search_dialog_get_fuzzy (GtrSearchDialog * dialog);
-
void gtr_search_dialog_set_match_case (GtrSearchDialog *
dialog, gboolean match_case);
diff --git a/src/gtr-search-dialog.ui b/src/gtr-search-dialog.ui
index c9547a53..7e9efcea 100644
--- a/src/gtr-search-dialog.ui
+++ b/src/gtr-search-dialog.ui
@@ -208,23 +208,6 @@
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkCheckButton" id="fuzzy_checkbutton">
- <property name="label" translatable="yes">Include fu_zzy strings</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
<child>
<object class="GtkCheckButton" id="match_case_checkbutton">
<property name="label" translatable="yes">_Match case</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]