summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--amiga/arexx.c14
-rw-r--r--amiga/filetype.c2
-rw-r--r--amiga/gui.c32
-rw-r--r--amiga/plotters.c7
-rw-r--r--desktop/textarea.c5
5 files changed, 36 insertions, 24 deletions
diff --git a/amiga/arexx.c b/amiga/arexx.c
index 65f1ebab5..3b386d3ad 100644
--- a/amiga/arexx.c
+++ b/amiga/arexx.c
@@ -29,11 +29,13 @@
#include <gadgets/clicktab.h>
#include <reaction/reaction_macros.h>
-#include "utils/nsoption.h"
#include "desktop/browser.h"
#include "desktop/gui_window.h"
#include "desktop/version.h"
+#include "utils/log.h"
+#include "utils/nsoption.h"
+
#include "amiga/arexx.h"
#include "amiga/download.h"
#include "amiga/gui.h"
@@ -140,7 +142,15 @@ void ami_arexx_handle(void)
void ami_arexx_execute(char *script)
{
- IDoMethod(arexx_obj, AM_EXECUTE, script, NULL, NULL, NULL, NULL, NULL);
+ char full_script_path[1025];
+ BPTR lock;
+
+ if(lock = Lock(script, ACCESS_READ)) {
+ DevNameFromLock(lock, full_script_path, 1024, DN_FULLPATH);
+ LOG(("Executing script: %s", full_script_path));
+ IDoMethod(arexx_obj, AM_EXECUTE, full_script_path, NULL, NULL, NULL, NULL, NULL);
+ UnLock(lock);
+ }
}
void ami_arexx_cleanup(void)
diff --git a/amiga/filetype.c b/amiga/filetype.c
index b37ebe58d..aa3e29620 100644
--- a/amiga/filetype.c
+++ b/amiga/filetype.c
@@ -176,6 +176,8 @@ nserror ami_mime_init(const char *mimefile)
struct nsObject *node;
struct ami_mime_entry *mimeentry;
+ LOG(("mimetypes file: %s", mimefile));
+
if(ami_mime_list == NULL)
ami_mime_list = NewObjList();
diff --git a/amiga/gui.c b/amiga/gui.c
index f13b5672c..f49dc0666 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -580,13 +580,13 @@ static nserror ami_set_options(struct nsoption_s *defaults)
nsoption_setnull_charp(url_file,
(char *)strdup(temp));
- nsoption_setnull_charp(ca_bundle,
- (char *)strdup("PROGDIR:Resources/ca-bundle"));
-
sprintf(temp, "%s/FontGlyphCache", current_user_dir);
nsoption_setnull_charp(font_unicode_file,
(char *)strdup(temp));
+ nsoption_setnull_charp(ca_bundle,
+ (char *)strdup("PROGDIR:Resources/ca-bundle"));
+
/* font defaults */
#ifdef __amigaos4__
nsoption_setnull_charp(font_sans, (char *)strdup("DejaVu Sans"));
@@ -1800,7 +1800,6 @@ static void ami_handle_msg(void)
nnode=(struct nsObject *)GetSucc((struct Node *)node);
gwin = node->objstruct;
- LOG(("Type %d", node->Type));
if(node->Type == AMINS_TVWINDOW) {
if(ami_tree_event((struct treeview_window *)gwin)) {
@@ -1863,11 +1862,7 @@ static void ami_handle_msg(void)
if((gwin == NULL) || (gwin->objects[OID_MAIN] == NULL)) continue;
- LOG(("RA_HandleInput(%p,%p) (gwin=%p)", gwin->objects[OID_MAIN], &code, gwin));
-
while((result = RA_HandleInput(gwin->objects[OID_MAIN], &code)) != WMHI_LASTMSG) {
- LOG(("%d: %d (switch)",code, result & WMHI_CLASSMASK));
-
switch(result & WMHI_CLASSMASK) // class
{
case WMHI_MOUSEMOVE:
@@ -4036,27 +4031,32 @@ gui_window_create(struct browser_window *bw,
g->shared->objects[GID_STATUS] = NewObject(
NULL,
- "frbuttonclass",
+ "frbuttonclass", /**\todo find appropriate class which works on OS3 */
GA_ID, GID_STATUS,
GA_Left, scrn->WBorLeft + 2,
GA_RelBottom, -((2 + height + scrn->WBorBottom - scrn->RastPort.TxHeight)/2),
GA_Width, width,
+ GA_Height, 1 + height - scrn->WBorBottom,
GA_DrawInfo, dri,
GA_BottomBorder, TRUE,
GA_ReadOnly, TRUE,
-#ifdef __amigaos4__
+ GA_Disabled, TRUE,
GA_Image, (struct Image *)NewObject(
NULL,
+#ifdef __amigaos4__
"gaugeiclass",
+ GAUGEIA_Level, 0,
+#else
+ "frameiclass",
+ IA_Recessed, TRUE,
+#endif
IA_Top, 2 - (scrn->RastPort.TxHeight),
IA_Left, -4,
- IA_Height, 4 + scrn->RastPort.TxHeight,
- IA_InBorder, TRUE,
+ IA_Height, 1 + height - scrn->WBorBottom,
IA_Label, NULL,
+ IA_InBorder, TRUE,
IA_Screen, scrn,
- GAUGEIA_Level, 0,
TAG_DONE),
-#endif
TAG_DONE);
AddGList(g->shared->win, (struct Gadget *)g->shared->objects[GID_STATUS],
@@ -5258,7 +5258,7 @@ Object *ami_gui_splash_open(void)
tattr.ta_Name = "DejaVu Serif Italic.font";
#else
SetAPen(win->RPort, 3); /* Pen 3 is usually blue */
- tattr.ta_Name = "CGTriumvirate.font";
+ tattr.ta_Name = "ruby.font";
#endif
tattr.ta_YSize = 24;
tattr.ta_Style = 0;
@@ -5283,7 +5283,7 @@ Object *ami_gui_splash_open(void)
#ifdef __amigaos4__
tattr.ta_Name = "DejaVu Sans.font";
#else
- tattr.ta_Name = "CGTriumvirate.font";
+ tattr.ta_Name = "helvetica.font";
#endif
tattr.ta_YSize = 16;
tattr.ta_Style = 0;
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 9455d1cde..443077b58 100644
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -264,9 +264,10 @@ static void ami_plot_setopen(struct RastPort *rp, ULONG colr)
void ami_plot_clear_bbox(struct RastPort *rp, struct IBox *bbox)
{
- ami_plot_setapen(rp, 0xffffffff);
- RectFill(rp, bbox->Left, bbox->Top,
- bbox->Width+bbox->Left, bbox->Height+bbox->Top);
+ if((bbox == NULL) || (rp == NULL)) return;
+
+ EraseRect(rp, bbox->Left, bbox->Top,
+ bbox->Width + bbox->Left, bbox->Height + bbox->Top);
}
diff --git a/desktop/textarea.c b/desktop/textarea.c
index ece529e48..573da1d1d 100644
--- a/desktop/textarea.c
+++ b/desktop/textarea.c
@@ -934,10 +934,9 @@ static bool textarea_reflow_multiline(struct textarea *ta,
assert(ta->flags & TEXTAREA_MULTILINE);
if (ta->lines == NULL) {
- ta->lines =
- malloc(LINE_CHUNK_SIZE * sizeof(struct line_info));
+ ta->lines = calloc(sizeof(struct line_info), LINE_CHUNK_SIZE);
if (ta->lines == NULL) {
- LOG(("malloc failed"));
+ LOG(("Failed to allocate memory for textarea lines"));
return false;
}
ta->lines_alloc_size = LINE_CHUNK_SIZE;