[gnome-builder] vim: add search direction to begin-search signal
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vim: add search direction to begin-search signal
- Date: Thu, 29 Jan 2015 10:07:21 +0000 (UTC)
commit 871b3aed013e0c49009b2ae8c7d540fd9c3f98ff
Author: Ray Strode <rstrode redhat com>
Date: Tue Jan 27 22:54:26 2015 -0500
vim: add search direction to begin-search signal
This commit adds the search direction to the begin-search signal.
It will be necessary for implementing the '?' command.
https://bugzilla.gnome.org/show_bug.cgi?id=743668
src/editor/gb-source-view.c | 9 +++++----
src/vim/gb-source-vim.c | 8 +++++---
src/vim/gb-source-vim.h | 1 +
3 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/src/editor/gb-source-view.c b/src/editor/gb-source-view.c
index b751c7e..4268105 100644
--- a/src/editor/gb-source-view.c
+++ b/src/editor/gb-source-view.c
@@ -326,14 +326,15 @@ gb_source_view_begin_search (GbSourceView *view,
}
static void
-gb_source_view_vim_begin_search (GbSourceView *view,
- const gchar *text,
- GbSourceVim *vim)
+gb_source_view_vim_begin_search (GbSourceView *view,
+ GtkDirectionType direction,
+ const gchar *text,
+ GbSourceVim *vim)
{
g_return_if_fail (GB_IS_SOURCE_VIEW (view));
g_return_if_fail (GB_IS_SOURCE_VIM (vim));
- gb_source_view_begin_search (view, GTK_DIR_DOWN, text);
+ gb_source_view_begin_search (view, direction, text);
}
static void
diff --git a/src/vim/gb-source-vim.c b/src/vim/gb-source-vim.c
index 486b196..aea3f60 100644
--- a/src/vim/gb-source-vim.c
+++ b/src/vim/gb-source-vim.c
@@ -4398,7 +4398,7 @@ gb_source_vim_cmd_begin_search (GbSourceVim *vim,
text = gtk_text_iter_get_slice (&begin, &end);
}
- g_signal_emit (vim, gSignals [BEGIN_SEARCH], 0, text);
+ g_signal_emit (vim, gSignals [BEGIN_SEARCH], 0, GTK_DIR_DOWN, text);
g_free (text);
}
@@ -5324,6 +5324,7 @@ gb_source_vim_class_init (GbSourceVimClass *klass)
/**
* GbSourceVim::begin-search:
+ * @search_direction: Direction to search
* @search_text: (allow none): Optional search text to apply to the search.
*
* This signal is emitted when the `/` key is pressed. The consuming code
@@ -5337,9 +5338,10 @@ gb_source_vim_class_init (GbSourceVimClass *klass)
G_STRUCT_OFFSET (GbSourceVimClass, begin_search),
NULL,
NULL,
- g_cclosure_marshal_VOID__STRING,
+ g_cclosure_marshal_generic,
G_TYPE_NONE,
- 1,
+ 2,
+ GTK_TYPE_DIRECTION_TYPE,
G_TYPE_STRING);
/**
diff --git a/src/vim/gb-source-vim.h b/src/vim/gb-source-vim.h
index c949629..c785514 100644
--- a/src/vim/gb-source-vim.h
+++ b/src/vim/gb-source-vim.h
@@ -66,6 +66,7 @@ struct _GbSourceVimClass
GObjectClass parent_class;
void (*begin_search) (GbSourceVim *vim,
+ GtkDirectionType search_direction,
const gchar *search_text);
void (*command_visibility_toggled) (GbSourceVim *vim,
gboolean visibility);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]