Add 'Owner' and 'Public' fields to the details tab

This commit is contained in:
Andrew Resch 2010-08-21 12:42:01 -07:00
parent f0fe3c7879
commit 10aebd600a
2 changed files with 79 additions and 4 deletions

View File

@ -62,7 +62,9 @@ class DetailsTab(Tab):
(glade.get_widget("summary_torrent_path"), None, ("save_path",)), (glade.get_widget("summary_torrent_path"), None, ("save_path",)),
(glade.get_widget("summary_message"), str, ("message",)), (glade.get_widget("summary_message"), str, ("message",)),
(glade.get_widget("summary_hash"), str, ("hash",)), (glade.get_widget("summary_hash"), str, ("hash",)),
(glade.get_widget("summary_comments"), str, ("comment",)) (glade.get_widget("summary_comments"), str, ("comment",)),
(glade.get_widget("summary_owner"), str, ("owner",)),
(glade.get_widget("summary_public"), str, ("public",))
] ]
def update(self): def update(self):
@ -79,7 +81,8 @@ class DetailsTab(Tab):
# Get the torrent status # Get the torrent status
status_keys = ["name", "total_size", "num_files", status_keys = ["name", "total_size", "num_files",
"tracker", "save_path", "message", "hash", "comment"] "tracker", "save_path", "message", "hash", "comment", "owner",
"public"]
session = component.get("SessionProxy") session = component.get("SessionProxy")
session.get_torrent_status(selected, status_keys).addCallback(self._on_get_torrent_status) session.get_torrent_status(selected, status_keys).addCallback(self._on_get_torrent_status)

View File

@ -1276,7 +1276,7 @@
<child> <child>
<widget class="GtkTable" id="table9"> <widget class="GtkTable" id="table9">
<property name="visible">True</property> <property name="visible">True</property>
<property name="n_rows">8</property> <property name="n_rows">10</property>
<property name="n_columns">4</property> <property name="n_columns">4</property>
<property name="column_spacing">5</property> <property name="column_spacing">5</property>
<property name="row_spacing">2</property> <property name="row_spacing">2</property>
@ -1542,6 +1542,57 @@
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
</child> </child>
<child>
<widget class="GtkLabel" id="label23">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="ypad">1</property>
<property name="label" translatable="yes">&lt;b&gt;Owner:&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="top_attach">8</property>
<property name="bottom_attach">9</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label24">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="ypad">1</property>
<property name="label" translatable="yes">&lt;b&gt;Public:&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="top_attach">9</property>
<property name="bottom_attach">10</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="summary_owner">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="wrap_mode">char</property>
<property name="selectable">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">8</property>
<property name="bottom_attach">9</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
@ -1554,6 +1605,27 @@
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<widget class="GtkLabel" id="summary_public">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="wrap_mode">char</property>
<property name="selectable">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">9</property>
<property name="bottom_attach">10</property>
<property name="y_options"></property>
</packing>
</child>
</widget> </widget>
</child> </child>
</widget> </widget>
@ -2019,8 +2091,8 @@
<widget class="GtkFileChooserButton" id="filechooser_move_completed"> <widget class="GtkFileChooserButton" id="filechooser_move_completed">
<property name="visible">True</property> <property name="visible">True</property>
<property name="sensitive">False</property> <property name="sensitive">False</property>
<property name="action">select-folder</property>
<property name="local_only">False</property> <property name="local_only">False</property>
<property name="action">select-folder</property>
<property name="title" translatable="yes">Select A Folder</property> <property name="title" translatable="yes">Select A Folder</property>
</widget> </widget>
<packing> <packing>