updated on Thu Jan 5 13:17:10 UTC 2012
[aur-mirror.git] / rtorrent-pyro / ui_pyroscope_unicode.patch
blobaff97cf394e3972a0fab49d9454a525d2324eed7
1 --- ui_pyroscope.cc 2011-12-11 20:20:18.654395573 +0000
2 +++ ui_pyroscope.cc.orig 2011-12-11 18:42:45.427570972 +0000
3 @@ -459,7 +459,7 @@
5 // show column headers
6 int pos = 1;
7 - canvas->print(2, pos, " ► ♥ ◌ ! ⣿ ↕ ☺ × D S L ∆ ∇ Size Name");
8 + canvas->print(2, pos, " ☢ ☍ ⌘ ✰ ⣿ ⚡ ☯ ⚑ ↺ ⤴ ⤵ ∆ ⌚ ≀∇ ✇ Name");
9 if (canvas->width() > TRACKER_LABEL_WIDTH) {
10 canvas->print(canvas->width() - 14, 1, "Tracker Domain");
12 @@ -500,36 +500,35 @@
13 int col_active = ps::COL_INFO;
14 //int col_active = item->is_open() && item->is_active() ? ps::COL_INFO : d->is_done() ? ps::COL_STOPPED : ps::COL_QUEUED;
16 - const char* alert = "! ";
17 + const char* alert = "⚠ ";
18 if (has_alert) {
19 if (d->message().find("Timeout was reached") != std::string::npos
20 || d->message().find("Timed out") != std::string::npos)
21 - alert = "t ";
22 + alert = "◔ ";
23 else if (d->message().find("Connecting to") != std::string::npos)
24 - alert = "c ";
25 + alert = "⚡ ";
26 else if (d->message().find("Could not parse bencoded data") != std::string::npos
27 || d->message().find("Failed sending data") != std::string::npos
28 || d->message().find("Server returned nothing") != std::string::npos
29 || d->message().find("Couldn't connect to server") != std::string::npos)
30 - alert = "r ";
31 + alert = "↯ ";
32 else if (d->message().find("not registered") != std::string::npos
33 || d->message().find("torrent cannot be found") != std::string::npos
34 || d->message().find("unregistered") != std::string::npos)
35 - alert = "? ";
36 + alert = "¿?";
37 else if (d->message().find("not authorized") != std::string::npos
38 || d->message().find("blocked from") != std::string::npos
39 || d->message().find("denied") != std::string::npos
40 || d->message().find("limit exceeded") != std::string::npos
41 || d->message().find("active torrents are enough") != std::string::npos)
42 - alert = "x ";
43 + alert = "⨂ ";
46 - const char* prios[] = {"- ", "↓ ", " ", "↑ "};
47 + const char* prios[] = {"✖ ", "⇣ ", "  ", "⇡ "};
48 const char* progress[] = {"⠀ ", "⠁ ", "⠉ ", "⠋ ", "⠛ ", "⠟ ", "⠿ ", "⡿ ", "⣿ "};
49 //const char* ying_yang[] = {"☹ ", "① ", "② ", "③ ", "④ ", "⑤ ", "⑥ ", "⑦ ", "⑧ ", "⑨ ", "⑩ "};
50 //const char* ying_yang[] = {"☹ ", "➊ ", "➋ ", "➌ ", "➍ ", "➎ ", "➏ ", "➐ ", "➑ ", "➒ ", "➓ "};
51 - // const char* ying_yang[] = {"☹ ", "➀ ", "➁ ", "➂ ", "➃ ", "➄ ", "➅ ", "➆ ", "➇ ", "➈ ", "➉ "};
52 - const char* ying_yang[] = {"⠁ ", "⠁ ", "⠃ ", "⠇ ", "⠏ ", "⠟ ", "⠿ ", "⠿ ", "⠿ ", "⠿ ", "⠿ "};
53 + const char* ying_yang[] = {"☹ ", "➀ ", "➁ ", "➂ ", "➃ ", "➄ ", "➅ ", "➆ ", "➇ ", "➈ ", "➉ "};
55 int progress_steps = sizeof(progress) / sizeof(*progress);
56 uint32_t down_rate = D_INFO(item)->down_rate()->rate();
57 @@ -540,21 +539,21 @@
59 canvas->print(0, pos, "%s %s%s%s%s%s%s%s%s %s %s %s %s %s%s %s%s",
60 range.first == view->focus() ? "»" : " ",
61 - item->is_open() ? item->is_active() ? "► " : "╍ " : "▪ ",
62 - rpc::call_command_string("d.get_tied_to_file", rpc::make_target(d)).empty() ? " " : "♥ ",
63 - rpc::call_command_value("d.get_ignore_commands", rpc::make_target(d)) == 0 ? " " : "◌ ",
64 + item->is_open() ? item->is_active() ? "▹ " : "╍ " : "▪ ",
65 + rpc::call_command_string("d.get_tied_to_file", rpc::make_target(d)).empty() ? "  " : "⚯ ",
66 + rpc::call_command_value("d.get_ignore_commands", rpc::make_target(d)) == 0 ? "⚒ " : "◌ ",
67 prios[d->priority() % 4],
68 - d->is_done() ? "⣿ " : progress[
69 + d->is_done() ? "✔ " : progress[
70 item->file_list()->completed_chunks() * progress_steps
71 / item->file_list()->size_chunks()],
72 D_INFO(item)->down_rate()->rate() ?
73 - (D_INFO(item)->up_rate()->rate() ? "↕ " : "↧ ") :
74 - (D_INFO(item)->up_rate()->rate() ? "↥ " : " "),
75 - ratio >= 11000 ? "☺ " : ying_yang[ratio / 1000],
76 - has_msg ? has_alert ? alert : "! " : " ",
77 - tracker ? num2(tracker->scrape_downloaded()).c_str() : " ",
78 - tracker ? num2(tracker->scrape_complete()).c_str() : " ",
79 - tracker ? num2(tracker->scrape_incomplete()).c_str() : " ",
80 + (D_INFO(item)->up_rate()->rate() ? "⇅ " : "↡ ") :
81 + (D_INFO(item)->up_rate()->rate() ? "↟ " : "  "),
82 + ratio >= 11000 ? "⊛ " : ying_yang[ratio / 1000],
83 + has_msg ? has_alert ? alert : "♺ " : "  ",
84 + tracker ? num2(tracker->scrape_downloaded()).c_str() : "  ",
85 + tracker ? num2(tracker->scrape_complete()).c_str() : "  ",
86 + tracker ? num2(tracker->scrape_incomplete()).c_str() : "  ",
87 human_size(D_INFO(item)->up_rate()->rate(), 2 | 8).c_str(),
88 d->is_done() || !down_rate ? "" : " ",
89 d->is_done() ? elapsed_time(get_custom_long(d, "tm_completed")).c_str() :