;
- "&Pencil" = tool_pencil "select_tool(\"Pencil\")" ;
- "&Brush (real pencil)" = tool_brush "select_tool(\"Brush\")" ;
- "&Floodfill" = tool_floodfill "select_tool(\"Floodfill\")" ;
- "&Spray" = tool_spray "select_tool(\"Spray\")" ;
- "&Line" = tool_line "select_tool(\"Line\")" ;
- "&Rectangle" = tool_rectangle "select_tool(\"Rectangle\")" ;
- "&Ellipse" = tool_ellipse "select_tool(\"Ellipse\")" ;
-# "&Oval" = tool_path "select_tool(\"Oval\")" ;
- }
- &Filters FILTERS_POPUP {
- "Convolution &Matrix" = has_image "dialogs_convolution_matrix()" ;
- "&Color Curve" = has_image "dialogs_color_curve()" ;
- #"&Gaussian Blur" = has_image "gaussian_blur(current_sprite)" ;
- #"&Vector Map" = has_image "dialogs_vector_map()" ;
- ----
- "&Despeckle (median filter)" = has_image "dialogs_median_filter()" ;
- }
-# "Make &Undo Animation" = has_sprite
-# "sprite = make_undo_animation(current_sprite)
-# if sprite ~= nil then select_sprite(sprite) end" ;
- &Scripts {
- "Load script &file" = always "GUI_LoadScriptFile()" ;
- ----
- "aselogo.lua" = always "include(\"examples/aselogo.lua\")" ;
- "cosy.lua" = always "include(\"examples/cosy.lua\")" ;
- "dacap.lua" = always "include(\"examples/dacap.lua\")" ;
- "shell.lua" = always "include(\"examples/shell.lua\")" ;
- "spiral.lua" = always "include(\"examples/spiral.lua\")" ;
- "terrain.lua" = always "include(\"examples/terrain.lua\")" ;
- }
- ----
- "Draw &Text" = has_sprite "dialogs_draw_text()" ;
- "&MapGen" = always "dialogs_mapgen()" ;
- "&Play FLI/FLC File" = always "GUI_PlayFLI()" ;
-# ----
-# "Test &JID File" = always "GUI_TestJID()" ;
- ----
- "&Options" = always "dialogs_options()" ;
-}
-
-&View {
- "&Tiled" = has_sprite "view_tiled()" ;
- "&Normal" = has_sprite "view_normal()" ;
- "&Fullscreen" = has_sprite "view_fullscreen()" ;
- ----
- "&Menu Bar" = menu_bar "app_switch(app_get_menu_bar())" ;
- "&Status Bar" = status_bar "app_switch(app_get_status_bar())" ;
- "&Color Bar" = color_bar "app_switch(app_get_color_bar())" ;
- "T&ool Bar" = tool_bar "app_switch(app_get_tool_bar())" ;
- ----
- &Editor {
- "Make &Unique" = always "make_unique_editor(current_editor)" ;
- ----
- "Split &Vertically" = always "split_editor(current_editor, JI_VERTICAL)" ;
- "Split &Horizontally" = always "split_editor(current_editor, JI_HORIZONTAL)" ;
- ----
- "&Close" = always "close_editor(current_editor)" ;
- }
- "Fi&lm Editor" FILMEDITOR_ACCEL = has_sprite "switch_between_film_and_sprite_editor()" ;
- "&Palette Editor" = always "dialogs_palette_editor()" ;
- ----
- "F&ilters Popup Menu" = always "show_fx_popup_menu()" ;
-}
-
-L&ist SPRITE_LIST ;
diff --git a/data/menus.es b/data/menus.es
deleted file mode 100644
index 381863d28..000000000
--- a/data/menus.es
+++ /dev/null
@@ -1,189 +0,0 @@
-# allegro-sprite-editor menus -*- Shell-script -*-
-# Copyright (C) 2001-2005, 2007 by David A. Capello
-#
-# Spanish menus (see menus.en for more information)
-
-- {
- "&Tips" = always "dialogs_tips(true)" ;
- "&Acerca de" = always "dialogs_about()" ;
- "&Refrescar" = always "app_refresh_screen()" ;
- ----
- "&Protector de Pantalla" = always "dialogs_screen_saver()" ;
- "Cambiar Modo &Gráfico" {
- "&Seleccionar" = always "set_gfx(\"interactive\", 0, 0, 0)" ;
- ----
- "320x200 8" = always "set_gfx(\"autodetect\", 320, 200, 8)" ;
- "320x240 8" = always "set_gfx(\"autodetect\", 320, 240, 8)" ;
- "640x480 8" = always "set_gfx(\"autodetect\", 640, 480, 8)" ;
- "800x600 8" = always "set_gfx(\"autodetect\", 800, 600, 8)" ;
- ----
- "320x200 16" = always "set_gfx(\"autodetect\", 320, 200, 16)" ;
- "320x240 16" = always "set_gfx(\"autodetect\", 320, 240, 16)" ;
- "640x480 16" = always "set_gfx(\"autodetect\", 640, 480, 16)" ;
- "800x600 16" = always "set_gfx(\"autodetect\", 800, 600, 16)" ;
- }
- ----
- "Screen Sh&ot" SCREENSHOT_ACCEL = always "screen_shot()" ;
- "G&rabar Pantalla" = is_rec "switch_recording_screen()" ;
- ----
- "Recargar los &Menus" = always "rebuild_root_menu_with_alert()" ;
- ----
- "Cargar Sesión" = always "GUI_LoadSession()" ;
- "Guardar Sesión" = always "GUI_SaveSession()" ;
-}
-
-&Archivo {
- "&Nuevo" = always "GUI_NewSprite()" ;
- "&Abrir" = always "GUI_OpenSprite()" ;
- "Abrir &Reciente" RECENT_LIST ;
- ----
- "&Guardar" = has_sprite "GUI_SaveSprite()" ;
- "&Cerrar" = has_sprite "GUI_CloseSprite()" ;
- ----
- "&Salir" = always "GUI_Exit()" ;
-}
-
-&Edit {
- "&Deshacer" UNDO_ACCEL = can_undo "GUI_Undo()" ;
- "&Rehacer" REDO_ACCEL = can_redo "GUI_Redo()" ;
- ----
- "Cortar" = has_imagemask "cut_to_clipboard()" ;
- "Copiar" = has_imagemask "copy_to_clipboard()" ;
- "Pegar" = has_clipboard "paste_from_clipboard(true, 0, 0, 0, 0)" ;
- "Borrar" = has_image "GUI_EditClear()" ;
- ----
- "Movimiento Rápido" = has_imagemask "quick_move()" ;
- "Copia Rápida" = has_imagemask "quick_copy()" ;
-# "Intercambio Rápido" = has_imagemask "quick_swap()" ;
- ----
- "Flip &Horizontal" = has_image "GUI_FlipHorizontal()" ;
- "Flip &Vertical" = has_image "GUI_FlipVertical()" ;
- ----
- "Reemplazar Color" = has_image "dialogs_replace_color()" > ;
- "Invertir" = has_image "dialogs_invert_color()" ;
-}
-
-&Sprite {
- "&Propiedades" = has_sprite "GUI_SpriteProperties()" ;
- ----
- "&Duplicar" = has_sprite "GUI_DuplicateSprite()" ;
- "&Tipo de Imagen" = has_sprite "GUI_ImageType()" ;
- ----
- #"Tamaño de &Imagen" = has_sprite "print(\"Unavailable\")" ;
- #"&Canvas Resize" = has_sprite "canvas_resize()" ;
- "Rec&ortar" = has_mask "crop_sprite()" ;
- "Recortar &Automáticamente" = has_sprite "autocrop_sprite()" ;
-}
-
-&Layer LAYER_POPUP {
- "&Propiedades" = has_layer "GUI_LayerProperties()" ;
- ----
- "&Nueva Capa" = has_sprite "GUI_NewLayer()" ;
- "Nuevo Con&junto" = has_sprite "GUI_NewLayerSet()" ;
- "&Remover" = has_layer "GUI_RemoveLayer()" ;
- ----
- "&Duplicar" = has_layer "GUI_DuplicateLayer()" ;
- "&Mezclar Abajo" = has_layer "GUI_MergeDown()" ;
- "&Aplanar" = has_layer "FlattenLayers()" ;
- "Rec&ortar" = has_mask "crop_layer()" ;
-}
-
-F&rame FRAME_POPUP {
- "&Propiedades" = has_layer "GUI_FrameProperties()" ;
- "&Remover" = has_image "GUI_RemoveFrame()" ;
- ----
- "&Nuevo" = has_layerimage "new_frame()" ;
- "&Mover" = is_movingframe "move_frame()" ;
- "&Copiar" = is_movingframe "copy_frame()" ;
- "En&lazar" = is_movingframe "link_frame()" ;
- ----
- "Rec&ortar" = has_imagemask "crop_frame()" ;
-}
-
-&Mask {
- "&Todo" = has_sprite "MaskAll()" ;
- "&Deseleccionar" = has_mask "DeselectMask()" ;
- "&Reseleccionar" = has_sprite "ReselectMask()" ;
- "&Invertir" = has_sprite "InvertMask()" ;
- ----
- "&Color" = has_image "dialogs_mask_color()" > ;
- "&Especial" {
- "Estirar &Fondo" = has_mask "StretchMaskBottom()" ;
- }
- ----
- "Repositorio" = has_sprite "dialogs_mask_repository()" ;
- "Cargar" = has_sprite "GUI_LoadMask()" ;
- "Guardar" = has_mask "GUI_SaveMask()" ;
-}
-
-# XXX
-# &Path {
-# "Repositorio" = has_sprite "print(\"Unavailable\")" ;
-# "Cargar" = has_sprite "print(\"Unavailable\")" ;
-# "Guardar" = has_path "print(\"Unavailable\")" ;
-# }
-
-&Tool {
- "&Herramientas de Dibujo" {
- "&Configurar" = always "dialogs_tools_configuration()" ;
- ----
- "&Marcador" = tool_marker "select_tool(\"Marker\")" ;
- "Puntos" = tool_dots "select_tool(\"Dots\")" ;
- "Pincel" = tool_pencil "select_tool(\"Pencil\")" ;
- "&Brocha (pincel real)" = tool_brush "select_tool(\"Brush\")" ;
- "Relleno" = tool_floodfill "select_tool(\"Floodfill\")" ;
- "&Spray" = tool_spray "select_tool(\"Spray\")" ;
- "&Línea" = tool_line "select_tool(\"Line\")" ;
- "&Rectángulo" = tool_rectangle "select_tool(\"Rectangle\")" ;
- "&Elipse" = tool_ellipse "select_tool(\"Ellipse\")" ;
- }
- &Filtros FILTERS_POPUP {
- "&Matriz de Convolución" = has_image "dialogs_convolution_matrix()" ;
- "&Curva de Color" = has_image "dialogs_color_curve()" ;
-# "Mapa de &Vectores" = has_image "dialogs_vector_map()" ;
- ----
- "&Reducción de ruido (filtrado por mediana)" = has_image "dialogs_median_filter()" ;
- }
- &Scripts {
- "Cargar script desde &archivo" = always "GUI_LoadScriptFile()" ;
- ----
- "aselogo.lua" = always "include(\"examples/aselogo.lua\")" ;
- "cosy.lua" = always "include(\"examples/cosy.lua\")" ;
- "dacap.lua" = always "include(\"examples/dacap.lua\")" ;
- "shell.lua" = always "include(\"examples/shell.lua\")" ;
- "spiral.lua" = always "include(\"examples/spiral.lua\")" ;
- "terrain.lua" = always "include(\"examples/terrain.lua\")" ;
- }
- ----
- "Dibujar &Texto" = has_sprite "dialogs_draw_text()" ;
- "&MapGen" = always "dialogs_mapgen()" ;
- "&Reproducir Archivo FLI/FLC" = always "GUI_PlayFLI()" ;
- ----
- "&Opciones" = always "dialogs_options()" ;
-}
-
-&Ver {
- "&Alicatado" = has_sprite "view_tiled()" ;
- "&Normal" = has_sprite "view_normal()" ;
- "Pantalla c&ompleta" = has_sprite "view_fullscreen()" ;
- ----
- "Barra de &Menu" = menu_bar "app_switch(app_get_menu_bar())" ;
- "Barra de E&stado" = status_bar "app_switch(app_get_status_bar())" ;
- "Barra de &Colores" = color_bar "app_switch(app_get_color_bar())" ;
- "Barra de &Herramientas" = tool_bar "app_switch(app_get_tool_bar())" ;
- ----
- &Editor {
- "Hacer &Único" = always "make_unique_editor(current_editor)" ;
- ----
- "Dividir &Verticalmente" = always "split_editor(current_editor, JI_VERTICAL)" ;
- "Dividir &Horizontalmente" = always "split_editor(current_editor, JI_HORIZONTAL)" ;
- ----
- "&Cerrar" = always "close_editor(current_editor)" ;
- }
- "E&ditor de Película" FILMEDITOR_ACCEL = has_sprite "switch_between_film_and_sprite_editor()" ;
- "&Paleta de Colores" = always "dialogs_palette_editor()" ;
- ----
- "Popup Menu de &Filtros" = always "show_fx_popup_menu()" ;
-}
-
-L&ista SPRITE_LIST ;
diff --git a/data/scripts/confjpeg.lua b/data/scripts/confjpeg.lua
deleted file mode 100644
index 07f940caf..000000000
--- a/data/scripts/confjpeg.lua
+++ /dev/null
@@ -1,71 +0,0 @@
--- ase -- allegro-sprite-editor: the ultimate sprites factory
--- Copyright (C) 2001-2005 by David A. Capello
-
--- shows the JPEG configuration dialog
-function ConfigureJPEG()
- -- configuration parameters
- local quality = get_config_int("JPEG", "Quality", 100)
- local smooth = get_config_int("JPEG", "Smooth", 0)
- local method = get_config_int("JPEG", "Method", 0)
- -- widgets
- local window = jwindow_new(_("Configure JPEG Compression"))
- local box1 = jbox_new(JI_VERTICAL)
- local box2 = jbox_new(JI_HORIZONTAL)
- local box3 = jbox_new(JI_VERTICAL + JI_HOMOGENEOUS)
- local box4 = jbox_new(JI_VERTICAL + JI_HOMOGENEOUS)
- local box5 = jbox_new(JI_HORIZONTAL + JI_HOMOGENEOUS)
- local label_quality = jlabel_new(_("Quality:"), JI_LEFT)
- local label_smooth = jlabel_new(_("Smooth:"), JI_LEFT)
- local label_method = jlabel_new(_("Method:"), JI_LEFT)
- local slider_quality = jslider_new(0, 100, quality)
- local slider_smooth = jslider_new(0, 100, smooth)
- local view_method = jview_new()
- local list_method = jlistbox_new()
- local button_ok = jbutton_new(_("&OK"))
- local button_cancel = jbutton_new(_("&Cancel"))
- local ret
-
- jwidget_add_child (list_method, jlistitem_new(_("Slow")))
- jwidget_add_child (list_method, jlistitem_new(_("Fast")))
- jwidget_add_child (list_method, jlistitem_new(_("Float")))
- jlistbox_select_index(list_method, method)
-
- jview_attach(view_method, list_method)
- jview_maxsize(view_method)
-
- jwidget_expansive(box4, true)
- jwidget_expansive(view_method, true)
-
- jwidget_add_child (box3, label_quality)
- jwidget_add_child (box3, label_smooth)
- jwidget_add_child (box4, slider_quality)
- jwidget_add_child (box4, slider_smooth)
- jwidget_add_child (box2, box3)
- jwidget_add_child (box2, box4)
- jwidget_add_child (box1, box2)
- jwidget_add_child (box1, label_method)
- jwidget_add_child (box1, view_method)
- jwidget_add_child (box5, button_ok)
- jwidget_add_child (box5, button_cancel)
- jwidget_add_child (box1, box5)
- jwidget_add_child (window, box1)
-
- jwindow_open_fg(window)
-
- if jwindow_get_killer(window) == button_ok then
- ret = true
-
- quality = jslider_get_value(slider_quality)
- smooth = jslider_get_value(slider_smooth)
- method = jlistbox_get_selected_index(list_method)
-
- set_config_int("JPEG", "Quality", quality)
- set_config_int("JPEG", "Smooth", smooth)
- set_config_int("JPEG", "Method", method)
- else
- ret = false
- end
-
- jwidget_free(window)
- return ret
-end
diff --git a/data/scripts/loadfile.lua b/data/scripts/loadfile.lua
deleted file mode 100644
index 8d81a02eb..000000000
--- a/data/scripts/loadfile.lua
+++ /dev/null
@@ -1,9 +0,0 @@
--- ase -- allegro-sprite-editor: the ultimate sprites factory
--- Copyright (C) 2001-2005 by David A. Capello
-
-function GUI_LoadScriptFile()
- local filename = ji_file_select(_("Load Script File(.lua)"), "", "lua")
- if filename then
- dofile(filename)
- end
-end
diff --git a/data/tips/ase.pcx b/data/tips/ase.pcx
new file mode 100644
index 000000000..3695d258c
Binary files /dev/null and b/data/tips/ase.pcx differ
diff --git a/data/tips/aselogo.pcx b/data/tips/aselogo.pcx
deleted file mode 100644
index 7f51a9eff..000000000
Binary files a/data/tips/aselogo.pcx and /dev/null differ
diff --git a/data/tips/tips.en b/data/tips/tips.en
index 7acb824f4..946ae4d05 100644
--- a/data/tips/tips.en
+++ b/data/tips/tips.en
@@ -2,17 +2,15 @@
# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007 David A. Capello
**********************************************************************
-\palette aselogo.pcx
-\image aselogo.pcx
-Allegro Sprite Editor
+\palette ase.pcx
+\image ase.pcx
-Welcome to ASE
+Welcome to ASE 0.6
-You can find more information about the keyboard shortcuts in the
-"docs/QuickHelp.html" file.
+You can find help in ASE Wiki:
+http://www.allegrospriteeditor.com.ar/wiki/
Report bugs to:
-
ase-help@lists.sourceforge.net
**********************************************************************
\split
@@ -115,6 +113,6 @@ directory for some examples.
\image sprite.pcx
And remember look for updates in:
-http://ase.sourceforge.net/
+http://www.allegrospriteeditor.com.ar/
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007 by David A. Capello
diff --git a/data/tips/tips.es b/data/tips/tips.es
index f35726082..6f4b45328 100644
--- a/data/tips/tips.es
+++ b/data/tips/tips.es
@@ -2,17 +2,15 @@
# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007 David A. Capello
**********************************************************************
-\palette aselogo.pcx
-\image aselogo.pcx
-Allegro Sprite Editor
+\palette ase.pcx
+\image ase.pcx
-Bienvenido a ASE
+Bienvenido a ASE 0.6
-Puede encontrar más información sobre los atajos del teclado en el
-archivo "docs/QuickHelp.html".
+Puede encontrar ayuda en la Wiki de ASE:
+http://www.allegrospriteeditor.com.ar/wiki/
Reporte bugs y errores a:
-
ase-help@lists.sourceforge.net
**********************************************************************
\split
@@ -117,6 +115,6 @@ tareas repetitivas? Puede buscar la documentaci
\image sprite.pcx
Y recuerde buscar actualizaciones en:
-http://ase.sourceforge.net/
+http://www.allegrospriteeditor.com.ar/
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007 por David A. Capello
diff --git a/jinete/src/jentry.c b/jinete/src/jentry.c
index c127cc4f4..5ce97851d 100644
--- a/jinete/src/jentry.c
+++ b/jinete/src/jentry.c
@@ -438,21 +438,21 @@ static bool entry_msg_proc (JWidget widget, JMessage msg)
}
}
- if (ustrcmp (widget->text, text) != 0) {
- jwidget_set_text (widget, text);
- jwidget_emit_signal (widget, JI_SIGNAL_ENTRY_CHANGE);
+ if (ustrcmp(widget->text, text) != 0) {
+ jwidget_set_text(widget, text);
+ jwidget_emit_signal(widget, JI_SIGNAL_ENTRY_CHANGE);
}
- jfree (text);
+ jfree(text);
- jentry_set_cursor_pos (widget, entry->cursor);
- jwidget_dirty (widget);
+ jentry_set_cursor_pos(widget, entry->cursor);
+ jwidget_dirty(widget);
return TRUE;
}
break;
case JM_BUTTONPRESSED:
- jwidget_capture_mouse (widget);
+ jwidget_capture_mouse(widget);
case JM_MOTION:
if (jwidget_has_capture (widget)) {
@@ -469,17 +469,17 @@ static bool entry_msg_proc (JWidget widget, JMessage msg)
entry->cursor = --entry->scroll;
move = FALSE;
dirty = TRUE;
- jwidget_dirty (widget);
+ jwidget_dirty(widget);
}
}
/* forward scroll */
else if (msg->mouse.x >= widget->rc->x2) {
- if (entry->scroll < ustrlen (text)) {
+ if (entry->scroll < ustrlen(text)) {
entry->scroll++;
x = widget->rc->x1 + widget->border_width.l;
for (c=entry->scroll; ; c++) {
- x += CHARACTER_LENGTH (widget->text_font,
- (c < ustrlen (text))? ugetat (text, c): ' ');
+ x += CHARACTER_LENGTH(widget->text_font,
+ (c < ustrlen (text))? ugetat (text, c): ' ');
if (x > widget->rc->x2-widget->border_width.r) {
c--;
break;
@@ -506,8 +506,10 @@ static bool entry_msg_proc (JWidget widget, JMessage msg)
}
/* move selection */
- if (entry->recent_focused)
+ if (entry->recent_focused) {
entry->recent_focused = FALSE;
+ entry->select = entry->cursor;
+ }
else if (msg->type == JM_BUTTONPRESSED)
entry->select = entry->cursor;
@@ -527,17 +529,17 @@ static bool entry_msg_proc (JWidget widget, JMessage msg)
return TRUE;
case JM_DOUBLECLICK:
- entry_forward_word (widget);
+ entry_forward_word(widget);
entry->select = entry->cursor;
- entry_backward_word (widget);
- jwidget_dirty (widget);
+ entry_backward_word(widget);
+ jwidget_dirty(widget);
return TRUE;
case JM_MOUSEENTER:
case JM_MOUSELEAVE:
/* XXX theme stuff */
- if (jwidget_is_enabled (widget))
- jwidget_dirty (widget);
+ if (jwidget_is_enabled(widget))
+ jwidget_dirty(widget);
break;
}
diff --git a/jinete/src/jfilesel.c b/jinete/src/jfilesel.c
index 0842099c7..7a961ad27 100644
--- a/jinete/src/jfilesel.c
+++ b/jinete/src/jfilesel.c
@@ -63,10 +63,10 @@ typedef struct Extension
char *text;
} Extension;
-static JWidget listbox1, listbox2, entry_path;
+static JWidget listbox1, listbox2, entry_path, entry_name;
static JList paths, files;
-static char current_path[512];
+static char current_path[1024];
static JList extensions; /* list of supported Extensions */
static bool filesel_msg_proc(JWidget entry, JMessage msg);
@@ -95,12 +95,13 @@ char *ji_file_select(const char *message,
const char *init_path,
const char *exts)
{
- return ji_file_select_ex (message, init_path, exts, NULL);
+ return ji_file_select_ex(message, init_path, exts, NULL);
}
/* customizable widgets:
widget_extension can have childs with these widget's names:
- "entry"
+ "path"
+ "name"
"left"
"top"
"right"
@@ -111,26 +112,28 @@ char *ji_file_select_ex(const char *message,
const char *exts,
JWidget widget_extension)
{
- JWidget window, box1, box2, box3, panel, view1, view2;
+ JWidget window, box1, box2, box3, box4, panel, view1, view2;
JWidget button_select, button_cancel, tmp;
- int size = 256;
- char buf[512];
+ int size = 1024;
+ char buf[1024];
JLink link;
char *s;
char *selected_filename;
- bool entry_created;
+ bool entry_path_created;
+ bool entry_name_created;
generate_extensions(exts);
- ustrcpy (current_path, init_path);
- ustrcpy (get_filename (current_path), empty_string);
+ ustrcpy(current_path, init_path);
+ ustrcpy(get_filename(current_path), empty_string);
- ustrcpy (buf, init_path);
+ ustrcpy(buf, init_path);
- window = jwindow_new (message);
+ window = jwindow_new(message);
box1 = jbox_new(JI_VERTICAL);
box2 = jbox_new(JI_HORIZONTAL);
box3 = jbox_new(JI_HORIZONTAL | JI_HOMOGENEOUS);
+ box4 = jbox_new(JI_VERTICAL | JI_EXPANSIVE);
panel = jpanel_new(JI_HORIZONTAL);
view1 = jview_new();
view2 = jview_new();
@@ -141,19 +144,29 @@ char *ji_file_select_ex(const char *message,
/* create input widget (entry_path) */
entry_path = NULL;
- entry_created = FALSE;
+ entry_name = NULL;
+ entry_path_created = FALSE;
+ entry_name_created = FALSE;
- if (widget_extension)
- entry_path = jwidget_find_name (widget_extension, "entry");
+ if (widget_extension) {
+ entry_path = jwidget_find_name(widget_extension, "path");
+ entry_name = jwidget_find_name(widget_extension, "name");
+ }
if (!entry_path) {
- entry_path = jentry_new (size-1, NULL);
- entry_created = TRUE;
+ entry_path = jentry_new(size-1, NULL);
+ entry_path_created = TRUE;
+ }
+
+ if (!entry_name) {
+ entry_name = jentry_new(size-1, NULL);
+ entry_name_created = TRUE;
}
/* add hook */
jwidget_add_hook(button_select, filesel_type(), filesel_msg_proc, NULL);
jwidget_add_hook(entry_path, filesel_type(), filesel_msg_proc, NULL);
+ jwidget_add_hook(entry_name, filesel_type(), filesel_msg_proc, NULL);
jwidget_add_hook(listbox1, filesel_type(), filesel_msg_proc, listbox2);
jwidget_add_hook(listbox2, filesel_type(), filesel_msg_proc, listbox1);
@@ -167,23 +180,35 @@ char *ji_file_select_ex(const char *message,
jwidget_expansive(box2, TRUE);
if (widget_extension && (tmp = jwidget_find_name(widget_extension, "top")))
- jwidget_add_child (box1, tmp);
- if (entry_created)
- jwidget_add_child (box1, entry_path);
+ jwidget_add_child(box1, tmp);
+ if (entry_path_created)
+ jwidget_add_child(box1, entry_path);
if (widget_extension && (tmp = jwidget_find_name(widget_extension, "left")))
- jwidget_add_child (box2, tmp);
- jwidget_add_child (panel, view1);
- jwidget_add_child (panel, view2);
- jwidget_add_child (box2, panel);
+ jwidget_add_child(box2, tmp);
+ jwidget_add_child(panel, view1);
+ jwidget_add_child(panel, view2);
+ if (!entry_name_created)
+ jwidget_add_child(box2, panel);
+ else {
+ JWidget subbox1 = jbox_new(JI_VERTICAL);
+ JWidget subbox2 = jbox_new(JI_HORIZONTAL);
+ jwidget_expansive(entry_name, TRUE);
+ jwidget_add_child(box2, subbox1);
+ jwidget_add_child(subbox1, panel);
+ jwidget_add_child(subbox1, subbox2);
+ jwidget_add_child(subbox2, jlabel_new(ji_translate_string("File name:")));
+ jwidget_add_child(subbox2, entry_name);
+ }
if (widget_extension && (tmp = jwidget_find_name(widget_extension, "right")))
- jwidget_add_child (box2, tmp);
- jwidget_add_child (box1, box2);
- jwidget_add_child (box3, button_select);
- jwidget_add_child (box3, button_cancel);
- jwidget_add_child (box1, box3);
+ jwidget_add_child(box2, tmp);
+ jwidget_add_child(box1, box2);
+ jwidget_add_child(box3, box4);
+ jwidget_add_child(box3, button_select);
+ jwidget_add_child(box3, button_cancel);
+ jwidget_add_child(box1, box3);
if (widget_extension && (tmp = jwidget_find_name(widget_extension, "bottom")))
- jwidget_add_child (box1, tmp);
- jwidget_add_child (window, box1);
+ jwidget_add_child(box1, tmp);
+ jwidget_add_child(window, box1);
/* magnetic */
jwidget_magnetic(button_select, TRUE);
@@ -199,10 +224,13 @@ char *ji_file_select_ex(const char *message,
/* put the current directory in the entry */
jlistbox_select_child(listbox1, NULL);
+
+ s = get_filename(buf);
+ if (s > buf) *(s-1) = 0;
jwidget_set_text(entry_path, buf);
+ jwidget_set_text(entry_name, s);
/* select the filename */
- s = get_filename(buf);
JI_LIST_FOR_EACH(listbox2->children, link) {
if (ustrcmp(s, jwidget_get_text(link->data)) == 0) {
jlistbox_select_child(listbox2, link->data);
@@ -218,16 +246,25 @@ char *ji_file_select_ex(const char *message,
/* button "select"? */
if ((jwindow_get_killer(window) == button_select) ||
(jwindow_get_killer(window) == listbox2) ||
- (jwindow_get_killer(window) == entry_path)) {
+ (jwindow_get_killer(window) == entry_path) ||
+ (jwindow_get_killer(window) == entry_name)) {
/* copy the new name */
- selected_filename = jstrdup(jwidget_get_text(entry_path));
+ selected_filename = jmalloc(1024);
+
+ ustrcpy(selected_filename, jwidget_get_text(entry_path));
+ put_backslash(selected_filename);
+ ustrcat(selected_filename, jwidget_get_text(entry_name));
+
+ fix_filename_slashes(selected_filename);
}
else {
/* nothing selected */
selected_filename = NULL;
}
- if (widget_extension && (tmp = jwidget_find_name(widget_extension, "entry")))
+ if (widget_extension && (tmp = jwidget_find_name(widget_extension, "path")))
+ jwidget_remove_child(tmp->parent, tmp);
+ if (widget_extension && (tmp = jwidget_find_name(widget_extension, "name")))
jwidget_remove_child(tmp->parent, tmp);
if (widget_extension && (tmp = jwidget_find_name(widget_extension, "left")))
jwidget_remove_child(tmp->parent, tmp);
@@ -254,29 +291,30 @@ void ji_file_select_refresh_listbox(void)
fill_listbox_with_files(current_path, sizeof(current_path));
}
-void ji_file_select_enter_to_path (const char *path)
+void ji_file_select_enter_to_path(const char *path)
{
- jwidget_set_text (entry_path, path);
- enter_to_path_in_entry ();
+ jwidget_set_text(entry_path, path);
+ jwidget_set_text(entry_name, "");
+ enter_to_path_in_entry();
}
-bool ji_dir_exists (const char *filename)
+bool ji_dir_exists(const char *filename)
{
struct al_ffblk info;
- char buf[512];
+ char buf[1024];
int ret;
- ustrcpy (buf, filename);
- put_backslash (buf);
- ustrcat (buf, "*.*");
+ ustrcpy(buf, filename);
+ put_backslash(buf);
+ ustrcat(buf, "*.*");
- ret = al_findfirst (buf, &info, FA_ALL);
- al_findclose (&info);
+ ret = al_findfirst(buf, &info, FA_ALL);
+ al_findclose(&info);
return (ret == 0);
}
-static bool filesel_msg_proc (JWidget widget, JMessage msg)
+static bool filesel_msg_proc(JWidget widget, JMessage msg)
{
switch (msg->type) {
@@ -284,43 +322,49 @@ static bool filesel_msg_proc (JWidget widget, JMessage msg)
switch (msg->signal.num) {
case JI_SIGNAL_BUTTON_SELECT:
- if (!enter_to_path_in_entry ())
- jwidget_close_window (widget);
+ if (!enter_to_path_in_entry())
+ jwidget_close_window(widget);
return TRUE;
case JI_SIGNAL_LISTBOX_SELECT: {
- const char *text;
+ char filename[1024];
int attr;
- enter_to_path_in_entry ();
- jmanager_set_focus (widget);
+ enter_to_path_in_entry();
+ jmanager_set_focus(widget);
/* close the window when we double-click in a normal file */
- text = jwidget_get_text (entry_path);
- if (file_exists (text, FA_ALL, &attr)) {
+ ustrcpy(filename, jwidget_get_text(entry_path));
+ put_backslash(filename);
+ ustrcat(filename, jwidget_get_text(entry_name));
+
+ if (file_exists(filename, FA_ALL, &attr)) {
if (!(attr & FA_DIREC))
- jwidget_close_window (widget);
+ jwidget_close_window(widget);
}
break;
}
case JI_SIGNAL_LISTBOX_CHANGE: {
- JWidget the_other_listbox = jwidget_get_data (widget,
- filesel_type ());
- JWidget item = jlistbox_get_selected_child (widget);
- const char *filename = item ? jwidget_get_text (item):
+ JWidget the_other_listbox = jwidget_get_data(widget,
+ filesel_type());
+ JWidget item = jlistbox_get_selected_child(widget);
+ const char *filename = item ? jwidget_get_text(item):
empty_string;
- char buf[512];
- jwidget_signal_off (the_other_listbox);
- jlistbox_select_child (the_other_listbox, 0);
- jwidget_signal_on (the_other_listbox);
+ jwidget_signal_off(the_other_listbox);
+ jlistbox_select_child(the_other_listbox, 0);
+ jwidget_signal_on(the_other_listbox);
- /* get `current_path + current_item_in_list' */
- replace_filename (buf, current_path, filename, sizeof (buf));
+ jwidget_set_text(entry_path, current_path);
+ jwidget_set_text(entry_name, filename);
+ jentry_select_text(entry_name, 0, -1);
+ break;
+ }
- /* set the text in the edit box */
- jwidget_set_text (entry_path, buf);
- jentry_select_text (entry_path, get_filename (buf)-buf, -1);
+ case JI_SIGNAL_ENTRY_CHANGE: {
+ if (widget == entry_path) {
+ jwidget_set_text(entry_name, "");
+ }
break;
}
}
@@ -330,12 +374,12 @@ static bool filesel_msg_proc (JWidget widget, JMessage msg)
if ((jwidget_has_focus (widget)) &&
((msg->key.scancode == KEY_ENTER) ||
(msg->key.scancode == KEY_ENTER_PAD))) {
- if (enter_to_path_in_entry ()) {
- jmanager_set_focus (widget);
+ if (enter_to_path_in_entry()) {
+ jmanager_set_focus(widget);
return TRUE;
}
else {
- jwidget_close_window (widget);
+ jwidget_close_window(widget);
return TRUE;
}
}
@@ -345,59 +389,62 @@ static bool filesel_msg_proc (JWidget widget, JMessage msg)
return FALSE;
}
-static bool enter_to_path_in_entry (void)
+static bool enter_to_path_in_entry(void)
{
- const char *filename = jwidget_get_text (entry_path);
- char buf[512], path[512], from[512];
+ char buf[1024], path[1024], from[1024];
+ const char *filename;
JLink link;
- jmanager_set_focus (entry_path);
+ jmanager_set_focus(entry_path);
- fix_filename_path (path, filename, sizeof (path));
- fixup_filename (buf, from, path);
- ustrcpy (path, buf);
+ fix_filename_path(path, jwidget_get_text(entry_path), sizeof(path));
+ put_backslash(path);
+ ustrcat(path, jwidget_get_text(entry_name));
+
+ fixup_filename(buf, from, path);
+ ustrcpy(path, buf);
#ifdef HAVE_DRIVES
if (ugetat (buf, -1) == DEVICE_SEPARATOR) {
- uinsert (path, ustrlen (path), OTHER_PATH_SEPARATOR);
- ustrcat (buf, "./");
+ uinsert(path, ustrlen (path), OTHER_PATH_SEPARATOR);
+ ustrcat(buf, "./");
}
else if ((ugetat (buf, -1) == OTHER_PATH_SEPARATOR) &&
(ugetat (buf, -2) == DEVICE_SEPARATOR)) {
- uremove (buf, -1);
- ustrcat (buf, "./");
+ uremove(buf, -1);
+ ustrcat(buf, "./");
}
#endif
- if (ji_dir_exists (buf)) {
- ustrcpy (buf, path);
- put_backslash (buf);
+ if (ji_dir_exists(buf)) {
+ ustrcpy(buf, path);
+ put_backslash(buf);
- ustrcpy (current_path, buf);
+ ustrcpy(current_path, buf);
/* make the new list of files */
- fill_listbox_with_files (buf, sizeof (buf));
+ fill_listbox_with_files(buf, sizeof(buf));
/* change the edit text */
- jwidget_set_text (entry_path, buf);
- jentry_select_text (entry_path, 0, -1);
+ jwidget_set_text(entry_path, buf);
+ jentry_select_text(entry_path, 0, -1);
/* select the filename */
- if (!ugetat (from, 0))
- ustrcpy (from, "..");
+ if (!ugetat(from, 0))
+ ustrcpy(from, "..");
JI_LIST_FOR_EACH(listbox1->children, link) {
filename = jwidget_get_text(link->data);
#ifdef HAVE_DRIVES
- if (ustricmp (filename, from) == 0)
+ if (ustricmp(filename, from) == 0)
#else
- if (ustrcmp (filename, from) == 0)
+ if (ustrcmp(filename, from) == 0)
#endif
{
JWidget listitem = jlistbox_get_selected_child(listbox1);
if (listitem)
- jwidget_deselect (listitem);
+ jwidget_deselect(listitem);
jlistbox_select_child(listbox1, link->data);
jlistbox_center_scroll(listbox1);
break;
@@ -415,7 +462,7 @@ static void fill_listbox_callback(const char *filename, int attrib, int param)
const char *other_filename;
JList *list;
JLink link;
- char buf[512];
+ char buf[1024];
bool found;
errno = 0;
@@ -428,11 +475,11 @@ static void fill_listbox_callback(const char *filename, int attrib, int param)
/* only files with an acceptable extension */
else {
list = &files;
- found = check_extension(get_extension (filename));
+ found = check_extension(get_extension(filename));
}
if (found) {
- ustrzcpy(buf, sizeof (buf), get_filename(filename));
+ ustrzcpy(buf, sizeof(buf), get_filename(filename));
fix_filename_case(buf);
if (attrib & FA_DIREC) {
@@ -452,7 +499,7 @@ static void fill_listbox_callback(const char *filename, int attrib, int param)
static void fill_listbox_with_files(char *path, int size)
{
- char buf[512], tmp[32];
+ char buf[1024], tmp[32];
int ch, attr;
JList list;
JLink link;
@@ -505,8 +552,8 @@ static void fill_listbox_with_files(char *path, int size)
for_each_file(buf, FA_TO_SHOW, fill_listbox_callback, 0);
- JI_LIST_FOR_EACH(paths, link) jwidget_add_child (listbox1, link->data);
- JI_LIST_FOR_EACH(files, link) jwidget_add_child (listbox2, link->data);
+ JI_LIST_FOR_EACH(paths, link) jwidget_add_child(listbox1, link->data);
+ JI_LIST_FOR_EACH(files, link) jwidget_add_child(listbox2, link->data);
jlist_free(paths);
jlist_free(files);
@@ -524,7 +571,7 @@ static void fill_listbox_with_files(char *path, int size)
static void generate_extensions(const char *exts)
{
- char *tok, buf[512];
+ char *tok, buf[1024];
Extension *ext;
extensions = jlist_new();
@@ -564,7 +611,7 @@ static void generate_extensions(const char *exts)
}
}
-static bool check_extension (const char *filename_ext)
+static bool check_extension(const char *filename_ext)
{
Extension *ext;
JLink link;
@@ -581,18 +628,18 @@ static bool check_extension (const char *filename_ext)
switch (ext->type) {
case EQUAL_TO_TEXT:
- if (ustricmp (ext->text, filename_ext) == 0)
+ if (ustricmp(ext->text, filename_ext) == 0)
return TRUE;
break;
case START_WITH_TEXT:
- if (my_ustrnicmp (ext->text, filename_ext, ext->size) == 0)
+ if (my_ustrnicmp(ext->text, filename_ext, ext->size) == 0)
return TRUE;
break;
case END_WITH_TEXT:
if (len >= ext->size &&
- my_ustrnicmp (ext->text, filename_ext+len-ext->size, ext->size) == 0)
+ my_ustrnicmp(ext->text, filename_ext+len-ext->size, ext->size) == 0)
return TRUE;
break;
}
diff --git a/jinete/src/jlabel.c b/jinete/src/jlabel.c
index be207fa10..242dc8790 100644
--- a/jinete/src/jlabel.c
+++ b/jinete/src/jlabel.c
@@ -35,19 +35,19 @@
static bool label_msg_proc (JWidget widget, JMessage msg);
-JWidget jlabel_new (const char *text)
+JWidget jlabel_new(const char *text)
{
- JWidget widget = jwidget_new (JI_LABEL);
+ JWidget widget = jwidget_new(JI_LABEL);
- jwidget_add_hook (widget, JI_LABEL, label_msg_proc, NULL);
- jwidget_set_align (widget, JI_LEFT | JI_MIDDLE);
- jwidget_set_text (widget, text);
- jwidget_init_theme (widget);
+ jwidget_add_hook(widget, JI_LABEL, label_msg_proc, NULL);
+ jwidget_set_align(widget, JI_LEFT | JI_MIDDLE);
+ jwidget_set_text(widget, text);
+ jwidget_init_theme(widget);
return widget;
}
-static bool label_msg_proc (JWidget widget, JMessage msg)
+static bool label_msg_proc(JWidget widget, JMessage msg)
{
switch (msg->type) {
diff --git a/makefile.mgw b/makefile.mgw
index 0a714bc8f..ac096fe29 100644
--- a/makefile.mgw
+++ b/makefile.mgw
@@ -15,8 +15,7 @@ endif
# Flags for MinGW
CFLAGS =
-# LFLAGS = -mwindows
-LFLAGS = -mconsole
+LFLAGS = -mwindows
ifdef DEBUGMODE
LFLAGS_LAST = -lalld
else
diff --git a/src/commands/cmd_run_script.c b/src/commands/cmd_run_script.c
index 64bd76810..10460a29b 100644
--- a/src/commands/cmd_run_script.c
+++ b/src/commands/cmd_run_script.c
@@ -22,12 +22,15 @@
#include "jinete.h"
-#include "core/app.h"
-#include "modules/sprites.h"
-#include "raster/sprite.h"
+#include "script/script.h"
#endif
void command_execute_run_script(const char *argument)
{
+ char *filename = ji_file_select(_("Load Script File(.lua)"), "", "lua");
+ if (filename) {
+ do_script_file(filename);
+ jfree(filename);
+ }
}
diff --git a/src/commands/commands.c b/src/commands/commands.c
index cc99faf12..00b6ea44d 100644
--- a/src/commands/commands.c
+++ b/src/commands/commands.c
@@ -171,7 +171,6 @@ bool command_enabled_despeckle(const char *argument);
void command_execute_despeckle(const char *argument);
/* void command_execute_draw_text(const char *argument); */
/* void command_execute_play_flic(const char *argument); */
-/* void command_execute_mapgen(const char *argument); */
void command_execute_run_script(const char *argument);
void command_execute_tips(const char *argument);
void command_execute_options(const char *argument);
@@ -263,7 +262,7 @@ static Command commands[] = {
/* { CMD_DRAW_TEXT, NULL, NULL, NULL, NULL }, */
/* { CMD_PLAY_FLIC, NULL, NULL, NULL, NULL }, */
/* { CMD_MAPGEN, NULL, NULL, NULL, NULL }, */
- { CMD_RUN_SCRIPT, NULL, NULL, NULL, NULL },
+ CMD_EXE(run_script),
CMD_EXE(tips),
CMD_EXE(options),
CMD_EXE_ENA_CHK(select_file),
diff --git a/src/dialogs/filesel.c b/src/dialogs/filesel.c
index ef47f58a5..5a925cde8 100644
--- a/src/dialogs/filesel.c
+++ b/src/dialogs/filesel.c
@@ -73,7 +73,7 @@ char *GUI_FileSelect(const char *message,
{
JWidget box_left, button_home;
JWidget button_fonts, button_palettes, button_mkdir;
- JWidget box_top, box_top2, combobox, add_bookmark, del_bookmark, entry;
+ JWidget box_top, box_top2, combobox, add_bookmark, del_bookmark, entry_path;
JWidget widget_extension;
char buf[512], *selected_filename;
@@ -136,7 +136,7 @@ char *GUI_FileSelect(const char *message,
box_top = jbox_new(JI_HORIZONTAL);
box_top2 = jbox_new(JI_HORIZONTAL | JI_HOMOGENEOUS);
combobox = jcombobox_new();
- entry = jcombobox_get_entry_widget(combobox);
+ entry_path = jcombobox_get_entry_widget(combobox);
add_bookmark = jbutton_new("+");
del_bookmark = jbutton_new("-");
@@ -168,7 +168,7 @@ char *GUI_FileSelect(const char *message,
widget_extension = jwidget_new(JI_WIDGET);
jwidget_set_name(box_left, "left");
jwidget_set_name(box_top, "top");
- jwidget_set_name(entry, "entry");
+ jwidget_set_name(entry_path, "path");
jwidget_add_childs(widget_extension, box_left, box_top, NULL);
/* call the jinete file selector */
@@ -310,7 +310,7 @@ static void home_command(JWidget widget)
get_executable_name (path, sizeof (path));
*get_filename (path) = 0;
- ji_file_select_enter_to_path (path);
+ ji_file_select_enter_to_path(path);
}
}
diff --git a/src/dialogs/tips.c b/src/dialogs/tips.c
index 5dcd95a4a..01db7ac31 100644
--- a/src/dialogs/tips.c
+++ b/src/dialogs/tips.c
@@ -123,12 +123,12 @@ void dialogs_tips(bool forced)
jwidget_add_child(vbox, hbox);
jwidget_add_child(window, vbox);
- if (JI_SCREEN_W > 320)
+/* if (JI_SCREEN_W > 320) */
jwidget_set_static_size(window,
MIN(400, JI_SCREEN_W-32),
- MIN(300, JI_SCREEN_H-32));
- else
- jwidget_set_static_size(window, 282, 182);
+ MIN(300, JI_SCREEN_H-16));
+/* else */
+/* jwidget_set_static_size(window, 282, 200); */
/* open the window */
jwindow_open(window);
diff --git a/src/file/jpeg.c b/src/file/jpeg.c
index c2734db81..5cc038c6e 100644
--- a/src/file/jpeg.c
+++ b/src/file/jpeg.c
@@ -24,6 +24,8 @@
#include
#include
+#include "jinete.h"
+
#include "console/console.h"
#include "core/app.h"
#include "core/cfg.h"
@@ -553,26 +555,86 @@ FileType filetype_jpeg = { "jpeg", "jpeg,jpg", NULL, NULL, 0 };
#if defined HAVE_LIBJPEG || HAVE_JPGALLEG
+/**
+ * Shows the JPEG configuration dialog.
+ */
static int configure_jpeg(void)
{
+ JWidget window, box1, box2, box3, box4, box5;
+ JWidget label_quality, label_smooth, label_method;
+ JWidget slider_quality, slider_smooth, view_method;
+ JWidget list_method, button_ok, button_cancel;
+ int ret, quality, smooth, method;
+
/* interactive mode */
- if (is_interactive()) {
- lua_State *L = get_lua_state();
- int ret;
+ if (!is_interactive())
+ return 0;
- /* call the ConfigureJPEG() script routine, it must return "true"
- to save the image */
- lua_pushstring(L, "ConfigureJPEG");
- lua_gettable(L, LUA_GLOBALSINDEX);
- do_script_raw(L, 0, 1);
- ret = lua_toboolean(L, -1);
- lua_pop(L, 1);
+ /* configuration parameters */
+ quality = get_config_int("JPEG", "Quality", 100);
+ smooth = get_config_int("JPEG", "Smooth", 0);
+ method = get_config_int("JPEG", "Method", 0);
- if (!ret)
- return -1;
+ /* widgets */
+ window = jwindow_new(_("Configure JPEG Compression"));
+ box1 = jbox_new(JI_VERTICAL);
+ box2 = jbox_new(JI_HORIZONTAL);
+ box3 = jbox_new(JI_VERTICAL + JI_HOMOGENEOUS);
+ box4 = jbox_new(JI_VERTICAL + JI_HOMOGENEOUS);
+ box5 = jbox_new(JI_HORIZONTAL + JI_HOMOGENEOUS);
+ label_quality = jlabel_new(_("Quality:"));
+ label_smooth = jlabel_new(_("Smooth:"));
+ label_method = jlabel_new(_("Method:"));
+ slider_quality = jslider_new(0, 100, quality);
+ slider_smooth = jslider_new(0, 100, smooth);
+ view_method = jview_new();
+ list_method = jlistbox_new();
+ button_ok = jbutton_new(_("&OK"));
+ button_cancel = jbutton_new(_("&Cancel"));
+
+ jwidget_add_child(list_method, jlistitem_new(_("Slow")));
+ jwidget_add_child(list_method, jlistitem_new(_("Fast")));
+ jwidget_add_child(list_method, jlistitem_new(_("Float")));
+ jlistbox_select_index(list_method, method);
+
+ jview_attach(view_method, list_method);
+ jview_maxsize(view_method);
+
+ jwidget_expansive(box4, TRUE);
+ jwidget_expansive(view_method, TRUE);
+
+ jwidget_add_child(box3, label_quality);
+ jwidget_add_child(box3, label_smooth);
+ jwidget_add_child(box4, slider_quality);
+ jwidget_add_child(box4, slider_smooth);
+ jwidget_add_child(box2, box3);
+ jwidget_add_child(box2, box4);
+ jwidget_add_child(box1, box2);
+ jwidget_add_child(box1, label_method);
+ jwidget_add_child(box1, view_method);
+ jwidget_add_child(box5, button_ok);
+ jwidget_add_child(box5, button_cancel);
+ jwidget_add_child(box1, box5);
+ jwidget_add_child(window, box1);
+
+ jwindow_open_fg(window);
+
+ if (jwindow_get_killer(window) == button_ok) {
+ ret = TRUE;
+
+ quality = jslider_get_value(slider_quality);
+ smooth = jslider_get_value(slider_smooth);
+ method = jlistbox_get_selected_index(list_method);
+
+ set_config_int("JPEG", "Quality", quality);
+ set_config_int("JPEG", "Smooth", smooth);
+ set_config_int("JPEG", "Method", method);
}
+ else
+ ret = FALSE;
- return 0;
+ jwidget_free(window);
+ return ret;
}
#endif
diff --git a/src/modules/gfxdata.c b/src/modules/gfxdata.c
index 1db5690df..8402c7ffa 100644
--- a/src/modules/gfxdata.c
+++ b/src/modules/gfxdata.c
@@ -1,5 +1,5 @@
/* ase -- allegro-sprite-editor: the ultimate sprites factory
- * Copyright (C) 2001-2005 David A. Capello
+ * Copyright (C) 2001-2005, 2007 David A. 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
@@ -127,8 +127,8 @@ static DATA gfx_data[GFX_BITMAP_COUNT] =
" ### "
" ## "
" ## "
- " ##"
- " ##"
+ " # "
+ " #"
" ###"
" #### " },
/* GFX_TOOL_FLOODFILL */
diff --git a/src/modules/gui.c b/src/modules/gui.c
index 2738e894b..78b4ad263 100644
--- a/src/modules/gui.c
+++ b/src/modules/gui.c
@@ -23,6 +23,10 @@
#include
#include
+#ifdef ALLEGRO_WINDOWS
+#include
+#endif
+
#include "jinete.h"
#include "jinete/intern.h"
@@ -305,8 +309,6 @@ void gui_feedback(void)
/* jmanager_dispatch_draw_messages(); */
}
-
- rest(0); /* don't eat CPU... rest some time */
}
void gui_setup_screen(void)
@@ -688,6 +690,8 @@ static bool manager_msg_proc(JWidget widget, JMessage msg)
case JM_IDLE:
gui_feedback();
+ /* don't eat CPU... rest some time */
+ rest(0);
break;
case JM_CHAR: {
diff --git a/src/script/functions.c b/src/script/functions.c
index 088e5c72e..16ca8a2f6 100644
--- a/src/script/functions.c
+++ b/src/script/functions.c
@@ -35,6 +35,10 @@
#endif
+/* ======================================= */
+/* Sprite */
+/* ======================================= */
+
/* ======================================= */
/* Layer */
/* ======================================= */
diff --git a/src/script/functions.h b/src/script/functions.h
index cb042f628..ea8d9c2d7 100644
--- a/src/script/functions.h
+++ b/src/script/functions.h
@@ -19,10 +19,17 @@
#ifndef SCRIPT_FUNCTIONS_H
#define SCRIPT_FUNCTIONS_H
+struct Sprite;
struct Layer;
struct Frame;
-/* Layer */
+/* ======================================= */
+/* Sprite */
+/* ======================================= */
+
+/* ======================================= */
+/* Layer */
+/* ======================================= */
char *GetUniqueLayerName(void);
@@ -32,7 +39,9 @@ void RemoveLayer(void);
struct Layer *FlattenLayers(void);
-/* Frame */
+/* ======================================= */
+/* Frame */
+/* ======================================= */
void RemoveFrame(struct Layer *layer, struct Frame *frame);
diff --git a/src/widgets/statebar.c b/src/widgets/statebar.c
index e1ff37fe9..54c1cac06 100644
--- a/src/widgets/statebar.c
+++ b/src/widgets/statebar.c
@@ -27,6 +27,7 @@
#include "jinete.h"
+#include "commands/commands.h"
#include "modules/editors.h"
#include "modules/gfx.h"
#include "modules/gui.h"
@@ -373,7 +374,7 @@ static void button_command(JWidget widget, void *data)
switch ((int)data) {
case ACTION_LAYER:
- do_script_expr("GUI_LayerProperties()");
+ command_execute(command_get_by_name(CMD_LAYER_PROPERTIES), NULL);
break;
case ACTION_FIRST: