[gnome-builder/wip/chergert/grep: 5/10] grep: allow closing the dialog
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/grep: 5/10] grep: allow closing the dialog
- Date: Tue, 30 Oct 2018 00:51:33 +0000 (UTC)
commit da124134a803cf566a54b3728b579015767d99fa
Author: Christian Hergert <chergert redhat com>
Date: Fri Oct 26 18:15:41 2018 -0700
grep: allow closing the dialog
src/plugins/grep/gbp-grep-panel.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/plugins/grep/gbp-grep-panel.c b/src/plugins/grep/gbp-grep-panel.c
index 4ca029988..c91d60db7 100644
--- a/src/plugins/grep/gbp-grep-panel.c
+++ b/src/plugins/grep/gbp-grep-panel.c
@@ -34,6 +34,7 @@ struct _GbpGrepPanel
GtkTreeView *tree_view;
GtkTreeViewColumn *toggle_column;
GtkCheckButton *check;
+ GtkButton *close_button;
};
enum {
@@ -346,6 +347,7 @@ gbp_grep_panel_class_init (GbpGrepPanelClass *klass)
gtk_widget_class_set_css_name (widget_class, "gbpgreppanel");
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/builder/plugins/grep/gbp-grep-panel.ui");
+ gtk_widget_class_bind_template_child (widget_class, GbpGrepPanel, close_button);
gtk_widget_class_bind_template_child (widget_class, GbpGrepPanel, tree_view);
}
@@ -357,6 +359,12 @@ gbp_grep_panel_init (GbpGrepPanel *self)
gtk_widget_init_template (GTK_WIDGET (self));
+ g_signal_connect_object (self->close_button,
+ "clicked",
+ G_CALLBACK (gtk_widget_destroy),
+ self,
+ G_CONNECT_SWAPPED);
+
g_signal_connect_object (self->tree_view,
"row-activated",
G_CALLBACK (gbp_grep_panel_row_activated_cb),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]