Author: rpmcruz
Date: Fri Jan 29 12:59:42 2010
New Revision: 60612
URL: http://svn.opensuse.org/viewcvs/yast?rev=60612&view=rev
Log:
* src/YGTable.cc: bug fix 567505: crash when cell is
unset: see firewall tool.
Modified:
branches/SuSE-Code-11-SP1-Branch/gtk/ChangeLog
branches/SuSE-Code-11-SP1-Branch/gtk/src/YGTable.cc
Modified: branches/SuSE-Code-11-SP1-Branch/gtk/ChangeLog
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/gtk/ChangeLog?rev=60612&r1=60611&r2=60612&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/gtk/ChangeLog (original)
+++ branches/SuSE-Code-11-SP1-Branch/gtk/ChangeLog Fri Jan 29 12:59:42 2010
@@ -1,3 +1,7 @@
+2010-01-29 Ricardo Cruz
+
+ * src/YGTable.cc: bug fix 567505: definite fix.
+
2010-01-19 Ricardo Cruz
* src/YGTable.cc: bug fix 567505: simply backported SVN code.
Modified: branches/SuSE-Code-11-SP1-Branch/gtk/src/YGTable.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/gtk/src/YGTable.cc?rev=60612&r1=60611&r2=60612&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/gtk/src/YGTable.cc (original)
+++ branches/SuSE-Code-11-SP1-Branch/gtk/src/YGTable.cc Fri Jan 29 12:59:42 2010
@@ -295,16 +295,20 @@
{
GtkTreeIter iter;
if (getIter (cell->parent(), &iter))
- setCell (&iter, cell);
+ setCell (&iter, cell->column(), cell);
}
- void setCell (GtkTreeIter *iter, const YTableCell *cell)
+ void setCell (GtkTreeIter *iter, int column, const YTableCell *cell)
{
- int index = cell->column() * 2;
- setCellIcon (iter, index, cell->iconName());
- std::string label (cell->label());
- if (label == "X")
- label = YUI::app()->glyph (YUIGlyph_CheckMark);
+ int index = column * 2;
+ std::string icon, label;
+ if (cell) {
+ icon = cell->iconName();
+ label = cell->label();
+ if (label == "X")
+ label = YUI::app()->glyph (YUIGlyph_CheckMark);
+ }
+ setCellIcon (iter, index, icon);
setCellLabel (iter, index+1, label);
}
@@ -350,7 +354,7 @@
GtkTreeIter iter;
addRow (&iter, _item, true);
for (int i = 0; i < columns(); i++)
- setCell (&iter, item->cell (i));
+ setCell (&iter, i, item->cell (i));
}
else
yuiError() << "Can only add YTableItems to a YTable.\n";
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org