[gnome-builder/wip/chergert/grep: 13/15] grep: add spinner while we are editing files
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/grep: 13/15] grep: add spinner while we are editing files
- Date: Tue, 30 Oct 2018 20:41:22 +0000 (UTC)
commit 9a39a8de7e0cf5f2b248b25754b8ce4f5f445c6f
Author: Christian Hergert <chergert redhat com>
Date: Mon Oct 29 18:57:30 2018 -0700
grep: add spinner while we are editing files
src/plugins/grep/gbp-grep-panel.c | 6 ++++++
src/plugins/grep/gbp-grep-panel.ui | 11 +++++++++++
2 files changed, 17 insertions(+)
---
diff --git a/src/plugins/grep/gbp-grep-panel.c b/src/plugins/grep/gbp-grep-panel.c
index ebc3ea602..10e49f16a 100644
--- a/src/plugins/grep/gbp-grep-panel.c
+++ b/src/plugins/grep/gbp-grep-panel.c
@@ -37,6 +37,7 @@ struct _GbpGrepPanel
GtkButton *close_button;
GtkButton *replace_button;
GtkEntry *replace_entry;
+ GtkSpinner *spinner;
};
enum {
@@ -300,6 +301,8 @@ gbp_grep_panel_replace_edited_cb (GObject *object,
* to jump to the positions that were edited.
*/
gtk_widget_set_sensitive (GTK_WIDGET (self->tree_view), TRUE);
+ gtk_spinner_stop (self->spinner);
+ gtk_widget_hide (GTK_WIDGET (self->spinner));
}
static void
@@ -331,6 +334,8 @@ gbp_grep_panel_replace_clicked_cb (GbpGrepPanel *self,
gtk_widget_set_sensitive (GTK_WIDGET (self->tree_view), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (self->replace_button), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (self->replace_entry), FALSE);
+ gtk_widget_show (GTK_WIDGET (self->spinner));
+ gtk_spinner_start (self->spinner);
context = ide_widget_get_context (GTK_WIDGET (self));
bufmgr = ide_context_get_buffer_manager (context);
@@ -401,6 +406,7 @@ gbp_grep_panel_class_init (GbpGrepPanelClass *klass)
gtk_widget_class_bind_template_child (widget_class, GbpGrepPanel, close_button);
gtk_widget_class_bind_template_child (widget_class, GbpGrepPanel, replace_button);
gtk_widget_class_bind_template_child (widget_class, GbpGrepPanel, replace_entry);
+ gtk_widget_class_bind_template_child (widget_class, GbpGrepPanel, spinner);
gtk_widget_class_bind_template_child (widget_class, GbpGrepPanel, tree_view);
}
diff --git a/src/plugins/grep/gbp-grep-panel.ui b/src/plugins/grep/gbp-grep-panel.ui
index a275ef646..c8f92de59 100644
--- a/src/plugins/grep/gbp-grep-panel.ui
+++ b/src/plugins/grep/gbp-grep-panel.ui
@@ -29,6 +29,17 @@
<property name="margin-bottom">6</property>
<property name="orientation">horizontal</property>
<property name="visible">true</property>
+ <child>
+ <object class="GtkSpinner" id="spinner">
+ <property name="halign">end</property>
+ </object>
+ <packing>
+ <property name="expand">true</property>
+ <property name="fill">true</property>
+ <property name="pack-type">start</property>
+ <property name="padding">12</property>
+ </packing>
+ </child>
<child type="center">
<object class="GtkBox">
<property name="spacing">12</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]