Commit Graph

95 Commits

Author SHA1 Message Date
Andrew Borodin
b3b332083c Use commands instead of callbacks to execute menu items.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-26 16:15:31 +03:00
Andrew Borodin
e73664d966 Menu fixes and optimization.
Fixed hotkey handling.
Optimized call of menu item callback.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-26 16:15:31 +03:00
Andrew Borodin
c47d2d20d7 New menu engine: use GList instead of GPtrArray.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-26 16:15:31 +03:00
Andrew Borodin
83b855027e Menu: handle HOME and END keys.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-26 16:15:31 +03:00
Andrew Borodin
7f7bc452e3 Ticket #1563: Modified menu engine to create and modify menu dynamically.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-26 16:15:31 +03:00
Andrew Borodin
95d53b08cf Ticket #1564: fiix segfault in menu at GPM_DRAG mouse event.
Ignore GPM_DRAG mouse event above or below dropped down menu.
Also fixed handling of click events.

Minor optimization.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-09-23 09:38:50 +04:00
Slava Zanko
981fe001d1 Base support of skins.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-09-18 11:49:44 +03:00
Andrew Borodin
ae3a14ae0e Modified mouse event handling in menu.
Fixed event boundaries: menu frame is in event aria now.

Middle click is used to execute selected menu item independently
of mouse cursor position.

Minor optimization.

Indentation.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-09-14 15:11:59 +04:00
Andrew Borodin
07f237782b If menu is inactive, ignore mouse wheel events.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-09-14 15:11:59 +04:00
Andrew Borodin
a14574d037 Fixed mouse event boundaries in menus.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-09-14 15:11:59 +04:00
Andrew Borodin
c2f37224c5 Don't close menu by mouse wheel outside the menu area.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-09-14 15:11:59 +04:00
Andrew Borodin
7c5407e86e Ticket #1564: mouse wheel support for menus and listboxes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-09-14 15:11:59 +04:00
Ilia Maslakov
465d4d2cc5 Ticket #1497 (stickchars)
add frm_* vars
    read frame lines from ini
[Lines]
lefttop
righttop
centertop
centerbottom
leftbottom
rightbottom
leftmiddle
rightmiddle
centermiddle
horiz
vert
thinhoriz
thinvert

    fix draw frames in stickchar mode

Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-09-07 10:17:27 +00:00
Denys Vlasenko
e064bd60df De-inline a few functions which are large
...or not-so-large but nevertheless
contain more than one function call,
or contain loops, or contain if's and at least one
function call, or contain largish objects on stack.

In my experience, in those cases the code size
growth is big enough to not inline stuff.

I guess some of the really big functions
are defined inline because they have, or had in the past,
just one callsite.

But for a few years gcc already does it automatically,
no need to do it by hand and risk code size explosion
when later during code evolution another callsite
is created. This optimization by hand is simply
no longer needed.

Anyway, here is the code size difference:

   text    data     bss     dec     hex filename
 572337   17944  177820  768101   bb865 mc.t5/.obj/src/mc
 567697   17944  177820  763461   ba645 mc.t6/.obj/src/mc

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-08-31 07:12:59 +03:00
Andrew Borodin
5da55ec14e Ticket #1565 (incorrect draw menu)
fix: now used correct color for draw menu frames

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-26 09:19:44 +00:00
Andrew Borodin
f2e6817363 Ticket #1414: small refactoring before major modifications.
Fixed missed includes.
Fised widget_set_size() declaration.
Moved default widget callback (default_proc()) from dialog.[ch] to widget.[ch].

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-17 15:54:39 +04:00
Andrew Borodin
05f3ee1f6c TTY: modifed initialization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-12 21:23:54 +04:00
Andrew Borodin
30fd7fc34a TTY: modified line drawing. 2009-08-12 21:23:13 +04:00
Andrew Borodin
fe1adb5f27 tty_print_char() function is used instead of addch() one.
Modified tty_print_char() function for S-Lang library to use it
instead of addch().
2009-08-12 21:23:12 +04:00
Andrew Borodin
f1670d735e Fixed commnets about #include's. 2009-08-12 21:23:12 +04:00
Andrew Borodin
5a5a8bd3c0 Reorganization of key and window management functions. 2009-08-12 21:23:12 +04:00
Andrew Borodin
7ed7c83e8d Replaced addstr(str_term_form(...)) to tty_print_string(...). 2009-08-12 21:22:17 +04:00
Andrew Borodin
ebbf6fbcdc Replaced functions.
attrset() -> tty_setcolor()
move() -> tty_gotoyx()
getyx() -> tty_getyx()
2009-08-12 21:19:20 +04:00
Andrew Borodin
389e5bf613 Moved rxvt.c, win.[ch] and x11con.[ch] from src to src/tty directory.
Fixed includes.
Fixed library order in src/Makefile.am due to --as-needed linking option.
2009-08-12 21:19:20 +04:00
Andrew Borodin
f3730bdc41 Initial step to move TTY layer of MC to separate library. 2009-08-12 21:19:20 +04:00
Andrew Borodin
8a1c364ff0 Ticket #330: show dropped down menu is screen has been resized.
Now works for both values of "menuBar visible" option.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-10 15:30:29 +04:00
Slava Zanko
2ebdf91079 Merge branch 'm-utf-8'
* m-utf-8: (223 commits)
  Fix wildcard pattern in file select and file find dialogs
  Project builds with option --disable-charsets
  Deleted build-glib1.sh because glib1 don't work with utf-8
  fix building without --enable-charset
  Total replacement to mc_search stuff in all places
  Search engine: if found_len parameter NULL, then mc_search_run don't try to fill them
  src/view.c: Reworked search stuff to usage src/search
  refactoring: rename edit/editcmd_dialog.c:editcmd_dialog__get_search_types_list to
  Search engine: development of hex search complete
  Search engine: remove forgotten debug string and reindent file
  Search engine:
  configure.ac: if present glib-2.14 and higher, libpcre don't linked
  Search engine: now used regexp external engines:
  src/find.c: Fixed core dump if content search pattern no present
  edit/editcmd_dialogs.c: fixed state of search type between dialog window calls
  Find files: checkbox 'Regular expression' for content search now default unchecked
  Find files: changes for usage of new search engine:
  Fix copy of current/opposite path to command line: remove charset info from path
  src/Makefile.am: add some header files to Make-tracking
  Fixed editor menu reloading.
2009-05-07 13:01:01 +03:00
Andrew Borodin
aadcca8048 src/edit.c (create_menu): small fix of i18n for menu entry text. 2009-05-01 21:08:21 +04:00
Andrew Borodin
931f0d073d src/menu.c: nice menu view: added LTEE and RTEE symbols to menu separators.
Small optimization. Removed some trailing spaces. Some formatting.
2009-04-26 18:22:53 +04:00
Andrew Borodin
95b622f0db src/menu.c (create_menu): don't translate menu entry text if ENABLE_NLS isn't defined. 2009-04-24 20:11:45 +04:00
Andrew Borodin
baef389ce7 menu.c (menubar_new): init the subsel field clearly.
(menu_callback): show menu after screen resize.
2009-04-22 12:00:21 +03:00
Mikhail S. Pobolovets
1959b42fdc Merge branch '252_doxygen_desc_src'
Conflicts:

	src/file.h

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-04-16 08:26:52 +03:00
Ilia Maslakov
3b5e2c052f Merge branch 'utf-8' into master
resolve conflicts:
	configure.ac
	src/complete.c
	src/file.c
	src/layout.c
	src/main.c
	src/menu.c
	src/screen.c
	src/util.c
	src/widget.c
	src/widget.h
2009-04-04 19:50:46 +00:00
Andrew Borodin
a9d59f9afc Fixed menu painting for NCurses screen library. 2009-02-26 19:55:10 +03:00
Mikhail S. Pobolovets
758ab591d8 Simple doxygen description for files in src directory.
Mostly \file and \brief tag added.

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-02-10 16:07:59 +02:00
Slava Zanko
e54f318cef Completely removed MHL stuff
Changed all source files relative to remove MHL

Some string-related functions moved into src/util.c

This stable fix.
2009-02-06 14:01:28 +02:00
Patrick Winnertz
d84586ba82 Reverted the use of mhl_str_dup and use g_strdup instead.
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 23:40:32 +01:00
Patrick Winnertz
1c287d798d First bunch of mhl_mem_free removal patches
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 23:36:58 +01:00
Enrico Weigelt, metux IT service
8b38cf44da manully merged 227_replace_g_free 2009-02-02 22:34:05 +01:00
Enrico Weigelt, metux IT service
f921cc40cd replaced calls to g_strdup() by mhl_str_dup() 2009-01-30 20:10:40 +01:00
Enrico Weigelt, metux IT service
15d7d47c15 replaced g_free() by mhl_mem_free() 2009-01-30 19:28:35 +01:00
Slava Zanko
4f00496233 patches by Rostislav Beneš: mc-12-menu
like buttons use menu entries hotkey_t. But menus are staticly defined, so this
change is much bigger. All menu declaration must be edited. follow standard
changes in drawing and handling hotkeys.

now basic mc's functions works in utf-8, remain correct calculation of controls
width in dialogs, replace functions like tolower, toupper,isspace, ... width
functions from strutil or g_ascii variant.
2009-01-26 11:47:41 +02:00
Pavel Tsekov
7ad6feae42 * src/achown.c: Update copyright notice.
* src/chmod.c: Likewise.
* src/chown.c: Likewise.
* src/cmd.c: Likewise.
* src/color.c: Likewise.
* src/command.c: Likewise.
* src/cons.handler.c: Likewise.
* src/cons.saver.c: Likewise.
* src/dialog.c: Likewise.
* src/dir.c: Likewise.
* src/help.c: Likewise.
* src/info.c: Likewise.
* src/man2hlp.c: Likewise.
* src/menu.c: Likewise.
* src/mouse.c: Likewise.
* src/option.c: Likewise.
* src/profile.c: Likewise.
* src/screen.c: Likewise.
* src/setup.c: Likewise.
* src/subshell.c: Likewise.
* src/user.c: Likewise.
* src/win.c: Likewise.
* vfs/sfs.c: Likewise.
* vfs/tcputil.c: Likewise.
2007-09-26 10:22:25 +00:00
Roland Illig
03759c8f34 * main.h: Added const qualifier to the global prompt variable.
* main.c: Likewise.
2005-09-05 02:10:48 +00:00
Roland Illig
070b0dccf2 Use hline() instead of addch() to clear the menubar widget area. 2005-08-05 12:01:47 +00:00
Pavel Roskin
1f60f44145 Update postal address of Free Software Foundation. 2005-05-27 03:35:10 +00:00
Roland Illig
a3e822b6ba * menu.c: Removed function casts. 2005-05-23 16:39:52 +00:00
Pavel Roskin
9260860bbf * dialog.c (dlg_select_widget): Remove first argument, it's
redundant.  Adjust all callers.
(dlg_replace_widget): Likewise.
2005-05-20 20:22:06 +00:00
Pavel Roskin
c90d263d2c * .c: Sanitize all calls to functions from ctype.h. Fix gcc 4.0
warnings.
2005-05-11 01:16:58 +00:00
Roland Illig
fc85bdba7e * *.c: Reordered header inclusion. 2005-02-08 09:04:03 +00:00