Package: libgtkmm-2.4-dev
Version: 1:2.6.5-1
Severity: normal
Tags: patch

When compiling against gtkmm 2.6.5, I get warnings about statements with
no effect in gtkmm/treeview.h, caused by calls to g_assert().

The following patch disables those calls, as upstream does in later
releases (2.8.3 and CVS head).
  * gtk/src/treeview.hg, gtk/gtkmm/treeview.h:
    - Do not use g_asssert in a header, because it gives warnings when
      disabled (fix from CVS head).

--- gtkmm2.4-2.6.5.orig/gtk/src/treeview.hg
+++ gtkmm2.4-2.6.5/gtk/src/treeview.hg
@@ -741,7 +741,7 @@
 template <class ColumnType> inline
 int TreeView::append_column_editable(const Glib::ustring& title, const TreeModelColumn<ColumnType>& model_column)
 {
-  g_assert(model_column.type() != 0);
+  //Don't use this in a header, because it gives warnings when disabled: g_assert(model_column.type() != 0);
 
   // compilation will fail if there is no appropriate TreeViewColumn
   // constructor for this model column type.
@@ -998,7 +998,7 @@
 template <class ColumnType> inline
 void _connect_auto_store_editable_signal_handler(Gtk::TreeView* this_p, Gtk::CellRenderer* pCellRenderer, const Gtk::TreeModelColumn<ColumnType>& model_column)
 {
-  g_assert(model_column.type() != 0);
+  //Don't use this in a header, because it gives warnings when disabled: g_assert(model_column.type() != 0);
 
   //The different CellRenderers have different "edited" signals,
   //and numerical values need to convert the text value to a number,
--- gtkmm2.4-2.6.5.orig/gtk/gtkmm/treeview.h
+++ gtkmm2.4-2.6.5/gtk/gtkmm/treeview.h
@@ -1421,7 +1421,7 @@
 template <class ColumnType> inline
 int TreeView::append_column_editable(const Glib::ustring& title, const TreeModelColumn<ColumnType>& model_column)
 {
-  g_assert(model_column.type() != 0);
+  //Don't use this in a header, because it gives warnings when disabled: g_assert(model_column.type() != 0);
 
   // compilation will fail if there is no appropriate TreeViewColumn
   // constructor for this model column type.
@@ -1678,7 +1678,7 @@
 template <class ColumnType> inline
 void _connect_auto_store_editable_signal_handler(Gtk::TreeView* this_p, Gtk::CellRenderer* pCellRenderer, const Gtk::TreeModelColumn<ColumnType>& model_column)
 {
-  g_assert(model_column.type() != 0);
+  //Don't use this in a header, because it gives warnings when disabled: g_assert(model_column.type() != 0);
 
   //The different CellRenderers have different "edited" signals,
   //and numerical values need to convert the text value to a number,

Reply via email to