glom r1615 - in trunk: . glom/libglom/data_structure/layout glom/utility_widgets



Author: jhs
Date: Thu May 22 13:09:24 2008
New Revision: 1615
URL: http://svn.gnome.org/viewvc/glom?rev=1615&view=rev

Log:
2008-05-22  Johannes Schmid  <johannes schmid openismus com>

	* glom/libglom/data_structure/layout/layoutgroup.cc: (add_item)
	Add item at the end of the group instead of losing it
	
	* glom/utility_widgets/flowtable_dnd.cc:
	(on_child_drag_motion):
	Fix flickering of placeholder on bigger objects like images or text boxes

Modified:
   trunk/ChangeLog
   trunk/glom/libglom/data_structure/layout/layoutgroup.cc
   trunk/glom/utility_widgets/flowtable_dnd.cc

Modified: trunk/glom/libglom/data_structure/layout/layoutgroup.cc
==============================================================================
--- trunk/glom/libglom/data_structure/layout/layoutgroup.cc	(original)
+++ trunk/glom/libglom/data_structure/layout/layoutgroup.cc	Thu May 22 13:09:24 2008
@@ -145,11 +145,6 @@
   //Find the position of the item.
   sharedptr<LayoutItem> unconst = sharedptr<LayoutItem>::cast_const(position);
   type_list_items::iterator iter = std::find(m_list_items.begin(), m_list_items.end(), unconst);
-  if(iter == m_list_items.end())
-  {
-    std::cout << __FUNCTION__ << ": item not found" << std::endl;
-    return;
-  }
 
   //std::vector::insert() adds before rather than after:
   // jhs: We want to add after rather than before - at least for dnd

Modified: trunk/glom/utility_widgets/flowtable_dnd.cc
==============================================================================
--- trunk/glom/utility_widgets/flowtable_dnd.cc	(original)
+++ trunk/glom/utility_widgets/flowtable_dnd.cc	Thu May 22 13:09:24 2008
@@ -347,7 +347,8 @@
     {
       item = 0; // means end
     }
-  } 
+  }
+  
   return item;
 }
 
@@ -356,8 +357,6 @@
 {
   m_current_dnd_item = find_current_dnd_item(child, x, y);
   
-  on_dnd_remove_placeholder ();
-  
   LayoutWidgetBase* above = dnd_datawidget_from_item(0);
   
   // above might be 0 here...
@@ -394,17 +393,6 @@
 void FlowTableDnd::on_child_drag_begin (const Glib::RefPtr<Gdk::DragContext>& drag_context,
                           Gtk::Widget* child)
 {
-  std::cout << "Drag begin type: " << G_OBJECT_TYPE_NAME (child->gobj()) << std::endl;
-  Gtk::Container* container = dynamic_cast<Gtk::Container*>(child);
-  while (container)
-  {
-    std::list<Gtk::Widget*> children = container->get_children();
-    for (std::list<Gtk::Widget*>::const_iterator CI (children.begin());
-         CI != children.end(); CI++)
-      std::cout << "Drag begin child: " << G_OBJECT_TYPE_NAME ((*CI)->gobj()) << std::endl;
-    Gtk::Bin* bin = dynamic_cast<Gtk::Bin*>(container);
-    container = dynamic_cast<Gtk::Container*>(bin->get_child());
-  }
   FlowTableItem* item = find_current_dnd_item (child);
   if (!item)
   {
@@ -414,7 +402,6 @@
     item->m_first->hide();
   if (item->m_second)
     item->m_second->hide();
-  std::cout << "Drag begin item: " << G_OBJECT_TYPE_NAME (item->m_first->gobj()) << std::endl;
   LayoutWidgetBase* base = dnd_datawidget_from_item (item);
   base->set_dnd_in_progress(); 
 }



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