[kazehakase-svn] [3321] * src/bookmarks/kz-bookmark-item.c: re-supported DnD to bookmark

Zurück zum Archiv-Index

svnno****@sourc***** svnno****@sourc*****
Sat Dec 15 19:56:20 JST 2007


Revision: 3321
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3321
Author:   kous
Date:     2007-12-15 19:56:19 +0900 (Sat, 15 Dec 2007)

Log Message:
-----------
* src/bookmarks/kz-bookmark-item.c: re-supported DnD to bookmark
  folder in toolbar.

Modified Paths:
--------------
    kazehakase/trunk/ChangeLog
    kazehakase/trunk/src/bookmarks/kz-bookmark-item.c

Modified: kazehakase/trunk/ChangeLog
===================================================================
--- kazehakase/trunk/ChangeLog	2007-11-26 12:49:41 UTC (rev 3320)
+++ kazehakase/trunk/ChangeLog	2007-12-15 10:56:19 UTC (rev 3321)
@@ -1,3 +1,8 @@
+2007-12-15  Kouhei Sutou  <kou****@cozmi*****>
+
+	* src/bookmarks/kz-bookmark-item.c: re-supported DnD to bookmark
+	folder in toolbar.
+
 2007-11-26  Kouhei Sutou  <kou****@cozmi*****>
 
 	* src/kz-window.c (motion_notify_event): added NULL check.

Modified: kazehakase/trunk/src/bookmarks/kz-bookmark-item.c
===================================================================
--- kazehakase/trunk/src/bookmarks/kz-bookmark-item.c	2007-11-26 12:49:41 UTC (rev 3320)
+++ kazehakase/trunk/src/bookmarks/kz-bookmark-item.c	2007-12-15 10:56:19 UTC (rev 3321)
@@ -34,6 +34,7 @@
 #include "kz-bookmark-editor.h"
 #include "kz-bookmark-utils.h"
 #include "kz-icons.h"
+#include "kz-notebook.h"
 #include "kz-actions.h"
 #include "gtk-utils.h"
 
@@ -44,6 +45,7 @@
 };
 
 enum {
+	TARGET_GTK_NOTEBOOK_TAB,
 	TARGET_KAZEHAKASE_BOOKMARKS,
 	TARGET_NETSCAPE_URL,
 	TARGET_TEXT_URI_LIST
@@ -55,6 +57,7 @@
 
 static const GtkTargetEntry url_drag_types [] = 
 {
+	{"GTK_NOTEBOOK_TAB", GTK_TARGET_SAME_APP, TARGET_GTK_NOTEBOOK_TAB},
 	{"_KAZEHAKASE_BOOKMARKS", 0, TARGET_KAZEHAKASE_BOOKMARKS},
         { "_NETSCAPE_URL",        0, TARGET_NETSCAPE_URL},
 	{ "text/uri-list",        0, TARGET_TEXT_URI_LIST}
@@ -665,6 +668,19 @@
 	item = KZ_BOOKMARK_ITEM(widget);
 	switch (info)
 	{
+	 case TARGET_GTK_NOTEBOOK_TAB:
+	 {
+	 	KzEmbed *kzembed;
+		const gchar *uri, *title;
+		src_widget = gtk_drag_get_source_widget(context);
+		if (!KZ_IS_NOTEBOOK(src_widget))
+			break;
+		kzembed = KZ_EMBED(kz_notebook_get_dragged_page(KZ_NOTEBOOK(src_widget)));
+		uri   = kz_embed_get_location(kzembed);
+		title = kz_embed_get_title(kzembed);
+		bookmark = KZ_BOOKMARK(kz_bookmark_new_with_attrs(title, uri, NULL));
+	 	break;
+	 }
 	 case TARGET_KAZEHAKASE_BOOKMARKS:
 		src_widget = gtk_drag_get_source_widget(context);
 		




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