Merge lp:~feng-kylin/unity/changeTopLabel into lp:unity

Proposed by handsome_feng
Status: Rejected
Rejected by: Stephen M. Webb
Proposed branch: lp:~feng-kylin/unity/changeTopLabel
Merge into: lp:unity
Diff against target: 74 lines (+27/-3) (has conflicts)
3 files modified
debian/changelog (+9/-0)
panel/PanelMenuView.cpp (+17/-2)
panel/PanelMenuView.h (+1/-1)
Text conflict in debian/changelog
To merge this branch: bzr merge lp:~feng-kylin/unity/changeTopLabel
Reviewer Review Type Date Requested Status
Sebastien Bacher Needs Information
Anthony Wong (community) Needs Fixing
Review via email: mp+223190@code.launchpad.net

Description of the change

The desktop name "Ubuntu Desktop" can not be notified,it is not convenient for us to change it to our Special symbol,so i remove the ”const" attribute of desktop_name_ in PanelManuView.h ,and add a if statement in PanelManuView.cpp to judge witch desktop_name to show .thank you.

To post a comment you must log in.
Revision history for this message
Anthony Wong (anthonywong) wrote :

The string "Ubuntu Desktop" was localized but in your change it is no longer the case. You should use _("Ubuntu Desktop") to take the localized string. The same applies to the "Ubuntu Kylin Desktop" string.

review: Needs Fixing
Revision history for this message
Jack Yu (jackyu) wrote :

Thanks.

lp:~feng-kylin/unity/changeTopLabel updated
3827. By handsome_feng

change the 'Ubuntu Desktop' to _('Ubuntu Desktop')

Revision history for this message
Sebastien Bacher (seb128) wrote :

would it make sense to use /etc/os-release, similar to what has been discussed on https://bugs.launchpad.net/bugs/1331873 ?

review: Needs Information
Revision history for this message
handsome_feng (feng-kylin) wrote :

yes ,i will do that ,thank you very much!

lp:~feng-kylin/unity/changeTopLabel updated
3828. By handsome_feng

 Add support for getting the distro name from /etc/os-release

Revision history for this message
handsome_feng (feng-kylin) wrote :

i have add the support for getting the distro name from /etc/os-release , how about this ?

Revision history for this message
handsome_feng (feng-kylin) wrote :

> would it make sense to use /etc/os-release, similar to what has been discussed
> on https://bugs.launchpad.net/bugs/1331873 ?
i have add the support to /etc/os-release ,and how about this?

Revision history for this message
Stephen M. Webb (bregma) wrote :

This MP has long been superseded by a different one accomplishing the same task. Marking as rejected.

Unmerged revisions

3828. By handsome_feng

 Add support for getting the distro name from /etc/os-release

3827. By handsome_feng

change the 'Ubuntu Desktop' to _('Ubuntu Desktop')

3826. By handsome_feng

change the label on the panel menu

3825. By handsome_feng

add a if statement,just for practice.

3824. By handsome_feng

add a if statement (a novice,make this for practice)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2014-07-11 19:59:35 +0000
+++ debian/changelog 2014-07-30 01:57:45 +0000
@@ -1,3 +1,4 @@
1<<<<<<< TREE
1unity (7.3.0+14.10.20140711-0ubuntu1) utopic; urgency=low2unity (7.3.0+14.10.20140711-0ubuntu1) utopic; urgency=low
23
3 [ Eleni Maria Stea ]4 [ Eleni Maria Stea ]
@@ -77,6 +78,14 @@
7778
78 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 19 Jun 2014 18:41:55 +000079 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 19 Jun 2014 18:41:55 +0000
7980
81=======
82unity (7.2.0+14.10.20140607-0ubuntu2) UNRELEASED; urgency=medium
83
84 * add a if statement,just for practice.
85
86 -- handsome_feng <445865575@qq.com> Fri, 13 Jun 2014 09:36:20 +0800
87
88>>>>>>> MERGE-SOURCE
80unity (7.2.0+14.10.20140607-0ubuntu1) utopic; urgency=low89unity (7.2.0+14.10.20140607-0ubuntu1) utopic; urgency=low
8190
82 [ Chris Townsend ]91 [ Chris Townsend ]
8392
=== modified file 'panel/PanelMenuView.cpp'
--- panel/PanelMenuView.cpp 2014-04-02 21:42:44 +0000
+++ panel/PanelMenuView.cpp 2014-07-30 01:57:45 +0000
@@ -20,6 +20,7 @@
2020
21#include <Nux/Nux.h>21#include <Nux/Nux.h>
22#include <NuxCore/Logger.h>22#include <NuxCore/Logger.h>
23#include <fstream>
2324
24#include "PanelMenuView.h"25#include "PanelMenuView.h"
25#include "unity-shared/AnimationUtils.h"26#include "unity-shared/AnimationUtils.h"
@@ -73,9 +74,23 @@
73 , ignore_menu_visibility_(false)74 , ignore_menu_visibility_(false)
74 , integrated_menus_(decoration::Style::Get()->integrated_menus())75 , integrated_menus_(decoration::Style::Get()->integrated_menus())
75 , active_xid_(0)76 , active_xid_(0)
76 , desktop_name_(_("Ubuntu Desktop"))
77{77{
7878 std::ifstream fin("/etc/os-release");
79 std::string temp,os_release_name = _("Ubuntu");
80 if (fin.is_open())
81 {
82 while( getline(fin,temp) )
83 {
84 if (temp.substr(0,4) == "NAME")
85 {
86 size_t i = temp.find_first_of("\"");
87 size_t j = temp.find_last_of("\"");
88 os_release_name = temp.substr(i+1,j-i-1);
89 break;
90 }
91 }
92 }
93 desktop_name_ = os_release_name + " " + _("Desktop");
79 BamfWindow* active_win = bamf_matcher_get_active_window(matcher_);94 BamfWindow* active_win = bamf_matcher_get_active_window(matcher_);
80 if (BAMF_IS_WINDOW(active_win))95 if (BAMF_IS_WINDOW(active_win))
81 active_xid_ = bamf_window_get_xid(active_win);96 active_xid_ = bamf_window_get_xid(active_win);
8297
=== modified file 'panel/PanelMenuView.h'
--- panel/PanelMenuView.h 2014-04-02 21:42:44 +0000
+++ panel/PanelMenuView.h 2014-07-30 01:57:45 +0000
@@ -188,7 +188,7 @@
188188
189 Window active_xid_;189 Window active_xid_;
190 nux::Geometry monitor_geo_;190 nux::Geometry monitor_geo_;
191 const std::string desktop_name_;191 std::string desktop_name_;
192192
193 glib::Signal<void, BamfMatcher*, BamfView*> view_opened_signal_;193 glib::Signal<void, BamfMatcher*, BamfView*> view_opened_signal_;
194 glib::Signal<void, BamfMatcher*, BamfView*> view_closed_signal_;194 glib::Signal<void, BamfMatcher*, BamfView*> view_closed_signal_;