Merge lp:~unity-team/unity/misc-fixes-2011-06-09 into lp:unity

Proposed by Neil J. Patel
Status: Merged
Merged at revision: 1234
Proposed branch: lp:~unity-team/unity/misc-fixes-2011-06-09
Merge into: lp:unity
Diff against target: 43 lines (+8/-3)
3 files modified
src/IconTexture.cpp (+5/-1)
src/PanelTray.cpp (+2/-1)
src/PanelTray.h (+1/-1)
To merge this branch: bzr merge lp:~unity-team/unity/misc-fixes-2011-06-09
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Review via email: mp+64047@code.launchpad.net

Description of the change

Fixes two linked bugs.

To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

well, just makes sense! Approved :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/IconTexture.cpp'
2--- src/IconTexture.cpp 2011-04-21 03:57:41 +0000
3+++ src/IconTexture.cpp 2011-06-09 16:14:27 +0000
4@@ -180,7 +180,11 @@
5 else
6 {
7 _loading = false;
8- SetByIconName (DEFAULT_ICON, _size);
9+
10+ // Protects against a missing default icon, we only request it if icon_name
11+ // doesn't match.
12+ if (g_strcmp0 (icon_name, DEFAULT_ICON))
13+ SetByIconName (DEFAULT_ICON, _size);
14 }
15 }
16
17
18=== modified file 'src/PanelTray.cpp'
19--- src/PanelTray.cpp 2011-06-07 11:55:49 +0000
20+++ src/PanelTray.cpp 2011-06-09 16:14:27 +0000
21@@ -180,7 +180,8 @@
22 PanelTray::OnTrayIconRemoved (NaTrayManager *manager, NaTrayChild *child, PanelTray *self)
23 {
24 g_idle_add ((GSourceFunc)IdleSync, self);
25- self->_n_children--;
26+ if (self->_n_children > 0)
27+ self->_n_children--;
28 }
29
30 gboolean
31
32=== modified file 'src/PanelTray.h'
33--- src/PanelTray.h 2011-05-30 02:49:31 +0000
34+++ src/PanelTray.h 2011-06-09 16:14:27 +0000
35@@ -52,7 +52,7 @@
36 virtual void OnEntryAdded(unity::indicator::Entry::Ptr const& proxy);
37
38 public:
39- int _n_children;
40+ guint8 _n_children;
41 char **_whitelist;
42 protected:
43 const gchar * GetName ();