[Kazehakase-devel 1978] Re: ForwardFind and BackwardFind

Back to archive index

Kouhei Sutou kou****@cozmi*****
2005年 3月 2日 (水) 21:03:30 JST


須藤です.

In <20050****@ikezo*****>
  "[Kazehakase-devel 1968] Re: ForwardFind and BackwardFind" on Mon, 28 Feb 2005 11:39:18 +0900,
  Hiroyuki Ikezoe <poinc****@ikezo*****> wrote:

> > # うーん,ToggleFindDirectionアクションがあると嬉しいのかなぁ.
> 
> そうですね。そっちはよさそうです。

気に入らないんですが,一応投げておきます.

# アクションが起動されるとFindNextが最初からになっちゃうんだ
# よなぁ.

-------------- next part --------------
Index: src/actions/kz-actions.c
===================================================================
RCS file: /cvsroot/kazehakase/kazehakase/src/actions/kz-actions.c,v
retrieving revision 1.43.2.4
diff -u -p -r1.43.2.4 kz-actions.c
--- src/actions/kz-actions.c	15 Feb 2005 03:42:06 -0000	1.43.2.4
+++ src/actions/kz-actions.c	2 Mar 2005 12:03:00 -0000
@@ -605,6 +605,15 @@ act_find (GtkAction *action, KzWindow *k
 	gtk_widget_grab_focus(kz->find_area);
 }
 
+static void
+act_toggle_find_direction (GtkAction *action, KzWindow *kz)
+{
+	g_return_if_fail(KZ_IS_WINDOW(kz));
+
+	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(kz->find_direction),
+				     !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(kz->find_direction)));
+}
+
 
 static void
 act_prev_tab (GtkAction *action, KzWindow *kz)
@@ -1856,6 +1865,9 @@ GtkActionEntry kz_actions[] =
 */
 
   {"Find",          NULL,                 N_("Find"),         CTRL"F",  N_("Find a word or phrase in the page"), G_CALLBACK(act_find)},
+
+  {"ToggleFindDirection", NULL,           N_("ToggleFindDirection"), NULL,  N_("Toggle find direction"), G_CALLBACK(act_toggle_find_direction)},
+
   {"PrevTab", KZ_STOCK_TAB_PREV,    N_("_Previous Tab"),  ALT"L",   N_("Activate previous tab"), G_CALLBACK(act_prev_tab)},
   {"NextTab", KZ_STOCK_TAB_NEXT,    N_("_Next Tab"),      ALT"R",   N_("Activate next tab"), G_CALLBACK(act_next_tab)},
 


Kazehakase-devel メーリングリストの案内
Back to archive index