Merge lp:~rick-rickspencer3/unity/DeleteEmblemForQuitApplicationsPinnedToLauncher into lp:unity

Proposed by Rick Spencer
Status: Superseded
Proposed branch: lp:~rick-rickspencer3/unity/DeleteEmblemForQuitApplicationsPinnedToLauncher
Merge into: lp:unity
Diff against target: 297 lines (+128/-3) (has conflicts)
8 files modified
CMakeLists.txt (+1/-1)
src/BamfLauncherIcon.cpp (+6/-0)
src/PanelIndicatorObjectEntryView.cpp (+85/-0)
src/PanelIndicatorObjectEntryView.h (+9/-0)
src/PanelMenuView.cpp (+5/-1)
src/PluginAdapter.cpp (+5/-0)
src/unityshell.cpp (+13/-1)
src/unityshell.h (+4/-0)
Text conflict in src/PanelIndicatorObjectEntryView.cpp
Text conflict in src/PanelIndicatorObjectEntryView.h
Text conflict in src/PluginAdapter.cpp
Text conflict in src/unityshell.cpp
Text conflict in src/unityshell.h
To merge this branch: bzr merge lp:~rick-rickspencer3/unity/DeleteEmblemForQuitApplicationsPinnedToLauncher
Reviewer Review Type Date Requested Status
Alex Launi (community) Needs Fixing
Review via email: mp+63446@code.launchpad.net

This proposal has been superseded by a proposal from 2011-06-09.

Commit message

Modified BamfLauchnerIcon to delete it's emblem when the application is quit if it is sticky:
  if (!bamf_view_is_sticky (BAMF_VIEW (self->m_App)))
  {
    self->Remove ();
  }
  else
  {
    self->DeleteEmblem ();
  }

This is a fix for Bug #762508

Description of the change

Modified BamfLauchnerIcon to delete it's emblem when the application is quit if it is sticky:
  if (!bamf_view_is_sticky (BAMF_VIEW (self->m_App)))
  {
    self->Remove ();
  }
  else
  {
    self->DeleteEmblem ();
  }

This is a fix for Bug #762508

To post a comment you must log in.
Revision history for this message
Alex Launi (alexlauni) wrote :

Rick, this branch has conflicts.

review: Needs Fixing

Unmerged revisions

1199. By Rick Spencer

added call to DeleteEmblem for bug #762508

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2011-06-03 16:20:30 +0000
3+++ CMakeLists.txt 2011-06-04 00:22:13 +0000
4@@ -12,7 +12,7 @@
5 set (PROJECT_NAME "unity")
6 set (UNITY_MAJOR 3)
7 set (UNITY_MINOR 8)
8-set (UNITY_MICRO 12)
9+set (UNITY_MICRO 14)
10 set (UNITY_VERSION "${UNITY_MAJOR}.${UNITY_MINOR}.${UNITY_MICRO}")
11 set (UNITY_API_VERSION "3.0")
12
13
14=== modified file 'src/BamfLauncherIcon.cpp'
15--- src/BamfLauncherIcon.cpp 2011-06-02 15:14:17 +0000
16+++ src/BamfLauncherIcon.cpp 2011-06-04 00:22:13 +0000
17@@ -520,7 +520,13 @@
18 BamfLauncherIcon *self = (BamfLauncherIcon *) data;
19
20 if (!bamf_view_is_sticky (BAMF_VIEW (self->m_App)))
21+ {
22 self->Remove ();
23+ }
24+ else
25+ {
26+ self->DeleteEmblem ();
27+ }
28 }
29
30 void
31
32=== modified file 'src/Launcher.cpp'
33=== modified file 'src/LauncherIcon.cpp'
34=== modified file 'src/PanelIndicatorObjectEntryView.cpp'
35--- src/PanelIndicatorObjectEntryView.cpp 2011-06-02 08:37:18 +0000
36+++ src/PanelIndicatorObjectEntryView.cpp 2011-06-04 00:22:13 +0000
37@@ -57,6 +57,7 @@
38 , util_cg_(CAIRO_FORMAT_ARGB32, 1, 1)
39 , padding_(padding)
40 {
41+<<<<<<< TREE
42 on_indicator_activate_changed_connection_ = proxy_->active_changed.connect(sigc::mem_fun(this, &PanelIndicatorObjectEntryView::OnActiveChanged));
43 on_indicator_updated_connection_ = proxy_->updated.connect(sigc::mem_fun(this, &PanelIndicatorObjectEntryView::Refresh));
44
45@@ -67,6 +68,19 @@
46 InputArea::OnMouseWheel.connect(sigc::mem_fun(this, &PanelIndicatorObjectEntryView::OnMouseWheel));
47
48 on_panelstyle_changed_connection_ = PanelStyle::GetDefault()->changed.connect(sigc::mem_fun(this, &PanelIndicatorObjectEntryView::Refresh));
49+=======
50+ _on_indicator_activate_changed_connection = _proxy->active_changed.connect (sigc::mem_fun (this, &PanelIndicatorObjectEntryView::OnActiveChanged));
51+ _on_indicator_updated_connection = _proxy->updated.connect (sigc::mem_fun (this, &PanelIndicatorObjectEntryView::Refresh));
52+ _padding = padding;
53+
54+ _on_font_changed_connection = g_signal_connect (gtk_settings_get_default (), "notify::gtk-font-name", (GCallback) &PanelIndicatorObjectEntryView::OnFontChanged, this);
55+
56+ InputArea::OnMouseDown.connect (sigc::mem_fun (this, &PanelIndicatorObjectEntryView::OnMouseDown));
57+ InputArea::OnMouseUp.connect (sigc::mem_fun (this, &PanelIndicatorObjectEntryView::OnMouseUp));
58+ InputArea::OnMouseWheel.connect (sigc::mem_fun (this, &PanelIndicatorObjectEntryView::OnMouseWheel));
59+
60+ _on_panelstyle_changed_connection = PanelStyle::GetDefault ()->changed.connect (sigc::mem_fun (this, &PanelIndicatorObjectEntryView::Refresh));
61+>>>>>>> MERGE-SOURCE
62 Refresh ();
63 }
64
65@@ -92,15 +106,25 @@
66 if ((proxy_->label_visible() && proxy_->label_sensitive()) ||
67 (proxy_->image_visible() && proxy_->image_sensitive()))
68 {
69+<<<<<<< TREE
70 proxy_->ShowMenu(GetAbsoluteGeometry().x + 1, //cairo translation
71 GetAbsoluteGeometry().y + PANEL_HEIGHT,
72 time(NULL),
73 nux::GetEventButton(button_flags));
74 } else {
75 Refresh();
76+=======
77+ _proxy->ShowMenu (GetAbsoluteGeometry ().x + 1, //cairo translation
78+ GetAbsoluteGeometry ().y + PANEL_HEIGHT,
79+ time (NULL),
80+ nux::GetEventButton (button_flags));
81+ } else {
82+ Refresh();
83+>>>>>>> MERGE-SOURCE
84 }
85 }
86
87+<<<<<<< TREE
88 void PanelIndicatorObjectEntryView::OnMouseUp(int x, int y, long button_flags, long key_flags)
89 {
90 Refresh();
91@@ -119,6 +143,51 @@
92 GetAbsoluteGeometry().y + PANEL_HEIGHT,
93 time(NULL),
94 1);
95+=======
96+void
97+PanelIndicatorObjectEntryView::OnMouseUp (int x, int y, long button_flags, long key_flags)
98+{
99+ Refresh();
100+}
101+
102+void
103+PanelIndicatorObjectEntryView::OnMouseWheel (int x, int y, int delta, unsigned long mouse_state, unsigned long key_state)
104+{
105+ _proxy->Scroll (delta);
106+}
107+
108+void
109+PanelIndicatorObjectEntryView::Activate ()
110+{
111+ _proxy->ShowMenu (GetAbsoluteGeometry().x + 1, //cairo translation FIXME: Make this into one function
112+ GetAbsoluteGeometry ().y + PANEL_HEIGHT,
113+ time (NULL),
114+ 1);
115+}
116+
117+static char *
118+fix_string (const char *string)
119+{
120+ if (string == NULL)
121+ return NULL;
122+
123+ char buf[256];
124+ int buf_pos = 0;
125+ int i = 0;
126+ int len = strlen (string);
127+
128+ for (i = 0; i < len; i++)
129+ {
130+ if (string[i] != '_')
131+ {
132+ buf[buf_pos] = string[i];
133+ buf_pos++;
134+ }
135+ }
136+ buf[buf_pos] = '\0';
137+
138+ return g_strdup (buf);
139+>>>>>>> MERGE-SOURCE
140 }
141
142 // We need to do a couple of things here:
143@@ -237,7 +306,11 @@
144 x = padding_;
145 y = 0;
146
147+<<<<<<< TREE
148 if (pixbuf && proxy_->image_visible())
149+=======
150+ if (pixbuf && _proxy->icon_visible)
151+>>>>>>> MERGE-SOURCE
152 {
153 gdk_cairo_set_source_pixbuf (cr, pixbuf, x, (int)((height - gdk_pixbuf_get_height (pixbuf))/2));
154 cairo_paint_with_alpha (cr, proxy_->image_sensitive() ? 1.0 : 0.5);
155@@ -301,6 +374,7 @@
156
157 NeedRedraw ();
158
159+<<<<<<< TREE
160 refreshed.emit(this);
161 }
162
163@@ -364,6 +438,17 @@
164 namespace {
165
166 void draw_menu_bg(cairo_t* cr, int width, int height)
167+=======
168+ refreshed.emit (this);
169+ if (label)
170+ g_free (label);
171+ if (pixbuf)
172+ g_object_unref (pixbuf);
173+}
174+
175+static void
176+draw_menu_bg (cairo_t *cr, int width, int height)
177+>>>>>>> MERGE-SOURCE
178 {
179 int radius = 4;
180 double x = 0;
181
182=== modified file 'src/PanelIndicatorObjectEntryView.h'
183--- src/PanelIndicatorObjectEntryView.h 2011-06-02 08:37:18 +0000
184+++ src/PanelIndicatorObjectEntryView.h 2011-06-04 00:22:13 +0000
185@@ -42,6 +42,7 @@
186 ~PanelIndicatorObjectEntryView();
187
188 void Refresh ();
189+<<<<<<< TREE
190
191 void OnMouseDown(int x, int y, long button_flags, long key_flags);
192 void OnMouseUp(int x, int y, long button_flags, long key_flags);
193@@ -54,6 +55,14 @@
194 void GetGeometryForSync(indicator::EntryLocationMap& locations);
195 bool IsEntryValid() const;
196 bool IsSensitive() const;
197+=======
198+ void OnMouseDown (int x, int y, long button_flags, long key_flags);
199+ void OnMouseUp (int x, int y, long button_flags, long key_flags);
200+ void OnMouseWheel (int x, int y, int delta, unsigned long mouse_state, unsigned long key_state);
201+ void Activate ();
202+ void OnActiveChanged (bool is_active);
203+ bool GetShowNow ();
204+>>>>>>> MERGE-SOURCE
205
206 const gchar * GetName ();
207 void AddProperties (GVariantBuilder *builder);
208
209=== modified file 'src/PanelMenuView.cpp'
210--- src/PanelMenuView.cpp 2011-06-01 23:46:41 +0000
211+++ src/PanelMenuView.cpp 2011-06-04 00:22:13 +0000
212@@ -171,7 +171,11 @@
213 _title_tex->UnReference ();
214
215 _menu_layout->UnReference ();
216- _window_buttons->UnReference ();
217+ if (_window_buttons->OwnsTheReference ())
218+ _window_buttons->UnReference ();
219+ else
220+ _window_buttons->Dispose ();
221+
222 _panel_titlebar_grab_area->UnReference ();
223
224 UBusServer* ubus = ubus_server_get_default ();
225
226=== modified file 'src/PanelTray.cpp'
227=== modified file 'src/PluginAdapter.cpp'
228--- src/PluginAdapter.cpp 2011-05-25 14:20:57 +0000
229+++ src/PluginAdapter.cpp 2011-06-04 00:22:13 +0000
230@@ -617,8 +617,13 @@
231 // not mapped yet
232 const XSizeHints& hints = window->sizeHints ();
233 covering_part = (float)(window->serverWidth () * window->serverHeight ()) / (float)(screen_width * screen_height);
234+<<<<<<< TREE
235 if ((covering_part < _coverage_area_before_automaximize) || (covering_part > 1.0) ||
236 (hints.flags & PMaxSize && (screen_width > hints.max_width || screen_height > hints.max_height)))
237+=======
238+ if ((covering_part < COVERAGE_AREA_BEFORE_AUTOMAXIMIZE) || (covering_part > 1.0) ||
239+ (hints.flags & PMaxSize && (screen_width > hints.max_width || screen_height > hints.max_height)))
240+>>>>>>> MERGE-SOURCE
241 {
242 g_debug ("MaximizeIfBigEnough: %s window size doesn't fit", win_wmclass.c_str());
243 return;
244
245=== modified file 'src/Tooltip.cpp'
246=== modified file 'src/unityshell.cpp'
247--- src/unityshell.cpp 2011-06-02 17:27:06 +0000
248+++ src/unityshell.cpp 2011-06-04 00:22:13 +0000
249@@ -1019,12 +1019,23 @@
250
251 LOGGER_START_PROCESS ("initLauncher-Launcher");
252 self->launcherWindow = new nux::BaseWindow(TEXT("LauncherWindow"));
253+<<<<<<< TREE
254 self->launcherWindow->SinkReference ();
255
256+=======
257+ self->launcherWindow->SinkReference ();
258+
259+>>>>>>> MERGE-SOURCE
260 self->launcher = new Launcher(self->launcherWindow, self->screen);
261- self->launcher->SinkReference ();
262+<<<<<<< TREE
263+ self->launcher->SinkReference ();
264+=======
265+ self->launcher->SinkReference ();
266+
267+>>>>>>> MERGE-SOURCE
268 self->launcher->hidden_changed.connect (sigc::mem_fun (self, &UnityScreen::OnLauncherHiddenChanged));
269
270+
271 self->AddChild (self->launcher);
272
273 nux::HLayout* layout = new nux::HLayout();
274@@ -1041,6 +1052,7 @@
275 self->launcherWindow->ShowWindow(true);
276 self->launcherWindow->EnableInputWindow(true, "launcher", false, false);
277 self->launcherWindow->InputWindowEnableStruts(true);
278+
279 self->launcherWindow->SetEnterFocusInputArea (self->launcher);
280
281 /* FIXME: this should not be manual, should be managed with a
282
283=== modified file 'src/unityshell.h'
284--- src/unityshell.h 2011-05-31 03:28:29 +0000
285+++ src/unityshell.h 2011-06-04 00:22:13 +0000
286@@ -218,7 +218,11 @@
287 GestureEngine *gestureEngine;
288 nux::WindowThread *wt;
289 nux::BaseWindow *launcherWindow;
290+<<<<<<< TREE
291 nux::BaseWindow *panelWindow;
292+=======
293+ nux::BaseWindow *panelWindow;
294+>>>>>>> MERGE-SOURCE
295 nux::Geometry lastTooltipArea;
296 DebugDBusInterface *debugger;
297 bool needsRelayout;