summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alan F <ajf@eth0.org.uk>2014-01-08 09:22:03 +0000
committerGravatar Alan F <ajf@eth0.org.uk>2014-01-08 19:20:02 +0000
commitaf3b6c1788728dbb83c1562f7fa7327c588e030d (patch)
tree50da7c5bdd2a6abfa015425768691f001f803355
parent458178d53df114486e71d7ea69f74afac421e2d5 (diff)
deprecation fixes: change to GtkStock to themed icons for all cell renderers
-rw-r--r--src/main.c4
-rw-r--r--src/torrent.c18
-rw-r--r--src/trg-peers-model.c2
-rw-r--r--src/trg-peers-tree-view.c2
-rw-r--r--src/trg-torrent-tree-view.c2
-rw-r--r--src/trg-trackers-model.c4
-rw-r--r--src/trg-trackers-tree-view.c6
-rw-r--r--src/trg-tree-view.c4
-rw-r--r--src/trg-tree-view.h2
9 files changed, 24 insertions, 20 deletions
diff --git a/src/main.c b/src/main.c
index 5fdbf5f..d238818 100644
--- a/src/main.c
+++ b/src/main.c
@@ -176,7 +176,11 @@ int main(int argc, char *argv[])
TrgClient *client;
g_type_init();
+
+#if !GLIB_CHECK_VERSION(2, 32, 0)
g_thread_init(NULL);
+#endif
+
gtk_init(&argc, &argv);
#if WIN32
diff --git a/src/torrent.c b/src/torrent.c
index ed595dd..4a73e9e 100644
--- a/src/torrent.c
+++ b/src/torrent.c
@@ -299,23 +299,23 @@ torrent_get_flags(JsonObject * t, gint64 rpcv, gint64 status,
gchar *torrent_get_status_icon(gint64 rpcv, guint flags)
{
if (flags & TORRENT_FLAG_ERROR)
- return g_strdup(GTK_STOCK_DIALOG_WARNING);
+ return g_strdup("dialog-warning");
else if (flags & TORRENT_FLAG_DOWNLOADING_METADATA)
- return g_strdup(GTK_STOCK_FIND);
+ return g_strdup("edit-find");
else if (flags & TORRENT_FLAG_DOWNLOADING)
- return g_strdup(GTK_STOCK_GO_DOWN);
+ return g_strdup("go-down");
else if (flags & TORRENT_FLAG_PAUSED)
- return g_strdup(GTK_STOCK_MEDIA_PAUSE);
+ return g_strdup("media-playback-pause");
else if (flags & TORRENT_FLAG_SEEDING)
- return g_strdup(GTK_STOCK_GO_UP);
+ return g_strdup("go-up");
else if (flags & TORRENT_FLAG_CHECKING)
- return g_strdup(GTK_STOCK_REFRESH);
+ return g_strdup("view-refresh");
else if (flags & TORRENT_FLAG_DOWNLOADING_WAIT)
- return g_strdup(GTK_STOCK_MEDIA_REWIND);
+ return g_strdup("media-seek-backward");
else if (flags & TORRENT_FLAG_SEEDING_WAIT)
- return g_strdup(GTK_STOCK_MEDIA_FORWARD);
+ return g_strdup("media-seek-forward");
else
- return g_strdup(GTK_STOCK_DIALOG_QUESTION);
+ return g_strdup("dialog-question");
}
gint64 torrent_get_done_date(JsonObject * t)
diff --git a/src/trg-peers-model.c b/src/trg-peers-model.c
index 0d15753..1301fc3 100644
--- a/src/trg-peers-model.c
+++ b/src/trg-peers-model.c
@@ -190,7 +190,7 @@ trg_peers_model_update(TrgPeersModel * model, TrgTreeView * tv,
}
#endif
gtk_list_store_set(GTK_LIST_STORE(model), &peerIter,
- PEERSCOL_ICON, GTK_STOCK_NETWORK,
+ PEERSCOL_ICON, "network-workgroup",
PEERSCOL_IP, address,
#ifdef HAVE_GEOIP
PEERSCOL_COUNTRY, country ? country : "",
diff --git a/src/trg-peers-tree-view.c b/src/trg-peers-tree-view.c
index f7fbd7c..c2a96c2 100644
--- a/src/trg-peers-tree-view.c
+++ b/src/trg-peers-tree-view.c
@@ -46,7 +46,7 @@ static void trg_peers_tree_view_init(TrgPeersTreeView * self)
trg_column_description *desc;
desc =
- trg_tree_view_reg_column(ttv, TRG_COLTYPE_STOCKICONTEXT,
+ trg_tree_view_reg_column(ttv, TRG_COLTYPE_ICONTEXT,
PEERSCOL_IP, _("IP"), "ip", 0);
desc->model_column_extra = PEERSCOL_ICON;
diff --git a/src/trg-torrent-tree-view.c b/src/trg-torrent-tree-view.c
index d97a8be..3eb4772 100644
--- a/src/trg-torrent-tree-view.c
+++ b/src/trg-torrent-tree-view.c
@@ -48,7 +48,7 @@ static void trg_torrent_tree_view_init(TrgTorrentTreeView * tttv)
trg_column_description *desc;
desc =
- trg_tree_view_reg_column(ttv, TRG_COLTYPE_STOCKICONTEXT,
+ trg_tree_view_reg_column(ttv, TRG_COLTYPE_ICONTEXT,
TORRENT_COLUMN_NAME, _("Name"), "name",
0);
desc->model_column_extra = TORRENT_COLUMN_ICON;
diff --git a/src/trg-trackers-model.c b/src/trg-trackers-model.c
index c998c93..da669b1 100644
--- a/src/trg-trackers-model.c
+++ b/src/trg-trackers-model.c
@@ -85,7 +85,7 @@ trg_trackers_model_update(TrgTrackersModel * model,
#ifdef DEBUG
gtk_list_store_set(GTK_LIST_STORE(model), &trackIter,
- TRACKERCOL_ICON, GTK_STOCK_NETWORK, -1);
+ TRACKERCOL_ICON, "network-workgroup", -1);
gtk_list_store_set(GTK_LIST_STORE(model), &trackIter,
TRACKERCOL_TIER,
tracker_stats_get_tier(tracker), -1);
@@ -123,7 +123,7 @@ trg_trackers_model_update(TrgTrackersModel * model,
tracker_stats_get_seeder_count(tracker), -1);
#else
gtk_list_store_set(GTK_LIST_STORE(model), &trackIter,
- TRACKERCOL_ICON, GTK_STOCK_NETWORK,
+ TRACKERCOL_ICON, "network-workgroup",
TRACKERCOL_ID, trackerId,
TRACKERCOL_UPDATESERIAL, updateSerial,
TRACKERCOL_TIER,
diff --git a/src/trg-trackers-tree-view.c b/src/trg-trackers-tree-view.c
index 0dfd4f9..7ce05b7 100644
--- a/src/trg-trackers-tree-view.c
+++ b/src/trg-trackers-tree-view.c
@@ -115,7 +115,7 @@ trg_tracker_announce_edited(GtkCellRendererText * renderer,
req = torrent_set(torrentIds);
args = node_get_arguments(req);
- if (!g_strcmp0(icon, GTK_STOCK_ADD)) {
+ if (!g_strcmp0(icon, "list-add")) {
json_array_add_string_element(trackerModifiers, new_text);
json_object_set_array_member(args, "trackerAdd", trackerModifiers);
} else {
@@ -164,7 +164,7 @@ static void trg_trackers_tree_view_init(TrgTrackersTreeView * self)
trg_column_description *desc;
desc =
- trg_tree_view_reg_column(ttv, TRG_COLTYPE_STOCKICONTEXT,
+ trg_tree_view_reg_column(ttv, TRG_COLTYPE_ICONTEXT,
TRACKERCOL_TIER, _("Tier"), "tier",
TRG_COLUMN_UNREMOVABLE);
desc->model_column_extra = TRACKERCOL_ICON;
@@ -220,7 +220,7 @@ static void add_tracker(GtkWidget * w, gpointer data)
gtk_list_store_append(GTK_LIST_STORE(model), &iter);
gtk_list_store_set(GTK_LIST_STORE(model), &iter, TRACKERCOL_ICON,
- GTK_STOCK_ADD, -1);
+ "list-add", -1);
path = gtk_tree_model_get_path(model, &iter);
gtk_tree_view_set_cursor(tv, path, priv->announceColumn, TRUE);
diff --git a/src/trg-tree-view.c b/src/trg-tree-view.c
index bdd78a8..4cf6b00 100644
--- a/src/trg-tree-view.c
+++ b/src/trg-tree-view.c
@@ -496,8 +496,8 @@ trg_tree_view_add_column_after(TrgTreeView * tv,
"wanted-value",
desc->model_column, NULL);
break;
- case TRG_COLTYPE_STOCKICONTEXT:
- column = trg_tree_view_icontext_column_new(desc, "stock-id");
+ case TRG_COLTYPE_ICONTEXT:
+ column = trg_tree_view_icontext_column_new(desc, "icon-name");
break;
case TRG_COLTYPE_FILEICONTEXT:
column = trg_tree_view_fileicontext_column_new(desc);
diff --git a/src/trg-tree-view.h b/src/trg-tree-view.h
index 5a17073..43ee576 100644
--- a/src/trg-tree-view.h
+++ b/src/trg-tree-view.h
@@ -51,7 +51,7 @@ GtkWidget *trg_tree_view_new(void);
G_END_DECLS GList *trg_tree_view_get_selected_refs_list(GtkTreeView * tv);
enum {
- TRG_COLTYPE_STOCKICONTEXT,
+ TRG_COLTYPE_ICONTEXT,
TRG_COLTYPE_FILEICONTEXT,
TRG_COLTYPE_WANTED,
TRG_COLTYPE_TEXT,