[Kazehakase-cvs] CVS update: kazehakase/src

Zurück zum Archiv-Index

Hiroyuki Ikezoe ikezo****@users*****
Thu Jan 4 22:33:34 JST 2007


Index: kazehakase/src/kz-notebook.c
diff -u kazehakase/src/kz-notebook.c:1.11 kazehakase/src/kz-notebook.c:1.12
--- kazehakase/src/kz-notebook.c:1.11	Thu Jan  4 22:25:04 2007
+++ kazehakase/src/kz-notebook.c	Thu Jan  4 22:33:33 2007
@@ -230,26 +230,7 @@
 {
 	KzWindow *kz = KZ_NOTEBOOK(widget)->kz;
 
-	g_return_val_if_fail(KZ_IS_WINDOW(kz), FALSE);
-
-	switch (event->direction)
-	{
-	case GDK_SCROLL_UP:
-	case GDK_SCROLL_LEFT:
-		kz_window_activate_action(kz, "PrevTab");
-		return TRUE;
-		break;
-	case GDK_SCROLL_DOWN:
-	case GDK_SCROLL_RIGHT:
-		kz_window_activate_action(kz, "NextTab");
-		return TRUE;
-		break;
-	default:
-		g_warning ("Invalid scroll direction!");
-		break;
-	}
-
-	return FALSE;
+	return kz_window_scroll_tab(kz, event->direction);
 }
 
 static void
Index: kazehakase/src/kz-tab-label.c
diff -u kazehakase/src/kz-tab-label.c:1.87 kazehakase/src/kz-tab-label.c:1.88
--- kazehakase/src/kz-tab-label.c:1.87	Thu Jan  4 11:16:50 2007
+++ kazehakase/src/kz-tab-label.c	Thu Jan  4 22:33:33 2007
@@ -688,21 +688,7 @@
 
 	kz = KZ_TAB_LABEL(widget)->kz;
 
-	switch (event->direction) {
-	case GDK_SCROLL_UP:
-	case GDK_SCROLL_LEFT:
-		kz_window_activate_action(kz, "PrevTab");
-		retval = TRUE;
-		break;
-	case GDK_SCROLL_DOWN:
-	case GDK_SCROLL_RIGHT:
-		kz_window_activate_action(kz, "NextTab");
-		retval = TRUE;
-		break;
-	default:
-		g_warning ("Invalid scroll direction!");
-		break;
-	}
+	retval = kz_window_scroll_tab(kz, event->direction);
 
 	if (GTK_WIDGET_CLASS(kz_tab_label_parent_class)->scroll_event)
 		return GTK_WIDGET_CLASS(kz_tab_label_parent_class)->scroll_event(widget, event)
Index: kazehakase/src/kz-window.c
diff -u kazehakase/src/kz-window.c:1.300 kazehakase/src/kz-window.c:1.301
--- kazehakase/src/kz-window.c:1.300	Thu Jan  4 22:22:39 2007
+++ kazehakase/src/kz-window.c	Thu Jan  4 22:33:34 2007
@@ -2041,8 +2041,8 @@
 }
 
 
-static gboolean
-handle_scroll_event (KzWindow *kz, GdkScrollDirection direction)
+gboolean
+kz_window_scroll_tab (KzWindow *kz, GdkScrollDirection direction)
 {
 	g_return_val_if_fail(KZ_IS_WINDOW(kz), FALSE);
 
@@ -2608,7 +2608,7 @@
 
 	if (priv->is_button3_pressed)
 	{
-		retval = handle_scroll_event (kz, event->direction);
+		retval = kz_window_scroll_tab(kz, event->direction);
 		priv->is_button3_scrolled = retval;
 	}
 	
Index: kazehakase/src/kz-window.h
diff -u kazehakase/src/kz-window.h:1.77 kazehakase/src/kz-window.h:1.78
--- kazehakase/src/kz-window.h:1.77	Thu Jan  4 11:47:51 2007
+++ kazehakase/src/kz-window.h	Thu Jan  4 22:33:34 2007
@@ -112,6 +112,8 @@
 						      gint         position);
 void		  kz_window_move_tab 		     (KzWindow    *kz,
 						      GtkWidget   *widget);
+gboolean          kz_window_scroll_tab               (KzWindow    *kz,
+						      GdkScrollDirection direction);
 void              kz_window_load_url                 (KzWindow    *kz,
 						      const gchar *url);
 void              kz_window_store_state              (KzWindow    *kz);


More information about the Kazehakase-cvs mailing list
Zurück zum Archiv-Index