diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2011-08-27 17:15:31 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2011-08-27 17:15:31 +0000 |
commit | bd758ee4fc423b9ca152a01f897609daa656c938 (patch) | |
tree | 0378306b5b007f38f0c4f6c0d868215f70fd70d6 /src/trg-status-bar.c | |
parent | b8a1599a2ab9eafd496ba23179dda97d6e83e917 (diff) |
Profile support! Please test and report bugs, as the config system is totally rewritten and may not be perfect. No more GConf (trying to implement profiles with this was UGLY), settings now (for most) live in JSON at $HOME/.config/transmission-remote-gtk/config.json. Hopefully windows support will be easier without GConf.
Diffstat (limited to 'src/trg-status-bar.c')
-rw-r--r-- | src/trg-status-bar.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/trg-status-bar.c b/src/trg-status-bar.c index 3e45b72..8ccbe72 100644 --- a/src/trg-status-bar.c +++ b/src/trg-status-bar.c @@ -79,27 +79,29 @@ void trg_status_bar_connect(TrgStatusBar * sb, JsonObject * session) void trg_status_bar_update(TrgStatusBar * sb, trg_torrent_model_update_stats * stats, - trg_client * client) + TrgClient * client) { TrgStatusBarPrivate *priv; + JsonObject *session; gchar *statusBarUpdate; gint64 uplimitraw, downlimitraw; gchar downRateTotalString[32], upRateTotalString[32]; gchar uplimit[64], downlimit[64]; priv = TRG_STATUS_BAR_GET_PRIVATE(sb); + session = trg_client_get_session(client); /* The session should always exist otherwise this function wouldn't be called */ downlimitraw = - json_object_get_boolean_member(client->session, + json_object_get_boolean_member(session, SGET_SPEED_LIMIT_DOWN_ENABLED) ? - json_object_get_int_member(client->session, + json_object_get_int_member(session, SGET_SPEED_LIMIT_DOWN) : -1; uplimitraw = - json_object_get_boolean_member(client->session, + json_object_get_boolean_member(session, SGET_SPEED_LIMIT_UP_ENABLED) ? - json_object_get_int_member(client->session, + json_object_get_int_member(session, SGET_SPEED_LIMIT_UP) : -1; trg_strlspeed(downRateTotalString, |