Commit Graph

49 Commits

Author SHA1 Message Date
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
Roland Illig
8b1e87523a * boxes.c (display_unit): Added const qualifier.
* file.c (check_hardlinks): Likewise.
	* find.c (find_do_view_edit): Likewise. (find_file): Likewise.
	* global.h (home_dir): Likewise.
	* main.c (get_parent_dir_name): Likewise. (init_xterm_support):
	Likewise. (OS_Setup): Likewise.
	* menu.c (create_menu): Likewise.
	* mountlist.c (xatoi): Likewise. (read_filesystem_list): Likewise.
	* poptconfig.c (poptReadDefaultConfig): Likewise.
	* popthelp.c (showHelpIntro): Likewise.
	* rxvt.c (look_for_rxvt_extensions): Likewise.
	* slint.c (has_colors): Likewise.
	* subshell.c (check_sid): Likewise.
	* user.c (check_format_var): Likewise.
	* widget.c (radio_callback): Likewise.
2004-09-25 13:46:23 +00:00
Roland Illig
2994c738d0 * help.c (search_string): Fixed a warning about a const qualifier.
A local copy of the string is used for modifying.
	* menu.h: Removed the const qualifier from Menu.name and
	Menu.help_node as they are freed in destroy_menu.
	* menu.c (destroy_menu): Removed the (now unnecessary) casts.
	* popt.h: Removed a const qualifier to avoid compiler warnings.
	* profile.c (get_profile_string): Added const qualifiers to
	avoid compiler warnings. (GetSetProfile): likewise.
	(GetSetProfileChar): likewise.
	* profile.h (get_profile_string): likewise.
	* win.c (check_movement_keys): likewise.
	* win.h (check_movement_keys): likewise.
2004-09-18 14:30:58 +00:00
Andrew V. Samoilov
d3e4fcb5b0 * menu.c (destroy_menu): Fix warnings.
* view.c (view_adjust_size): Likewise.
        * widget.c (find_buttonbar): Likewise.
2004-09-02 20:14:12 +00:00
Roland Illig
03913065b4 * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 23:27:40 +00:00
Roland Illig
8458240147 * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 16:42:40 +00:00
Roland Illig
6cefb6d3bb Made the data type of some variables more appropriate. 2004-08-16 03:12:05 +00:00
Pavel Roskin
4014009077 * menu.c (menu_scan_hotkey): Use g_strlcpy() to avoid undefined
behavior when using strcpy() on overlapping strings.
* profile.c (GetSetProfile): Likewise.
* widget.c (button_scan_hotkey): Likewise.
Found by Valgrind.
2003-09-22 19:40:07 +00:00
Pavel Roskin
6eda31f362 * menu.h: Return to keeping dialog id instead of a widget
pointer for previous widget.  The widget can be replaced in the
meantime.
* dlg.c (dlg_select_by_id): New function, essentially a cleaner
implementation of dlg_select_nth_widget().
2003-09-13 07:43:20 +00:00
Pavel Roskin
c0b34498dd * dlg.h: Merge Widget_Item into Widget. Massive adjustment. 2003-09-12 23:38:42 +00:00
Pavel Roskin
824a5256c1 * menu.h (WMenu): Save pointer to the previous widget, not its
number.  Adjust all dependencies.
* menu.c (menubar_finish): Restore focus on the saved widget.
* dlg.c (dlg_item_number): Remove, it's unused now.
(dlg_select_nth_widget): Likewise.
2003-09-12 22:45:51 +00:00
Pavel Roskin
e355e25b56 * dlg.h: Use cb_ret_t and widget_msg_t in widget callbacks.
Massive adjustment for the above.
2003-09-10 22:48:54 +00:00
Pavel Roskin
24737eb1c1 * dlg.h: Remove restroy callback. Widgets should use
WIDGET_DESTROY.  Adjust all dependencies.
2003-09-10 18:21:40 +00:00
Pavel Roskin
10f65ac83d * dlg.h (struct Widget): Remove tkname field.
(init_widget): Remove tkname argument.
* widget.h (listbox_new): Likewise.
Adjust all dependencies.
2003-08-31 23:29:49 +00:00
Pavel Roskin
c72a1ea44c Get rid of all references to NATIVE_WIN32. 2003-07-23 03:22:32 +00:00
Pavel Roskin
f2c028ce46 s/can not/cannot/ 2002-12-26 02:21:37 +00:00
Pavel Roskin
5cb2ef30f3 Fix duplicate declarations. 2002-11-15 06:38:55 +00:00
Pavel Roskin
d4ddbe5148 * cmd.c (menu_edit_cmd): Make static, provide separate functions
without arguments to access it.
* menu.h: Make callfn function without arguments - we are not
using any arguments now.
2002-11-14 06:30:16 +00:00
Pavel Roskin
31f491b01e * dlg.h: Remove Dlg_head argument from callback_fn - it's
excessive and can be trivially derived from the widget.
(default_proc): Remove Dlg_head argument.  Change all callers.
* widget.c (listbox_draw): Remove Dlg_head argument.
2002-11-13 02:27:00 +00:00
Pavel Roskin
b0481b41bf * menu.h: Remove "*" from the definition of the type "Menu"
for consistency with other types.  Change all dependencies.
(menubar_event): Make static.
2002-11-12 21:01:50 +00:00
Pavel Roskin
da7e82d253 Global removal of RCS Id: flags. 2002-09-26 23:13:45 +00:00
Pavel Roskin
ec1b1f9614 Globally replace OS2_NT and _OS_NT with WIN32_NATIVE. 2002-09-10 22:04:11 +00:00
Pavel Roskin
608d74abda * menu.c (create_menu): Get help node as an argument.
* main.c: Use new create_menu() interface.
2002-08-20 21:30:06 +00:00
Pavel Roskin
105cb58726 * mad.c: Remove.
* mad.h: Likewise.
* Makefile.am (SRCS): Remove mad.c and mad.h.
* cmd.c: Remove references to MAD.
* main.c: Likewise.
* dlg.c: Use inline, not INLINE.
* hotlist.c: Likewise.
* menu.c: Likewise.
* global.h: Don't include mad.h.
2002-08-01 19:40:43 +00:00
Pavel Roskin
d05bfe1f01 * boxes.c (display_init): Associate correct help topic.
(sort_box): Likewise.
(set_panel_filter): Likewise.
* option.c (init_configure): Likewise.
* menu.c (menubar_handle_key): Show help dependent on the active
menu.
2001-08-06 22:22:04 +00:00
Andrew V. Samoilov
d9fb8565c0 * menu.c (create_menu): Don't localize name, it is always done. 2001-07-31 11:15:46 +00:00
Pavel Roskin
e828211662 Updated address of Free Software Foundation 2000-08-22 22:50:00 +00:00
Norbert Warmuth
ccdd7f5bce 1999-08-08 David Martin <dmartina@usa.net>
* gtkedit/syntax.c (upgrade_syntax_file): Mark error strings for
translation.

* gtkedit/editmenu.c (edit_about_cmd): Mark text in "about" for
translation as it used to be.

* po/POTFILES.in: Removed symbolic links, and outdated
gmc-window.[ch] and olddnd.c. These don't repport any new strings,
increase compile time and make po files large. Basically adds
gaction.c, g,mount, smbfs.c to the pre-previous file.

* po/es.po: Added new strings with latest editor changes. Added
strings in gaction.c. Merged with a new mc.pot after the changes
in POTFILES.in.

* gnome/gaction.c (mainly gmc_unable_to_execute_dlg): Moved g_strconcat
to g_strdup_printf, to get compact strings and make coherent
translations. Translate atomic actions (open, edit, view) when
calling this function.

* src/menu.c: (create_menu): Adjust "#ifdef ENABLE_NLS" so that menus
get the right size even when NLS is disabled.



1999-08-08  Norbert Warmuth  <nwarmuth@privat.circular.de>

* po/POTFILE.in: Removed gpopup.c as it is not compiled.
1999-08-08 12:43:32 +00:00
Norbert Warmuth
fb16422da4 1999-08-03 Norbert Warmuth <nwarmuth@privat.circular.de>
* src/poptalloca.h: New file with definitions for alloca. Note: alloca
is defined as malloc on systems which fail to support alloca. Don't
include this file if you frequently use alloca.

* src/findme.c, src/popt*.c: include poptalloca.h

* src/Makefile.in: added poptalloca.h

* src/menu.c (create_menu): set minimum menu width to 20 characters as
it used to be (this was part of davids patches but I haven't
applied it, yet).
1999-08-03 05:17:47 +00:00
Norbert Warmuth
fc05bf2408 1999-08-01 David Martin <dmartina@usa.net>
* gnome/gcmd.c (gnome_about_cmd): Change strings in gmc "about" to
static as they only translated once.

* src/menu.c (create_menu, menubar_drop_compute, menubar_paint_idx):
Discount '&' for hotkeys when checking menu widths to avoid the
extra blank space.
Moved this accounting from the drawing to the creating function.

* src/widget.c: Translate History box tittle.

* po/es.po, po/es_ES.po: added translation for history box title



1999-08-01  Norbert Warmuth  <nwarmuth@privat.circular.de>

* src/vfs.c: Don't close a function definition with "};". SunCC from
2.5.1 chokes on the extra semicolon.

(mc_munmap): Don't dereference function pointer when checking for
NULL (this check is supposed to prevent a segfault instead of
causing one). This haven't got noticed up to now becaue there's no
file system with mmap but without munmap.
1999-08-01 11:37:25 +00:00
Norbert Warmuth
0897355081 1999-06-24 Norbert Warmuth <nwarmuth@privat.circular.de>
* menu.c (menubar_execute): Now needs an additional do_refresh in order
to make layout changes visible.
1999-06-24 06:47:02 +00:00
Norbert Warmuth
c1fb49b689 David's "Hex View in GMC & some June patches" sent on June 14 (don't blame
David for the ChangeLog entries).

1999-06-22  David Martin <dmartina@usa.net>

* gnome/gnome-file-property-dialog.c (switch_metadata_box): Tag some
strings for localization.

* gnome/gnome-open-dialog.c (gnome_open_dialog_new): Don't assemble
label_string from seperate strings (makes it easier to translate).

* src/view.c (display): added view_gotoxy's in order to make hex mode
work in the gnome edition.

* gtkedit/gtkedit.c (tb_items): Mark strings for localization.

1999-06-22  Norbert Warmuth  <nwarmuth@privat.circular.de>

* gnome/gview.c (viewer_size_changed): Update internal viewer state used
in hex mode.


And some fixes to the bug reported on mc-bugs ("Two Big Bugs in
Quickview@mc").

1999-06-22  Norbert Warmuth  <nwarmuth@privat.circular.de>

* src/cmd.c (quick_view_cmd): Change panel when the file we want to
view isn't in the current panel (prevents a "file not found"
error).

* src/menu.c (menubar_execute): De-activate the menubar previous to
invoking the callback. This is needed to make change_panel in
quick_view_cmd work (the activated menubar doesn't allow unfocus,
i.e. dlg_one_down|up don't change anything).

* src/view.c (do_view_init): improved error handling w.r.t quick view
(mc used to dump core when the file to view couldn't be opened).
1999-06-22 10:29:29 +00:00
Timur Bakeyev
a39568367e Glibing..... (2)
Wed Jan 27 03:17:44 1999  Timur Bakeyev <mc@bat.ru>

	* Converted memory managment to Glib. Now we use g_new()/g_malloc()/
	g_strdup()/g_free() routings. Also, copy_strings() replaced by
	g_strconcat(), strcasecmp() -> g_strcasecmp(),and sprintf() by
	g_snprintf().

	* Some sequences of malloc()/sprintf() changed to g_strdup_printf().

	* mad.[ch]: Modified, to work with new GLib's memory managment. Fixed
	a missing #undef for tempnam, which caused dead loop. Add several new
	functions to emulate GLib memory managment.

	*main.c, mad.[ch]: Add a new switch  "-M", which allows to redirect MAD
	messages to the file.

	* util.[ch], utilunix.c: Modified, deleted our variants of strcasecmp()
	and strdup() - we have g_ equivalences. Remove get_full_name() - it is
	similar to concat_dir_and_file(). Some other tricks with g_* functions.

	* global.h: Modified, extended. Now it is main memory mangment include -
	i.e. all inclusions of <stdlib.h>, <malloc.h>, <glib.h>, "fs.h", "mem.h",
	"util.h" and "mad.h" done there. This elimanates problem with proper or-
	der of #include's.

	* All around the source - changed order of #include's, most of them gone
	to global.h (see above), minor changes, like "0" -> NULL in string func-
	tions.
1999-01-27 01:08:30 +00:00
Miguel de Icaza
b2b9c116f7 Applied Namsh's patch for i18n hotkey support in the menu code -mig 1998-06-08 00:33:31 +00:00
Norbert Warmuth
5baf384554 Thu May 21 00:09:45 1998 Norbert Warmuth <k3190@fh-sw.de>
* menu.c (menubar_event): Don't set menubar->selected to the
invalid value -1. Fix for the bug reported by root@liepa.soften.ktu.lt

* menu.c (menubar_drop_compute): removed the check for inrange
items which isn't necessary any longer.
1998-05-20 22:34:13 +00:00
Norbert Warmuth
321bc71bab Mon May 18 22:24:09 1998 Norbert Warmuth <k3190@fh-sw.de>
* lib/mc.ini.in: s/reges/regex/

* main.c (process_args): return void, the return value was only
used once but wrong (-h displayed help twice).
(handle_args): -h: don't display help twice
(print_usage): Don't print program name and version, that's
already done by version(0).

* menu.c (menubar_paint_idx): Highlight Hotkeys also on slow
terminals (hotkeys were not displayed at all).
1998-05-19 08:58:41 +00:00
Miguel de Icaza
c50ced7273 Range check error fix -miguel 1998-05-18 17:18:12 +00:00
Miguel de Icaza
824b7198ea Icon View mode for GNOME/mc:
1. My icons suck.
	2. Keyboard handling is not finished.
	3. Save current-mode, load current-mode is not
	   implemented yet.
	4. Listing mode is not working, as I have hardcoded
	   the icon view for now.
	5. Will finish this tomorrow.  Not much is missing.
	6. No, this is not the final implementation.
	7. Yes, later I will put some scheme for using
	   more icons as discussed in the ethernal "Re: Icons"
	   thread.

Miguel.

1998-05-07  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* gscreen.c (panel_icon_list_realized): Add drag and drop support
	to the icon list view;

1998-05-06  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* gscreen.c (panel_fill_panel_icons): New function:  Fill up the
	icon list.
	(x_create_panel): Change in the approach:  we create both of the
	widget views at creation time and we now carefully show every
	component.  I attach everything to the table, but not necesarly
	show it.
1998-05-08 02:25:00 +00:00
Miguel de Icaza
8c34e0837f i18n compilation fixes for the new gnome-i18n.h changes.
fix a bug in the panel-widget selection.
i18n changes from Andrej Borsenkow.
Menus renamed, better texts -- thanks Havoc.
lav's fixes for curses compilation.

Miguel
1998-04-28 04:29:19 +00:00
Miguel de Icaza
c752ec9d97 Reorgranized the script execution code to fix a race condition that
only happened in the GNOME code (as the execution of anything from
the file manager in the GNOME version is done in background).

Miguel.
1998-04-24 01:08:06 +00:00
Miguel de Icaza
26f6e92abf Fri Apr 3 05:23:20 1998 Alex Tkachenko <alex@bcs.zp.ua>
* configure.in: ALL_LINGUAS test added, to allow specify list
	of languages to be installed by setting env variable before
	configure. If it is empty, it defaults to full list.

	* src/menu.h menu_entry.{hot_pos, is_dupped} dropped

	* src/menu.c: consistency fixes: pull-down menu items are now
	accessible either with arrow keys or with hotkeys, denoted with &
	(and highlighted). (key combinations, placed to the right of items
	intended to be used from outside the menus). Freeing menu entries
	removed as it no longer needed

	* src/main.c, edit/editmenu.c: menubar init code is changed to conform
	above fixes.

	* edit/edit.h: use of "Cancel" in error_dialogs replaced with
	"Dismiss", to avoid collisions in translation of "Cancel" in other
	places with this case.

	* src/boxes.c: select_format() and it's support removed, as it is
	obsoleted by input line history feature. display_init()/display_callback
	fixed to suite i18n changes. sort_box() - alike.

	* src/option.c: pause_options added &'s and gettext calls to expand
	statically assigned values.

	* src/widget.c: (radio_callback) hotkey recognition is changed to
	&-notation, rather than simple uppercase.

	* src/dlg.c: (dlg_try_hotkey) plain symbol comparison replaced with
	call to isalpha(), this fixes errorneous exit from input line, when
	button hotkey is 8-bit NLS char.
1998-04-03 20:00:00 +00:00
Miguel de Icaza
549908db83 More optimal menu free code -miguel 1998-03-31 02:33:23 +00:00
Miguel de Icaza
26eca16176 Do not free separator strings\n 1998-03-31 02:24:32 +00:00
Miguel de Icaza
60c595aa91 1998-03-30 Miguel de Icaza <miguel@nuclecu.unam.mx>
* menu.c (destroy_menu): Implement destroy_menu for all of the
	ports as a routine that frees the menu entries if
	internationalization has been enabled.

	* wtools.c (quick_dialog_skip): Do not i18n any string that is empty.

Sun Mar 29 23:02:09 1998 Alex Tkachenko <alex@bcs.zp.ua>

	* src/menu.[ch]: new member to menu_entry (hot_pos) introduced to make
	internationalized version of menu use externally defined hotkeys
	(denoted with preceding &). create_menu() fixed to load intl text of
	the entries. Some fixes around menu.c to enable usage of reloaded
	hotkeys.

	* main.c, editmenu.c: menu initialization code fixed to conform new
	menu structure. editmenu init code includes N_(..) now.

	* menu.c, layout.c, editwidget.c: bar menu items displacement is made
	dynamically upon initialization and window size changes. Mouse event
	processing is fixed accordingly.

Sat Mar 28 13:18:36 1998 Alex Tkachenko <alex@bcs.zp.ua>

	* src/screen.c: (repaint_file) last patches to format_file() in the
	same file broke appearance of panels in brief mode -- fixed.
1998-03-30 20:59:37 +00:00
Miguel de Icaza
ac70e34d02 MC goes Internationallsls./gmc Spanish translation almost complete -mig 1998-03-25 05:16:00 +00:00
Miguel de Icaza
eb6b3842ab Initial revision 1998-02-27 04:54:42 +00:00