Commit Graph

11733 Commits

Author SHA1 Message Date
Slava Zanko
a354a9b228 Ticket #2695: fixed segfault on newly created files in editor
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-15 12:47:46 +03:00
Andrew Borodin
61ee9cef43 Merge branch '2747_hotlist_load_fixups'
* 2747_hotlist_load_fixups:
  Support of use ~ as home directory in hotlist.
  Ticket #2747: fixups of hotlist loading.
2012-03-12 16:27:07 +03:00
Andrew Borodin
dd9c7516a3 Support of use ~ as home directory in hotlist.
Expand tilde while vfs path canonicalize.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-12 16:23:59 +03:00
Andrew Borodin
cfc13ba3a0 Ticket #2747: fixups of hotlist loading.
Path transformation while loading hotlist breaks shell variable
substitution.
Load paths from hotlist as is withowt any transformation.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-12 16:22:22 +03:00
Sergei Trofimovich
a742521198 misc/syntax/cabal.syntax: added some cabal-1.8+ keywords
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2012-03-09 21:16:28 +03:00
Andrew Borodin
da00fa0b04 Fixup of getting stat info before file operation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 19:37:39 +03:00
Andrew Borodin
dba17c8fde Merge branch '2608_widget_enhancement'
* 2608_widget_enhancement:
  Make menu always resizable.
  Fixed location of hotlist query dialogs.
  Added D_CENTER flag to query dialog flags
  Workaround for NCurses output routines.
  Allow draw a part of line if some coordinares are out of screen boundaries.
  Allow close help and tree dialogs using ctrl-g shortcut (SIGINT).
  Allow override standard dialog actions in some dialog.
  Don't get dialog hotkey from disabled widget.
  Fixed widget redraw order in dialog.
  Menu hack to keep overlapped widgets order
  Added dlg_set_top_widget() function
  Allow add and remove widgets in runtime.
  Put global mouse coordinates to widgets.
  Fix mouse handling in dialog.
  Ticket #2608: widget enhancements.
2012-03-08 10:38:46 +03:00
Andrew Borodin
fc371ba8f8 Make menu always resizable.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:56 +03:00
Andrew Borodin
50c63ca886 Fixed location of hotlist query dialogs.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:56 +03:00
Andrew Borodin
19a4eb1ca6 Added D_CENTER flag to query dialog flags
...to forced place a query dialog in the center of the screen.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:56 +03:00
Andrew Borodin
e1f2b5b017 Workaround for NCurses output routines.
Unlike S-Lang, NCurses always wraps long lines and unable trancate that
to pring only visible part of text. Therefore we have to implement our
own addch() wrappers.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:56 +03:00
Andrew Borodin
62fc80f5f7 Allow draw a part of line if some coordinares are out of screen boundaries.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:56 +03:00
Andrew Borodin
140d4ea117 Allow close help and tree dialogs using ctrl-g shortcut (SIGINT).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
7e6ff9caf9 Allow override standard dialog actions in some dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
dc3d161e71 Don't get dialog hotkey from disabled widget.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
65d9697d69 Fixed widget redraw order in dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
8bbad1dbfb Menu hack to keep overlapped widgets order
...required in multi-window editor.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
fe34f89a19 Added dlg_set_top_widget() function
...to move widget to the top of widget list and make it current.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
6ad4b2466b Allow add and remove widgets in runtime.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
33d25a0c8f Put global mouse coordinates to widgets.
Now each widget gets absolute coordinates of mouse pointer and decides
itself how to handle them.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
7956b64e54 Fix mouse handling in dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
c3f359c82b Ticket #2608: widget enhancements.
New method of widget ID assignment:
now widget ID is a value of unsigned long type. Dlg_head structure now has
new filed widget_id that contains a ID of the next added widget. When new
widget is added into dialog, widget_id is set as ID of it and then
incremented.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
8fe49bb599 Merge branch '2695_editor_segfault'
* 2695_editor_segfault:
  Ticket #2695: Fixed segfault while new file created in editor.
2012-03-08 10:34:17 +03:00
Slava Zanko
8451286bb5 Ticket #2695: Fixed segfault while new file created in editor.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-08 10:33:22 +03:00
Slava Zanko
1784d57ace Merge branch '2695_expansion_to_src'
* 2695_expansion_to_src: (51 commits)
  Fixed creation of lock files
  Changed function remove_encoding_from_path() for return vfs_path_t type
  fixup! Added tests for examine_cd() function.
  panels: Show archive name when entering to archive
  Fixed destination file name when file dialog with single operation is appear
  vfs_path: Fixed broken relative paths processing.
  Reimplemented list of operated files using GSList.
  Return values of following functions are constants now:
  Changed src/filemanager/file.c to handle vfs_path_t objects.
  Changed lot of functions in src/ directory
  Share same code between update_xterm_title_path() and midnight_get_title() functions
  Changes to handle vfs_path_t object:
  VFS: Added new function vfs_path_to_str_flags()
  Use vfs_path_t in execute.c and subshell.c.
  Changed do_cd() and do_panel() functions
  Added unit test for do_panel_cd() functions.
  Code refactoring: removed concat_dir_and_file() function.
  Code refactoring
  Changed internal viewer to use vfs_path_t objects.
  Changed internal editor to use vfs_path_t objects.
  ...
2012-03-06 12:13:15 +03:00
Slava Zanko
4047403077 Fixed creation of lock files
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:32 +03:00
Slava Zanko
8d71371961 Changed function remove_encoding_from_path() for return vfs_path_t type
Also, fixed bug with non-changeable encoding inside archives.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:32 +03:00
Slava Zanko
af1f37b967 fixup! Added tests for examine_cd() function. 2012-03-06 11:52:32 +03:00
Slava Zanko
9d005bce6f panels: Show archive name when entering to archive
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:32 +03:00
Slava Zanko
49e35a62fb Fixed destination file name when file dialog with single operation is appear
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:31 +03:00
Slava Zanko
05d220a9c6 vfs_path: Fixed broken relative paths processing.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:31 +03:00
Andrew Borodin
2f744e86a2 Reimplemented list of operated files using GSList.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-06 11:52:31 +03:00
Slava Zanko
a8da7179d0 Return values of following functions are constants now:
* vfs_path_get_last_path_str()
  * vfs_path_get_last_path_vfs()
  * vfs_path_get_by_index()
  * vfs_class_find_by_handle()

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-06 11:52:31 +03:00
Slava Zanko
d2be823ac3 Changed src/filemanager/file.c to handle vfs_path_t objects.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:31 +03:00
Slava Zanko
c9af137914 Changed lot of functions in src/ directory
...to handle vfs_path_t objects.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:31 +03:00
Slava Zanko
ccfea7a142 Share same code between update_xterm_title_path() and midnight_get_title() functions
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:31 +03:00
Slava Zanko
2b5c28b316 Changes to handle vfs_path_t object:
* removed strip_password () function;
 * Added new vfs_path flag: VPF_HIDE_CHARSET;
 * added vfs_path_add_element() function.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:31 +03:00
Slava Zanko
18d8b06238 VFS: Added new function vfs_path_to_str_flags()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:31 +03:00
Slava Zanko
c68ce1efe4 Use vfs_path_t in execute.c and subshell.c.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:30 +03:00
Slava Zanko
4dde82c5be Changed do_cd() and do_panel() functions
...to handle vfs_path_t objects.

Changed panelized_panel_t.root type to vfs_path_t.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:30 +03:00
Slava Zanko
a3a1e7937f Added unit test for do_panel_cd() functions.
Check if empty directory is mean 'change current directory to home dir'.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:30 +03:00
Slava Zanko
8562a215be Code refactoring: removed concat_dir_and_file() function.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:30 +03:00
Slava Zanko
862d53090d Code refactoring
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:30 +03:00
Slava Zanko
87291354e3 Changed internal viewer to use vfs_path_t objects.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:30 +03:00
Slava Zanko
db58cd9ca7 Changed internal editor to use vfs_path_t objects.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:30 +03:00
Slava Zanko
12a9390524 Changed lock_file() and unlock_file() functions
...to handle vfs_path_t objects.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:30 +03:00
Slava Zanko
3529890d0c Changed treestore functions to handle vfs_path_t objects.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:30 +03:00
Slava Zanko
ddf8c542c9 Added function vfs_path_cmp()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:45:51 +03:00
Slava Zanko
b319ddfbab Added vfs_path_cmp() ans vfs_path_ncmp() functions
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:45:51 +03:00
Slava Zanko
98bad221f8 Changed do_reload_dir() function
...to handle vfs_path_t objects.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:45:51 +03:00