diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2011-11-30 18:54:29 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2011-11-30 18:54:29 +0000 |
commit | 7bc8fe632f29a875659f223ad1e9aa035c56f46c (patch) | |
tree | 8a13af1000337feade93762295b213283b03d089 /src/trg-torrent-props-dialog.c | |
parent | 6df6b7c2a2383d01a6fc20e597f48b0168ccfeb5 (diff) |
add some comments at the top of some files, also add a timeout of 20 seconds for curl requests
Diffstat (limited to 'src/trg-torrent-props-dialog.c')
-rw-r--r-- | src/trg-torrent-props-dialog.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/trg-torrent-props-dialog.c b/src/trg-torrent-props-dialog.c index c1fe493..8f650bf 100644 --- a/src/trg-torrent-props-dialog.c +++ b/src/trg-torrent-props-dialog.c @@ -34,6 +34,18 @@ #include "trg-main-window.h" #include "hig.h" +/* Pretty similar to remote preferences, also using the widget creation functions + * in trg-json-widgets.c. The torrent tree view is passed into here, which this + * gets the selection from. If there are multiple selections, use the first to + * populate the fields. + * + * Build the JSON array of torrent IDs when the dialog is created, in case the + * selection changes before clicking OK. + * + * When the user clicks OK, use trg-json-widgets to populate an object with the + * values and then send it with the IDs. + */ + G_DEFINE_TYPE(TrgTorrentPropsDialog, trg_torrent_props_dialog, GTK_TYPE_DIALOG) @@ -115,6 +127,7 @@ trg_torrent_props_response_cb(GtkDialog * dlg, gint res_id, if (res_id != GTK_RESPONSE_OK) { gtk_widget_destroy(GTK_WIDGET(dlg)); + json_array_unref(priv->targetIds); return; } |