|
a/GUI/prefs/prefs.cpp |
|
b/GUI/prefs/prefs.cpp |
|
... |
|
... |
76 |
|
76 |
|
77 |
// Close to tray ?
|
77 |
// Close to tray ?
|
78 |
m_w->addParam(idx, ConfTabsW::CFPT_BOOL, "min2tray", "Close to tray",
|
78 |
m_w->addParam(idx, ConfTabsW::CFPT_BOOL, "min2tray", "Close to tray",
|
79 |
"Minimize to tray instead of exiting when the main window "
|
79 |
"Minimize to tray instead of exiting when the main window "
|
80 |
"is closed");
|
80 |
"is closed");
|
|
|
81 |
|
|
|
82 |
// Show notifications ?
|
|
|
83 |
ConfParamW *wsn =
|
|
|
84 |
m_w->addParam(idx, ConfTabsW::CFPT_BOOL, "shownotifications",
|
|
|
85 |
"Show notifications",
|
|
|
86 |
"Show pop-up message in notification area when a "
|
|
|
87 |
"track starts playing");
|
81 |
#ifndef _WIN32
|
88 |
#ifndef _WIN32
|
82 |
// Show notifications ?
|
89 |
ConfParamW *wuncmd =
|
83 |
m_w->addParam(idx, ConfTabsW::CFPT_BOOL, "shownotifications",
|
90 |
m_w->addParam(idx, ConfTabsW::CFPT_BOOL, "usenotificationcmd",
|
84 |
"Show notifications",
|
91 |
"Use notification command (else use Qt)",
|
85 |
"Show pop-up message in notification area when a track "
|
92 |
"Choose whether to use the Qt notification mechanism "
|
86 |
"starts playing");
|
93 |
"or to execute a desktop command");
|
87 |
|
|
|
88 |
QSettings settings;
|
94 |
QSettings settings;
|
89 |
if (!settings.contains("notificationcmd")) {
|
95 |
if (!settings.contains("notificationcmd")) {
|
90 |
settings.setValue("notificationcmd",
|
96 |
settings.setValue("notificationcmd",
|
91 |
"notify-send --expire-time=500 --icon=upplay");
|
97 |
"notify-send --expire-time=1000 --icon=upplay");
|
92 |
}
|
98 |
}
|
|
|
99 |
ConfParamW *wncmd =
|
93 |
m_w->addParam(idx, ConfTabsW::CFPT_STR, "notificationcmd",
|
100 |
m_w->addParam(idx, ConfTabsW::CFPT_STR, "notificationcmd",
|
94 |
"Notification command",
|
101 |
"Notification command",
|
95 |
"Command to execute to notify. The message argument "
|
102 |
"Command to execute to notify. The message argument "
|
96 |
" will be appended");
|
103 |
" will be appended");
|
|
|
104 |
m_w->enableLink(wsn, wuncmd);
|
|
|
105 |
m_w->enableLink(wuncmd, wncmd);
|
97 |
#endif
|
106 |
#endif
|
98 |
|
107 |
|
99 |
// Truncate artist information in directory listings?
|
108 |
// Truncate artist information in directory listings?
|
100 |
ConfParamW *b1 =
|
109 |
ConfParamW *b1 =
|
101 |
m_w->addParam(idx, ConfTabsW::CFPT_BOOL, "truncateartistindir",
|
110 |
m_w->addParam(idx, ConfTabsW::CFPT_BOOL, "truncateartistindir",
|