Merge lp:~renatofilho/indicator-transfer/buteo-changes into lp:indicator-transfer/15.10

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Charles Kerr
Approved revision: 63
Merged at revision: 36
Proposed branch: lp:~renatofilho/indicator-transfer/buteo-changes
Merge into: lp:indicator-transfer/15.10
Prerequisite: lp:~renatofilho/indicator-transfer/source-clear-fix
Diff against target: 40 lines (+3/-2)
2 files modified
include/transfer/transfer.h (+2/-1)
src/view-gmenu.cpp (+1/-1)
To merge this branch: bzr merge lp:~renatofilho/indicator-transfer/buteo-changes
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+269793@code.launchpad.net

Commit message

Allow to set custom states label.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

\o/

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/transfer/transfer.h'
2--- include/transfer/transfer.h 2015-07-31 14:04:44 +0000
3+++ include/transfer/transfer.h 2015-09-08 18:12:27 +0000
4@@ -65,6 +65,7 @@
5 Id id;
6 std::string title;
7 std::string app_icon;
8+ std::string custom_state;
9
10 // meaningful iff state is ERROR
11 std::string error_string;
12@@ -75,7 +76,7 @@
13 protected:
14 static std::string next_unique_id();
15 };
16-
17+
18 } // namespace transfer
19 } // namespace indicator
20 } // namespace unity
21
22=== modified file 'src/view-gmenu.cpp'
23--- src/view-gmenu.cpp 2015-08-12 14:23:28 +0000
24+++ src/view-gmenu.cpp 2015-09-08 18:12:27 +0000
25@@ -160,6 +160,7 @@
26 }
27
28 g_variant_builder_add(&b, "{sv}", "state", g_variant_new_int32(transfer->state));
29+ g_variant_builder_add(&b, "{sv}", "state-label", g_variant_new_string(transfer->custom_state.c_str()));
30 }
31 else
32 {
33@@ -623,7 +624,6 @@
34
35 g_menu_item_set_attribute (menu_item, ATTRIBUTE_X_TYPE,
36 "s", "com.canonical.indicator.transfer");
37-
38 GVariant * serialized_icon = nullptr;
39 if (!t->app_icon.empty() && g_file_test(t->app_icon.c_str(), G_FILE_TEST_EXISTS))
40 {

Subscribers

People subscribed via source and target branches