Merge lp:~mmcg069/software-center/misbehaving-pathbar-fix into lp:software-center

Proposed by Matthew McGowan
Status: Merged
Approved by: Gary Lasker
Approved revision: 1083
Merge reported by: Gary Lasker
Merged at revision: not available
Proposed branch: lp:~mmcg069/software-center/misbehaving-pathbar-fix
Merge into: lp:software-center
Diff against target: 118 lines (+43/-14) (has conflicts)
2 files modified
data/ui/SoftwareCenter.ui (+23/-13)
softwarecenter/app.py (+20/-1)
Text conflict in data/ui/SoftwareCenter.ui
To merge this branch: bzr merge lp:~mmcg069/software-center/misbehaving-pathbar-fix
Reviewer Review Type Date Requested Status
Gary Lasker (community) Approve
Review via email: mp+34140@code.launchpad.net

Description of the change

Fixes bug #625210. Pathbutton no longer shrinks to available width.

This issue is resolved by removing the Viewport which parented the main Notebook widget. The Viewport was only used to paint the border around the Notebook so this is harmless.

The border width of the Notebook is now set to 1px and the borders a painted in an expose-event handler connected to the Notebook.

To post a comment you must log in.
Revision history for this message
Gary Lasker (gary-lasker) wrote :

Looks good, Matthew McGowan! I've merged it. Thanks a lot as always. :)

With aggressive resizing, I do notice some minor artifacts showing for the redrawn pathbutton. Do you see that? They seem quite minor so we can decide if we want to take a look at that.

This does indeed fix bug #625210 (and bug #625210).

Thanks again!

review: Approve
Revision history for this message
Gary Lasker (gary-lasker) wrote :

Of course, the second bug listed above should be bug #620514. ;)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'data/ui/SoftwareCenter.ui'
--- data/ui/SoftwareCenter.ui 2010-08-30 09:40:20 +0000
+++ data/ui/SoftwareCenter.ui 2010-08-30 23:36:49 +0000
@@ -60,7 +60,11 @@
60 <child>60 <child>
61 <object class="GtkMenuItem" id="menuitem_reinstall_purchases">61 <object class="GtkMenuItem" id="menuitem_reinstall_purchases">
62 <property name="visible">True</property>62 <property name="visible">True</property>
63<<<<<<< TREE
63 <property name="label" translatable="yes">Reinstall Previous Purchases…</property>64 <property name="label" translatable="yes">Reinstall Previous Purchases…</property>
65=======
66 <property name="label" translatable="yes">Reinstall Previous Purchases&#x2026;</property>
67>>>>>>> MERGE-SOURCE
64 <property name="use_underline">True</property>68 <property name="use_underline">True</property>
65 <signal name="activate" handler="on_menuitem_reinstall_purchases_activate"/>69 <signal name="activate" handler="on_menuitem_reinstall_purchases_activate"/>
66 </object>70 </object>
@@ -188,7 +192,11 @@
188 </child>192 </child>
189 <child>193 <child>
190 <object class="GtkImageMenuItem" id="menuitem_search">194 <object class="GtkImageMenuItem" id="menuitem_search">
195<<<<<<< TREE
191 <property name="label" translatable="yes">Search…</property>196 <property name="label" translatable="yes">Search…</property>
197=======
198 <property name="label" translatable="yes">Search&#x2026;</property>
199>>>>>>> MERGE-SOURCE
192 <property name="visible">True</property>200 <property name="visible">True</property>
193 <property name="use_underline">True</property>201 <property name="use_underline">True</property>
194 <property name="image">image2</property>202 <property name="image">image2</property>
@@ -204,7 +212,11 @@
204 </child>212 </child>
205 <child>213 <child>
206 <object class="GtkImageMenuItem" id="menuitem_software_sources">214 <object class="GtkImageMenuItem" id="menuitem_software_sources">
215<<<<<<< TREE
207 <property name="label" translatable="yes">_Software Sources…</property>216 <property name="label" translatable="yes">_Software Sources…</property>
217=======
218 <property name="label" translatable="yes">_Software Sources&#x2026;</property>
219>>>>>>> MERGE-SOURCE
208 <property name="visible">True</property>220 <property name="visible">True</property>
209 <property name="use_underline">True</property>221 <property name="use_underline">True</property>
210 <property name="image">image4</property>222 <property name="image">image4</property>
@@ -341,21 +353,15 @@
341 </packing>353 </packing>
342 </child>354 </child>
343 <child>355 <child>
344 <object class="GtkViewport" id="viewport1">356 <object class="GtkNotebook" id="notebook_view">
345 <property name="visible">True</property>357 <property name="visible">True</property>
346 <property name="resize_mode">queue</property>358 <property name="show_tabs">False</property>
359 <property name="show_border">False</property>
347 <child>360 <child>
348 <object class="GtkNotebook" id="notebook_view">361 <placeholder/>
349 <property name="visible">True</property>362 </child>
350 <property name="show_tabs">False</property>363 <child type="tab">
351 <property name="show_border">False</property>364 <placeholder/>
352 <child>
353 <placeholder/>
354 </child>
355 <child type="tab">
356 <placeholder/>
357 </child>
358 </object>
359 </child>365 </child>
360 </object>366 </object>
361 <packing>367 <packing>
@@ -455,7 +461,11 @@
455 <child>461 <child>
456 <object class="GtkLabel" id="label_rebuilding">462 <object class="GtkLabel" id="label_rebuilding">
457 <property name="visible">True</property>463 <property name="visible">True</property>
464<<<<<<< TREE
458 <property name="label" translatable="yes">Rebuilding software catalog…</property>465 <property name="label" translatable="yes">Rebuilding software catalog…</property>
466=======
467 <property name="label" translatable="yes">Rebuilding software catalog&#x2026;</property>
468>>>>>>> MERGE-SOURCE
459 <attributes>469 <attributes>
460 <attribute name="weight" value="bold"/>470 <attribute name="weight" value="bold"/>
461 </attributes>471 </attributes>
462472
=== modified file 'softwarecenter/app.py'
--- softwarecenter/app.py 2010-08-28 11:16:59 +0000
+++ softwarecenter/app.py 2010-08-30 23:36:49 +0000
@@ -189,6 +189,10 @@
189 self._block_menuitem_view = False189 self._block_menuitem_view = False
190 self._available_items_for_page = {}190 self._available_items_for_page = {}
191 191
192 # hackery, paint viewport borders around notebook
193 self.notebook_view.set_border_width(1)
194 self.notebook_view.connect('expose-event', self._on_notebook_expose)
195
192 # register view manager and create view panes/widgets196 # register view manager and create view panes/widgets
193 self.view_manager = ViewManager(self.notebook_view)197 self.view_manager = ViewManager(self.notebook_view)
194 198
@@ -723,7 +727,22 @@
723 return727 return
724 if view.dialogs.confirm_repair_broken_cache(self.window_main, self.datadir):728 if view.dialogs.confirm_repair_broken_cache(self.window_main, self.datadir):
725 self.backend.fix_broken_depends()729 self.backend.fix_broken_depends()
726 730
731 def _on_notebook_expose(self, widget, event):
732 # use availabel pane as the Style source so viewport colours are the same
733 # as a real Viewport
734 self.available_pane.style.paint_shadow(widget.window,
735 gtk.STATE_NORMAL,
736 gtk.SHADOW_IN,
737 event.area,
738 widget,
739 'viewport',
740 widget.allocation.x,
741 widget.allocation.y,
742 widget.allocation.width,
743 widget.allocation.height)
744 return
745
727 def _on_apt_cache_broken(self, aptcache):746 def _on_apt_cache_broken(self, aptcache):
728 self._ask_and_repair_broken_cache()747 self._ask_and_repair_broken_cache()
729748