~ubuntu-branches/ubuntu/natty/unity-2d/natty-updates

« back to all changes in this revision

Viewing changes to panel/app/main.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Oliver Grawert, Oliver Grawert, Aurélien Gâteau
  • Date: 2011-04-08 16:03:10 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20110408160310-yth7qb9kbgabkqk0
Tags: 3.8.2-0ubuntu1
[ Oliver Grawert ]
* New upstream bugfix release
 - (LP: #632526)  Dash elipsizes file and application names too soon, making them
   unreadable
 - (LP: #669926) [launcher] Web favorites support
 - (LP: #708479) Dash view should use "Prefferred Applications" icons where
   appropriate
 - (LP: #718686) [dash] Group of results sometimes badly positioned
 - (LP: #727483) unity-2d-panel crashed with SIGSEGV in g_return_if_fail_warning()
 - (LP: #731449) [launcher] Dragging a tile at the top of the launcher while
   autoscrolling makes autoscroll wrong afterwards
 - (LP: #736097) [dash] home screen misses icons for applications that are not
   installed
 - (LP: #744999) [launcher] launchers are truncated when too many items to fit
   onscreen
 - (LP: #745077) [spread] clicking launcher with open windows not working correctly
   across workspaces
 - (LP: #745237) [dash] search field default string not translated
 - (LP: #746693) [launcher] .places messages not i18nized
 - (LP: #747836) [dash] Banshee no longer works from the dash home page in 3.8.2
 - (LP: #750753) [dash] showing/hiding places causing graphical corruption
 - (LP: #670608) [dash] Home screen customization should be easy
 - (LP: #683084) Global menu doesn't work well with more than one screen
 - (LP: #714646) [launcher] icons jagged edges during animation
 - (LP: #717744) [panel] inactive menus are clickable
 - (LP: #729002) First four items in Dash begin "Find" "Find" "Find" "Find"
 - (LP: #745758) [spread] super+s should toggle the workspace switcher
 - (LP: #751284) [launcher] Escaping of title broken with webfavorites
 - (LP: #751325) [panel] circle of friends button icon needs to be updated to match
   Unity's
 - (LP: #697816) [launcher] if an urgent window is available then the spread should
   not be activated
 - (LP: #729478) [launcher] Clicking middle mouse button should launch another
   instance of application
 - (LP: #750244) [launcher] Newly installed lenses don’t appear
 - (LP: #752948) Home's "Shortcuts" not i18n/l10n

[ Aurélien Gâteau ]
* Include .mo files in unity-2d package (LP: #751425)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
// Local
23
23
#include <config.h>
24
 
 
25
 
// Applets
26
 
#include <appindicator/appindicatorapplet.h>
27
 
#include <appname/appnameapplet.h>
28
 
#include <homebutton/homebuttonapplet.h>
29
 
#include <indicator/indicatorapplet.h>
30
 
#include <legacytray/legacytrayapplet.h>
 
24
#include <panelmanager.h>
31
25
 
32
26
// Unity
33
27
#include <gnomesessionclient.h>
34
28
#include <unity2ddebug.h>
35
 
#include <unity2dpanel.h>
36
29
#include <unity2dapplication.h>
37
30
#include <unity2dstyle.h>
38
31
#include <unity2dtr.h>
41
34
#include <QAbstractFileEngineHandler>
42
35
#include <QApplication>
43
36
#include <QFSFileEngine>
44
 
#include <QLabel>
45
 
 
46
 
using namespace Unity2d;
47
37
 
48
38
class ThemeEngineHandler : public QAbstractFileEngineHandler
49
39
{
59
49
    }
60
50
};
61
51
 
62
 
QPalette getPalette()
63
 
{
64
 
    QPalette palette;
65
 
 
66
 
    /* Should use the panel's background provided by Unity but it turns
67
 
       out not to be good. It would look like:
68
 
 
69
 
         QBrush bg(QPixmap("theme:/panel_background.png"));
70
 
    */
71
 
    QBrush bg(QPixmap(unity2dDirectory() + "/panel/artwork/background.png"));
72
 
    palette.setBrush(QPalette::Window, bg);
73
 
    palette.setBrush(QPalette::Button, bg);
74
 
    palette.setColor(QPalette::WindowText, Qt::white);
75
 
    palette.setColor(QPalette::ButtonText, Qt::white);
76
 
    return palette;
77
 
}
78
 
 
79
 
QLabel* createSeparator()
80
 
{
81
 
    QLabel* label = new QLabel;
82
 
    QPixmap pix(unity2dDirectory() + "/panel/artwork/divider.png");
83
 
    label->setPixmap(pix);
84
 
    label->setFixedSize(pix.size());
85
 
    return label;
86
 
}
87
 
 
88
52
int main(int argc, char** argv)
89
53
{
90
54
    ThemeEngineHandler handler;
109
73
    /* Configure translations */
110
74
    Unity2dTr::init("unity-2d", INSTALL_PREFIX "/share/locale");
111
75
 
112
 
    Unity2dPanel panel;
113
 
    panel.setEdge(Unity2dPanel::TopEdge);
114
 
    panel.setPalette(getPalette());
115
 
    panel.setFixedHeight(24);
 
76
    PanelManager panels;
116
77
 
117
 
    panel.addWidget(new HomeButtonApplet);
118
 
    panel.addWidget(createSeparator());
119
 
    panel.addWidget(new AppNameApplet);
120
 
    panel.addWidget(new LegacyTrayApplet);
121
 
    panel.addWidget(new IndicatorApplet);
122
 
    panel.show();
123
78
    return app.exec();
124
79
}