svnno****@sourc*****
svnno****@sourc*****
Sun Mar 25 14:56:56 JST 2007
Revision: 3003 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3003 Author: ikezoe Date: 2007-03-25 14:56:56 +0900 (Sun, 25 Mar 2007) Log Message: ----------- minor fixes. Modified Paths: -------------- kazehakase/trunk/module/embed/gtk-webcore/kz-gtk-webcore.cpp Modified: kazehakase/trunk/module/embed/gtk-webcore/kz-gtk-webcore.cpp =================================================================== --- kazehakase/trunk/module/embed/gtk-webcore/kz-gtk-webcore.cpp 2007-03-25 05:37:05 UTC (rev 3002) +++ kazehakase/trunk/module/embed/gtk-webcore/kz-gtk-webcore.cpp 2007-03-25 05:56:56 UTC (rev 3003) @@ -53,14 +53,6 @@ static void kz_gtk_webcore_init (KzGtkWebcore *gtk_webcore); static void kz_gtk_webcore_dispose (GObject *object); -#if 0 -/* widget class */ -static gboolean button_press (GtkWidget *widget, - GdkEventButton *event); -static gboolean button_release (GtkWidget *widget, - GdkEventButton *event); -#endif - /* gtk_webcore class */ static void kz_gtk_webcore_status (Webi *gtk_webcore, WebiLoadStatus *status); @@ -246,10 +238,6 @@ gtk_webcore_class = (WebiClass *) klass; object_class->dispose = kz_gtk_webcore_dispose; -#if 0 - widget_class->button_press_event = button_press; - widget_class->button_release_event = button_release; -#endif gtk_webcore_class->status = kz_gtk_webcore_status; gtk_webcore_class->load_start = kz_gtk_webcore_load_start; gtk_webcore_class->load_stop = kz_gtk_webcore_load_stop; @@ -429,25 +417,6 @@ G_OBJECT_CLASS(kz_gtk_webcore_parent_class)->dispose(object); } -#if 0 -static gboolean -button_press (GtkWidget *widget, GdkEventButton *event) -{ - if (GTK_WIDGET_CLASS(kz_gtk_webcore_parent_class)->button_press_event) - return GTK_WIDGET_CLASS(kz_gtk_webcore_parent_class)->button_press_event(widget, event); - - return FALSE; -} - -static gboolean -button_release (GtkWidget *widget, GdkEventButton *event) -{ - if (GTK_WIDGET_CLASS(kz_gtk_webcore_parent_class)->button_press_event) - return GTK_WIDGET_CLASS(kz_gtk_webcore_parent_class)->button_press_event(widget, event); - return FALSE; -} -#endif - GtkWidget * kz_gtk_webcore_new (void) { @@ -782,7 +751,7 @@ { g_return_if_fail(KZ_IS_GTK_WEBCORE(kzembed)); - webi_refresh (WEBI(kzembed)); + webi_refresh(WEBI(kzembed)); } @@ -791,7 +760,7 @@ { g_return_if_fail(KZ_IS_GTK_WEBCORE(kzembed)); - webi_stop_load (WEBI(kzembed)); + webi_stop_load(WEBI(kzembed)); } @@ -800,7 +769,7 @@ { g_return_if_fail(KZ_IS_GTK_WEBCORE(kzembed)); - return webi_go_back (WEBI(kzembed)); + return webi_go_back(WEBI(kzembed)); } @@ -809,7 +778,7 @@ { g_return_if_fail(KZ_IS_GTK_WEBCORE(kzembed)); - return webi_go_forward (WEBI(kzembed)); + return webi_go_forward(WEBI(kzembed)); } @@ -818,7 +787,7 @@ { g_return_val_if_fail(KZ_IS_GTK_WEBCORE(kzembed), FALSE); - return webi_can_go_back (WEBI(kzembed)); + return webi_can_go_back(WEBI(kzembed)); } @@ -827,7 +796,7 @@ { g_return_val_if_fail(KZ_IS_GTK_WEBCORE(kzembed), FALSE); - return webi_can_go_forward (WEBI(kzembed)); + return webi_can_go_forward(WEBI(kzembed)); } @@ -898,10 +867,7 @@ progress = (gdouble) priv->cur_requests / (gdouble) priv->total_requests; - if (progress > 1.0) - return 1.0; - - return progress; + return (progress < 1.0) ? progress : 1.0; }