Moved data/jids/*.jid files to data/widgets/*.xml.

This commit is contained in:
David Capello 2010-04-06 22:14:33 -03:00
parent 5ea607d801
commit c5442abcba
49 changed files with 39 additions and 48 deletions

View File

@ -1,17 +0,0 @@
<!-- ASE - Allegro Sprite Editor -->
<!-- Copyright (C) 2001-2009 by David Capello -->
<jinete>
<window text="Color Curve" name="color_curve">
<box vertical="true">
<box horizontal="true" expansive="true">
<view expansive="true" name="curve" /><!-- custom widget -->
<box vertical="true">
<button text="&amp;OK" name="button_ok" magnetic="true" />
<button text="&amp;Cancel" />
<box name="target" />
<check text="&amp;Preview" name="preview" />
</box>
</box>
</box>
</window>
</jinete>

View File

@ -1,6 +1,19 @@
<!-- ASE - Allegro Sprite Editor -->
<!-- Copyright (C) 2001-2009 by David Capello -->
<jinete>
<window text="Color Curve" name="color_curve">
<box vertical="true">
<box horizontal="true" expansive="true">
<view expansive="true" name="curve" /><!-- custom widget -->
<box vertical="true">
<button text="&amp;OK" name="button_ok" magnetic="true" />
<button text="&amp;Cancel" />
<box name="target" />
<check text="&amp;Preview" name="preview" />
</box>
</box>
</box>
</window>
<window text="Point Properties" name="point_properties">
<box vertical="true">
<box horizontal="true" expansive="true">

View File

@ -157,12 +157,7 @@ int App::run()
jmanager_refresh_screen();
// load main window
top_window = static_cast<Frame*>(load_widget("main.jid", "main_window"));
if (!top_window) {
allegro_message("Error loading data data/jids/main.jid file.\n"
"You have to reinstall the program.\n");
return 1;
}
top_window = static_cast<Frame*>(load_widget("main_window.xml", "main_window"));
box_menubar = jwidget_find_name(top_window, "menubar");
box_editors = jwidget_find_name(top_window, "editor");

View File

@ -78,7 +78,7 @@ void AdvancedModeCommand::execute(Context* context)
char key[1024];
char buf[1024];
FramePtr window(load_widget("advanced.jid", "advanced_mode_warning"));
FramePtr window(load_widget("advanced_mode.xml", "advanced_mode_warning"));
Widget* warning_label = find_widget(window, "warning_label");
Widget* donot_show = find_widget(window, "donot_show");

View File

@ -66,7 +66,7 @@ void CanvasSizeCommand::execute(Context* context)
JWidget left, top, right, bottom, ok;
// load the window widget
FramePtr window(load_widget("canvas.jid", "canvas_size"));
FramePtr window(load_widget("canvas_size.xml", "canvas_size"));
get_widgets(window,
"left", &left,
"top", &top,

View File

@ -74,7 +74,7 @@ void CelPropertiesCommand::execute(Context* context)
// Get current cel (can be NULL)
const Cel* cel = static_cast<const LayerImage*>(layer)->get_cel(sprite->getCurrentFrame());
FramePtr window(load_widget("celprop.jid", "cel_properties"));
FramePtr window(load_widget("cel_properties.xml", "cel_properties"));
get_widgets(window,
"frame", &label_frame,
"pos", &label_pos,

View File

@ -95,7 +95,7 @@ void ConfigureScreen::show_dialog(Context* context)
{
JWidget resolution, color_depth, pixel_scale, fullscreen;
FramePtr window(load_widget("confscr.jid", "configure_screen"));
FramePtr window(load_widget("configure_screen.xml", "configure_screen"));
get_widgets(window,
"resolution", &resolution,
"color_depth", &color_depth,

View File

@ -148,7 +148,7 @@ void ConfigureTools::execute(Context* context)
bool first_time = false;
if (!window) {
window = static_cast<Frame*>(load_widget("toolconf.jid", "configure_tool"));
window = static_cast<Frame*>(load_widget("tools_configuration.xml", "configure_tool"));
first_time = true;
}
/* if the window is opened, close it */

View File

@ -65,7 +65,7 @@ void DuplicateSpriteCommand::execute(Context* context)
char buf[1024];
/* load the window widget */
FramePtr window(load_widget("dupspr.jid", "duplicate_sprite"));
FramePtr window(load_widget("duplicate_sprite.xml", "duplicate_sprite"));
src_name = jwidget_find_name(window, "src_name");
dst_name = jwidget_find_name(window, "dst_name");

View File

@ -69,7 +69,7 @@ void dialogs_frame_length(const SpriteReader& sprite, int sprite_frame)
JWidget frame, frlen, ok;
char buf[64];
FramePtr window(load_widget("frlen.jid", "frame_duration"));
FramePtr window(load_widget("frame_duration.xml", "frame_duration"));
get_widgets(window,
"frame", &frame,
"frlen", &frlen,

View File

@ -83,7 +83,7 @@ void NewFileCommand::execute(Context* context)
int ncolors = 256;
// Load the window widget
FramePtr window(load_widget("newspr.jid", "new_sprite"));
FramePtr window(load_widget("new_sprite.xml", "new_sprite"));
width = jwidget_find_name(window, "width");
height = jwidget_find_name(window, "height");

View File

@ -90,7 +90,7 @@ void NewLayerCommand::execute(Context* context)
// If params specify to ask the user about the name...
if (m_ask) {
// We open the window to ask the name
FramePtr window(load_widget("newlay.jid", "new_layer"));
FramePtr window(load_widget("new_layer.xml", "new_layer"));
JWidget name_widget = find_widget(window, "name");
name_widget->setText(name.c_str());
jwidget_set_min_size(name_widget, 128, 0);

View File

@ -60,7 +60,7 @@ void NewLayerSetCommand::execute(Context* context)
CurrentSpriteWriter sprite(context);
// load the window widget
FramePtr window(load_widget("newlay.jid", "new_layer_set"));
FramePtr window(load_widget("new_layer.xml", "new_layer_set"));
window->open_window_fg();

View File

@ -108,7 +108,7 @@ void PaletteEditorCommand::execute(Context* context)
}
/* load widgets */
FramePtr window(load_widget("paledit.jid", "palette_editor"));
FramePtr window(load_widget("palette_editor.xml", "palette_editor"));
get_widgets(window,
"red", &slider_R,
"green", &slider_G,

View File

@ -70,7 +70,7 @@ void SpritePropertiesCommand::execute(Context* context)
char buf[256];
/* load the window widget */
FramePtr window(load_widget("sprprop.jid", "sprite_properties"));
FramePtr window(load_widget("sprite_properties.xml", "sprite_properties"));
get_widgets(window,
"name", &name,
"type", &type,

View File

@ -187,7 +187,7 @@ void SpriteSizeCommand::execute(Context* context)
const CurrentSpriteReader sprite(context);
// load the window widget
FramePtr window(load_widget("sprsize.jid", "sprite_size"));
FramePtr window(load_widget("sprite_size.xml", "sprite_size"));
get_widgets(window,
"width_px", &width_px,
"height_px", &height_px,

View File

@ -94,7 +94,7 @@ void ColorCurveCommand::execute(Context* context)
App::instance()->Exit.connect(&on_exit_delete_curve);
}
FramePtr window(load_widget("colcurv.jid", "color_curve"));
FramePtr window(load_widget("color_curve.xml", "color_curve"));
get_widgets(window,
"preview", &check_preview,
"button_ok", &button_ok,

View File

@ -102,7 +102,7 @@ void ConvolutionMatrixCommand::execute(Context* context)
JWidget box_target;
JWidget reload, generate;
FramePtr window(load_widget("convmatr.jid", "convolution_matrix"));
FramePtr window(load_widget("convolution_matrix.xml", "convolution_matrix"));
get_widgets(window,
"preview", &check_preview,
"tiled", &check_tiled,
@ -241,7 +241,7 @@ static bool generate_select_hook(JWidget widget, void *data)
JWidget div, div_auto;
JWidget bias, bias_auto;
JWidgetPtr window(load_widget("convmatr.jid", "generate_convolution_matrix"));
JWidgetPtr window(load_widget("convolution_matrix.xml", "generate_convolution_matrix"));
get_widgets(window,
"view_x", &view_x,
"view_y", &view_y,

View File

@ -87,7 +87,7 @@ void DespeckleCommand::execute(Context* context)
const CurrentSpriteReader sprite(context);
JWidget box_target, target_button, button_ok;
FramePtr window(load_widget("median.jid", "median"));
FramePtr window(load_widget("median_blur.xml", "median"));
get_widgets(window,
"width", &entry_width,
"height", &entry_height,

View File

@ -81,7 +81,7 @@ void InvertColorCommand::execute(Context* context)
const CurrentSpriteReader sprite(context);
JWidget box_target, target_button, button_ok;
FramePtr window(load_widget("invrtcol.jid", "invert_color"));
FramePtr window(load_widget("invert_color.xml", "invert_color"));
get_widgets(window,
"target", &box_target,
"preview", &check_preview,

View File

@ -86,7 +86,7 @@ void ReplaceColorCommand::execute(Context* context)
JWidget box_target, target_button;
JWidget button_ok;
FramePtr window(load_widget("replcol.jid", "replace_color"));
FramePtr window(load_widget("replace_color.xml", "replace_color"));
get_widgets(window,
"color_buttons_box", &color_buttons_box,
"preview", &check_preview,

View File

@ -62,7 +62,7 @@ void dialogs_draw_text(Sprite* sprite)
if (!dest_image)
return;
JWidgetPtr window = load_widget("drawtext.jid", "drawtext_window");
JWidgetPtr window = load_widget("draw_text.xml", "drawtext_window");
if (!get_widgets(window,
"font", &font_button,

View File

@ -139,7 +139,7 @@ jstring ase_file_selector(const jstring& message,
if (!window) {
// load the window widget
window = static_cast<Frame*>(load_widget("filesel.jid", "file_selector"));
window = static_cast<Frame*>(load_widget("file_selector.xml", "file_selector"));
JWidget box = jwidget_find_name(window, "box");
JWidget goback = jwidget_find_name(window, "goback");

View File

@ -59,7 +59,7 @@ void dialogs_options()
old_y = y;
/* load the window widget */
FramePtr window(load_widget("options.jid", "options"));
FramePtr window(load_widget("options.xml", "options"));
get_widgets(window,
"mouse_x", &slider_x,
"mouse_y", &slider_y,

View File

@ -360,7 +360,7 @@ static FormatOptions *get_options_JPEG(FileOp *fop)
return (FormatOptions*)jpeg_options;
/* widgets */
FramePtr window(load_widget("jpeg_options.jid", "jpeg_options"));
FramePtr window(load_widget("jpeg_options.xml", "jpeg_options"));
JWidget slider_quality, ok;
get_widgets(window,
"quality", &slider_quality,

View File

@ -667,7 +667,7 @@ JWidget load_widget(const char *filename, const char *name)
dirs = dirs_new();
usprintf(buf, "jids/%s", filename);
usprintf(buf, "widgets/%s", filename);
dirs_add_path(dirs, filename);
dirs_cat_dirs(dirs, filename_in_datadir(buf));

View File

@ -475,7 +475,7 @@ static int edit_node_manual(CurvePoint* point)
CurvePoint point_copy = *point;
int res;
FramePtr window(load_widget("pntprop.jid", "point_properties"));
FramePtr window(load_widget("color_curve.xml", "point_properties"));
entry_x = jwidget_find_name(window, "x");
entry_y = jwidget_find_name(window, "y");