diff options
author | 2011-02-06 20:25:39 +0000 | |
---|---|---|
committer | 2011-02-06 20:25:39 +0000 | |
commit | 6e8c5fd62724c57e8e7a9603a856c5113d130af4 (patch) | |
tree | df03891c0fb7678797e5f8b34b42690b2f52b2f9 /src | |
parent | cf119827779b5987cc1c770af5a81b76afb2079e (diff) |
rename gconf namespace s/trg/transmission-remote-gtk/, do individual list_store_set's #ifdef DEBUG on torrents/trackers to ease debugging
Diffstat (limited to 'src')
-rw-r--r-- | src/transmission-remote-gtk.schemas | 48 | ||||
-rw-r--r-- | src/trg-torrent-model.c | 69 | ||||
-rw-r--r-- | src/trg-trackers-model.c | 12 |
3 files changed, 87 insertions, 42 deletions
diff --git a/src/transmission-remote-gtk.schemas b/src/transmission-remote-gtk.schemas index 11c8cdb..f5f7615 100644 --- a/src/transmission-remote-gtk.schemas +++ b/src/transmission-remote-gtk.schemas @@ -2,9 +2,9 @@ <schemalist> <schema> - <key>/schemas/apps/trg/auto-connect</key> - <applyto>/apps/trg/auto-connect</applyto> - <owner>trg</owner> + <key>/schemas/apps/transmission-remote-gtk/auto-connect</key> + <applyto>/apps/transmission-remote-gtk/auto-connect</applyto> + <owner>transmission-remote-gtk</owner> <type>bool</type> <default>0</default> @@ -15,9 +15,9 @@ </schema> <schema> - <key>/schemas/apps/trg/system-tray</key> - <applyto>/apps/trg/system-tray</applyto> - <owner>trg</owner> + <key>/schemas/apps/transmission-remote-gtk/system-tray</key> + <applyto>/apps/transmission-remote-gtk/system-tray</applyto> + <owner>transmission-remote-gtk</owner> <type>bool</type> <default>0</default> @@ -28,9 +28,9 @@ </schema> <schema> - <key>/schemas/apps/trg/window_height</key> - <applyto>/apps/trg/window_height</applyto> - <owner>trg</owner> + <key>/schemas/apps/transmission-remote-gtk/window_height</key> + <applyto>/apps/transmission-remote-gtk/window_height</applyto> + <owner>transmission-remote-gtk</owner> <type>int</type> <default>600</default> @@ -41,9 +41,9 @@ </schema> <schema> - <key>/schemas/apps/trg/window_width</key> - <applyto>/apps/trg/window_width</applyto> - <owner>trg</owner> + <key>/schemas/apps/transmission-remote-gtk/window_width</key> + <applyto>/apps/transmission-remote-gtk/window_width</applyto> + <owner>transmission-remote-gtk</owner> <type>int</type> <default>800</default> @@ -54,9 +54,9 @@ </schema> <schema> - <key>/schemas/apps/trg/port</key> - <applyto>/apps/trg/port</applyto> - <owner>trg</owner> + <key>/schemas/apps/transmission-remote-gtk/port</key> + <applyto>/apps/transmission-remote-gtk/port</applyto> + <owner>transmission-remote-gtk</owner> <type>int</type> <default>9091</default> @@ -67,9 +67,9 @@ </schema> <schema> - <key>/schemas/apps/trg/username</key> - <applyto>/apps/trg/username</applyto> - <owner>trg</owner> + <key>/schemas/apps/transmission-remote-gtk/username</key> + <applyto>/apps/transmission-remote-gtk/username</applyto> + <owner>transmission-remote-gtk</owner> <type>string</type> <default></default> @@ -80,9 +80,9 @@ </schema> <schema> - <key>/schemas/apps/trg/password</key> - <applyto>/apps/trg/password</applyto> - <owner>trg</owner> + <key>/schemas/apps/transmission-remote-gtk/password</key> + <applyto>/apps/transmission-remote-gtk/password</applyto> + <owner>transmission-remote-gtk</owner> <type>string</type> <default></default> @@ -93,9 +93,9 @@ </schema> <schema> - <key>/schemas/apps/trg/hostname</key> - <applyto>/apps/trg/hostname</applyto> - <owner>trg</owner> + <key>/schemas/apps/transmission-remote-gtk/hostname</key> + <applyto>/apps/transmission-remote-gtk/hostname</applyto> + <owner>transmission-remote-gtk</owner> <type>string</type> <default></default> diff --git a/src/trg-torrent-model.c b/src/trg-torrent-model.c index 95406fe..3542777 100644 --- a/src/trg-torrent-model.c +++ b/src/trg-torrent-model.c @@ -191,25 +191,58 @@ update_torrent_iter(gint64 serial, TrgTorrentModel * model, gtk_tree_model_get(GTK_TREE_MODEL(model), iter, TORRENT_COLUMN_FLAGS, &lastFlags, -1); +#ifdef DEBUG gtk_list_store_set(GTK_LIST_STORE(model), iter, - TORRENT_COLUMN_ICON, statusIcon, - TORRENT_COLUMN_NAME, torrent_get_name(t), - TORRENT_COLUMN_SIZE, torrent_get_size(t), - TORRENT_COLUMN_DONE, - torrent_get_percent_done(t), - TORRENT_COLUMN_STATUS, statusString, - TORRENT_COLUMN_DOWNSPEED, downRate, - TORRENT_COLUMN_FLAGS, newFlags, - TORRENT_COLUMN_UPSPEED, upRate, - TORRENT_COLUMN_ETA, torrent_get_eta(t), - TORRENT_COLUMN_UPLOADED, uploaded, - TORRENT_COLUMN_DOWNLOADED, downloaded, - TORRENT_COLUMN_RATIO, - uploaded > - 0 && downloaded > 0 ? (double) uploaded / (double) downloaded : 0, - TORRENT_COLUMN_ID, id, TORRENT_COLUMN_JSON, t, - TORRENT_COLUMN_UPDATESERIAL, serial, -1); - + TORRENT_COLUMN_ICON, statusIcon, -1); + gtk_list_store_set(GTK_LIST_STORE(model), iter, + TORRENT_COLUMN_NAME, torrent_get_name(t), -1); + gtk_list_store_set(GTK_LIST_STORE(model), iter, + TORRENT_COLUMN_SIZE, torrent_get_size(t), -1); + gtk_list_store_set(GTK_LIST_STORE(model), iter, + TORRENT_COLUMN_DONE, torrent_get_percent_done(t), -1); + gtk_list_store_set(GTK_LIST_STORE(model), iter, + TORRENT_COLUMN_STATUS, statusString, -1); + gtk_list_store_set(GTK_LIST_STORE(model), iter, + TORRENT_COLUMN_DOWNSPEED, downRate, -1); + gtk_list_store_set(GTK_LIST_STORE(model), iter, + TORRENT_COLUMN_FLAGS, newFlags, -1); + gtk_list_store_set(GTK_LIST_STORE(model), iter, + TORRENT_COLUMN_UPSPEED, upRate, -1); + gtk_list_store_set(GTK_LIST_STORE(model), iter, + TORRENT_COLUMN_ETA, torrent_get_eta(t), -1); + gtk_list_store_set(GTK_LIST_STORE(model), iter, + TORRENT_COLUMN_UPLOADED, uploaded, -1); + gtk_list_store_set(GTK_LIST_STORE(model), iter, + TORRENT_COLUMN_DOWNLOADED, downloaded, -1); + gtk_list_store_set(GTK_LIST_STORE(model), iter, + TORRENT_COLUMN_RATIO, + uploaded > 0 && downloaded > 0 ? (double) uploaded / (double) downloaded : 0, -1); + gtk_list_store_set(GTK_LIST_STORE(model), iter, + TORRENT_COLUMN_ID, id, -1); + gtk_list_store_set(GTK_LIST_STORE(model), iter, + TORRENT_COLUMN_JSON, t, -1); + gtk_list_store_set(GTK_LIST_STORE(model), iter, + TORRENT_COLUMN_UPDATESERIAL, serial, -1); +#else + gtk_list_store_set(GTK_LIST_STORE(model), iter, + TORRENT_COLUMN_ICON, statusIcon, + TORRENT_COLUMN_NAME, torrent_get_name(t), + TORRENT_COLUMN_SIZE, torrent_get_size(t), + TORRENT_COLUMN_DONE, + torrent_get_percent_done(t), + TORRENT_COLUMN_STATUS, statusString, + TORRENT_COLUMN_DOWNSPEED, downRate, + TORRENT_COLUMN_FLAGS, newFlags, + TORRENT_COLUMN_UPSPEED, upRate, + TORRENT_COLUMN_ETA, torrent_get_eta(t), + TORRENT_COLUMN_UPLOADED, uploaded, + TORRENT_COLUMN_DOWNLOADED, downloaded, + TORRENT_COLUMN_RATIO, + uploaded > + 0 && downloaded > 0 ? (double) uploaded / (double) downloaded : 0, + TORRENT_COLUMN_ID, id, TORRENT_COLUMN_JSON, t, + TORRENT_COLUMN_UPDATESERIAL, serial, -1); +#endif if ((lastFlags & TORRENT_FLAG_DOWNLOADING) && (newFlags & TORRENT_FLAG_COMPLETE)) diff --git a/src/trg-trackers-model.c b/src/trg-trackers-model.c index 4a9c700..4075b78 100644 --- a/src/trg-trackers-model.c +++ b/src/trg-trackers-model.c @@ -54,12 +54,24 @@ void trg_trackers_model_update(TrgTrackersModel * model, JsonObject * t) continue; gtk_list_store_append(GTK_LIST_STORE(model), &trackIter); + +#ifdef DEBUG + gtk_list_store_set(GTK_LIST_STORE(model), &trackIter, + TRACKERCOL_ICON, GTK_STOCK_NETWORK, -1); + gtk_list_store_set(GTK_LIST_STORE(model), &trackIter, + TRACKERCOL_TIER, tracker_get_tier(tracker), -1); + gtk_list_store_set(GTK_LIST_STORE(model), &trackIter, + TRACKERCOL_ANNOUNCE, announce, -1); + gtk_list_store_set(GTK_LIST_STORE(model), &trackIter, + TRACKERCOL_SCRAPE, scrape, -1); +#else gtk_list_store_set(GTK_LIST_STORE(model), &trackIter, TRACKERCOL_ICON, GTK_STOCK_NETWORK, TRACKERCOL_TIER, tracker_get_tier(tracker), TRACKERCOL_ANNOUNCE, announce, TRACKERCOL_SCRAPE, scrape, -1); +#endif } } |