mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 19:20:09 +00:00
Show current sprite's filename in window title bar.
This commit is contained in:
parent
6a64fa311f
commit
85e75122b5
@ -292,9 +292,6 @@ int init_module_gui()
|
||||
|
||||
gfx_done:;
|
||||
|
||||
/* window title */
|
||||
set_window_title(PACKAGE " v" VERSION);
|
||||
|
||||
/* create the default-manager */
|
||||
manager = jmanager_new();
|
||||
jwidget_add_hook(manager, JI_WIDGET, manager_msg_proc, NULL);
|
||||
|
@ -19,8 +19,10 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <allegro/file.h>
|
||||
#include <allegro/system.h>
|
||||
|
||||
#include "app.h"
|
||||
#include "base/path.h"
|
||||
#include "modules/editors.h"
|
||||
#include "raster/sprite.h"
|
||||
#include "settings/ui_settings_impl.h"
|
||||
@ -71,9 +73,19 @@ void UIContext::on_remove_sprite(Sprite* sprite)
|
||||
|
||||
void UIContext::on_set_current_sprite(Sprite* sprite)
|
||||
{
|
||||
// base method
|
||||
Context::on_set_current_sprite(sprite);
|
||||
|
||||
// select the sprite in the tabs
|
||||
// Select the sprite in the tabs.
|
||||
app_get_tabsbar()->selectTab(sprite);
|
||||
|
||||
// Change the main frame title.
|
||||
base::string defaultTitle = PACKAGE " v" VERSION;
|
||||
base::string title;
|
||||
if (sprite) {
|
||||
// Prepend the sprite's filename.
|
||||
title += base::get_file_name(sprite->getFilename());
|
||||
title += " - ";
|
||||
}
|
||||
title += defaultTitle;
|
||||
set_window_title(title.c_str());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user