Merge lp:~ted/ubuntu-app-launch/disable-only-show-in into lp:ubuntu-app-launch/16.10

Proposed by Ted Gould
Status: Merged
Approved by: Larry Price
Approved revision: 230
Merged at revision: 229
Proposed branch: lp:~ted/ubuntu-app-launch/disable-only-show-in
Merge into: lp:ubuntu-app-launch/16.10
Diff against target: 35 lines (+6/-1)
2 files modified
libubuntu-app-launch/application-info-desktop.cpp (+3/-1)
tests/application-info-desktop.cpp (+3/-0)
To merge this branch: bzr merge lp:~ted/ubuntu-app-launch/disable-only-show-in
Reviewer Review Type Date Requested Status
Larry Price Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+294260@code.launchpad.net

Commit message

Allow invalid desktop files for OTA11 quick fix

To post a comment you must log in.
Revision history for this message
Larry Price (larryprice) wrote :

Should the comments say OTA10 or OTA11 like the commit message?

I'm also curious - what apps were these breaking?

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
230. By Ted Gould

Fixing comment

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Larry Price (larryprice) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libubuntu-app-launch/application-info-desktop.cpp'
--- libubuntu-app-launch/application-info-desktop.cpp 2016-05-04 20:12:50 +0000
+++ libubuntu-app-launch/application-info-desktop.cpp 2016-05-10 19:09:58 +0000
@@ -181,7 +181,9 @@
181 if (stringlistFromKeyfileContains(keyfile, "NotShowIn", xdg_current_desktop, false) ||181 if (stringlistFromKeyfileContains(keyfile, "NotShowIn", xdg_current_desktop, false) ||
182 !stringlistFromKeyfileContains(keyfile, "OnlyShowIn", xdg_current_desktop, true))182 !stringlistFromKeyfileContains(keyfile, "OnlyShowIn", xdg_current_desktop, true))
183 {183 {
184 throw std::runtime_error("Application is not shown in Unity");184 g_warning("Application is not shown in Unity");
185 // Exception removed for OTA11 as a temporary fix
186 // throw std::runtime_error("Application is not shown in Unity");
185 }187 }
186 }188 }
187189
188190
=== modified file 'tests/application-info-desktop.cpp'
--- tests/application-info-desktop.cpp 2016-04-26 13:13:51 +0000
+++ tests/application-info-desktop.cpp 2016-05-10 19:09:58 +0000
@@ -112,6 +112,8 @@
112 g_key_file_set_string(hidden.get(), DESKTOP, "Hidden", "true");112 g_key_file_set_string(hidden.get(), DESKTOP, "Hidden", "true");
113 EXPECT_THROW(ubuntu::app_launch::app_info::Desktop(hidden, "/"), std::runtime_error);113 EXPECT_THROW(ubuntu::app_launch::app_info::Desktop(hidden, "/"), std::runtime_error);
114114
115 /* Disabling for OTA11 */
116#if 0
115 // not shown in Unity117 // not shown in Unity
116 auto notshowin = defaultKeyfile();118 auto notshowin = defaultKeyfile();
117 g_key_file_set_string(notshowin.get(), DESKTOP, "NotShowIn", ("Gnome;" + test_dekstop_env + ";").c_str());119 g_key_file_set_string(notshowin.get(), DESKTOP, "NotShowIn", ("Gnome;" + test_dekstop_env + ";").c_str());
@@ -121,6 +123,7 @@
121 auto onlyshowin = defaultKeyfile();123 auto onlyshowin = defaultKeyfile();
122 g_key_file_set_string(onlyshowin.get(), DESKTOP, "OnlyShowIn", "KDE;Gnome;");124 g_key_file_set_string(onlyshowin.get(), DESKTOP, "OnlyShowIn", "KDE;Gnome;");
123 EXPECT_THROW(ubuntu::app_launch::app_info::Desktop(onlyshowin, "/"), std::runtime_error);125 EXPECT_THROW(ubuntu::app_launch::app_info::Desktop(onlyshowin, "/"), std::runtime_error);
126#endif
124}127}
125128
126TEST_F(ApplicationInfoDesktop, KeyfileShowListEdgeCases)129TEST_F(ApplicationInfoDesktop, KeyfileShowListEdgeCases)

Subscribers

People subscribed via source and target branches