Revision: 7398
Author: nogu.dev
Date: Mon Jan 2 04:08:08 2012
Log: * gtk2/pref/gtk-custom-widgets.c
- (create_table_tree_view): Update comment.
- (table_pref_dialog_response_cb, uim_pref_gtk_set_default_value):
Add comment.
* qt4/pref/customwidgets.cpp
- (TableEditForm::setTable): Update comment.
- (CustomTable::setDefault, TableEditForm::table): Add comment.
http://code.google.com/p/uim/source/detail?r=7398
Modified:
/trunk/gtk2/pref/gtk-custom-widgets.c
/trunk/qt4/pref/customwidgets.cpp
=======================================
--- /trunk/gtk2/pref/gtk-custom-widgets.c Mon Jan 2 04:07:57 2012
+++ /trunk/gtk2/pref/gtk-custom-widgets.c Mon Jan 2 04:08:08 2012
@@ -1962,6 +1962,7 @@
for (row = 0; row < n_rows; row++) {
int n_columnsForRow = n_columns;
+ /* the number of column may differ from row to row */
for (column = 0; column < n_columns; column++) {
GValue value = {0, };
gtk_tree_model_get_value(model, &iter, column, &value);
@@ -2058,7 +2059,7 @@
gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE);
custom_table = custom->value->as_table;
- /* the number may differ from row to row */
+ /* the number of column may differ from row to row */
n_columns = -1;
for (row = 0; custom_table[row]; row++) {
for (column = 0; custom_table[row][column]; column++) {
@@ -2494,6 +2495,7 @@
value->as_table = custom_table;
for (row = 0; default_table[row]; row++) {
+ /* the number of column may differ from row to row */
for (column = 0; default_table[row][column]; column++)
;
custom_table[row] = (char **)malloc(sizeof(char *) * (column + 1));
=======================================
--- /trunk/qt4/pref/customwidgets.cpp Sun Sep 18 23:31:24 2011
+++ /trunk/qt4/pref/customwidgets.cpp Mon Jan 2 04:08:08 2012
@@ -1250,6 +1250,7 @@
for ( int row = 0; default_table[row]; row++ ) {
int column;
+ // the number of column may differ from row to row
for ( column = 0; default_table[row][column]; column++ )
;
custom_table[row] = (char **)malloc( sizeof(char *) * ( column + 1
) );
@@ -1350,7 +1351,7 @@
{
if ( !custom_table )
return;
- // the number may differ from row to row
+ // the number of column may differ from row to row
int max_column = -1;
int row;
for ( row = 0; custom_table[row]; row++ ) {
@@ -1395,6 +1396,7 @@
for ( int row = 0; row < rowCount; row++ ) {
int columnCountForRow = columnCount;
+ // the number of column may differ from row to row
for ( int column = 0; column < columnCount; column++ ) {
if ( !( m_table->item( row, column )->flags() ) ) {
columnCountForRow = column;