glom r1521 - in trunk: . glom/mode_data glom/utility_widgets/adddel glom/utility_widgets/db_adddel
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: glom r1521 - in trunk: . glom/mode_data glom/utility_widgets/adddel glom/utility_widgets/db_adddel
- Date: Fri, 4 Apr 2008 13:46:08 +0100 (BST)
Author: murrayc
Date: Fri Apr 4 13:46:08 2008
New Revision: 1521
URL: http://svn.gnome.org/viewvc/glom?rev=1521&view=rev
Log:
2008-04-04 Murray Cumming <murrayc murrayc com>
* glom/utility_widgets/db_adddel/db_adddel.cc:
treeviewcolumn_on_cell_data(): Do not try to dereference a null pixbuf
refptr. This fixes a crash when adding an image field to the list view
if one of the records has no data in that field.
Bug #526114 (Jani Monoses).
Modified:
trunk/ChangeLog
trunk/glom/mode_data/flowtablewithfields.cc
trunk/glom/utility_widgets/adddel/adddel.cc
trunk/glom/utility_widgets/db_adddel/db_adddel.cc
Modified: trunk/glom/mode_data/flowtablewithfields.cc
==============================================================================
--- trunk/glom/mode_data/flowtablewithfields.cc (original)
+++ trunk/glom/mode_data/flowtablewithfields.cc Fri Apr 4 13:46:08 2008
@@ -177,7 +177,7 @@
if(!group->get_title().empty())
{
- Gtk::Label* label = Gtk::manage( new Gtk::Label );
+ Gtk::Label* label = Gtk::manage( new Gtk::Label ); //TODO: This is maybe leaked, according to valgrind, though it should be managed by GtkFrame.
label->set_markup( Bakery::App_Gtk::util_bold_message(group->get_title()) );
label->show();
frame->set_label_widget(*label);
Modified: trunk/glom/utility_widgets/adddel/adddel.cc
==============================================================================
--- trunk/glom/utility_widgets/adddel/adddel.cc (original)
+++ trunk/glom/utility_widgets/adddel/adddel.cc Fri Apr 4 13:46:08 2008
@@ -719,6 +719,12 @@
delete pModelColumnDerived;
break;
}
+ case(AddDelColumnInfo::STYLE_Numerical):
+ {
+ Gtk::TreeModelColumn<int>* pModelColumnDerived = static_cast< Gtk::TreeModelColumn<int>* >(pModelColumn);
+ delete pModelColumnDerived;
+ break;
+ }
default:
{
Gtk::TreeModelColumn<Glib::ustring>* pModelColumnDerived = static_cast< Gtk::TreeModelColumn<Glib::ustring>* >(pModelColumn);
@@ -728,7 +734,11 @@
*iter = 0;
}
- }
+ }
+ else
+ {
+ std::cerr << "debug: AddDel::construct_specified_columns(): Leaking a Gtk::TreeModelColumn<>." << std::endl;
+ }
}
m_TreeView.columns_autosize();
Modified: trunk/glom/utility_widgets/db_adddel/db_adddel.cc
==============================================================================
--- trunk/glom/utility_widgets/db_adddel/db_adddel.cc (original)
+++ trunk/glom/utility_widgets/db_adddel/db_adddel.cc Fri Apr 4 13:46:08 2008
@@ -1999,7 +1999,8 @@
if(pixbuf)
pixbuf = ImageGlom::scale_keeping_ratio(pixbuf, get_fixed_cell_height(), pixbuf->get_width());
- g_object_set(pDerived->gobj(), "pixbuf", pixbuf->gobj(), (gpointer)NULL);
+ if(pixbuf)
+ g_object_set(pDerived->gobj(), "pixbuf", pixbuf->gobj(), (gpointer)NULL);
}
else
g_warning("Field::sql(): glom_type is TYPE_IMAGE but gda type is not VALUE_TYPE_BINARY");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]