summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/toolbars/find-toolbar.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/toolbars/find-toolbar.c b/src/toolbars/find-toolbar.c
index 2534afa..a793b7c 100644
--- a/src/toolbars/find-toolbar.c
+++ b/src/toolbars/find-toolbar.c
@@ -30,6 +30,7 @@
struct _MqFindToolbar {
GtkRevealer parent_instance;
GtkWidget *search_entry;
+ GtkSpinner *spinner;
GtkWidget *matches_label;
gboolean match_case;
WebKitFindController *find_controller;
@@ -63,6 +64,7 @@ search(MqFindToolbar *find_toolbar, gboolean forward)
webkit_find_controller_search(find_toolbar->find_controller,
gtk_entry_get_text(GTK_ENTRY(find_toolbar->search_entry)),
find_options, G_MAXUINT);
+ gtk_spinner_start(find_toolbar->spinner);
}
static void
@@ -138,6 +140,7 @@ found_text_cb(WebKitFindController G_GNUC_UNUSED *find_controller,
{
gchar *text;
+ gtk_spinner_stop(find_toolbar->spinner);
if (match_count == 1) {
text = g_strdup("1 match");
} else {
@@ -151,6 +154,7 @@ static void
failed_to_find_text_cb(WebKitFindController G_GNUC_UNUSED *find_controller,
MqFindToolbar *find_toolbar)
{
+ gtk_spinner_stop(find_toolbar->spinner);
gtk_label_set_text(GTK_LABEL(find_toolbar->matches_label),
"No matches");
}
@@ -262,6 +266,9 @@ mq_find_toolbar_init(MqFindToolbar *find_toolbar)
g_signal_connect(match_case_button, "toggled",
G_CALLBACK(match_case_toggled_cb), find_toolbar);
+ /* Spinner */
+ find_toolbar->spinner = GTK_SPINNER(gtk_spinner_new());
+
/* Matches label */
find_toolbar->matches_label = gtk_label_new(NULL);
@@ -281,6 +288,8 @@ mq_find_toolbar_init(MqFindToolbar *find_toolbar)
gtk_box_pack_start(GTK_BOX(box), prev_button, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(box), next_button, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(box), match_case_button, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(find_toolbar->spinner),
+ FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(box), find_toolbar->matches_label,
FALSE, FALSE, 0);
gtk_box_pack_end(GTK_BOX(box), close_button, FALSE, FALSE, 0);