~ubuntu-branches/ubuntu/raring/software-center/raring-proposed

« back to all changes in this revision

Viewing changes to softwarecenter/db/categories.py

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2012-12-06 17:30:50 UTC
  • Revision ID: package-import@ubuntu.com-20121206173050-n7mxi5fzlsvtdh9l
Tags: 5.5.2
* lp:~mvo/software-center/fix-pygobject-deprecation-warnings:
  - fix deprecation warninings with the latest python-gi
* lp:~mvo/software-center/minor-logging-fixes:
  - drop some LOG.info() messages to LOG.debug() to spam the user
    less
* lp:~mvo/software-center/trivial-close-ui-tweak:
  - hide the main window immediately when closing down
* lp:~mvo/software-center/5.4-fix-save-person-to-config:
  - This branch ensures that the "username" is saved everytime
    that the ubuntu sso whoami call is done
* lp:~mvo/software-center/use-dpkg-builddeps:
  - use dpkg-checkbuilddeps to find test-dependencies
* lp:~mvo/software-center/update-sc-cmdline-flexibility:
  - update-software-center-agent: 
    + add --target-db-path commandline
  - update-software-center: 
    + add --app-install-desktop-dir and --target-db-path commandline
* lp:~mvo/software-center/raring-pep8:
  - fixes for new pep8

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
        "needs-refresh": (GObject.SIGNAL_RUN_LAST,
144
144
                          GObject.TYPE_NONE,
145
145
                          (),
146
 
                         ),
 
146
                          ),
147
147
        "recommender-agent-error": (GObject.SIGNAL_RUN_LAST,
148
148
                                    GObject.TYPE_NONE,
149
149
                                    (GObject.TYPE_STRING,),
150
 
                                   ),
151
 
        }
 
150
                                    ),
 
151
    }
152
152
 
153
153
    def __init__(self, db, subcategory=None):
154
154
        self.db = db
156
156
        if subcategory:
157
157
            # this is the set of recommendations for a given subcategory
158
158
            cat_title = u"Recommended For You in %s" % (
159
 
                                                 subcategory.untranslated_name)
 
159
                subcategory.untranslated_name)
160
160
            tr_title = utf8(_("Recommended For You in %s")) % utf8(
161
 
                                                              subcategory.name)
 
161
                subcategory.name)
162
162
        else:
163
163
            # this is the full set of recommendations for e.g. the lobby view
164
164
            cat_title = u"Recommended For You"
201
201
        "needs-refresh": (GObject.SIGNAL_RUN_LAST,
202
202
                          GObject.TYPE_NONE,
203
203
                          (),
204
 
                         ),
 
204
                          ),
205
205
        "recommender-agent-error": (GObject.SIGNAL_RUN_LAST,
206
206
                                    GObject.TYPE_NONE,
207
207
                                    (GObject.TYPE_STRING,),
208
 
                                   ),
209
 
        }
 
208
                                    ),
 
209
    }
210
210
 
211
211
    def __init__(self, db, pkgname):
212
212
        super(AppRecommendationsCategory, self).__init__(
213
 
                u"People Also Installed",
214
 
                _(u"People Also Installed"),
215
 
                None,
216
 
                xapian.Query(),
217
 
                flags=['available-only', 'not-installed-only'],
218
 
                item_limit=4)
 
213
            u"People Also Installed",
 
214
            _(u"People Also Installed"),
 
215
            None,
 
216
            xapian.Query(),
 
217
            flags=['available-only', 'not-installed-only'],
 
218
            item_limit=4)
219
219
        self.db = db
220
220
        self.recommender_agent = RecommenderAgent()
221
221
        self.recommender_agent.connect(
525
525
# static category mapping for the tiles
526
526
 
527
527
category_cat = {
528
 
'Utility': 'Accessories',
529
 
'System': 'Accessories',
530
 
'Education': 'Education',
531
 
'Game': 'Games',
532
 
'Sports': 'Games',
533
 
'Graphics': 'Graphics',
534
 
'Network': 'Internet',
535
 
'Office': 'Office',
536
 
'Science': 'Science & Engineering',
537
 
'Audio': 'Sound & Video',
538
 
'AudioVideo': 'Sound & Video',
539
 
'Video': 'Sound & Video',
540
 
'Settings': 'Themes & Tweaks',
541
 
'Accessibility': 'Universal Access',
542
 
'Development': 'Developer Tools',
543
 
'X-Publishing': 'Books & Magazines',
 
528
    'Utility': 'Accessories',
 
529
    'System': 'Accessories',
 
530
    'Education': 'Education',
 
531
    'Game': 'Games',
 
532
    'Sports': 'Games',
 
533
    'Graphics': 'Graphics',
 
534
    'Network': 'Internet',
 
535
    'Office': 'Office',
 
536
    'Science': 'Science & Engineering',
 
537
    'Audio': 'Sound & Video',
 
538
    'AudioVideo': 'Sound & Video',
 
539
    'Video': 'Sound & Video',
 
540
    'Settings': 'Themes & Tweaks',
 
541
    'Accessibility': 'Universal Access',
 
542
    'Development': 'Developer Tools',
 
543
    'X-Publishing': 'Books & Magazines',
544
544
}
545
545
 
546
546
category_subcat = {
547
 
'BoardGame': 'Games;Board Games',
548
 
'CardGame': 'Games;Card Games',
549
 
'LogicGame': 'Games;Puzzles',
550
 
'RolePlaying': 'Games;Role Playing',
551
 
'SportsGame': 'Games;Sports',
552
 
'3DGraphics': 'Graphics;3D Graphics',
553
 
'VectorGraphics': 'Graphics;Drawing',
554
 
'RasterGraphics': 'Graphics;Painting & Editing',
555
 
'Photography': 'Graphics;Photography',
556
 
'Publishing': 'Graphics;Publishing',
557
 
'Scanning': 'Graphics;Scanning & OCR',
558
 
'OCR': 'Graphics;Scanning & OCR',
559
 
'Viewer': 'Graphics;Viewers',
560
 
'InstantMessaging': 'Internet;Chat',
561
 
'IRCClient': 'Internet;Chat',
562
 
'FileTransfer': 'Internet;File Sharing',
563
 
'Email': 'Internet;Mail',
564
 
'WebBrowser': 'Internet;Web Browsers',
565
 
'Astronomy': 'Science & Engineering;Astronomy',
566
 
'Biology': 'Science & Engineering;Biology',
567
 
'Chemistry': 'Science & Engineering;Chemistry',
568
 
'ArtificialIntelligence': 'Science & Engineering;Computing & Robotics',
569
 
'ComputerScience': 'Science & Engineering;Computing & Robotics',
570
 
'Robotics': 'Science & Engineering;Computing & Robotics',
571
 
'Electronics': 'Science & Engineering;Electronics',
572
 
'Engineering': 'Science & Engineering;Engineering',
573
 
'Geography': 'Science & Engineering;Geography',
574
 
'Geology': 'Science & Engineering;Geology',
575
 
'Geoscience': 'Science & Engineering;Geology',
576
 
'DataVisualization': 'Science & Engineering;Mathematics',
577
 
'Math': 'Science & Engineering;Mathematics',
578
 
'NumericalAnalysis': 'Science & Engineering;Mathematics',
579
 
'MedicalSoftware': 'Science & Engineering;Medicine',
580
 
'Electricity': 'Science & Engineering;Physics',
581
 
'Physics': 'Science & Engineering;Physics',
582
 
'Debugger': 'Developer Tools;Debugging',
583
 
'GUIDesigner': 'Developer Tools;Graphic Interface Design',
584
 
'IDE': 'Developer Tools;IDEs',
585
 
'Translation': 'Developer Tools;Localization',
586
 
'Profiling': 'Developer Tools;Profiling',
587
 
'RevisionControl': 'Developer Tools;Version Control',
588
 
'WebDevelopment': 'Developer Tools;Web Development',
 
547
    'BoardGame': 'Games;Board Games',
 
548
    'CardGame': 'Games;Card Games',
 
549
    'LogicGame': 'Games;Puzzles',
 
550
    'RolePlaying': 'Games;Role Playing',
 
551
    'SportsGame': 'Games;Sports',
 
552
    '3DGraphics': 'Graphics;3D Graphics',
 
553
    'VectorGraphics': 'Graphics;Drawing',
 
554
    'RasterGraphics': 'Graphics;Painting & Editing',
 
555
    'Photography': 'Graphics;Photography',
 
556
    'Publishing': 'Graphics;Publishing',
 
557
    'Scanning': 'Graphics;Scanning & OCR',
 
558
    'OCR': 'Graphics;Scanning & OCR',
 
559
    'Viewer': 'Graphics;Viewers',
 
560
    'InstantMessaging': 'Internet;Chat',
 
561
    'IRCClient': 'Internet;Chat',
 
562
    'FileTransfer': 'Internet;File Sharing',
 
563
    'Email': 'Internet;Mail',
 
564
    'WebBrowser': 'Internet;Web Browsers',
 
565
    'Astronomy': 'Science & Engineering;Astronomy',
 
566
    'Biology': 'Science & Engineering;Biology',
 
567
    'Chemistry': 'Science & Engineering;Chemistry',
 
568
    'ArtificialIntelligence': 'Science & Engineering;Computing & Robotics',
 
569
    'ComputerScience': 'Science & Engineering;Computing & Robotics',
 
570
    'Robotics': 'Science & Engineering;Computing & Robotics',
 
571
    'Electronics': 'Science & Engineering;Electronics',
 
572
    'Engineering': 'Science & Engineering;Engineering',
 
573
    'Geography': 'Science & Engineering;Geography',
 
574
    'Geology': 'Science & Engineering;Geology',
 
575
    'Geoscience': 'Science & Engineering;Geology',
 
576
    'DataVisualization': 'Science & Engineering;Mathematics',
 
577
    'Math': 'Science & Engineering;Mathematics',
 
578
    'NumericalAnalysis': 'Science & Engineering;Mathematics',
 
579
    'MedicalSoftware': 'Science & Engineering;Medicine',
 
580
    'Electricity': 'Science & Engineering;Physics',
 
581
    'Physics': 'Science & Engineering;Physics',
 
582
    'Debugger': 'Developer Tools;Debugging',
 
583
    'GUIDesigner': 'Developer Tools;Graphic Interface Design',
 
584
    'IDE': 'Developer Tools;IDEs',
 
585
    'Translation': 'Developer Tools;Localization',
 
586
    'Profiling': 'Developer Tools;Profiling',
 
587
    'RevisionControl': 'Developer Tools;Version Control',
 
588
    'WebDevelopment': 'Developer Tools;Web Development',
589
589
}