[kazehakase-svn] [3640] * src/kz-thumbnails-view.c: Use kz_bookmark_folder_get_child_index and

Back to archive index

svnno****@sourc***** svnno****@sourc*****
Thu Feb 12 14:22:52 JST 2009


Revision: 3640
          http://svn.sourceforge.jp/view?root=kazehakase&view=rev&rev=3640
Author:   ikezoe
Date:     2009-02-12 14:22:52 +0900 (Thu, 12 Feb 2009)

Log Message:
-----------
	* src/kz-thumbnails-view.c: Use kz_bookmark_folder_get_child_index and
	kz_bookmark_folder_get_nth_child.

Modified Paths:
--------------
    kazehakase/trunk/ChangeLog
    kazehakase/trunk/src/kz-thumbnails-view.c
    kazehakase/trunk/src/kz-window.c

Modified: kazehakase/trunk/ChangeLog
===================================================================
--- kazehakase/trunk/ChangeLog	2009-02-12 05:19:48 UTC (rev 3639)
+++ kazehakase/trunk/ChangeLog	2009-02-12 05:22:52 UTC (rev 3640)
@@ -18,6 +18,8 @@
 	kz_bookmark_folder_get_child_index.
 	* src/kz-window.c: Use kz_bookmark_folder_get_child_index and
 	kz_bookmark_folder_get_nth_child.
+	* src/kz-thumbnails-view.c: Use kz_bookmark_folder_get_child_index and
+	kz_bookmark_folder_get_nth_child.
 
 2009-02-11  Hiroyuki Ikezoe  <poinc****@ikezo*****>
 

Modified: kazehakase/trunk/src/kz-thumbnails-view.c
===================================================================
--- kazehakase/trunk/src/kz-thumbnails-view.c	2009-02-12 05:19:48 UTC (rev 3639)
+++ kazehakase/trunk/src/kz-thumbnails-view.c	2009-02-12 05:22:52 UTC (rev 3640)
@@ -305,13 +305,10 @@
 find_thumbnail_widget (KzThumbnailsView *view, KzBookmark *bookmark)
 {
 	GtkWidget *widget;
-	GList *children;
 	gint index;
 	KzThumbnailsViewPrivate *priv = KZ_THUMBNAILS_VIEW_GET_PRIVATE (view);
 	
-	children = kz_bookmark_folder_get_children(KZ_BOOKMARK_FOLDER(priv->folder));
-	index = g_list_index(children, bookmark); 
-	g_list_free(children);
+	index = kz_bookmark_folder_get_child_index(KZ_BOOKMARK_FOLDER(priv->folder), bookmark);
 
 	widget = g_list_nth_data(priv->children, index);
 
@@ -390,13 +387,7 @@
 			 G_CALLBACK(cb_thumbnail_leave_notify), NULL);
 
 	if (sibling)
-	{
-		GList *children;
-		
-		children = kz_bookmark_folder_get_children(KZ_BOOKMARK_FOLDER(bookmark));
-		pos = g_list_index(children, sibling); 
-		g_list_free(children);
-	}
+		pos = kz_bookmark_folder_get_child_index(KZ_BOOKMARK_FOLDER(bookmark), sibling);
 
 	if (pos >= 0)
 	{
@@ -497,7 +488,6 @@
 		      KzThumbnailsView *view)
 {
 	KzBookmark *bookmark;
-	GList *children;
 	gint index;
 	KzThumbnailsViewPrivate *priv = KZ_THUMBNAILS_VIEW_GET_PRIVATE(view);
 	
@@ -506,9 +496,7 @@
 
 	bookmark = g_object_get_data(G_OBJECT(thumbnail),
 				     KZ_THUMBNAIL_BOOKMARK_KEY);
-	children = kz_bookmark_folder_get_children(KZ_BOOKMARK_FOLDER(priv->folder));
-	index = g_list_index(children, bookmark);
-	g_list_free(children);
+	index = kz_bookmark_folder_get_child_index(KZ_BOOKMARK_FOLDER(priv->folder), bookmark);
 
 	g_signal_emit(view,
 		      kz_thumbnails_view_signals[ACTIVATE],

Modified: kazehakase/trunk/src/kz-window.c
===================================================================
--- kazehakase/trunk/src/kz-window.c	2009-02-12 05:19:48 UTC (rev 3639)
+++ kazehakase/trunk/src/kz-window.c	2009-02-12 05:22:52 UTC (rev 3640)
@@ -2525,9 +2525,8 @@
 		{
 			kz_gesture_cancel(priv->gesture);
 			if (gdk_pointer_is_grabbed())
-			{
 				gdk_pointer_ungrab(gtk_get_current_event_time());
-			}
+
 			kz_statusbar_set_gesture_text(KZ_STATUSBAR(KZ_WINDOW(widget)->statusbar), NULL);
 		}
 	}




More information about the Kazehakase-cvs mailing list
Back to archive index