mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-06 06:58:15 +00:00
Fix compilation when !ENABLE_UI
This commit is contained in:
parent
14c046573a
commit
afefac73bd
@ -1,5 +1,5 @@
|
||||
# Aseprite
|
||||
# Copyright (C) 2018-2019 Igara Studio S.A.
|
||||
# Copyright (C) 2018-2020 Igara Studio S.A.
|
||||
# Copyright (C) 2001-2018 David Capello
|
||||
|
||||
# Generate a ui::Widget for each widget in a XML file
|
||||
@ -300,7 +300,6 @@ if(ENABLE_UI)
|
||||
modules/editors.cpp
|
||||
modules/gfx.cpp
|
||||
modules/gui.cpp
|
||||
send_crash.cpp
|
||||
ui/app_menuitem.cpp
|
||||
ui/backup_indicator.cpp
|
||||
ui/browser_view.cpp
|
||||
@ -571,6 +570,7 @@ add_library(app-lib
|
||||
res/resources_loader.cpp
|
||||
resource_finder.cpp
|
||||
restore_visible_layers.cpp
|
||||
send_crash.cpp
|
||||
shade.cpp
|
||||
site.cpp
|
||||
snap_to_grid.cpp
|
||||
|
@ -59,7 +59,9 @@ void SendCrash::search()
|
||||
base::is_file(m_dumpFilename)) {
|
||||
auto app = App::instance();
|
||||
app->memoryDumpFilename(m_dumpFilename);
|
||||
#ifdef ENABLE_UI
|
||||
app->showNotification(this);
|
||||
#endif
|
||||
}
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
@ -93,7 +95,9 @@ void SendCrash::search()
|
||||
m_dumpFilename = fn;
|
||||
if (auto app = App::instance()) {
|
||||
app->memoryDumpFilename(fn);
|
||||
#ifdef ENABLE_UI
|
||||
app->showNotification(this);
|
||||
#endif
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -104,6 +108,8 @@ void SendCrash::search()
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef ENABLE_UI
|
||||
|
||||
std::string SendCrash::notificationText()
|
||||
{
|
||||
return "Report last crash";
|
||||
@ -163,4 +169,6 @@ void SendCrash::onClickDevFilename()
|
||||
base::launcher::open_file(m_dumpFilename);
|
||||
}
|
||||
|
||||
#endif // ENABLE_UI
|
||||
|
||||
} // namespace app
|
||||
|
@ -16,7 +16,11 @@
|
||||
|
||||
namespace app {
|
||||
|
||||
class SendCrash : public INotificationDelegate {
|
||||
class SendCrash
|
||||
#ifdef ENABLE_UI
|
||||
: public INotificationDelegate
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
static std::string DefaultMemoryDumpFilename();
|
||||
|
||||
@ -24,13 +28,17 @@ namespace app {
|
||||
|
||||
void search();
|
||||
|
||||
#ifdef ENABLE_UI
|
||||
public: // INotificationDelegate impl
|
||||
virtual std::string notificationText() override;
|
||||
virtual void notificationClick() override;
|
||||
|
||||
private:
|
||||
void onClickFilename();
|
||||
void onClickDevFilename();
|
||||
#endif // ENABLE_UI
|
||||
|
||||
private:
|
||||
Task m_task;
|
||||
std::string m_dumpFilename;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user