Skip to content

Commit

Permalink
Qt UI:
Browse files Browse the repository at this point in the history
* improvements for Mac OS X: change program icon in dock
  when there are new unread personal messages.
* add big icons: eiskaltdcpp logo + envelope
  • Loading branch information
tehnick committed Jul 12, 2013
1 parent 42e7f76 commit 4610a35
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 7 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added eiskaltdcpp-qt/icons/appl/faenza/icon_msg_big.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions eiskaltdcpp-qt/src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1896,9 +1896,9 @@ void MainWindow::redrawToolPanel(){
#else // !defined(Q_WS_MAC)
// Change program icon in dock when there are new unread personal messages.
if (has_unread)
this->setWindowIcon(WICON(WulforUtil::eiMESSAGE_TRAY_ICON));
qApp->setWindowIcon(WICON(WulforUtil::eiMESSAGE_TRAY_ICON));
else
this->setWindowIcon(WICON(WulforUtil::eiICON_APPL));
qApp->setWindowIcon(WICON(WulforUtil::eiICON_APPL));
#endif // !defined(Q_WS_MAC)

emit redrawWidgetPanels();
Expand Down
6 changes: 2 additions & 4 deletions eiskaltdcpp-qt/src/Notification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,8 @@ void Notification::showMessage(int t, const QString &title, const QString &msg){
break;

#if defined(Q_WS_MAC)
MainWindow::getInstance()->setWindowIcon(WICON(WulforUtil::eiMESSAGE_TRAY_ICON));

if (MainWindow::getInstance()->isVisible())
QApplication::alert(MainWindow::getInstance(), 0);
qApp->setWindowIcon(WICON(WulforUtil::eiMESSAGE_TRAY_ICON));
qApp->alert(MainWindow::getInstance(), 0);
#else // defined(Q_WS_MAC)
if (tray && t == PM && (!MainWindow::getInstance()->isVisible() || WBGET(WB_NOTIFY_CH_ICON_ALWAYS))){
tray->setIcon(WICON(WulforUtil::eiMESSAGE_TRAY_ICON));
Expand Down
2 changes: 1 addition & 1 deletion eiskaltdcpp-qt/src/WulforUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ bool WulforUtil::loadIcons(){
m_PixmapMap[eiHUBMSG] = FROMTHEME("hubmsg", resourceFound);
m_PixmapMap[eiICON_APPL] = FROMTHEME_SIDE("icon_appl_big", resourceFound, 128);
m_PixmapMap[eiMESSAGE] = FROMTHEME("message", resourceFound);
m_PixmapMap[eiMESSAGE_TRAY_ICON] = FROMTHEME("icon_msg", resourceFound);
m_PixmapMap[eiMESSAGE_TRAY_ICON] = FROMTHEME("icon_msg_big", resourceFound);
m_PixmapMap[eiOWN_FILELIST] = FROMTHEME("own_filelist", resourceFound);
m_PixmapMap[eiOPENLIST] = FROMTHEME("openlist", resourceFound);
m_PixmapMap[eiOPEN_LOG_FILE]= FROMTHEME("log_file", resourceFound);
Expand Down

0 comments on commit 4610a35

Please sign in to comment.