#include "debuglogwidget.h"
#include "debugmessagemodelfilter.h"
#include "flatproxymodel.h"
#include "debuglogwidget.h"
#include "debugmessagemodelfilter.h"
#include "flatproxymodel.h"
- coll->addAction("ConnectCore", new Action(SmallIcon("network-connect"), tr("&Connect to Core..."), coll,
+ coll->addAction("ConnectCore", new Action(QIcon::fromTheme("network-connect"), tr("&Connect to Core..."), coll,
- coll->addAction("DisconnectCore", new Action(SmallIcon("network-disconnect"), tr("&Disconnect from Core"), coll,
+ coll->addAction("DisconnectCore", new Action(QIcon::fromTheme("network-disconnect"), tr("&Disconnect from Core"), coll,
- coll->addAction("CoreInfo", new Action(SmallIcon("help-about"), tr("Core &Info..."), coll,
+ coll->addAction("CoreInfo", new Action(QIcon::fromTheme("help-about"), tr("Core &Info..."), coll,
- coll->addAction("ConfigureNetworks", new Action(SmallIcon("configure"), tr("Configure &Networks..."), coll,
+ coll->addAction("ConfigureNetworks", new Action(QIcon::fromTheme("configure"), tr("Configure &Networks..."), coll,
this, SLOT(on_actionConfigureNetworks_triggered())));
// FIXME: use QKeySequence::Quit once we depend on Qt 4.6
this, SLOT(on_actionConfigureNetworks_triggered())));
// FIXME: use QKeySequence::Quit once we depend on Qt 4.6
- coll->addAction("Quit", new Action(SmallIcon("application-exit"), tr("&Quit"), coll,
+ coll->addAction("Quit", new Action(QIcon::fromTheme("application-exit"), tr("&Quit"), coll,
lockAct->setCheckable(true);
connect(lockAct, SIGNAL(toggled(bool)), SLOT(on_actionLockLayout_toggled(bool)));
lockAct->setCheckable(true);
connect(lockAct, SIGNAL(toggled(bool)), SLOT(on_actionLockLayout_toggled(bool)));
- coll->addAction("ToggleSearchBar", new Action(SmallIcon("edit-find"), tr("Show &Search Bar"), coll,
+ coll->addAction("ToggleSearchBar", new Action(QIcon::fromTheme("edit-find"), tr("Show &Search Bar"), coll,
0, 0, QKeySequence::Find))->setCheckable(true);
coll->addAction("ShowAwayLog", new Action(tr("Show Away Log"), coll,
this, SLOT(showAwayLog())));
0, 0, QKeySequence::Find))->setCheckable(true);
coll->addAction("ShowAwayLog", new Action(tr("Show Away Log"), coll,
this, SLOT(showAwayLog())));
- coll->addAction("ToggleMenuBar", new Action(SmallIcon("show-menu"), tr("Show &Menubar"), coll,
+ coll->addAction("ToggleMenuBar", new Action(QIcon::fromTheme("show-menu"), tr("Show &Menubar"), coll,
0, 0, QKeySequence(Qt::CTRL + Qt::Key_M)))->setCheckable(true);
coll->addAction("ToggleStatusBar", new Action(tr("Show Status &Bar"), coll,
0, 0))->setCheckable(true);
0, 0, QKeySequence(Qt::CTRL + Qt::Key_M)))->setCheckable(true);
coll->addAction("ToggleStatusBar", new Action(tr("Show Status &Bar"), coll,
0, 0))->setCheckable(true);
QAction *fullScreenAct = KStandardAction::fullScreen(this, SLOT(onFullScreenToggled()), this, coll);
#else
QAction *fullScreenAct = KStandardAction::fullScreen(this, SLOT(onFullScreenToggled()), this, coll);
#else
- QAction *fullScreenAct = new Action(SmallIcon("view-fullscreen"), tr("&Full Screen Mode"), coll,
+ QAction *fullScreenAct = new Action(QIcon::fromTheme("view-fullscreen"), tr("&Full Screen Mode"), coll,
this, SLOT(onFullScreenToggled()), QKeySequence(Qt::Key_F11));
fullScreenAct->setCheckable(true);
#endif
coll->addAction("ToggleFullScreen", fullScreenAct);
// Settings
this, SLOT(onFullScreenToggled()), QKeySequence(Qt::Key_F11));
fullScreenAct->setCheckable(true);
#endif
coll->addAction("ToggleFullScreen", fullScreenAct);
// Settings
- QAction *configureShortcutsAct = new Action(SmallIcon("configure-shortcuts"), tr("Configure &Shortcuts..."), coll,
+ QAction *configureShortcutsAct = new Action(QIcon::fromTheme("configure-shortcuts"), tr("Configure &Shortcuts..."), coll,
this, SLOT(showShortcutsDlg()));
configureShortcutsAct->setMenuRole(QAction::NoRole);
coll->addAction("ConfigureShortcuts", configureShortcutsAct);
this, SLOT(showShortcutsDlg()));
configureShortcutsAct->setMenuRole(QAction::NoRole);
coll->addAction("ConfigureShortcuts", configureShortcutsAct);
- #ifdef Q_OS_MAC
- QAction *configureQuasselAct = new Action(SmallIcon("configure"), tr("&Configure Quassel..."), coll,
+#ifdef Q_OS_MAC
+ QAction *configureQuasselAct = new Action(QIcon::fromTheme("configure"), tr("&Configure Quassel..."), coll,
this, SLOT(showSettingsDlg()));
configureQuasselAct->setMenuRole(QAction::PreferencesRole);
this, SLOT(showSettingsDlg()));
configureQuasselAct->setMenuRole(QAction::PreferencesRole);
- #else
- QAction *configureQuasselAct = new Action(SmallIcon("configure"), tr("&Configure Quassel..."), coll,
+#else
+ QAction *configureQuasselAct = new Action(QIcon::fromTheme("configure"), tr("&Configure Quassel..."), coll,
- QAction *aboutQuasselAct = new Action(SmallIcon("quassel"), tr("&About Quassel"), coll,
+ QAction *aboutQuasselAct = new Action(QIcon(":/icons/quassel.png"), tr("&About Quassel"), coll,
this, SLOT(showAboutDlg()));
aboutQuasselAct->setMenuRole(QAction::AboutRole);
coll->addAction("AboutQuassel", aboutQuasselAct);
this, SLOT(showAboutDlg()));
aboutQuasselAct->setMenuRole(QAction::AboutRole);
coll->addAction("AboutQuassel", aboutQuasselAct);
qApp, SLOT(aboutQt()));
aboutQtAct->setMenuRole(QAction::AboutQtRole);
coll->addAction("AboutQt", aboutQtAct);
qApp, SLOT(aboutQt()));
aboutQtAct->setMenuRole(QAction::AboutQtRole);
coll->addAction("AboutQt", aboutQtAct);
- coll->addAction("DebugNetworkModel", new Action(SmallIcon("tools-report-bug"), tr("Debug &NetworkModel"), coll,
+ coll->addAction("DebugNetworkModel", new Action(QIcon::fromTheme("tools-report-bug"), tr("Debug &NetworkModel"), coll,
- coll->addAction("DebugBufferViewOverlay", new Action(SmallIcon("tools-report-bug"), tr("Debug &BufferViewOverlay"), coll,
+ coll->addAction("DebugBufferViewOverlay", new Action(QIcon::fromTheme("tools-report-bug"), tr("Debug &BufferViewOverlay"), coll,
- coll->addAction("DebugMessageModel", new Action(SmallIcon("tools-report-bug"), tr("Debug &MessageModel"), coll,
+ coll->addAction("DebugMessageModel", new Action(QIcon::fromTheme("tools-report-bug"), tr("Debug &MessageModel"), coll,
- coll->addAction("DebugHotList", new Action(SmallIcon("tools-report-bug"), tr("Debug &HotList"), coll,
+ coll->addAction("DebugHotList", new Action(QIcon::fromTheme("tools-report-bug"), tr("Debug &HotList"), coll,
- coll->addAction("DebugLog", new Action(SmallIcon("tools-report-bug"), tr("Debug &Log"), coll,
+ coll->addAction("DebugLog", new Action(QIcon::fromTheme("tools-report-bug"), tr("Debug &Log"), coll,
- coll->addAction("ReloadStyle", new Action(SmallIcon("view-refresh"), tr("Reload Stylesheet"), coll,
+ coll->addAction("ReloadStyle", new Action(QIcon::fromTheme("view-refresh"), tr("Reload Stylesheet"), coll,
QtUi::style(), SLOT(reload()), QKeySequence::Refresh));
coll->addAction("HideCurrentBuffer", new Action(tr("Hide Current Buffer"), coll,
QtUi::style(), SLOT(reload()), QKeySequence::Refresh));
coll->addAction("HideCurrentBuffer", new Action(tr("Hide Current Buffer"), coll,
- coll->addAction("NextBufferView", new Action(SmallIcon("go-next-view"), tr("Activate Next Chat List"), coll,
+ coll->addAction("NextBufferView", new Action(QIcon::fromTheme("go-next-view"), tr("Activate Next Chat List"), coll,
- coll->addAction("PreviousBufferView", new Action(SmallIcon("go-previous-view"), tr("Activate Previous Chat List"), coll,
+ coll->addAction("PreviousBufferView", new Action(QIcon::fromTheme("go-previous-view"), tr("Activate Previous Chat List"), coll,
- coll->addAction("NextBuffer", new Action(SmallIcon("go-down"), tr("Go to Next Chat"), coll,
+ coll->addAction("NextBuffer", new Action(QIcon::fromTheme("go-down"), tr("Go to Next Chat"), coll,
- coll->addAction("PreviousBuffer", new Action(SmallIcon("go-up"), tr("Go to Previous Chat"), coll,
+ coll->addAction("PreviousBuffer", new Action(QIcon::fromTheme("go-up"), tr("Go to Previous Chat"), coll,
_settingsMenu->addAction(coll->action("ConfigureQuassel"));
_helpMenu = menuBar()->addMenu(tr("&Help"));
_settingsMenu->addAction(coll->action("ConfigureQuassel"));
_helpMenu = menuBar()->addMenu(tr("&Help"));
_helpMenu->addAction(KStandardAction::aboutKDE(_kHelpMenu, SLOT(aboutKDE()), this));
#endif
_helpMenu->addSeparator();
_helpMenu->addAction(KStandardAction::aboutKDE(_kHelpMenu, SLOT(aboutKDE()), this));
#endif
_helpMenu->addSeparator();
_helpDebugMenu->addAction(coll->action("DebugNetworkModel"));
_helpDebugMenu->addAction(coll->action("DebugBufferViewOverlay"));
_helpDebugMenu->addAction(coll->action("DebugMessageModel"));
_helpDebugMenu->addAction(coll->action("DebugNetworkModel"));
_helpDebugMenu->addAction(coll->action("DebugBufferViewOverlay"));
_helpDebugMenu->addAction(coll->action("DebugMessageModel"));
_mainToolBar = new KToolBar("MainToolBar", this, Qt::TopToolBarArea, false, true, true);
#else
_mainToolBar = new QToolBar(this);
_mainToolBar = new KToolBar("MainToolBar", this, Qt::TopToolBarArea, false, true, true);
#else
_mainToolBar = new QToolBar(this);
KShortcutsDialog dlg(KShortcutsEditor::AllActions, KShortcutsEditor::LetterShortcutsDisallowed, this);
foreach(KActionCollection *coll, QtUi::actionCollections())
dlg.addCollection(coll, coll->property("Category").toString());
KShortcutsDialog dlg(KShortcutsEditor::AllActions, KShortcutsEditor::LetterShortcutsDisallowed, this);
foreach(KActionCollection *coll, QtUi::actionCollections())
dlg.addCollection(coll, coll->property("Category").toString());
KToggleFullScreenAction *kAct = static_cast<KToggleFullScreenAction *>(action);
kAct->setFullScreen(this, kAct->isChecked());
#else
KToggleFullScreenAction *kAct = static_cast<KToggleFullScreenAction *>(action);
kAct->setFullScreen(this, kAct->isChecked());
#else
// if we have no currently selected buffer, jump to the first connecting statusbuffer
if (!bufferWidget()->currentBuffer().isValid()) {
QModelIndex idx = Client::networkModel()->networkIndex(net->networkId());
// if we have no currently selected buffer, jump to the first connecting statusbuffer
if (!bufferWidget()->currentBuffer().isValid()) {
QModelIndex idx = Client::networkModel()->networkIndex(net->networkId());