~mmcg069/software-center/Bug846204

« back to all changes in this revision

Viewing changes to softwarecenter/ui/gtk3/panes/installedpane.py

  • Committer: Matthew McGowan
  • Date: 2011-09-20 20:53:11 UTC
  • mfrom: (2362.10.2 trunk)
  • mto: This revision was merged to the branch mainline in revision 2397.
  • Revision ID: matthew.joseph.mcgowan@gmail.com-20110920205311-lrdoiz3l4su2wu44
merge w trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
    """
71
71
 
72
72
    class Pages(SoftwarePane.Pages):
73
 
        # page names, useful for debuggin
 
73
        # page names, useful for debugging
74
74
        NAMES = ('list', 'details')
75
75
        # the actual page id's
76
76
        (LIST,
117
117
        
118
118
        # show a busy cursor and display the main spinner while we build the view
119
119
        window = self.get_window()
120
 
        window.set_cursor(self.busy_cursor)
 
120
        if window:
 
121
            window.set_cursor(self.busy_cursor)
121
122
        self.spinner_view.start()
122
123
        self.spinner_notebook.set_current_page(InstalledPane.Pages.SPINNER)
123
124
        
188
189
        self.installed_spinner_notebook.set_show_tabs(False)
189
190
        self.installed_spinner_notebook.set_show_border(False)
190
191
        self.installed_spinner_notebook.append_page(self.installed_spinner_view, None)
191
 
        # FIXME: could use some refactoring with SoftwarePane to avoid reparenting
192
 
        self.app_view.reparent(self.installed_spinner_notebook)
 
192
        self.box_app_list.remove(self.app_view)
193
193
        self.installed_spinner_notebook.append_page(self.app_view, None)
194
194
        
195
195
        self.computerpane.pack2(self.installed_spinner_notebook, True, True)
279
279
        
280
280
        # display the busy cursor and a local spinner while we build the view
281
281
        window = self.get_window()
282
 
        window.set_cursor(self.busy_cursor)
 
282
        if window:
 
283
            window.set_cursor(self.busy_cursor)
283
284
        self.installed_spinner_view.start()
284
285
        self.installed_spinner_notebook.set_current_page(self.PAGE_SPINNER)
285
286
        
357
358
            self.spinner_notebook.set_current_page(InstalledPane.Pages.APPVIEW)
358
359
            self.spinner_view.stop()
359
360
            
360
 
            window = self.get_window()
361
 
            window.set_cursor(None)
 
361
            if window:
 
362
                window.set_cursor(None)
362
363
            
363
364
            # reapply search if needed
364
365
            if self.state.search_term:
375
376
        
376
377
        # display the busy cursor and the local spinner while we build the view
377
378
        window = self.get_window()
378
 
        window.set_cursor(self.busy_cursor)
 
379
        if window:
 
380
            window.set_cursor(self.busy_cursor)
379
381
        self.installed_spinner_view.start()
380
382
        self.installed_spinner_notebook.set_current_page(self.PAGE_SPINNER)
381
383
        
402
404
                          sortmode=SortMethods.BY_ALPHABET,
403
405
                          nonapps_visible=self.nonapps_visible,
404
406
                          filter=xfilter,
405
 
                          nonblocking_load=True,
 
407
                          nonblocking_load=True, # we don't block this one for better oneconf responsiveness
406
408
                          persistent_duplicate_filter=(i>0))
407
409
 
408
410
            L = len(enq.matches)
453
455
            self.installed_spinner_notebook.set_current_page(self.PAGE_INSTALLED)
454
456
            self.installed_spinner_view.stop()
455
457
            
456
 
            window = self.get_window()
457
 
            window.set_cursor(None)
 
458
            if window:
 
459
                window.set_cursor(None)
458
460
            
459
461
            self.emit("app-list-changed", i)
460
462
            return