~ubuntu-branches/ubuntu/trusty/software-center/trusty

« back to all changes in this revision

Viewing changes to softwarecenter/ui/gtk3/widgets/apptreeview.py

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2012-12-18 09:30:13 UTC
  • Revision ID: package-import@ubuntu.com-20121218093013-fte692633i35ok59
Tags: 5.5.3
* lp:~mvo/software-center/pep8-e125:
  - more pep8 fixes with the rarning pep8 release (issue E125)
* lp:~mvo/software-center/support-size-from-agent:
  - Support showing the download size if the software-center-agent 
    provides it
* lp:~mvo/software-center/fix-removal-warning-metapackages:
  - Fixes a missing warning when a metapackage like "ubuntu-desktop"
    is marked for removal directly
* lp:~mvo/software-center/webapps-activation:
  - add support to activate webapps automatically on install

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
        if old is not None:
172
172
            start, end = self.get_visible_range() or (None, None)
173
173
            if ((start and start.compare(old) != -1) or
174
 
                (end and end.compare(old) != 1)):
 
174
                    (end and end.compare(old) != 1)):
175
175
                self._needs_collapse.append(old)
176
176
            else:
177
177
                try:  # try... a lazy solution to Bug #846204
263
263
        model = tree.get_model()
264
264
        app = model[path[0]][AppGenericStore.COL_ROW_DATA]
265
265
        if (not network_state_is_connected() and
266
 
            not self.appmodel.is_installed(app)):
 
266
                not self.appmodel.is_installed(app)):
267
267
            for btn_id in self.ACTION_BTNS:
268
268
                btn_id = tr.get_button_by_name(CellButtonIDs.ACTION)
269
269
                btn_id.set_sensitive(False)
437
437
        x, y = int(event.x), int(event.y)
438
438
        for btn in tr.get_buttons():
439
439
            if (btn.point_in(x, y) and
440
 
                (btn.state != Gtk.StateFlags.INSENSITIVE)):
 
440
                    (btn.state != Gtk.StateFlags.INSENSITIVE)):
441
441
                self.focal_btn = btn
442
442
                btn.set_state(Gtk.StateFlags.ACTIVE)
443
443
                view.queue_draw()
453
453
        x, y = int(event.x), int(event.y)
454
454
        for btn in tr.get_buttons():
455
455
            if (btn.point_in(x, y) and
456
 
                (btn.state != Gtk.StateFlags.INSENSITIVE)):
 
456
                    (btn.state != Gtk.StateFlags.INSENSITIVE)):
457
457
                btn.set_state(Gtk.StateFlags.NORMAL)
458
458
                self.get_window().set_cursor(self._cursor_hand)
459
459
                if self.focal_btn is not btn:
485
485
        elif kv == Gdk.KEY_space:  # spacebar
486
486
            for btn in tr.get_buttons():
487
487
                if (btn is not None and btn.has_focus and
488
 
                    btn.state != Gtk.StateFlags.INSENSITIVE):
 
488
                        btn.state != Gtk.StateFlags.INSENSITIVE):
489
489
                    btn.set_state(Gtk.StateFlags.ACTIVE)
490
490
                    sel = self.get_selection()
491
491
                    model, it = sel.get_selected()
607
607
                window.set_cursor(cursor)
608
608
 
609
609
    def _on_transaction_started(self, backend, pkgname, appname, trans_id,
610
 
        trans_type, tr):
 
610
                                trans_type, tr):
611
611
        """callback when an application install/remove transaction has
612
612
        started
613
613
        """