glom r1489 - in trunk: . glom/utility_widgets
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: glom r1489 - in trunk: . glom/utility_widgets
- Date: Sun, 30 Mar 2008 22:57:13 +0100 (BST)
Author: jhs
Date: Sun Mar 30 22:57:12 2008
New Revision: 1489
URL: http://svn.gnome.org/viewvc/glom?rev=1489&view=rev
Log:
2008-03-30 Johannes Schmid <johannes schmid openismus com>
* glom/utility_widgets/flowtable.cc
(on_child_drag_motion):
Fixed dragging on ComboEntryGlom and added some comments about
what happens inside the widget detection.
Modified:
trunk/ChangeLog
trunk/glom/utility_widgets/flowtable.cc
Modified: trunk/glom/utility_widgets/flowtable.cc
==============================================================================
--- trunk/glom/utility_widgets/flowtable.cc (original)
+++ trunk/glom/utility_widgets/flowtable.cc Sun Mar 30 22:57:12 2008
@@ -1293,21 +1293,34 @@
bool FlowTable::on_child_drag_motion(const Glib::RefPtr<Gdk::DragContext>& drag_context, int x, int y, guint time,
Gtk::Widget* child)
{
- Gdk::Rectangle rect = child->get_allocation();
type_vecChildren::iterator cur_child;
for (cur_child = m_children.begin();
cur_child != m_children.end(); cur_child++)
{
+ // The widget was added directly to the FlowTable
if (cur_child->m_first == child ||
- cur_child->m_second == child ||
- cur_child->m_first == child->get_parent() ||
- cur_child->m_second == child->get_parent())
+ cur_child->m_second == child)
+ {
+ break;
+ }
+ // The parent of the widget was added to the FlowTable
+ else if (cur_child->m_first == child->get_parent() ||
+ cur_child->m_second == child->get_parent())
{
- m_current_dnd_item = &(*cur_child);
break;
}
+ Gtk::Bin* bin = dynamic_cast<Gtk::Bin*>(cur_child->m_second);
+ // The widget was added inside a Gtk::EventBox
+ if (bin)
+ {
+ if (bin->get_child() == child ||
+ bin->get_child() == child->get_parent())
+ break;
+ }
}
- if (cur_child == m_children.end())
+ if (cur_child != m_children.end())
+ m_current_dnd_item = &(*cur_child);
+ else
m_current_dnd_item = 0;
// Allow dragging at-the-end
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]