Commit Graph

37 Commits

Author SHA1 Message Date
Andrew V. Samoilov
c13770201f * ext.c (exec_extension): Use "#! /bin/sh". 2002-02-21 14:37:51 +00:00
Pavel Roskin
0a4aa53f65 * cmd.c: Clean up unused GNOME code and some ifdef's.
* dlg.c: Likewise.
* dlg.h: Likewise.
* ext.c: Likewise.
* setup.c: Likewise.
2001-09-16 00:53:43 +00:00
Pavel Roskin
c11389facb * global.h: Include io.h, pwd.h, grp.h and utime.h. Adjust all
sources not to include them and to include global.h at the right
place.
2001-09-07 17:52:19 +00:00
Pavel Roskin
a8ef641beb * x.h: Remove. Adjust all users. Make sure that global.h is
included instead.  Don't include sys/param.h unconditionally -
rely on global.h taking care of it.
* Makefile.in: Remove x.h.
2001-09-03 05:07:40 +00:00
Pavel Roskin
689c3fb9ac Replace "Can't" with "Cannot" everywhere. 2001-08-14 00:55:34 +00:00
Pavel Roskin
fd895e3759 * user.c: Eliminate static variable s_editwidget. Pass
edit_widget as argument.  All callers changed.
(expand_format): Fix expansion of %n and %b for the editor.
* util.c: Remove dead code.
2001-07-23 22:50:54 +00:00
Pavel Roskin
ce150c8aa9 * ext.c (exec_extension): Add the `rm' command to the end of
temporary scripts so that they erase themselves.
2001-07-18 03:06:57 +00:00
Pavel Roskin
3f25e54361 * ext.c (exec_extension) [HAVE_X]: Free file_name. Add comment
explaining why it cannot be unlinked there.
2001-07-08 21:34:55 +00:00
Pavel Roskin
7a177fd8d5 * view.c (exec_extension): Unlink temporary file earlier if it's
not going to be used.
[OLD_CODE]: Remove.
2001-07-06 23:06:45 +00:00
Pavel Roskin
975726afd0 * ext.c (exec_extension) [HAVE_X]: Disable console handling. 2001-06-23 00:09:13 +00:00
Pavel Roskin
8c1534e4e6 * cons.handler.c (handle_console): Remove useless default.
* ext.c (regex_command): Initialize include_target_len.
* find.c [HAVE_GNOME]: Eliminate untyped declarations.
* fsusage.c: Remove untyped declaration of statfs().
[_AIX && _I386]: Rename statfs to aix_statfs and move
it before get_fs_usage(). Define statfs to aix_statfs.
2001-06-14 23:28:54 +00:00
Pavel Roskin
a13c1d1928 * ext.c (exec_extension): Use g_free() on the result of
mc_mkstemps(). Don't free it if mc_mkstemps() fails - it's not
needed anymore.
* user.c (execute_menu_command): Likewise.
* util.c (mc_mkstemps): Return NULL in the filename in the case
of failure. Remove support for NULL as the first argument.
From Andrew V. Samoilov.
2001-05-22 07:10:43 +00:00
Pavel Roskin
bea09b932d * src/ext.c (exec_extension): Use mc_mkstemps().
* src/user.c (execute_menu_command): Use mc_mkstemps().
* src/util.c (mc_mkstemps): New function - safely create and
open temporary file. Return the handle and the name.
* src/util.h: Declarations for init_tmpdir() and mc_mkstemps().
Define TMPDIR_DEFAULT and SCRIPT_SUFFIX.
* vfs/direntry.c (vfs_s_open): Use mc_mkstemps. Create and close
temporary file to reserve its name on the filesystem.
(vfs_s_retrieve_file): Use mc_mkstemps().
(g_tempnam): Remove.
* vfs/extfs.c (extfs_open): Use mc_mkstemps().
* vfs/sfs.c (redirect): Likewise.
* vfs/shared_ftp_fish.c (_get_file_entry): Likewise.
(retrieve_file): Likewise.
* vfs/vfs.c (mc_def_getlocalcopy): Likewise.
* vfs/xdirentry.h: Remove declaration of g_tempnam().
2001-05-21 16:21:07 +00:00
Pavel Roskin
38a1e6499c * INSTALL: Update download locations for MC, rxvt, gpm, ncurses.
Add download location for glib.
* mc.spec.in: Likewise.
* doc/LSM: Likewise.
* doc/mc.1.in: Likewise.
* doc/mcedit.1.in: Likewise.
* src/ext.c: Don't mention download location for MC.
2001-05-18 18:44:51 +00:00
Pavel Roskin
82d916924d * cmd.c (edit_cmd) [HAVE_GNOME]: Use gmc_edit(). Don't use
regex_command().
(ext_cmd) [HAVE_GNOME]: Don't compile for GNOME.
* ext.c (regex_command) [HAVE_GNOME]: Likewise.
* ext.h [HAVE_GNOME]: Don't define MC_USER_EXT and MC_LIB_EXT.
2001-02-26 21:21:18 +00:00
Pavel Roskin
e828211662 Updated address of Free Software Foundation 2000-08-22 22:50:00 +00:00
Pavel Machek
fd6d7391dd 2000-05-25 Andrew V. Samoilov <sav@bcs.zp.ua>
* slint.c (init_pair): segfault fixed when mcedit -b called

	* user.c (check_format_var): error messages are localized

	(expand_format, user_menu_cmd): memory leaking for %e and %k macro
	fixed; segfault fixed when %m macro is used outside user_menu_cmd ()

	* ext.c (regex_command): memory leaking fixed when user extension
	file is absent

	(exec_extension): error message for changed mc.ext file format
	are localized -- does we really must be worry about mc 3.0 ?

	* widget.c (history_put): counter is initialized again
2000-05-25 16:21:42 +00:00
Miguel de Icaza
871a880139 1999-08-27 Federico Mena Quintero <federico@redhat.com>
* ext.c (quote_block): How did this ever work?  People, if you
	realloc() things, don't keep pointers to stuff inside the original
	block.

	* screen.c (do_enter_on_file_entry): Pass in the full name to
	if_link_is_exe().

	* dir.[ch] (if_link_is_exe): Take in the full name, not the directory
	and the file entry.

1999-08-26  Federico Mena Quintero  <federico@redhat.com>

	* gscreen.c (panel_clist_drag_motion): Pass the full name to
	gdnd_validate_action().
	(panel_icon_list_drag_motion): Likewise.
	(panel_tree_drag_motion): Likewise.

	* gdnd.c (gdnd_perform_drop): Renamed the "directory" argument to
	"dest_full_name" for clarity.
	(gdnd_validate_action): Likewise.  Pass in the full name to
	if_link_is_exe().
	(drop_on_file): Do not compute the full name, since we are already
	get it from the caller.
	(drop_on_file): Pass in the full name to if_link_is_exe().

	* gscreen.c (panel_tree_drag_data_received): Free the pathname.

	* gdesktop.c (icon_drag_data_received): Pass the full name of the
	file to gdnd_perform_drop(), not just the desktop directory.
1999-08-27 05:01:08 +00:00
Miguel de Icaza
d8e892cb48 1999-08-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gscreen.c (editing_icon_list): New function to figure out
	whether an icon in the icon list is being edited.  This is a
	FANTASTICALLY UGLY HACK, but we cannot add new functions to the
	icon list at this point as it would break forwards compatibility.
	Sigh.  BUGFIX: GNOME bug tracker #382, #1065.

	* glayout.c (gnome_panel_desktop_menu): Added some underline
	accelerators.

	* gdesktop.c (desktop_arrange_icons_items): Renamed to the desktop
	namespace.  Added underline accelerators.
	(handle_arrange_icons_name): Made static.
	(handle_arrange_icons_type): Likewise.
	(handle_arrange_icons_size): Likewise.
	(handle_arrange_icons_access): Likewise.
	(handle_arrange_icons_mod): Likewise.
	(handle_arrange_icons_change): Likewise.
	(desktop_arrange_icons): Made static.
	(strip_tearoff_menu_item): Made it return the number of items in
	the menu, not the list of children.
	(desktop_icon_info_destroy): Remove the icon from the icon hash
	table.
	(text_changed): Update the icon hash table information.

	* gdesktop.h: Cleaned up some unused prototypes.

	* gview.c (view_status): Use the correct g_snprintf() format
	argument.

	* gcmd.c (sort_get_func_from_type): Indented according to the MC
	conventions.  People, *PLEASE* follow the Gnome Programming
	Guidelines, especially when modifying existing code.

	* gdesktop.c (swap): Likewise.
	(auto_pos): Likewise.
	(get_icon_auto_pos): Likewise.
1999-08-09 22:54:02 +00:00
Norbert Warmuth
2b862fe4f1 Wed Apr 21 21:47:15 1999 Norbert Warmuth <nwarmuth@privat.circular.de>
* src/ext.c (exec_extension): Use tempnam instead of tmpnam (AIX doesn't
like the lattern when compiled with -mthreads).

* src/user.c (execute_menu_command): ditto.


Wed Apr 21 22:04:30 1999  Norbert Warmuth  <nwarmuth@privat.circular.de>

* gtkedit/editcmd.c (edit_save_file): MAD knows about tempnam, no
need to fool it by strdup'ing the return value of tempnam.


Wed Apr 21 21:59:50 1999  Norbert Warmuth  <nwarmuth@privat.circular.de>

* vfs/extfs.c (extfs_open): tempnam returns a malloced string, no need
to strdup it

(various places): use free instead of g_free to free string returned
by tempnam.
1999-04-22 04:36:11 +00:00
Miguel de Icaza
8578ca5e2e 1999-02-26 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gdesktop.c (desktop_icon_info_open): Add needs terminal support.

	* gnome-file-property-dialog.c (create_settings_pane): Add Needs
	terminal check box

1999-02-25  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* gaction.c (gmc_open_filename): Add support for needsterminal.

	* gscreen.c: Add New Folder option to the panel popup.
1999-02-26 07:17:51 +00:00
Miguel de Icaza
1370e6c166 Notice: release coming in about 90 minutes.
Miguel.

1999-02-15  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* gcmd.c (gnome_open_terminal_with_cmd): New routine, based on the
	gnome_open_terminal routine, that will allow the user to specify a
	command to execute (used internally).

	* gaction.c (gmc_edit_filename): Support for the GNOME editor
	environment properties.

	* gdesktop.c (create_desktop_dir): Support GNOME_DESKTOP_DIR
	variable to configure the desktop directory.
1999-02-15 21:19:03 +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
3d9d1b6774 1999-01-25 Alexander Savelyev <fano@vcom.kiev.ua>
* ext.c (exec_extension): Always use /bin/sh.  Not the user
	shell.
1999-01-26 01:46:07 +00:00
Pavel Machek
121ecab640 Killed operation_names: op_names contain exactly same data. Added fixme. 1999-01-21 13:37:07 +00:00
Timur Bakeyev
f28489d29a Rearanged #include's, so glib.h follows fs.h, but preceed util.h and mad.h,
as this required for proper defenition of memory debbuger.
1999-01-19 02:34:37 +00:00
Miguel de Icaza
a7170a4f7a OS2 now uses property defines instead of OS2_NT 1999-01-10 08:55:35 +00:00
Miguel de Icaza
3ac4cfa567 Merge from MC_MIME_TYPE branch. It has so many bug fixes you wont
even recognize it.

1998-12-16  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* gdialogs.c (create_op_win): Remove second spurious packing.
	(create_op_win): OP_MOVE uses the same stuff OP_COPY does.  Fix
	this.
	(file_progress_show_target): More compliant to the original
	functions.
	(file_progress_show_source): More compliant to the original
	functions.

	* gdesktop.c (create_desktop_dir): Fix mem leak.

Miguel.
1998-12-17 04:51:24 +00:00
Miguel de Icaza
9d3578f803 Revert last commit, this should have gone into a branch 1998-12-16 06:33:55 +00:00
Miguel de Icaza
cb83d83796 Commiting the MIME-based Midnight Commander code into the MC_MIME_TYPE branch 1998-12-16 06:25:41 +00:00
Miguel de Icaza
96c55ff5bb Various memory leak fixes.
Miguel.
1998-05-19 18:37:03 +00:00
Miguel de Icaza
9f508487f2 . 1998-04-23 19:31:32 +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
84013cb8d5 Wed Mar 18 20:35:45 1998 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gdesktop.c (desktop_create_launch_entry): Support for the "Drop"
	target in mc.ext now.

	* Add support for dragging the icons on the desktop.

	(desktop_icon_make_draggable): new function.
	(drop_from_event): simplify.
	(my_create_transparent_text_window): Get the motion notify event.
	(drops_from_event): create a vector based on thge drop event.
	(drop_cb): splitted, call url_drop for regular drops, otherwise it
	is a icon drop.
	(artificial_drag_start): new routine, used now by gscreen.c and
	gdesktop.c
	(drop_on_directory): Check result value of operation.
	(desktop_icon_set_position): sane interface.
	(stop_desktop): Flush all of our state to disk.
1998-03-19 02:57:01 +00:00
Miguel de Icaza
4dd40872d9 1998-03-10 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtools.c (message): Added return NULL.  This needs to be fixed.
	(translate_gdk_keysym_to_curses): FIXME: Replace KEY_BACKTAB by '\t'
	while KEY_BACKTAB is added somewhere else.
	(translate_gdk_keysym_to_curses): return -1 as last resort.

	* glayout.c (get_current_index): Add g_assert_not_reached() for
	fatal case.

	* gmenu.c (menubar_new): Cast g_menubar to unsigned long.

	* gwidget.c (x_create_input): Cast entry to GTK_OBJECT.

	* gkey.c (find_select_closure_callback): Fix = -> == typo.

1998-03-10  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* xslint.c (getch): Added missing "return".

	* utilunix.c (init_groups): Added parentheses around
	assignment/truth value.

	* boxes.c: #include <stdlib.h>

	* screen.c (string_inode): Cast fe->buf.st_ino to long to be
	consistent with sprintf format.

	* main.c (handle_args): Added parentheses around assignment/truth value.
1998-03-10 21:10:30 +00:00
Miguel de Icaza
644baf741f More drag and drop work; the desktop is usable in some areas now 1998-03-03 05:20:20 +00:00
Miguel de Icaza
eb6b3842ab Initial revision 1998-02-27 04:54:42 +00:00