Skip to content

Commit 7649be9

Browse files
committed
disable windows desktop notification
1 parent b58c6e7 commit 7649be9

3 files changed

Lines changed: 30 additions & 29 deletions

File tree

src/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ GetSources("wesnoth" wesnoth_sources)
6868

6969
if(WIN32)
7070
set(wesnoth_core_sources ${wesnoth_core_sources} log_windows.cpp)
71-
set(wesnoth_game_sources ${wesnoth_game_sources} desktop/windows_tray_notification.cpp desktop/windows_battery_info.cpp)
71+
#set(wesnoth_game_sources ${wesnoth_game_sources} desktop/windows_tray_notification.cpp desktop/windows_battery_info.cpp)
72+
set(wesnoth_game_sources ${wesnoth_game_sources} desktop/windows_battery_info.cpp)
7273
endif()
7374

7475
# On apple only

src/desktop/notifications.cpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
#include "desktop/apple_notification.hpp"
2828
#endif
2929

30-
#ifdef _WIN32
31-
#include "desktop/windows_tray_notification.hpp"
32-
#endif
30+
// #ifdef _WIN32
31+
// #include "desktop/windows_tray_notification.hpp"
32+
// #endif
3333

3434
namespace desktop {
3535

@@ -68,24 +68,24 @@ void send(const std::string& owner, const std::string& message, type t)
6868
apple_notifications::send_notification(owner, message, t);
6969
#endif
7070

71-
#ifdef _WIN32
72-
std::string notification_title;
73-
std::string notification_message;
74-
75-
switch (t) {
76-
case CHAT:
77-
notification_title = _("Chat message");
78-
notification_message = owner + ": " + message;
79-
break;
80-
case TURN_CHANGED:
81-
case OTHER:
82-
notification_title = owner;
83-
notification_message = message;
84-
break;
85-
}
86-
87-
windows_tray_notification::show(notification_title, notification_message);
88-
#endif
71+
// #ifdef _WIN32
72+
// std::string notification_title;
73+
// std::string notification_message;
74+
75+
// switch (t) {
76+
// case CHAT:
77+
// notification_title = _("Chat message");
78+
// notification_message = owner + ": " + message;
79+
// break;
80+
// case TURN_CHANGED:
81+
// case OTHER:
82+
// notification_title = owner;
83+
// notification_message = message;
84+
// break;
85+
// }
86+
87+
// windows_tray_notification::show(notification_title, notification_message);
88+
// #endif
8989
}
9090
#endif //end #else (defined(HAVE_LIBDBUS) || defined(_WIN32))
9191

src/events.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
#include "utils/general.hpp"
2727
#include "video.hpp"
2828

29-
#if defined _WIN32
30-
#include "desktop/windows_tray_notification.hpp"
31-
#endif
29+
// #if defined _WIN32
30+
// #include "desktop/windows_tray_notification.hpp"
31+
// #endif
3232

3333
#include <algorithm>
3434
#include <cassert>
@@ -671,10 +671,10 @@ void pump()
671671
#ifdef _WIN32
672672
// TODO SDL3: needs to be replaced with https://wiki.libsdl.org/SDL3/SDL_SetWindowsMessageHook
673673
// syswm stuff has been removed overall, so windows_tray_notification::handle_system_event is also generally invalid
674-
case SDL_SYSWMEVENT: {
675-
windows_tray_notification::handle_system_event(event);
676-
break;
677-
}
674+
// case SDL_SYSWMEVENT: {
675+
// windows_tray_notification::handle_system_event(event);
676+
// break;
677+
// }
678678
#endif
679679

680680
case SDL_EVENT_QUIT: {

0 commit comments

Comments
 (0)