1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00
Inconsequential change to push_hierbox_delete_button

Use item instead of context->item.
This commit is contained in:
Miciah Dashiel Butler Masters 2006-02-19 06:22:12 +00:00 committed by Miciah Dashiel Butler Masters
parent 72f82e8553
commit a3fb98f499
3 changed files with 22 additions and 14 deletions

View File

@ -42,6 +42,14 @@ function root_w00t(cached, vs) {
};
elinks.preformat_html_hooks.push(root_w00t);
function fix_rss_content_type(cached, vs) {
if (cached.uri.match(/rss\.slashdot\.org|\.(rss|rdf)$/))
cached.type = 'application/rss+xml';
return true;
};
elinks.preformat_html_hooks.push(fix_rss_content_type);
function mangle_deb_bugnumbers(cached, vs) {
if (!cached.uri.match(/^[a-z0-9]+:\/\/[a-z0-9A-Z.-]+debian\.org/)
&& !cached.uri.match(/changelog\.Debian/))

View File

@ -754,26 +754,26 @@ push_hierbox_delete_button(struct dialog_data *dlg_data,
return EVENT_PROCESSED;
}
delete = ops->can_delete(context->item)
delete = ops->can_delete(item)
? DELETE_LOCKED : DELETE_IMPOSSIBLE;
if (delete == DELETE_IMPOSSIBLE || ops->is_used(context->item)) {
print_delete_error(context->item, term, ops, delete);
if (delete == DELETE_IMPOSSIBLE || ops->is_used(item)) {
print_delete_error(item, term, ops, delete);
mem_free(context);
return EVENT_PROCESSED;
}
text = ops->get_text(context->item, term);
text = ops->get_text(item, term);
if (!text) {
mem_free(context);
return EVENT_PROCESSED;
}
if (context->item->type == BI_FOLDER) {
if (item->type == BI_FOLDER) {
unsigned char *title = listbox_message(delete_folder_title);
unsigned char *message = listbox_message(delete_folder);
ops->lock(context->item);
ops->lock(item);
msg_box(term, getml(context, NULL), MSGBOX_FREE_TEXT,
title, ALIGN_CENTER,
msg_text(term, message, text),
@ -783,9 +783,9 @@ push_hierbox_delete_button(struct dialog_data *dlg_data,
} else {
unsigned char *title = listbox_message(delete_item_title);
unsigned char *message = listbox_message(delete_item);
unsigned char *msg = ops->get_info(context->item, term);
unsigned char *msg = ops->get_info(item, term);
ops->lock(context->item);
ops->lock(item);
msg_box(term, getml(context, NULL), MSGBOX_FREE_TEXT,
title, ALIGN_LEFT,

View File

@ -32,21 +32,21 @@
#define MEMORY_CACHE_GC_PERCENT 90
#define MAX_CACHED_OBJECT_PERCENT 25
#define MAX_INPUT_HISTORY_ENTRIES 256
#define MAX_INPUT_HISTORY_ENTRIES 1024
#define SCROLL_ITEMS 2
#define DIALOG_LEFT_BORDER 3
#define DIALOG_TOP_BORDER 1
#define DIALOG_LEFT_INNER_BORDER 2
#define DIALOG_LEFT_BORDER 0
#define DIALOG_TOP_BORDER 0
#define DIALOG_LEFT_INNER_BORDER 0
#define DIALOG_TOP_INNER_BORDER 0
#define DIALOG_FRAME 2
#define DIALOG_FRAME 0
#define DIALOG_MIN_WIDTH 42
#define DIALOG_LB (DIALOG_LEFT_BORDER + DIALOG_LEFT_INNER_BORDER + 1)
#define DIALOG_TB (DIALOG_TOP_BORDER + DIALOG_TOP_INNER_BORDER + 1)
#define ESC_TIMEOUT ((milliseconds_T) 200)
#define ESC_TIMEOUT ((milliseconds_T) 50)
#define DISPLAY_TIME_MIN ((milliseconds_T) 200)
#define DISPLAY_TIME 20