svnno****@sourc*****
svnno****@sourc*****
Fri Oct 26 12:07:58 JST 2007
Revision: 3318 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3318 Author: ikezoe Date: 2007-10-26 12:07:58 +0900 (Fri, 26 Oct 2007) Log Message: ----------- 2007-10-26 Hiroyuki Ikezoe <poinc****@ikezo*****> * src/kz-window.c: Connect "focus-out-event" signal. Modified Paths: -------------- kazehakase/trunk/ChangeLog kazehakase/trunk/src/kz-window.c Modified: kazehakase/trunk/ChangeLog =================================================================== --- kazehakase/trunk/ChangeLog 2007-10-26 03:02:43 UTC (rev 3317) +++ kazehakase/trunk/ChangeLog 2007-10-26 03:07:58 UTC (rev 3318) @@ -1,5 +1,9 @@ 2007-10-26 Hiroyuki Ikezoe <poinc****@ikezo*****> + * src/kz-window.c: Connect "focus-out-event" signal. + +2007-10-26 Hiroyuki Ikezoe <poinc****@ikezo*****> + * src/kz-window.c: Connect "motion-notify-event", "button-release-event" and "scroll-event" directly because these signals does not need KzEmbed object. Modified: kazehakase/trunk/src/kz-window.c =================================================================== --- kazehakase/trunk/src/kz-window.c 2007-10-26 03:02:43 UTC (rev 3317) +++ kazehakase/trunk/src/kz-window.c 2007-10-26 03:07:58 UTC (rev 3318) @@ -145,6 +145,8 @@ static gboolean motion_notify_event (GtkWidget *widget, GdkEventMotion *event); +static gboolean focus_out_event(GtkWidget *widget, + GdkEventFocus *event); static void destroy (GtkObject *object); static void kz_window_append_tab (KzWindow *kz, @@ -224,9 +226,6 @@ GtkToggleAction *action); static void cb_sidebar_unmap (GtkWidget *widget, GtkToggleAction *action); -static gboolean cb_focus_out_event (GtkWidget *widget, - GdkEventFocus *event, - KzWindow *kz); /* callbacks for embed */ static void cb_embed_title_changed (KzEmbed *embed, @@ -330,6 +329,7 @@ widget_class->button_release_event = button_release_event; widget_class->scroll_event = scroll_event; widget_class->motion_notify_event = motion_notify_event; + widget_class->focus_out_event = focus_out_event; /* KzWindow signals */ klass->append_tab = kz_window_append_tab; @@ -451,9 +451,6 @@ g_signal_connect(KZ_GET_GLOBAL_PROFILE, "changed::Gesture", G_CALLBACK(cb_profile_gesture_changed), kz); - g_signal_connect(kz, - "focus-out-event", - G_CALLBACK(cb_focus_out_event), kz); } /* top level vbox */ @@ -2505,13 +2502,12 @@ } static gboolean -cb_focus_out_event (GtkWidget *widget, - GdkEventFocus *event, - KzWindow *kz) +focus_out_event (GtkWidget *widget, + GdkEventFocus *event) { if(!event->in) { - KzWindowPrivate *priv = KZ_WINDOW_GET_PRIVATE(kz); + KzWindowPrivate *priv = KZ_WINDOW_GET_PRIVATE(widget); /* focus is out */ if (kz_gesture_is_started(priv->gesture)) { @@ -2520,7 +2516,7 @@ { gdk_pointer_ungrab(gtk_get_current_event_time()); } - kz_statusbar_set_gesture_text(KZ_STATUSBAR(kz->statusbar), NULL); + kz_statusbar_set_gesture_text(KZ_STATUSBAR(KZ_WINDOW(widget)->statusbar), NULL); } } return FALSE;