glom r1427 - in trunk: . glom/mode_data glom/utility_widgets
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: glom r1427 - in trunk: . glom/mode_data glom/utility_widgets
- Date: Wed, 20 Feb 2008 13:45:11 +0000 (GMT)
Author: jhs
Date: Wed Feb 20 13:45:11 2008
New Revision: 1427
URL: http://svn.gnome.org/viewvc/glom?rev=1427&view=rev
Log:
2008-02-20 Johannes Schmid <johannes schmid openismus com>
* glom/mode_data/flowtablewithfields.cc:
Use set_layout_item() on all layout element to allow to
adding them at the correct place to a layout_group
* glom/utility_widgets/flowtable.cc:
Remove some debug messages
Modified:
trunk/ChangeLog
trunk/glom/mode_data/flowtablewithfields.cc
trunk/glom/utility_widgets/flowtable.cc
Modified: trunk/glom/mode_data/flowtablewithfields.cc
==============================================================================
--- trunk/glom/mode_data/flowtablewithfields.cc (original)
+++ trunk/glom/mode_data/flowtablewithfields.cc Wed Feb 20 13:45:11 2008
@@ -486,19 +486,19 @@
}
-void FlowTableWithFields::add_button_at_position(const sharedptr<LayoutItem_Button>& layoutitem_button, const Glib::ustring& /* table_name */, const type_list_layoutwidgets::iterator& add_before)
+void FlowTableWithFields::add_button_at_position(const sharedptr<LayoutItem_Button>& layoutitem_button, const Glib::ustring& table_name, const type_list_layoutwidgets::iterator& add_before)
{
- //Add the widget:
+ //Add the widget
ButtonGlom* button = Gtk::manage(new ButtonGlom());
button->set_label(layoutitem_button->get_title_or_name());
-
+ button->set_layout_item (layoutitem_button, table_name);
button->signal_clicked().connect(
sigc::bind(
sigc::mem_fun(*this, &FlowTableWithFields::on_script_button_clicked),
layoutitem_button) );
- button->show(),
-
+ button->show();
+
add_layoutwidgetbase(button, add_before);
//add_view(button); //So it can get the document.
@@ -509,7 +509,7 @@
add(*button, false /* expand */);
}
-void FlowTableWithFields::add_textobject_at_position(const sharedptr<LayoutItem_Text>& layoutitem_text, const Glib::ustring& /* table_name */, const type_list_layoutwidgets::iterator& add_before)
+void FlowTableWithFields::add_textobject_at_position(const sharedptr<LayoutItem_Text>& layoutitem_text, const Glib::ustring& table_name , const type_list_layoutwidgets::iterator& add_before)
{
//Add the widget:
Gtk::Alignment* alignment_label = Gtk::manage(new Gtk::Alignment());
@@ -517,6 +517,7 @@
alignment_label->show();
LabelGlom* label = Gtk::manage(new LabelGlom(layoutitem_text->get_text(), 0.0 /* xalign */, 0.5 /* yalign */)); //The alignment here seems to be necessary as well (or instead of) the parent Gtk::Alignment.
+ label->set_layout_item (layoutitem_text, table_name);
label->show();
alignment_label->add(*label);
@@ -579,13 +580,14 @@
add(*m_placeholder, true);
}
-void FlowTableWithFields::add_imageobject_at_position(const sharedptr<LayoutItem_Image>& layoutitem_image, const Glib::ustring& /* table_name */, const type_list_layoutwidgets::iterator& add_before)
+void FlowTableWithFields::add_imageobject_at_position(const sharedptr<LayoutItem_Image>& layoutitem_image, const Glib::ustring& table_name , const type_list_layoutwidgets::iterator& add_before)
{
//Add the widget:
ImageGlom* image = Gtk::manage(new ImageGlom());
image->set_size_request(200, 200);
image->set_value(layoutitem_image->get_image());
image->set_read_only(); //Only field images can be changed by the user when they are on a layout.
+ image->set_layout_item (layoutitem_image, table_name);
image->show();
add_layoutwidgetbase(image, add_before);
Modified: trunk/glom/utility_widgets/flowtable.cc
==============================================================================
--- trunk/glom/utility_widgets/flowtable.cc (original)
+++ trunk/glom/utility_widgets/flowtable.cc Wed Feb 20 13:45:11 2008
@@ -1148,7 +1148,6 @@
void FlowTable::on_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& drag_context, int drag_x, int drag_y, const Gtk::SelectionData& selection_data, guint, guint time)
{
- std::cout << __FUNCTION__ << std::endl;
LayoutWidgetBase::enumType type = static_cast<LayoutWidgetBase::enumType>(*selection_data.get_data());
LayoutWidgetBase* above = dnd_find_datawidget ();
switch (type)
@@ -1176,7 +1175,6 @@
void FlowTable::on_drag_leave(const Glib::RefPtr<Gdk::DragContext>& drag_context, guint time)
{
- std::cout << __FUNCTION__ << std::endl;
on_dnd_remove_placeholder();
change_dnd_status(false);
realize();
@@ -1258,13 +1256,6 @@
above = dynamic_cast<LayoutWidgetBase*>(m_current_dnd_item->m_second);
//std::cout << g_type_name (G_OBJECT_TYPE (m_current_dnd_item->m_second->gobj())) << std::endl;
}
- std::cout << "cur_widget: ";
- std::cout << g_type_name (G_OBJECT_TYPE(m_current_dnd_item->m_first->gobj())) << std::endl;
- Gtk::Alignment* al = dynamic_cast<Gtk::Alignment*> (m_current_dnd_item->m_first);
- if (al)
- {
- std::cout << g_type_name (G_OBJECT_TYPE(al->get_child()->gobj())) << std::endl;
- }
}
return above;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]