1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-25 01:05:37 +00:00
Commit Graph

66 Commits

Author SHA1 Message Date
gabriele balducci
a96d7b3e5f Allow building with -Dlibsixel=false 2023-05-28 10:52:07 +01:59
Witold Filipczyk
aae82861cf [sixel] Added sixel to terminal options.
To see sixel images you must:
- build elinks with -Dlibsixel=true
- set document.plain.sixel=1
- enable sixel in terminal options
- add to mailcap:
image/*; img2sixel %s; copiousoutput
or
image/*; convert %s sixel:- ; copiousoutput

and click some images on terminal which supports sixel.

While opening dialogs or menu, sixel images are not shown.
2023-05-27 21:35:31 +02:00
Witold Filipczyk
c086cbe26e [color] Removed code related to draw_text_node
This idea failed. Code was slow.
2022-10-16 15:18:34 +02:00
Witold Filipczyk
81da515ba3 [menu] Removed unused functions 2022-03-19 10:34:00 +01:00
Witold Filipczyk
75aa0359a0 [menu] Removed unused function 2022-03-19 10:23:45 +01:00
Witold Filipczyk
afa50fe6ae [menu] Removed commmented code 2022-03-19 10:04:38 +01:00
Witold Filipczyk
1db4844920 [menu] _node 2022-03-18 18:44:13 +01:00
Witold Filipczyk
647e00f950 [intl] const language_to_iso639 2022-02-17 21:02:27 +01:00
Witold Filipczyk
b9701abffb [bfu] const in add_to_menu 2022-02-10 19:57:33 +01:00
Witold Filipczyk
cd49b315d9 [action] enum main_action -> main_action_T 2022-01-28 15:26:43 +01:00
Witold Filipczyk
199f1c60ff [draw] enum screen_char_attr -> screen_char_attr_T 2022-01-28 14:47:36 +01:00
Witold Filipczyk
3f29dada0a [bfu] enum menu_item_flags -> menu_item_flags_T 2022-01-28 14:35:18 +01:00
Witold Filipczyk
f706afe8d0 [bfu] enum menu_action -> action_id_T 2022-01-28 14:05:46 +01:00
Witold Filipczyk
e4550c1562 [bfu] cast 2022-01-24 21:53:18 +01:00
Witold Filipczyk
53a860a3d6 [strchr] casting first parameter to const char * was not a good idea 2022-01-18 20:30:48 +01:00
Witold Filipczyk
23f1a7cdce [mem_align_alloc] cast 2022-01-17 15:54:50 +01:00
Witold Filipczyk
881f896e85 [mem_calloc] Cast 2022-01-16 21:08:50 +01:00
Witold Filipczyk
66305fcb50 [gettext] try system gettext. Refs #62
Now, only meson was changed.
-Dnls=true -Dgettext=true
2021-08-08 21:25:08 +02:00
Witold Filipczyk
0fea79cc8f [cflags] Removed -Wno-pointer-sign
Likely some new bugs were introduced by this change.
The long term goal is clean compilation by g++.
2021-01-02 16:20:27 +01:00
Witold Filipczyk
3d96b0d7d7 Revert "Compile with C++."
This reverts commit 4f4df33638.
2019-04-21 12:27:40 +02:00
Witold Filipczyk
4f4df33638 Compile with C++.
Weak points:
- alignof
- js problems

Todo:
- make js work with C++ and mozjs-17
- then mozjs-24
- then mozjs-52
- then mozjs-60
- decrease number of warnings
2019-02-17 20:46:16 +01:00
Witold Filipczyk
d8be2c505e Rename struct box to struct el_box.
In the future I want to copy some code from netsurf, so I'm preparing.
2018-09-09 19:14:56 +02:00
Witold Filipczyk
1b06539694 Explicit cast to (const char *) in strcasestr for C++ 2016-04-20 20:11:08 +02:00
Witold Filipczyk
52d6f37c8e Explicit cast to (const char *) for strchr function (C++) 2016-04-20 19:43:37 +02:00
Witold Filipczyk
3688bb9c61 auto-completion reads not only the first character, but also the next ones.
This behaviour is similar to other browsers.
2015-05-12 16:12:56 +02:00
Miciah Dashiel Butler Masters
f1dee0d04f Drop special handling of ctrl-l
Drop special handling of ctrl-l in handle_interlink_event.

To make sure that the 'redraw' action works everywhere, first modify
menu_kbd_handler and mainmenu_kbd_handler to handle ACT_MENU_REDRAW; and
second, drop the ACTION_REQUIRE_VIEW_STATE flag from the 'redraw' action in
the 'main' keymap so that it works even if there is no document loaded.

Ctrl-l is already bound to 'redraw' in all keymaps by default, so the
current default behaviour is preserved.
2009-05-22 19:50:28 +00:00
Kalle Olavi Niemitalo
8010b3371b big dialogs: redraw the dialog when scrolling
Merge functions:
redraw_from_window(win) => redraw_windows(REDRAW_IN_FRONT_OF_WINDOW, win)
redraw_below_window(win) => redraw_windows(REDRAW_BEHIND_WINDOW, win)
Add REDRAW_WINDOW_AND_FRONT as a third possibility.
Then use that in update_hierbox_browser(), which previously used
window.next for this purpose, and in dialog-scrolling code,
which previously did not redraw the dialog box itself.
2008-10-12 14:01:05 +03:00
Miciah Dashiel Butler Masters
92abd48405 Drop EVENT_TEXTAREA, use EVENT_RESIZE instead
When returning from an external program, unblock_itrm_x in the slave process will send a resize event to the master process for the slave terminal.  In handle_interlink_event, when we receive this resize event, we can check whether we need to call textarea_edit.
2007-09-01 12:46:02 +00:00
Miciah Dashiel Butler Masters
1000f88748 bug 181: Allow edit textareas using an external editor on slave terminals.
Added EVENT_TEXTAREA used to notify the master terminal
about end of execution of an external program on a slave terminal.
The format of data sent to the master terminal by exec_on_slave_terminal
has changed. Now after 0, fg the value of term is sent.
Therfore this release of ELinks is incompatible with previous releases.

Patch by Witold Filipczyk, taken from his witekfl branch.

Conflicts:

	src/viewer/text/textarea.c
2007-09-01 09:00:33 +00:00
Miciah Dashiel Butler Masters
ea372bd0cd get_opt_*: Add ses parameter
Add a session parameter to get_opt_ and its wrappers in preparation for session-specific and domain-specific options.
2007-08-28 17:24:59 +00:00
Kalle Olavi Niemitalo
45d1750d03 Bug 914: Don't let UTF-8 I/O affect internal representations.
Use it for the actual I/O only.  Previously, defining CONFIG_UTF8 and
enabling UTF-8 used to force many strings to the UTF-8 charset
regardless of the terminal charset option.  Now, those strings always
follow the terminal charset.  This fixes bug 914 which was caused
because _() returned strings in the terminal charset and functions
then assumed they were in UTF-8.  This reduction in the effects of
UTF-8 I/O may also simplify future testing.
2007-05-20 15:31:02 +03:00
Kalle Olavi Niemitalo
157124dcdb UTF-8: Whitespace changes. 2007-05-19 14:22:36 +03:00
Kalle Olavi Niemitalo
801d520ddd Fix compiler errors without HAVE_VARIADIC_MACROS. 2007-03-11 12:22:02 +02:00
Miciah Dashiel Butler Masters
1a89589b13 menu_handler: Don't call get_parent_ptr for redraw events
Only call get_parent_ptr for resize events so that the menu isn't moved
to the cursor position for normal redraw events.
2007-03-03 12:44:45 +00:00
Kalle Olavi Niemitalo
8b8cd57941 Use new macro UCS_ORPHAN_CELL for broken double-cell characters.
UCS_ORPHAN_CELL is currently defined as U+0020 SPACE, which was
already used before this macro, so the behaviour does not change,
but the code seems clearer now.

I searched for ' ' and 32 and 0x20 and \x20, and replaced with
UCS_ORPHAN_CELL wherever UCS_NO_CHAR was involved.  However,
some BFU widgets first draw spaces and then overwrite with text;
those will require a more complex fix if UCS_ORPHAN_CELL is ever
changed to some other character.
2006-11-13 00:49:59 +02:00
Laurent MONIN
0b58b99d30 Use @current_tab for current tab. 2006-09-28 23:58:26 +02:00
Kalle Olavi Niemitalo
92cb452a9e Rename CONFIG_UTF_8 to CONFIG_UTF8.
The configure script no longer recognizes "CONFIG_UTF_8=yes" lines
in custom features.conf files.  They will have to be changed to
"CONFIG_UTF8=yes".  This incompatibility was deemed acceptable
because no released version of ELinks supports CONFIG_UTF_8.

The --enable-utf-8 option was not renamed.
2006-09-17 16:12:47 +03:00
Kalle Olavi Niemitalo
e8462980e5 Change "utf_8" to "utf8" in most identifiers.
Suggested by Miciah on #elinks.

What was renamed:
  add_utf_8                      => add_utf8
  cp2utf_8                       => cp2utf8
  encode_utf_8                   => encode_utf8
  get_translation_table_to_utf_8 => get_translation_table_to_utf8
  goto invalid_utf_8_start_byte  => goto invalid_utf8_start_byte
  goto utf_8                     => goto utf8
  goto utf_8_select              => goto utf8_select
  terminal_interlink.utf_8       => terminal_interlink.utf8
  utf_8_to_unicode               => utf8_to_unicode

What was not renamed:
  terminal._template_.utf_8_io option, TERM_OPT_UTF_8_IO
    Compatibility with existing elinks.conf files would require an alias.
  --enable-utf-8
    Because the name of the charset is UTF-8, --enable-utf-8 looks better
    than --enable-utf8.
  CONFIG_UTF_8
    Will be renamed in a later commit.
  Unicode/utf_8.cp, table_utf_8, aliases_utf_8
    Will be renamed in a later commit.
2006-09-17 16:06:22 +03:00
Kalle Olavi Niemitalo
f3b04b8645 terminal: Introduce term_event_key_T. 2006-08-12 14:48:08 +03:00
Kalle Olavi Niemitalo
fde466bde9 terminal: Introduce macros for KBD_F1...KBD_F12 arithmetic. 2006-08-06 20:02:39 +00:00
Laurent MONIN
1136aefb71 Trim trailing whitespaces. 2006-07-27 09:51:10 +02:00
Laurent MONIN
a897a95721 Compilation fixes (CONFIG_UTF_8): move variables declarations at start
of blocks. Old compilers do not support in-block declarations.
2006-07-27 09:49:49 +02:00
Witold Filipczyk
2a6125e3d0 Merge with utf8. src/document/plain/renderer.c replaced by utf8 version 2006-07-21 13:12:06 +02:00
Miciah Dashiel Butler Masters
588fa3ece8 Properly deselect the main menu instead of crashing
In send_kbd_event, use deselect_mainmenu to get rid of the main menu
instead of delete_window. This fixes bug 747.
2006-06-19 11:07:03 +00:00
Laurent MONIN
3e4bf0cf27 Fix: redraw main menu when one cancels it by clicking outside menu space. 2006-06-07 16:33:14 +02:00
Miciah Dashiel Butler Masters
f271a06487 Factor deselect_mainmenu out of select_menu_item, do_mainmenu,
mainmenu_mouse_handler, and mainmenu_kbd_handler
2006-06-02 03:57:53 +00:00
Miciah Dashiel Butler Masters
cdcc8c8415 do_mainmenu: get the menu's window via menu->win instead of using a
silly foreach loop
2006-06-02 03:54:54 +00:00
Miciah Dashiel Butler Masters
c330ae9b9c do_mainmenu: use add_to_list instead of add_at_pos 2006-06-02 03:27:55 +00:00
Kalle Olavi Niemitalo
0a8633d07e BFU: Fix infinite loops in menus that have only unselectable elements.
src/bfu/menu.c (scroll_menu): Let neither menu->selected nor pos
become -2.

src/bfu/menu.c (menu_mouse_handler): Call set_menu_selection directly
rather than via scroll_menu, as sel is already known to be selectable.
(Not required for fixing the bug.)

src/bfu/menu.c (menu_search_handler): Break infinite loops also if
menu->selected is -1 initially.

src/bfu/menu.c (menu_handler): Instead of tweaking menu->selected
directly, let scroll_menu do it.
2006-05-21 20:09:53 +03:00
Kalle Olavi Niemitalo
9fa5ae374f BFU: Fix searching in menus past unselectable items.
The bug was that menu_search_handler gave scroll_menu an incorrect
count because it didn't know that scroll_menu skips unselectable
items.
2006-05-21 18:12:34 +03:00