[aseprite] 75/250: Use advanced_mode.xml.h in cmd_advanced_mode.cpp
Tobias Hansen
thansen at moszumanska.debian.org
Sun Dec 20 15:27:13 UTC 2015
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository aseprite.
commit d55017cd17689f347b70e1e65308ec26015da96d
Author: David Capello <davidcapello at gmail.com>
Date: Tue Sep 22 17:27:47 2015 -0300
Use advanced_mode.xml.h in cmd_advanced_mode.cpp
---
data/widgets/advanced_mode.xml | 4 ++--
src/app/commands/cmd_advanced_mode.cpp | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/data/widgets/advanced_mode.xml b/data/widgets/advanced_mode.xml
index ec0a605..30c5e2e 100644
--- a/data/widgets/advanced_mode.xml
+++ b/data/widgets/advanced_mode.xml
@@ -1,7 +1,7 @@
<!-- ASEPRITE -->
-<!-- Copyright (C) 2001-2013 by David Capello -->
+<!-- Copyright (C) 2001-2013, 2015 by David Capello -->
<gui>
-<window text="Warning - Important" id="advanced_mode_warning">
+<window text="Warning - Important" id="advanced_mode">
<grid columns="1">
<label text="You are going to enter in "Advanced Mode"." />
<label text="" id="warning_label" />
diff --git a/src/app/commands/cmd_advanced_mode.cpp b/src/app/commands/cmd_advanced_mode.cpp
index 6976799..85a4e5b 100644
--- a/src/app/commands/cmd_advanced_mode.cpp
+++ b/src/app/commands/cmd_advanced_mode.cpp
@@ -18,6 +18,8 @@
#include "app/ui/main_window.h"
#include "ui/ui.h"
+#include "advanced_mode.xml.h"
+
#include <cstdio>
namespace app {
@@ -65,16 +67,14 @@ void AdvancedModeCommand::onExecute(Context* context)
get_config_bool("AdvancedMode", "Warning", true)) {
Key* key = KeyboardShortcuts::instance()->command(this->id().c_str());
if (!key->accels().empty()) {
- base::UniquePtr<Window> window(app::load_widget<Window>("advanced_mode.xml", "advanced_mode_warning"));
- Widget* warning_label = app::find_widget<Widget>(window, "warning_label");
- Widget* donot_show = app::find_widget<Widget>(window, "donot_show");
+ app::gen::AdvancedMode window;
- warning_label->setTextf("You can go back pressing \"%s\" key.",
+ window.warningLabel()->setTextf("You can go back pressing \"%s\" key.",
key->accels().front().toString().c_str());
- window->openWindowInForeground();
+ window.openWindowInForeground();
- set_config_bool("AdvancedMode", "Warning", !donot_show->isSelected());
+ set_config_bool("AdvancedMode", "Warning", !window.donotShow()->isSelected());
}
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git
More information about the Pkg-games-commits
mailing list