diff options
Diffstat (limited to 'atari/ctxmenu.c')
-rw-r--r-- | atari/ctxmenu.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/atari/ctxmenu.c b/atari/ctxmenu.c index 2acf61ca4..d5c39d341 100644 --- a/atari/ctxmenu.c +++ b/atari/ctxmenu.c @@ -149,8 +149,8 @@ void context_popup( struct gui_window * gw, short x, short y ) char * data;
FILE * fp_tmpfile;
char * tempfile;
- int err = 0; - char * editor; + int err = 0;
+ char * editor;
char cmdline[128];
pop = get_tree( POP_CTX );
@@ -177,7 +177,7 @@ void context_popup( struct gui_window * gw, short x, short y ) if( ctx->flags & CNT_HREF ){
SET_BIT(pop[ POP_CTX_COPY_LINK ].ob_state, DISABLED, 0);
- SET_BIT(pop[ POP_CTX_OPEN_NEW ].ob_state, DISABLED, 0); + SET_BIT(pop[ POP_CTX_OPEN_NEW ].ob_state, DISABLED, 0);
SET_BIT(pop[ POP_CTX_SAVE_LINK_AS ].ob_state, DISABLED, 0);
}
@@ -210,24 +210,24 @@ void context_popup( struct gui_window * gw, short x, short y ) browser_window_key_press( gw->browser->bw, KEY_SELECT_ALL );
break;
- case POP_CTX_SAVE_AS: - if( ctx->ccdata.object != NULL ) { + case POP_CTX_SAVE_AS:
+ if( ctx->ccdata.object != NULL ) {
if( hlcache_handle_get_url(ctx->ccdata.object) != NULL ) {
browser_window_download(
gw->browser->bw,
nsurl_access(hlcache_handle_get_url(ctx->ccdata.object)),
nsurl_access(hlcache_handle_get_url(gw->browser->bw->current_content))
);
- } - } - - case POP_CTX_SAVE_LINK_AS: - if( ctx->ccdata.link_url != NULL ) { + }
+ }
+
+ case POP_CTX_SAVE_LINK_AS:
+ if( ctx->ccdata.link_url != NULL ) {
browser_window_download(
gw->browser->bw,
- nsurl_access((const char*)ctx->ccdata.link_url),
+ nsurl_access(/*(const char*)*/ctx->ccdata.link_url),
nsurl_access(hlcache_handle_get_url(gw->browser->bw->current_content))
- ); + );
}
break;
@@ -257,7 +257,7 @@ void context_popup( struct gui_window * gw, short x, short y ) }
break;
- case POP_CTX_VIEW_SOURCE: + case POP_CTX_VIEW_SOURCE:
editor = nsoption_charp(atari_editor);
if( editor != NULL && strlen(editor)>0 ) {
data = content_get_source_data( gw->browser->bw->current_content, &size );
@@ -266,24 +266,24 @@ 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 ); - - // TODO: check if app is runnin, if not, use pexec or such. - /* - sprintf((char*)&cmdline, "%s \"%s\"", nsoption_charp(atari_editor), tempfile ); - system( (char*)&cmdline ); - */ - err = ShelWrite( editor, tempfile , editor, 1, 0); + fclose( fp_tmpfile );
+
+ // TODO: check if app is runnin, if not, use pexec or such.
+ /*
+ sprintf((char*)&cmdline, "%s \"%s\"", nsoption_charp(atari_editor), tempfile );
+ system( (char*)&cmdline );
+ */
+ err = ShelWrite( editor, tempfile , editor, 1, 0);
LOG(("Launched: %s %s (%d)\n", editor, tempfile, err ));
- } else { - printf("Could not open temp file: %s!\n", tempfile ); - } + } else {
+ printf("Could not open temp file: %s!\n", tempfile );
+ }
- } else { - LOG(("Invalid content!")); + } else {
+ LOG(("Invalid content!"));
}
- } else { - form_alert(0, "[1][Set option \"option_atari_editor\".][OK]"); + } else {
+ form_alert(0, "[1][Set option \"option_atari_editor\".][OK]");
}
break;
|