diff --git a/src/callbacks.c b/src/callbacks.c index 6a97ced..ad72f29 100644 --- a/src/callbacks.c +++ b/src/callbacks.c @@ -56,7 +56,7 @@ void on_edit_find(gpointer data) { Editor * editor = data; - editor_find(editor, NULL); + on_find(editor); } @@ -187,6 +187,15 @@ void on_cut(gpointer data) } +/* on_find */ +void on_find(gpointer data) +{ + Editor * editor = data; + + editor_find(editor, NULL); +} + + /* on_new */ void on_new(gpointer data) { diff --git a/src/callbacks.h b/src/callbacks.h index d819ada..6693437 100644 --- a/src/callbacks.h +++ b/src/callbacks.h @@ -42,6 +42,7 @@ void on_insert_file(gpointer data); void on_close(gpointer data); void on_copy(gpointer data); void on_cut(gpointer data); +void on_find(gpointer data); void on_new(gpointer data); void on_open(gpointer data); void on_paste(gpointer data); diff --git a/src/editor.c b/src/editor.c index 632348c..22cd2e3 100644 --- a/src/editor.c +++ b/src/editor.c @@ -81,6 +81,7 @@ static char const * _authors[] = static DesktopAccel _editor_accel[] = { { G_CALLBACK(on_close), GDK_CONTROL_MASK, GDK_KEY_w }, + { G_CALLBACK(on_find), GDK_CONTROL_MASK, GDK_KEY_f }, { G_CALLBACK(on_new), GDK_CONTROL_MASK, GDK_KEY_n }, { G_CALLBACK(on_open), GDK_CONTROL_MASK, GDK_KEY_o }, { G_CALLBACK(on_preferences), GDK_CONTROL_MASK, GDK_KEY_p }, @@ -178,6 +179,8 @@ static DesktopToolbar _editor_toolbar[] = { N_("Copy"), G_CALLBACK(on_copy), GTK_STOCK_COPY, 0, 0, NULL }, { N_("Paste"), G_CALLBACK(on_paste), GTK_STOCK_PASTE, 0, 0, NULL }, #ifdef EMBEDDED + { "", NULL, NULL, 0, 0, NULL }, + { N_("Find"), G_CALLBACK(on_find), GTK_STOCK_FIND, 0, 0, NULL }, { "", NULL, NULL, 0, 0, NULL }, { N_("Preferences"), G_CALLBACK(on_preferences), GTK_STOCK_PREFERENCES, 0, 0, NULL },