Hiroyuki Ikezoe
ikezo****@users*****
Thu Jan 4 11:12:17 JST 2007
Index: kazehakase/src/kz-notebook.c diff -u kazehakase/src/kz-notebook.c:1.5 kazehakase/src/kz-notebook.c:1.6 --- kazehakase/src/kz-notebook.c:1.5 Thu Jan 4 09:24:43 2007 +++ kazehakase/src/kz-notebook.c Thu Jan 4 11:12:17 2007 @@ -144,7 +144,7 @@ } -static GObject* +static GObject * constructor (GType type, guint n_props, GObjectConstructParam *props) @@ -228,7 +228,6 @@ static gboolean scroll_event (GtkWidget *widget, GdkEventScroll *event) { - GtkAction *action; KzWindow *kz = KZ_NOTEBOOK(widget)->kz; g_return_val_if_fail(KZ_IS_WINDOW(kz), FALSE); @@ -237,14 +236,12 @@ { case GDK_SCROLL_UP: case GDK_SCROLL_LEFT: - action = gtk_action_group_get_action(kz->actions, "PrevTab"); - gtk_action_activate(action); + kz_window_activate_action(kz, "PrevTab"); return TRUE; break; case GDK_SCROLL_DOWN: case GDK_SCROLL_RIGHT: - action = gtk_action_group_get_action(kz->actions, "NextTab"); - gtk_action_activate(action); + kz_window_activate_action(kz, "NextTab"); return TRUE; break; default: Index: kazehakase/src/kz-window.c diff -u kazehakase/src/kz-window.c:1.294 kazehakase/src/kz-window.c:1.295 --- kazehakase/src/kz-window.c:1.294 Thu Jan 4 09:24:43 2007 +++ kazehakase/src/kz-window.c Thu Jan 4 11:12:17 2007 @@ -1980,12 +1980,10 @@ idle_focus_location_entry(gpointer data) { KzWindow *kz = KZ_WINDOW(data); - GtkAction *action; g_return_val_if_fail(KZ_IS_WINDOW(kz), FALSE); - action = gtk_action_group_get_action(kz->actions, - "FocusLocationEntry"); - if(action) - gtk_action_activate(action); + + kz_window_activate_action(kz, "FocusLocationEntry"); + return FALSE; } @@ -2058,7 +2056,7 @@ focus && kz_tab_label_get_state(tab) == KZ_TAB_LABEL_STATE_LOADED) { - g_idle_add(idle_focus_location_entry, kz); + g_idle_add(idle_focus_location_entry, kz); } kz_actions_set_sensitive(kz, kzembed); @@ -2101,21 +2099,17 @@ static gboolean handle_scroll_event (KzWindow *kz, GdkScrollDirection direction) { - GtkAction *action; - g_return_val_if_fail(KZ_IS_WINDOW(kz), FALSE); switch (direction) { case GDK_SCROLL_UP: case GDK_SCROLL_LEFT: - action = gtk_action_group_get_action(kz->actions, "PrevTab"); - gtk_action_activate(action); + kz_window_activate_action(kz, "PrevTab"); return TRUE; break; case GDK_SCROLL_DOWN: case GDK_SCROLL_RIGHT: - action = gtk_action_group_get_action(kz->actions, "NextTab"); - gtk_action_activate(action); + kz_window_activate_action(kz, "NextTab"); return TRUE; break; default: @@ -2395,14 +2389,7 @@ } else if (!(type & KZ_CONTEXT_INPUT)) { - GtkAction *action; - - action = gtk_action_group_get_action(kz->actions, - "OpenSelection"); - - /* what about uri list? */ - if (action) - gtk_action_activate(action); + kz_window_activate_action(kz, "OpenSelection"); } break; default: @@ -2462,24 +2449,14 @@ if((event->modifier & modifier_id) && (!((KzEmbedEvent*)event)->link)) { - GtkAction *action; - action = gtk_action_group_get_action(kz->actions, - "AutoScrollMode"); - if (action) - gtk_action_activate(action); + kz_window_activate_action(kz, "AutoScrollMode"); } g_free(modifier_name); } else { if (!((KzEmbedEvent*)event)->link) - { - GtkAction *action; - action = gtk_action_group_get_action(kz->actions, - "AutoScrollMode"); - if (action) - gtk_action_activate(action); - } + kz_window_activate_action(kz, "AutoScrollMode"); break; } break;