svnno****@sourc*****
svnno****@sourc*****
Fri Oct 26 12:02:43 JST 2007
Revision: 3317 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3317 Author: ikezoe Date: 2007-10-26 12:02:43 +0900 (Fri, 26 Oct 2007) Log Message: ----------- 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 Paths: -------------- kazehakase/trunk/ChangeLog kazehakase/trunk/src/kz-window.c Modified: kazehakase/trunk/ChangeLog =================================================================== --- kazehakase/trunk/ChangeLog 2007-10-26 02:47:57 UTC (rev 3316) +++ kazehakase/trunk/ChangeLog 2007-10-26 03:02:43 UTC (rev 3317) @@ -1,5 +1,11 @@ 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. + +2007-10-26 Hiroyuki Ikezoe <poinc****@ikezo*****> + * module/embed/ie/kz-ie.c: Call gtk_ie_embed_set_use_context_menu() explicitly. Modified: kazehakase/trunk/src/kz-window.c =================================================================== --- kazehakase/trunk/src/kz-window.c 2007-10-26 02:47:57 UTC (rev 3316) +++ kazehakase/trunk/src/kz-window.c 2007-10-26 03:02:43 UTC (rev 3317) @@ -133,6 +133,18 @@ GtkSelectionData *data, guint info, guint time); +static gboolean button_release_event + (GtkWidget *widget, + GdkEventButton *event); +static gboolean scroll_event (GtkWidget *widget, + GdkEventScroll *event); +/* + * mozilla doesn't accept these signals, so we connect these funtions to + * KzWindow instead of KzEmbed. + */ +static gboolean motion_notify_event + (GtkWidget *widget, + GdkEventMotion *event); static void destroy (GtkObject *object); static void kz_window_append_tab (KzWindow *kz, @@ -252,19 +264,6 @@ KzEmbedEventMouse *event, KzWindow *kz); -/* - * mozilla doesn't accept these signals, so we connect these funtions to - * KzWindow instead of KzEmbed. - */ -static gboolean cb_window_motion_notify_event (GtkWidget *widget, - GdkEventMotion *event, - KzEmbed *kzembed); -static gboolean cb_window_button_release_event (GtkWidget *widget, - GdkEventButton *event, - KzEmbed *kzembed); -static gboolean cb_window_scroll_event (GtkWidget *widget, - GdkEventScroll *event, - KzEmbed *kzembed); static void gtk_key_theme_changed_cb (GtkSettings *settings, GParamSpec *pspec, @@ -325,9 +324,12 @@ object_class->destroy = destroy; /* GtkWidget signals */ - widget_class->delete_event = delete_event; - widget_class->key_press_event = key_press_event; - widget_class->drag_data_received = drag_data_received; + widget_class->delete_event = delete_event; + widget_class->key_press_event = key_press_event; + widget_class->drag_data_received = drag_data_received; + widget_class->button_release_event = button_release_event; + widget_class->scroll_event = scroll_event; + widget_class->motion_notify_event = motion_notify_event; /* KzWindow signals */ klass->append_tab = kz_window_append_tab; @@ -1447,16 +1449,6 @@ g_return_if_fail(KZ_IS_WINDOW(kz)); g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_signal_connect(kz, - "motion_notify_event", - G_CALLBACK(cb_window_motion_notify_event), kzembed); - g_signal_connect(kz, - "button_release_event", - G_CALLBACK(cb_window_button_release_event), kzembed); - g_signal_connect(kz, - "scroll_event", - G_CALLBACK(cb_window_scroll_event), kzembed); - /* * key event signal */ @@ -1500,16 +1492,6 @@ g_return_if_fail(KZ_IS_WINDOW(kz)); g_return_if_fail(KZ_IS_EMBED(kzembed)); - g_signal_handlers_disconnect_by_func - (kz, - G_CALLBACK(cb_window_motion_notify_event), kzembed); - g_signal_handlers_disconnect_by_func - (kz, - G_CALLBACK(cb_window_button_release_event), kzembed); - g_signal_handlers_disconnect_by_func - (kz, - G_CALLBACK(cb_window_scroll_event), kzembed); - /* * key event signal */ @@ -2418,17 +2400,15 @@ } static gboolean -cb_window_motion_notify_event (GtkWidget *widget, - GdkEventMotion *event, - KzEmbed *kzembed) +motion_notify_event (GtkWidget *widget, + GdkEventMotion *event) { KzWindow *kz; gint x, y; /* GdkModifierType state; */ KzWindowPrivate *priv; + KzEmbed *kzembed = KZ_EMBED(KZ_WINDOW_CURRENT_PAGE(KZ_WINDOW(widget))); - g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE); - kz = KZ_WINDOW(widget); priv = KZ_WINDOW_GET_PRIVATE(kz); @@ -2453,16 +2433,13 @@ static gboolean -cb_window_button_release_event (GtkWidget *widget, - GdkEventButton *event, - KzEmbed *kzembed) +button_release_event (GtkWidget *widget, + GdkEventButton *event) { KzWindow *kz; gboolean retval = FALSE; KzWindowPrivate *priv; - g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE); - kz = KZ_WINDOW(widget); priv = KZ_WINDOW_GET_PRIVATE(kz); @@ -2508,16 +2485,13 @@ } static gboolean -cb_window_scroll_event (GtkWidget *widget, - GdkEventScroll *event, - KzEmbed *kzembed) +scroll_event (GtkWidget *widget, + GdkEventScroll *event) { KzWindow *kz; gboolean retval = FALSE; KzWindowPrivate *priv; - g_return_val_if_fail(KZ_IS_EMBED(kzembed), FALSE); - kz = KZ_WINDOW(widget); priv = KZ_WINDOW_GET_PRIVATE(kz);