From 22e63760412a7fc434dff68ea8c4347b1cd13c9c Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sat, 15 Feb 2003 10:08:03 +0000 Subject: *** empty log message *** --- data/glade/epiphany.glade | 3 +- data/ui/epiphany-ui.xml.in | 2 - embed/find-dialog.c | 97 ++++++++++++++++++++++------------------------ 3 files changed, 47 insertions(+), 55 deletions(-) diff --git a/data/glade/epiphany.glade b/data/glade/epiphany.glade index 773bc0334..160615ef5 100644 --- a/data/glade/epiphany.glade +++ b/data/glade/epiphany.glade @@ -547,8 +547,7 @@ True * - False - + True diff --git a/data/ui/epiphany-ui.xml.in b/data/ui/epiphany-ui.xml.in index 761ecd8b5..e1ced423a 100644 --- a/data/ui/epiphany-ui.xml.in +++ b/data/ui/epiphany-ui.xml.in @@ -91,8 +91,6 @@ - - diff --git a/embed/find-dialog.c b/embed/find-dialog.c index 7b96e86c1..d16b3733a 100755 --- a/embed/find-dialog.c +++ b/embed/find-dialog.c @@ -43,7 +43,6 @@ impl_show (EphyDialog *dialog); void find_close_button_clicked_cb (GtkWidget *button, EphyDialog *dialog); void find_next_button_clicked_cb (GtkWidget *button, EphyDialog *dialog); void find_prev_button_clicked_cb (GtkWidget *button, EphyDialog *dialog); -void find_entry_activate_cb (GtkWidget *editable, EphyDialog *dialog); void find_entry_changed_cb (GtkWidget *editable, EphyDialog *dialog); void find_check_toggled_cb (GtkWidget *toggle, EphyDialog *dialog); @@ -203,6 +202,51 @@ impl_destruct (EphyDialog *dialog) EPHY_DIALOG_CLASS (parent_class)->destruct (dialog); } +static void +find_get_info (EphyDialog *dialog) +{ + EmbedFindInfo *properties; + char *search_string; + GValue word = {0, }; + GValue match_case = {0, }; + GValue wrap = {0, }; + FindDialog *find_dialog = FIND_DIALOG(dialog); + + /* get the search string from the entry field */ + ephy_dialog_get_value (dialog, WORD_PROP, &word); + search_string = g_strdup(g_value_get_string (&word)); + g_value_unset (&word); + + /* don't do null searches */ + if (search_string[0] == '\0') + { + find_dialog->priv->can_go_prev = FALSE; + find_dialog->priv->can_go_next = FALSE; + return; + } + + if (find_dialog->priv->properties != NULL) + { + g_free (find_dialog->priv->properties->search_string); + g_free (find_dialog->priv->properties); + } + + /* build search structure */ + properties = g_new0 (EmbedFindInfo,1); + properties->search_string = search_string; + + ephy_dialog_get_value (dialog, MATCH_CASE_PROP, &match_case); + properties->match_case = g_value_get_boolean (&match_case); + + ephy_dialog_get_value (dialog, AUTOWRAP_PROP, &wrap); + properties->wrap = g_value_get_boolean (&wrap); + + properties->entire_word = FALSE; + properties->search_frames = TRUE; + + find_dialog->priv->properties = properties; +} + static void impl_show (EphyDialog *dialog) { @@ -211,6 +255,7 @@ impl_show (EphyDialog *dialog) find_dialog->priv->can_go_prev = TRUE; find_dialog->priv->can_go_next = TRUE; + find_get_info (dialog); find_update_nav (dialog); /* Focus the text entry. This will correctly select or leave @@ -331,48 +376,6 @@ find_dialog_go_prev (FindDialog *dialog, find_update_nav (EPHY_DIALOG(dialog)); } -static void -find_get_info (EphyDialog *dialog) -{ - EmbedFindInfo *properties; - char *search_string; - GValue word = {0, }; - GValue match_case = {0, }; - GValue wrap = {0, }; - FindDialog *find_dialog = FIND_DIALOG(dialog); - - /* get the search string from the entry field */ - ephy_dialog_get_value (dialog, WORD_PROP, &word); - search_string = g_strdup(g_value_get_string (&word)); - - /* don't do null searches */ - if (search_string[0] == '\0') - { - return; - } - - if (find_dialog->priv->properties != NULL) - { - g_free (find_dialog->priv->properties->search_string); - g_free (find_dialog->priv->properties); - } - - /* build search structure */ - properties = g_new0 (EmbedFindInfo,1); - properties->search_string = search_string; - - ephy_dialog_get_value (dialog, MATCH_CASE_PROP, &match_case); - properties->match_case = g_value_get_boolean (&match_case); - - ephy_dialog_get_value (dialog, AUTOWRAP_PROP, &wrap); - properties->wrap = g_value_get_boolean (&wrap); - - properties->entire_word = FALSE; - properties->search_frames = TRUE; - - find_dialog->priv->properties = properties; -} - void find_close_button_clicked_cb (GtkWidget *button, EphyDialog *dialog) @@ -394,14 +397,6 @@ find_prev_button_clicked_cb (GtkWidget *button, find_dialog_go_prev (FIND_DIALOG(dialog), TRUE); } -void -find_entry_activate_cb (GtkWidget *editable, - EphyDialog *dialog) -{ - find_dialog_go_next (FIND_DIALOG(dialog), TRUE); - find_update_nav (dialog); -} - void find_entry_changed_cb (GtkWidget *editable, EphyDialog *dialog) -- cgit v1.2.3