Merge lp:~ilidrissi.amine/software-center/fixing-random-bugs into lp:software-center

Proposed by Michael Vogt
Status: Merged
Merged at revision: 1251
Proposed branch: lp:~ilidrissi.amine/software-center/fixing-random-bugs
Merge into: lp:software-center
Diff against target: 151 lines (+39/-7)
6 files modified
debian/changelog (+8/-0)
debian/control (+2/-1)
softwarecenter/apt/apthistory.py (+13/-0)
softwarecenter/view/appdetailsview_gtk.py (+12/-2)
softwarecenter/view/availablepane.py (+3/-3)
softwarecenter/view/historypane.py (+1/-1)
To merge this branch: bzr merge lp:~ilidrissi.amine/software-center/fixing-random-bugs
Reviewer Review Type Date Requested Status
software-store-developers Pending
Review via email: mp+34656@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for this branch.

I noticed that there are two lines like this:

        if self.adjustment_value is not None \
        and self.adjustment_value <= self.get_vadjustment().lower \
        and self.adjustment_value <= self.get_vadjustment().upper:
            self.get_vadjustment().set_value(self.adjustment_value)

but once its (notice that the >= and <= in the second but "<= and <=" in the
first. Is this a accident? I smells like this should be moved into a single
helper function.

        if self.adjustment_value is not None \
        and self.adjustment_value >= self.get_vadjustment().lower \
        and self.adjustment_value <= self.get_vadjustment().upper:
            self.get_vadjustment().set_value(self.adjustment_value)

The second part of the branch with the translation string clarifications is
great, but not quite suitable for 3.0 because we are in string freeze and this
would fuzzy existing translations. I will move it to trunk instead.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2010-09-11 01:48:19 +0000
+++ debian/changelog 2010-09-11 14:52:45 +0000
@@ -1,10 +1,18 @@
1software-center (2.1.18.2) UNRELEASED; urgency=low1software-center (2.1.18.2) UNRELEASED; urgency=low
22
3 [ Gary Lasker ]
3 * softwarecenter/view/widgets/mkit.py:4 * softwarecenter/view/widgets/mkit.py:
4 - fix crash during action_bar refresh (LP: #635044)5 - fix crash during action_bar refresh (LP: #635044)
5 * softwarecenter/backend/channel.py:6 * softwarecenter/backend/channel.py:
6 - always display the partner channel, even if its7 - always display the partner channel, even if its
7 source is not enabled (LP: #635003) 8 source is not enabled (LP: #635003)
9
10 [ Mohamed Amine IL Idrissi ]
11 * softwarecenter/apt/apthistory.py: History entries are now sorted by
12 date (LP: #635198)
13 * softwarecenter/view/historypane.py: Use 'updated' instead of
14 'upgraded' (LP: #635196)
15 * debian/control: depend on python-launchpadlib (LP: #634324)
816
9 -- Gary Lasker <gary.lasker@canonical.com> Fri, 10 Sep 2010 21:45:05 -040017 -- Gary Lasker <gary.lasker@canonical.com> Fri, 10 Sep 2010 21:45:05 -0400
1018
1119
=== modified file 'debian/control'
--- debian/control 2010-09-09 16:35:52 +0000
+++ debian/control 2010-09-11 14:52:45 +0000
@@ -39,7 +39,8 @@
39 python-gmenu,39 python-gmenu,
40 aptdaemon (>= 0.31),40 aptdaemon (>= 0.31),
41 python-lazr.restfulclient,41 python-lazr.restfulclient,
42 ubuntu-sso-client (>= 0.99.2)42 ubuntu-sso-client (>= 0.99.2),
43 python-launchpadlib
43Recommends: lsb-release, python-launchpad-integration, 44Recommends: lsb-release, python-launchpad-integration,
44 apt-xapian-index (>= 0.38ubuntu1), update-notifier,45 apt-xapian-index (>= 0.38ubuntu1), update-notifier,
45 software-properties-gtk, sessioninstaller46 software-properties-gtk, sessioninstaller
4647
=== modified file 'softwarecenter/apt/apthistory.py'
--- softwarecenter/apt/apthistory.py 2010-09-09 13:18:44 +0000
+++ softwarecenter/apt/apthistory.py 2010-09-11 14:52:45 +0000
@@ -73,6 +73,17 @@
73 return count73 return count
74 def __repr__(self):74 def __repr__(self):
75 return ('<Transaction: start_date:%s install:%s upgrade:%s downgrade:%s remove:%s purge:%s' % (self.start_date, self.install, self.upgrade, self.downgrade, self.remove, self.purge))75 return ('<Transaction: start_date:%s install:%s upgrade:%s downgrade:%s remove:%s purge:%s' % (self.start_date, self.install, self.upgrade, self.downgrade, self.remove, self.purge))
76 def __cmp__(self, other):
77 date_this = datetime(self.start_date.year, self.start_date.month,
78 self.start_date.day)
79 date_other = datetime(other.start_date.year, other.start_date.month,
80 other.start_date.day)
81 if date_this < date_other:
82 return -1
83 elif date_this == date_other:
84 return 0
85 else:
86 return 1
76 87
77class AptHistory(object):88class AptHistory(object):
7889
@@ -92,6 +103,8 @@
92 for history_gz_file in glob.glob(self.history_file+".*.gz"):103 for history_gz_file in glob.glob(self.history_file+".*.gz"):
93 self._scan(history_gz_file)104 self._scan(history_gz_file)
94 self._scan(self.history_file)105 self._scan(self.history_file)
106 self.transactions.sort()
107 self.transactions.reverse()
95 108
96 def _scan(self, history_file, rescan = False):109 def _scan(self, history_file, rescan = False):
97 try:110 try:
98111
=== modified file 'softwarecenter/view/appdetailsview_gtk.py'
--- softwarecenter/view/appdetailsview_gtk.py 2010-09-10 00:29:02 +0000
+++ softwarecenter/view/appdetailsview_gtk.py 2010-09-11 14:52:45 +0000
@@ -1019,6 +1019,7 @@
1019 AppDetailsViewBase.__init__(self, db, distro, icons, cache, history, datadir)1019 AppDetailsViewBase.__init__(self, db, distro, icons, cache, history, datadir)
1020 gtk.Viewport.__init__(self)1020 gtk.Viewport.__init__(self)
1021 self.set_shadow_type(gtk.SHADOW_NONE)1021 self.set_shadow_type(gtk.SHADOW_NONE)
1022 self.adjustment_value = None
10221023
1023 self.section = None1024 self.section = None
10241025
@@ -1152,6 +1153,10 @@
11521153
1153 def _full_redraw_cb(self):1154 def _full_redraw_cb(self):
1154 self.queue_draw()1155 self.queue_draw()
1156 if self.adjustment_value is not None \
1157 and self.adjustment_value >= self.get_vadjustment().lower \
1158 and self.adjustment_value <= self.get_vadjustment().upper:
1159 self.get_vadjustment().set_value(self.adjustment_value)
1155 return False1160 return False
11561161
1157 def _full_redraw(self):1162 def _full_redraw(self):
@@ -1170,6 +1175,10 @@
1170 # not to notice the temporary visual artefacts. Peace out.1175 # not to notice the temporary visual artefacts. Peace out.
11711176
1172 self.queue_draw()1177 self.queue_draw()
1178 if self.adjustment_value is not None \
1179 and self.adjustment_value >= self.get_vadjustment().lower \
1180 and self.adjustment_value <= self.get_vadjustment().upper:
1181 self.get_vadjustment().set_value(self.adjustment_value)
1173 gobject.idle_add(self._full_redraw_cb)1182 gobject.idle_add(self._full_redraw_cb)
1174 return1183 return
11751184
@@ -1457,9 +1466,9 @@
1457 self.action_bar.button.show()1466 self.action_bar.button.show()
1458 self.addons_bar.button_apply.set_sensitive(True)1467 self.addons_bar.button_apply.set_sensitive(True)
1459 self.addons_bar.button_cancel.set_sensitive(True)1468 self.addons_bar.button_cancel.set_sensitive(True)
1460
1461 self.addons_bar.configure()1469 self.addons_bar.configure()
14621470 self.adjustment_value = None
1471
1463 if self.addons_bar.applying:1472 if self.addons_bar.applying:
1464 self.addons_bar.applying = False1473 self.addons_bar.applying = False
1465 1474
@@ -1531,6 +1540,7 @@
1531 self.action_bar.progress.set_fraction(progress/100.0)1540 self.action_bar.progress.set_fraction(progress/100.0)
1532 if progress == 100:1541 if progress == 100:
1533 self.action_bar.progress.set_fraction(1)1542 self.action_bar.progress.set_fraction(1)
1543 self.adjustment_value = self.get_vadjustment().get_value()
1534 return1544 return
15351545
1536 def _show_prog_idle_cb(self):1546 def _show_prog_idle_cb(self):
15371547
=== modified file 'softwarecenter/view/availablepane.py'
--- softwarecenter/view/availablepane.py 2010-09-07 20:22:26 +0000
+++ softwarecenter/view/availablepane.py 2010-09-11 14:52:45 +0000
@@ -396,9 +396,9 @@
396 self.apps_search_term):396 self.apps_search_term):
397 appstore = self.app_view.get_model()397 appstore = self.app_view.get_model()
398 installable = appstore.installable_apps398 installable = appstore.installable_apps
399 button_text = gettext.ngettext("Install %s Item",399 button_text = gettext.ngettext("Install %(items_nbr)s Item",
400 "Install %s Items",400 "Install %(items_nbr)s Items",
401 len(installable)) % len(installable)401 len(installable)) % {'items_nbr': len(installable)}
402 button = self.action_bar.get_button(self._INSTALL_BTN_ID)402 button = self.action_bar.get_button(self._INSTALL_BTN_ID)
403 if button and installable:403 if button and installable:
404 # Install all already offered. Update offer.404 # Install all already offered. Update offer.
405405
=== modified file 'softwarecenter/view/historypane.py'
--- softwarecenter/view/historypane.py 2010-09-01 12:48:19 +0000
+++ softwarecenter/view/historypane.py 2010-09-11 14:52:45 +0000
@@ -269,7 +269,7 @@
269 elif action == self.REMOVED:269 elif action == self.REMOVED:
270 text = _('%s removed %s') % (pkg, when.time().strftime('%X'))270 text = _('%s removed %s') % (pkg, when.time().strftime('%X'))
271 elif action == self.UPGRADED:271 elif action == self.UPGRADED:
272 text = _('%s upgraded %s') % (pkg, when.time().strftime('%X'))272 text = _('%s updated %s') % (pkg, when.time().strftime('%X'))
273 elif isinstance(when, datetime.date):273 elif isinstance(when, datetime.date):
274 today = datetime.date.today()274 today = datetime.date.today()
275 monday = today - datetime.timedelta(days=today.weekday())275 monday = today - datetime.timedelta(days=today.weekday())

Subscribers

People subscribed via source and target branches