gtkmm-documentation r67 - in trunk: . examples/book/drag_and_drop examples/others/dnd



Author: murrayc
Date: Sun Sep 21 14:20:17 2008
New Revision: 67
URL: http://svn.gnome.org/viewvc/gtkmm-documentation?rev=67&view=rev

Log:
2008-09-21  Murray Cumming  <murrayc murrayc com>

* examples/book/drag_and_drop/dndwindow.cc:
* examples/others/dnd/dndwindow.cc: Adapted back to the old 
SelectionData API.

Modified:
   trunk/ChangeLog
   trunk/examples/book/drag_and_drop/dndwindow.cc
   trunk/examples/others/dnd/dndwindow.cc

Modified: trunk/examples/book/drag_and_drop/dndwindow.cc
==============================================================================
--- trunk/examples/book/drag_and_drop/dndwindow.cc	(original)
+++ trunk/examples/book/drag_and_drop/dndwindow.cc	Sun Sep 21 14:20:17 2008
@@ -74,8 +74,7 @@
         const Glib::RefPtr<Gdk::DragContext>& context, int, int,
         const Gtk::SelectionData& selection_data, guint, guint time)
 {
-  guint length = 0;
-  selection_data.get_data(length);
+  const guint length = selection_data.get_length();
   if((length >= 0) && (selection_data.get_format() == 8))
   {
     std::cout << "Received \"" << selection_data.get_data_as_string()

Modified: trunk/examples/others/dnd/dndwindow.cc
==============================================================================
--- trunk/examples/others/dnd/dndwindow.cc	(original)
+++ trunk/examples/others/dnd/dndwindow.cc	Sun Sep 21 14:20:17 2008
@@ -100,8 +100,8 @@
 
 void DnDWindow::on_label_drop_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int, int, const Gtk::SelectionData& selection_data, guint, guint time)
 {
-  guint length = 0;
-  const guchar* data = selection_data.get_data(length);
+  const guint length = selection_data.get_length();
+  const guchar* data = selection_data.get_data();
 
   if((length >= 0) && (selection_data.get_format() == 8))
   {
@@ -134,8 +134,8 @@
 
 void DnDWindow::on_image_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int, int, const Gtk::SelectionData& selection_data, guint, guint time)
 {
-  guint length = 0;
-  const guchar* data = selection_data.get_data(length);
+  const guint length = selection_data.get_length();
+  const guchar* data = selection_data.get_data();
 
   if( (length >= 0) && (selection_data.get_format() == 8) )
   {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]