summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/trg-client.c2
-rw-r--r--src/trg-main-window.c14
-rw-r--r--src/trg-stats-dialog.c8
-rw-r--r--src/trg-torrent-add-dialog.c4
-rw-r--r--src/trg-torrent-props-dialog.c6
5 files changed, 18 insertions, 16 deletions
diff --git a/src/trg-client.c b/src/trg-client.c
index f79adbf..3eb6d6d 100644
--- a/src/trg-client.c
+++ b/src/trg-client.c
@@ -36,7 +36,7 @@
gboolean trg_client_supports_tracker_edit(trg_client * tc)
{
- return tc->session != NULL && tc->version >= 2.10;
+ return tc->session && tc->version >= 2.10;
}
trg_client *trg_init_client()
diff --git a/src/trg-main-window.c b/src/trg-main-window.c
index b5769af..3d038aa 100644
--- a/src/trg-main-window.c
+++ b/src/trg-main-window.c
@@ -979,10 +979,10 @@ static gboolean trg_update_torrents_timerfunc(gpointer data)
if (priv->client->session)
dispatch_async(priv->client,
- torrent_get(priv->client->
- activeOnlyUpdate ? -2 : -1),
- priv->
- client->activeOnlyUpdate ? on_torrent_get_active :
+ torrent_get(priv->
+ client->activeOnlyUpdate ? -2 : -1),
+ priv->client->
+ activeOnlyUpdate ? on_torrent_get_active :
on_torrent_get_update, data);
return FALSE;
@@ -1032,7 +1032,7 @@ trg_torrent_tree_view_visible_func(GtkTreeModel * model,
if (criteria & FILTER_FLAG_TRACKER) {
gchar *text =
trg_state_selector_get_selected_text(priv->stateSelector);
- JsonObject *json = NULL;
+ JsonObject *json;
gtk_tree_model_get(model, iter, TORRENT_COLUMN_JSON, &json,
-1);
@@ -1159,10 +1159,6 @@ on_generic_interactive_action(JsonObject * response, int status,
} else {
id = -1;
}
- /*struct timespec ts;
- ts.tv_sec = 0;
- ts.tv_nsec = 350000000;
- nanosleep(&ts, NULL); */
dispatch_async(priv->client, torrent_get(id),
on_torrent_get_interactive, data);
diff --git a/src/trg-stats-dialog.c b/src/trg-stats-dialog.c
index d582a9f..42eab66 100644
--- a/src/trg-stats-dialog.c
+++ b/src/trg-stats-dialog.c
@@ -65,6 +65,13 @@ static void on_stats_reply(JsonObject * response, int status,
gpointer data);
static void
+trg_stats_dialog_get_property(GObject * object, guint property_id,
+ GValue * value, GParamSpec * pspec)
+{
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+}
+
+static void
trg_stats_dialog_set_property(GObject * object, guint property_id,
const GValue * value, GParamSpec * pspec)
{
@@ -311,6 +318,7 @@ static void trg_stats_dialog_class_init(TrgStatsDialogClass * klass)
g_type_class_add_private(klass, sizeof(TrgStatsDialogPrivate));
+ object_class->get_property = trg_stats_dialog_get_property;
object_class->set_property = trg_stats_dialog_set_property;
object_class->constructor = trg_stats_dialog_constructor;
diff --git a/src/trg-torrent-add-dialog.c b/src/trg-torrent-add-dialog.c
index b9c5af8..cbaa3ac 100644
--- a/src/trg-torrent-add-dialog.c
+++ b/src/trg-torrent-add-dialog.c
@@ -901,8 +901,8 @@ static GObject *trg_torrent_add_dialog_constructor(GType type,
priv->paused_check =
gtk_check_button_new_with_mnemonic(_("Start _paused"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->paused_check),
- pref_get_start_paused(priv->
- client->gconf));
+ pref_get_start_paused(priv->client->
+ gconf));
priv->priority_combo = gtr_priority_combo_new();
gtk_combo_box_set_active(GTK_COMBO_BOX(priv->priority_combo), 1);
diff --git a/src/trg-torrent-props-dialog.c b/src/trg-torrent-props-dialog.c
index 2851b7c..bf9f096 100644
--- a/src/trg-torrent-props-dialog.c
+++ b/src/trg-torrent-props-dialog.c
@@ -138,12 +138,10 @@ trg_torrent_props_response_cb(GtkDialog * dlg, gint res_id,
(priv->seedRatioLimit), args);
json_object_set_int_member(args, FIELD_SEED_RATIO_MODE,
gtk_combo_box_get_active(GTK_COMBO_BOX
- (priv->
- seedRatioMode)));
+ (priv->seedRatioMode)));
json_object_set_int_member(args, FIELD_BANDWIDTH_PRIORITY,
gtk_combo_box_get_active(GTK_COMBO_BOX
- (priv->
- bandwidthPriorityCombo))
+ (priv->bandwidthPriorityCombo))
- 1);
gtk_spin_button_json_int_out(GTK_SPIN_BUTTON