[gnome-builder/editor-layout] connect forward/back buttons
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/editor-layout] connect forward/back buttons
- Date: Sun, 30 Nov 2014 06:10:41 +0000 (UTC)
commit 4c6e48e1ee68693465a2f85653b77158c15cab1b
Author: Christian Hergert <christian hergert me>
Date: Sat Nov 29 22:07:27 2014 -0800
connect forward/back buttons
src/editor/gb-editor-frame.c | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-editor-frame.c b/src/editor/gb-editor-frame.c
index 33916c5..4057f42 100644
--- a/src/editor/gb-editor-frame.c
+++ b/src/editor/gb-editor-frame.c
@@ -489,6 +489,26 @@ gb_editor_frame_on_search_entry_activate (GbEditorFrame *frame,
gtk_widget_grab_focus (GTK_WIDGET (frame->priv->source_view));
}
+static void
+gb_editor_frame_on_forward_search_clicked (GbEditorFrame *frame,
+ GtkButton *button)
+{
+ g_return_if_fail (GB_IS_EDITOR_FRAME (frame));
+ g_return_if_fail (GTK_IS_BUTTON (button));
+
+ gb_editor_frame_move_next_match (frame);
+}
+
+static void
+gb_editor_frame_on_backward_search_clicked (GbEditorFrame *frame,
+ GtkButton *button)
+{
+ g_return_if_fail (GB_IS_EDITOR_FRAME (frame));
+ g_return_if_fail (GTK_IS_BUTTON (button));
+
+ gb_editor_frame_move_previous_match (frame);
+}
+
/**
* gb_editor_frame_on_begin_search:
*
@@ -713,6 +733,18 @@ gb_editor_frame_constructed (GObject *object)
G_CALLBACK (gb_editor_frame_on_search_entry_activate),
frame,
G_CONNECT_SWAPPED);
+
+ g_signal_connect_object (priv->forward_search,
+ "clicked",
+ G_CALLBACK (gb_editor_frame_on_forward_search_clicked),
+ frame,
+ G_CONNECT_SWAPPED);
+
+ g_signal_connect_object (priv->backward_search,
+ "clicked",
+ G_CALLBACK (gb_editor_frame_on_backward_search_clicked),
+ frame,
+ G_CONNECT_SWAPPED);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]