diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2012-01-23 09:03:29 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2012-01-23 09:03:29 +0000 |
commit | cdaff8ede183ae5d76b2d02d2cb72ce136e3592e (patch) | |
tree | dfa322395c1e7227d1d216dad40f806c88871be3 | |
parent | 7295ada33a7799e3b3d85e36a0c8a4e6b5bfdb19 (diff) |
part of issue 175 - regression not doing refresh when adding/deleting
-rw-r--r-- | src/requests.c | 6 | ||||
-rw-r--r-- | src/trg-gtk-app.c | 8 | ||||
-rw-r--r-- | src/trg-main-window.c | 11 |
3 files changed, 21 insertions, 4 deletions
diff --git a/src/requests.c b/src/requests.c index 38e3480..c78ba65 100644 --- a/src/requests.c +++ b/src/requests.c @@ -137,9 +137,13 @@ JsonNode *torrent_remove(JsonArray * array, gboolean removeData) { JsonNode *root = base_request(METHOD_TORRENT_REMOVE); JsonObject *args = node_get_arguments(root); + json_object_set_array_member(args, PARAM_IDS, array); json_object_set_boolean_member(args, PARAM_DELETE_LOCAL_DATA, removeData); + + request_set_tag(root, TORRENT_GET_TAG_MODE_FULL); + return root; } @@ -212,8 +216,10 @@ JsonNode *torrent_add_url(const gchar * url, gboolean paused) { JsonNode *root = base_request(METHOD_TORRENT_ADD); JsonObject *args = node_get_arguments(root); + json_object_set_string_member(args, PARAM_FILENAME, url); json_object_set_boolean_member(args, PARAM_PAUSED, paused); + request_set_tag(root, TORRENT_GET_TAG_MODE_FULL); return root; } diff --git a/src/trg-gtk-app.c b/src/trg-gtk-app.c index af4d4f5..02858ce 100644 --- a/src/trg-gtk-app.c +++ b/src/trg-gtk-app.c @@ -103,10 +103,12 @@ trg_gtk_app_command_line(GApplication * application, gchar **argv = g_application_command_line_get_arguments(cmdline, NULL); if (g_application_get_is_remote(application)) { - if (!argv[0]) - gtk_window_present(GTK_WINDOW(window)); - else + if (!argv[0]) { + gtk_window_present(GTK_WINDOW(window)); + g_strfreev(argv); + } else { return trg_add_from_filename(window, argv); + } } else { trg_main_window_set_start_args(window, argv); auto_connect_if_required(TRG_MAIN_WINDOW(windows->data)); diff --git a/src/trg-main-window.c b/src/trg-main-window.c index 4fb5561..a810495 100644 --- a/src/trg-main-window.c +++ b/src/trg-main-window.c @@ -1147,7 +1147,7 @@ static void update_whatever_statusicon(TrgMainWindow * win, downloadingLabel); g_free(downloadingLabel); - trg_strlsize(buf, stats->upRateTotal); + trg_strlspeed(buf, stats->upRateTotal); seedingLabel = g_strdup_printf(_("%d Seeding @ %s"), stats->seeding, buf); gtk_menu_item_set_label(GTK_MENU_ITEM(priv->iconSeedingItem), @@ -2347,6 +2347,14 @@ void trg_main_window_remove_graph(TrgMainWindow * win) } #endif +/*static gboolean status_icon_size_changed(GtkStatusIcon *status_icon, + gint size, + gpointer user_data) +{ + gtk_status_icon_set_from_icon_name(status_icon, PACKAGE_NAME); + return TRUE; +}*/ + void trg_main_window_add_status_icon(TrgMainWindow * win) { TrgMainWindowPrivate *priv = TRG_MAIN_WINDOW_GET_PRIVATE(win); @@ -2370,6 +2378,7 @@ void trg_main_window_add_status_icon(TrgMainWindow * win) G_CALLBACK(status_icon_button_press_event), win); g_signal_connect(priv->statusIcon, "popup-menu", G_CALLBACK(trg_status_icon_popup_menu_cb), win); + // g_signal_connect(priv->statusIcon, "size-changed", G_CALLBACK(status_icon_size_changed), win); gtk_status_icon_set_visible(priv->statusIcon, TRUE); #endif |