[aseprite] 74/250: Use the generated goto_frame.xml.h file in cmd_goto_frame.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 52d091810b9449a09bc124a30dead6750ade990f
Author: David Capello <davidcapello at gmail.com>
Date:   Tue Sep 22 17:25:48 2015 -0300

    Use the generated goto_frame.xml.h file in cmd_goto_frame.cpp
---
 src/app/commands/cmd_goto_frame.cpp | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/app/commands/cmd_goto_frame.cpp b/src/app/commands/cmd_goto_frame.cpp
index f92ebc2..1f98169 100644
--- a/src/app/commands/cmd_goto_frame.cpp
+++ b/src/app/commands/cmd_goto_frame.cpp
@@ -19,6 +19,8 @@
 #include "doc/sprite.h"
 #include "ui/window.h"
 
+#include "goto_frame.xml.h"
+
 namespace app {
 
 using namespace ui;
@@ -117,17 +119,15 @@ protected:
 
   frame_t onGetFrame(Editor* editor) override {
     if (m_frame == 0) {
-      base::UniquePtr<Window> window(app::load_widget<Window>("goto_frame.xml", "goto_frame"));
-      Widget* frame = app::find_widget<Widget>(window, "frame");
-      Widget* ok = app::find_widget<Widget>(window, "ok");
+      app::gen::GotoFrame window;
 
-      frame->setTextf("%d", editor->frame()+1);
+      window.frame()->setTextf("%d", editor->frame()+1);
 
-      window->openWindowInForeground();
-      if (window->getKiller() != ok)
+      window.openWindowInForeground();
+      if (window.getKiller() != window.ok())
         return editor->frame();
 
-      m_frame = frame->getTextInt();
+      m_frame = window.frame()->getTextInt();
     }
 
     return MID(0, m_frame-1, editor->sprite()->lastFrame());

-- 
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