mirror of
https://github.com/aseprite/aseprite.git
synced 2024-09-02 04:59:24 +00:00
Added CheckUpdates command.
This commit is contained in:
parent
b5944202f1
commit
c400ea0cd0
@ -310,6 +310,7 @@
|
||||
<item command="quick_reference" text="Quick &Reference" />
|
||||
<separator />
|
||||
<item command="donate" text="&Donate" />
|
||||
<item command="check_updates" text="&Check for New Version" />
|
||||
<separator />
|
||||
<item command="about" text="&About" />
|
||||
</menu>
|
||||
|
@ -22,6 +22,7 @@ COMMON_SOURCES = \
|
||||
src/commands/cmd_cel_properties.cpp \
|
||||
src/commands/cmd_change_color.cpp \
|
||||
src/commands/cmd_change_image_type.cpp \
|
||||
src/commands/cmd_check_updates.cpp \
|
||||
src/commands/cmd_clear.cpp \
|
||||
src/commands/cmd_close_file.cpp \
|
||||
src/commands/cmd_configure_screen.cpp \
|
||||
|
62
src/commands/cmd_check_updates.cpp
Normal file
62
src/commands/cmd_check_updates.cpp
Normal file
@ -0,0 +1,62 @@
|
||||
/* ASE - Allegro Sprite Editor
|
||||
* Copyright (C) 2001-2010 David Capello
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <allegro.h>
|
||||
|
||||
#include "commands/command.h"
|
||||
#include "launcher.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// about
|
||||
|
||||
class CheckUpdatesCommand : public Command
|
||||
{
|
||||
public:
|
||||
CheckUpdatesCommand();
|
||||
Command* clone() const { return new CheckUpdatesCommand(*this); }
|
||||
|
||||
protected:
|
||||
void execute(Context* context);
|
||||
};
|
||||
|
||||
CheckUpdatesCommand::CheckUpdatesCommand()
|
||||
: Command("check_updates",
|
||||
"Check for New Version",
|
||||
CmdUIOnlyFlag)
|
||||
{
|
||||
}
|
||||
|
||||
void CheckUpdatesCommand::execute(Context* context)
|
||||
{
|
||||
std::string url;
|
||||
url += WEBSITE;
|
||||
url += "update/?v=";
|
||||
url += VERSION; // ASE version
|
||||
|
||||
Launcher::openUrl(url);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// CommandFactory
|
||||
|
||||
Command* CommandFactory::create_check_updates_command()
|
||||
{
|
||||
return new CheckUpdatesCommand;
|
||||
}
|
@ -24,6 +24,7 @@ FOR_EACH_COMMAND(canvas_size)
|
||||
FOR_EACH_COMMAND(cel_properties)
|
||||
FOR_EACH_COMMAND(change_color)
|
||||
FOR_EACH_COMMAND(change_image_type)
|
||||
FOR_EACH_COMMAND(check_updates)
|
||||
FOR_EACH_COMMAND(clear)
|
||||
FOR_EACH_COMMAND(close_all_files)
|
||||
FOR_EACH_COMMAND(close_editor)
|
||||
|
Loading…
Reference in New Issue
Block a user