Fix removing columns from ListView.

This commit is contained in:
Andrew Resch 2007-11-10 09:54:09 +00:00
parent c42b146528
commit 5c154c3231
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!--Generated with glade3 3.2.2 on Fri Nov 9 03:49:00 2007 by andrew@fragment-->
<!--Generated with glade3 3.4.0 on Sat Nov 10 01:44:15 2007 -->
<glade-interface>
<widget class="GtkDialog" id="connection_manager">
<property name="has_focus">True</property>
@ -11,6 +11,7 @@
<property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
<property name="default_width">350</property>
<property name="default_height">300</property>
<property name="destroy_with_parent">True</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="has_separator">False</property>
<child internal-child="vbox">

View File

@ -200,7 +200,7 @@ class ListView:
def copy_row(model, path, row, user_data):
new_list, columns = user_data
new_row = new_list.append()
for column in range(model.get_n_columns()):
for column in range(len(columns)):
# Get the current value of the column for this row
value = model.get_value(row, column)
# Set the value of this row and column in the new liststore