summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2012-08-27 13:52:27 +0100
committerGravatar Alan Fitton <ajf@eth0.org.uk>2012-08-27 13:52:27 +0100
commit5083d076bda7c644e71318305a75d5dcc0105f5e (patch)
tree96836898010e18730361919774d6052028b616a1
parent7f8596ed981bd3336a0643a222720d9ecf861452 (diff)
fix a misplaced brace which was breaking close of torrent properties in classic mode
-rw-r--r--src/trg-torrent-props-dialog.c75
1 files changed, 35 insertions, 40 deletions
diff --git a/src/trg-torrent-props-dialog.c b/src/trg-torrent-props-dialog.c
index aef716a..ba82da6 100644
--- a/src/trg-torrent-props-dialog.c
+++ b/src/trg-torrent-props-dialog.c
@@ -132,53 +132,48 @@ static void trg_torrent_props_dialog_get_property(GObject * object,
}
static void trg_torrent_props_response_cb(GtkDialog * dialog, gint res_id,
- gpointer data G_GNUC_UNUSED)
+ gpointer data G_GNUC_UNUSED)
{
TrgTorrentPropsDialogPrivate *priv = GET_PRIVATE(dialog);
JsonNode *request;
JsonObject *args;
- if (priv->peersTv) {
+ if (priv->peersTv)
trg_tree_view_persist(TRG_TREE_VIEW(priv->peersTv),
- TRG_TREE_VIEW_PERSIST_SORT |
- TRG_TREE_VIEW_PERSIST_LAYOUT);
- if (priv->filesTv)
- trg_tree_view_persist(TRG_TREE_VIEW(priv->filesTv),
- TRG_TREE_VIEW_PERSIST_SORT |
- TRG_TREE_VIEW_PERSIST_LAYOUT);
-
- if (priv->trackersTv)
- trg_tree_view_persist(TRG_TREE_VIEW(priv->trackersTv),
- TRG_TREE_VIEW_PERSIST_SORT |
- TRG_TREE_VIEW_PERSIST_LAYOUT);
-
- if (res_id != GTK_RESPONSE_OK) {
- gtk_widget_destroy(GTK_WIDGET(dialog));
- json_array_unref(priv->targetIds);
- return;
- }
-
- request = torrent_set(priv->targetIds);
- args = node_get_arguments(request);
-
- json_object_set_int_member(args, FIELD_SEED_RATIO_MODE,
- gtk_combo_box_get_active(GTK_COMBO_BOX
- (priv->
- seedRatioMode)));
- json_object_set_int_member(args, FIELD_BANDWIDTH_PRIORITY,
- gtk_combo_box_get_active(GTK_COMBO_BOX
- (priv->
- bandwidthPriorityCombo))
- - 1);
-
- trg_json_widgets_save(priv->widgets, args);
- trg_json_widget_desc_list_free(priv->widgets);
-
- dispatch_async(priv->client, request,
- on_generic_interactive_action, priv->parent);
-
- gtk_widget_destroy(GTK_WIDGET(dialog));
+ TRG_TREE_VIEW_PERSIST_SORT | TRG_TREE_VIEW_PERSIST_LAYOUT);
+ if (priv->filesTv)
+ trg_tree_view_persist(TRG_TREE_VIEW(priv->filesTv),
+ TRG_TREE_VIEW_PERSIST_SORT | TRG_TREE_VIEW_PERSIST_LAYOUT);
+
+ if (priv->trackersTv)
+ trg_tree_view_persist(TRG_TREE_VIEW(priv->trackersTv),
+ TRG_TREE_VIEW_PERSIST_SORT | TRG_TREE_VIEW_PERSIST_LAYOUT);
+
+ if (res_id != GTK_RESPONSE_OK) {
+ gtk_widget_destroy(GTK_WIDGET(dialog) );
+ json_array_unref(priv->targetIds);
+ return;
}
+
+ request = torrent_set(priv->targetIds);
+ args = node_get_arguments(request);
+
+ json_object_set_int_member(args, FIELD_SEED_RATIO_MODE,
+ gtk_combo_box_get_active(GTK_COMBO_BOX
+ (priv->
+ seedRatioMode) ));
+ json_object_set_int_member(args, FIELD_BANDWIDTH_PRIORITY,
+ gtk_combo_box_get_active(GTK_COMBO_BOX
+ (priv->
+ bandwidthPriorityCombo) ) - 1);
+
+ trg_json_widgets_save(priv->widgets, args);
+ trg_json_widget_desc_list_free(priv->widgets);
+
+ dispatch_async(priv->client, request, on_generic_interactive_action,
+ priv->parent);
+
+ gtk_widget_destroy(GTK_WIDGET(dialog) );
}
static void seed_ratio_mode_changed_cb(GtkWidget * w, gpointer data)