diff options
Diffstat (limited to 'atari/ctxmenu.c')
-rw-r--r-- | atari/ctxmenu.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/atari/ctxmenu.c b/atari/ctxmenu.c index fadf69de2..06df25903 100644 --- a/atari/ctxmenu.c +++ b/atari/ctxmenu.c @@ -96,7 +96,7 @@ static struct s_context_info * get_context_info( struct gui_window * gw, short m memset( &ctxinfo.ccdata, sizeof(struct contextual_content), 0 );
browser_window_get_contextual_content(
gw->browser->bw,
- mx+gw->browser->scroll.current.x,
+ mx+gw->browser->scroll.current.x,
my+gw->browser->scroll.current.y,
(struct contextual_content*)&ctxinfo.ccdata
);
@@ -149,7 +149,8 @@ void context_popup( struct gui_window * gw, short x, short y ) char * data;
FILE * fp_tmpfile;
char * tempfile;
- int err = 0;
+ int err = 0; + char cmdline[128];
pop = get_tree( POP_CTX );
if( pop == NULL )
@@ -251,11 +252,18 @@ void context_popup( struct gui_window * gw, short x, short y ) fp_tmpfile = fopen( tempfile, "w" );
if( fp_tmpfile ){
fwrite( data, size, 1, fp_tmpfile );
- fclose( fp_tmpfile );
- err = ShelWrite( option_atari_editor, tempfile , NULL, 1, 0);
+ fclose( fp_tmpfile ); + // TODO: check if app is runnin, if not, use pexec or such. + /*sprintf((char*)&cmdline, "%s \"%s\"", option_atari_editor, tempfile ); + system( (char*)&cmdline ); + */ + //err = ShelWrite( option_atari_editor, tempfile , option_atari_editor, 1, 0); LOG(("launched: %s %s (%d)\n", option_atari_editor, tempfile, err ));
- }
+ } +
}
+ } else { + LOG(("Please set option_atari_editor!")); }
break;
|