Commit Graph

36 Commits

Author SHA1 Message Date
Miguel de Icaza 1270687440 1999-04-16 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gscreen.c (panel_tree_check_auto_expand): Enabled auto-collapse
	functionality again.  Made the code a simpler by using
	gtk_dtree_is_ancestor().

	* gtkdtree.c (gtk_dtree_is_ancestor): New function to test whether
	a node is an ancestor of a child.  This does the same as
	gtk_ctree_is_ancestor(), but much more efficiently.  GtkCTree
	seems to use the pessimal algorithm for this.
	(gtk_dtree_collapse): Slight optimization: do not re-select if the
	node is already selected.
	(gtk_dtree_collapse): Do not freeze/thaw the tree while
	collapsing/selecting.

	* gmain.c: Removed crufty old SM code.
1999-04-16 18:25:00 +00:00
Miguel de Icaza 5daec90384 1999-04-13 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gtkdtree.c (gtk_dtree_destroy): Memory leak fix: destroy
	current_path and requested_path
1999-04-14 00:03:24 +00:00
Miguel de Icaza 5c38a4b03b 1999-04-01 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtkdtree.c (scan_subtree): Moved the functionality to scan a
	subtree to this function.  Also, do not emit the DIRECTORY_CHANGED
	signal here.
	(gtk_dtree_select_row): Call scan_subtree() and emit the
	DIRECTORY_CHANGED signal here.
	(gtk_dtree_expand): Do not select the just-expanded node.  Call
	scan_subtree().
	(gtk_dtree_collapse): Only select the node if it is an ancestor of
	the currently-selected node.  This should really go in the
	GtkCTree sources.
	(gtk_dtree_init): Bad hack: unset the GTK_CAN_FOCUS flag to avoid
	the broken focusing behavior of GtkCTree.
1999-04-02 00:29:05 +00:00
Miguel de Icaza b3bb157ad5 These are a bunch of changes to fix CORBA and session management. They
are almost complete (i.e. to handle all nitty gritty cases), but they
seem to be working OK right now.  SM should be much more stable now.
Please tell me if you find any weird behavior - Federico

1999-03-30  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* gdesktop-icon.c (desktop_icon_realize): Remove the
	WM_CLIENT_LEADER property from icon windows so that window
	managers will not store SM information for them.

	* gnome-open-dialog.c: Added missing #includes.

	* gdesktop-init.c (desktop_init_at): Removed an unused variable.

	* gdesktop.h: Added some missing prototypes.

	* gmain.h: Added some missing prototypes.

	* Makefile.in: Added gsession.[ch] to the list of sources.

	* gmain.c (create_panels): Consider whether we have a CORBA server
	and session management.

	* gdesktop.c: #include "gdesktop-init.h"
	* gdesktop.c: Added a missing cast to GNOME_DIALOG.

	* gmain.c (create_panels): Removed the run_desktop global
	variable.

	* glayout.c (create_container): Set the wmclass of the panel to
	include its unique ID.

	* gsession.[ch]: New file with the functions that deal with
	session management.

	* glayout.c (gnome_exit): Use session_set_restart().

	* gcorba.c (corba_init): Now returns an int with an error value.
	(corba_init_server): Initialize the server properly.
	Fixed all the object implementation code.
	(corba_create_window): New function used to create a window with
	the CORBA server.

	* gmain.c (gnome_check_super_user): Now the check for running as
	root is done here.  There should be no GUI code in src/.

1999-03-30  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* dlg.c (dlg_run_done): Do not call the callback of a NULL current
	widget.

	* setup.h: Added missing prototype for setup_init().

	* filegui.c (check_progress_buttons): Added a missing return
	value.

	* dlg.c (remove_widget): Added a missing return value.

	* main.c: Removed the global directory_list variable.
	Removed the main_corba_register_server() function.

	* main.h: Removed the global run_desktop variable.

	* panel.h: Now the panel structure has a unique numerical ID used
	for session management.

	* screen.c (panel_new): Maintain a unique ID for each panel.

	* main.c (maybe_display_linksdir): Handle display of the desktop
	init dir here.
	(main): Call gnome_check_super_user().
	(init_corba_with_args): Call corba_init_server().

	* main.c (init_corba_with_args): Do CORBA initialization here.  Also
	removed the global force_activation option.

1999-03-30  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* vfs.c (vfs_add_current_stamps): Only do stamping of the panels
	if they exist.

	* mcserv.c: #include <sys/wait.h>
	(get_client): Put `#ifdef __EMX__' around an otherwise-unused
	variable.

	* utilvfs.c (vfs_split_url): Fix NULL <-> 0 confusion when
	comparing characters.

	* ftpfs.c (retrieve_dir): Removed unused variable dot_dot_found.

	* extfs.c (extfs_init): Assign `key' to c, not `&key'.
1999-03-30 06:09:56 +00:00
Jonathan Blandford 9fba0a4e27 1999-03-25 Jonathan Blandford <jrb@redhat.com>
* gdesktop.c (set_background_image): now we can set the background
	from GMC.
1999-03-25 23:17:55 +00:00
Miguel de Icaza ba56e04c4c 1999-03-19 Paul Raines <raines@slac.stanford.edu>
* gtkdtree.c (gtk_dtree_load_path): Uses a phantom node to get
	directories with the expandable flag.  Avoids loading directories
	at two levels.
1999-03-19 11:15:12 +00:00
Miguel de Icaza 50de059b75 Support for freezing/thawing the GtkCTree during potential
tree updates from the treestore.

This speeds up a lot the display, as the GtkCTree seems to be
particularly bad at handling changes to the tree and keeping
the display in sync.

Makefile fixes to support SHELL= during compilation.

Miguel.
1999-02-09 22:06:56 +00:00
Miguel de Icaza 1dfa5305cf 1999-02-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtkdtree.c (gtk_dtree_class_init): Added two new signals,
	scan_begin and scan_end.
	(gtk_dtree_expand): Call scan_begin() and scan_end().
	(gtk_dtree_select_row): Call scan_begin() and scan_end().
	(gtk_dtree_expand): Use gtk_ctree_select(), not gtk_dtree_select_row().
	(gtk_dtree_collapse): Select the node when it is collapsed.

	* gscreen.c (panel_create_tree_view): Added handlers for the
	scan_begin and scan_end signals of the tree -- these will set the
	cursor to a watch while the tree is being scanned.
1999-02-09 20:10:10 +00:00
Miguel de Icaza 2d77bf3f10 1999-02-07 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gtkdtree.c (gtk_dtree_select_row): Disable row selection when
	were are removing entries from the tree.
1999-02-07 07:23:41 +00:00
Miguel de Icaza ffbd234ae6 Two changes:
- Kill the stack in the treestore.  It was the wrong approach
	  at fixing the problem.  Now emit all of the change notifications
	  after the tree has been finished the check.

	- GtkCTree is not a tree internally but a list and the gaps
	  are, well, gaps.  Deal with it.

Miguel.
1999-02-07 06:16:30 +00:00
Miguel de Icaza 0108bdba8f 1999-02-06 Federico Mena Quintero <federico@nuclecu.unam.mx>
* treestore.h: Replaced TreeStore.check_name_list by a GSList, for
	minimal memory savings.

	* treestore.c (tree_store_remove_entry): Removed unused code for
	base_sublevel computation.

1999-02-06  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* gtkdtree.c (gtk_dtree_insert_node): This function was never
	returning the newly-created sibling.
1999-02-07 05:04:09 +00:00
Miguel de Icaza f6a9eb9d1d Reorder includes 1999-02-04 03:05:22 +00:00
Timur Bakeyev be7cbf3768 Glibing... (3)
Wed Jan 27 03:14:46 1999  Timur Bakeyev <mc@bat.ru>

	* Converted memory managment to Glib - where it wasn't done. Now we
	use g_new()/g_malloc()/g_strdup()/g_free() routings. copy_strings() re-
	placed by g_strconcat(), and sprintf() by g_snprintf(). Some other,
	minor changes.
1999-01-27 01:14:57 +00:00
Miguel de Icaza 7cb276b63e 1999-01-25 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gtkdtree.c (gtk_dtree_select_row): This should be also protected
	against async notifications.
1999-01-26 02:02:21 +00:00
Miguel de Icaza 7e4deeeda7 1999-01-24 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gtkdtree.c (gtk_dtree_load_path): Keep track of when we are
	loading the tree (and thus we do not care about async
	notifications to the tree state changes) and when we are done (and
	thus, we care about the async treestore structure notifications).
1999-01-25 05:22:47 +00:00
Miguel de Icaza 625f76e957 1999-01-23 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gcmd.c (ep_add_callback): Set Window's position to
	GTK_WIN_POS_MOUSE.
	(gnome_external_panelize): ditto.
	(gnome_filter_cmd): ditto.

	* gdialogs.c (file_progress_query_replace_policy): Set Window's
	position to GTK_WIN_POS_MOUSE.
	(file_progress_real_query_replace): ditto.
	(file_mask_dialog): ditto.

	* gdialogs.c: Tag the strings for localization.  Remove debugging
	messages.

	* gmain.c (gmc_window_setup_from_panel): Helper routine used to
	set the GTK_WIN_POS_MOUSE on a window and set the parent with
	gnome_dialog_set_parent (iff you have the WPanel * pointer to the
	parent).

	* gtools.c (query_dialog): Set the window position to GTK_WIN_POS_MOUSE.

	* gtkdtree.c (gtk_dtree_destroy): Kill the add_entry notification hook.
	(gtk_dtree_init): Install a notification function for treentry.
	removal.
	(entry_added_callback, entry_removed_callback): Implemented.  Now
	the tree is in sync with the panels and reload will update the
	tree correctly.

1999-01-23  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* treestore.c (tree_store_remove_entry_remove_hook): Missing
	function.  To remove a notification hook.
	(tree_store_notify_add, tree_store_add_entry_add_hook,
	tree_store_remove_entry_add_hook): New functions to notify of
	additions to the treestore.

	* tree.c (tree_destroy): Remove the callback hook when we go
	away.
1999-01-23 20:43:36 +00:00
Miguel de Icaza 62488e5354 1999-01-19 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gtkdtree.c (gtk_dtree_select_row): Wonder why the code was
	returning for the clicks on the root node.
1999-01-20 01:28:00 +00:00
Jonathan Blandford 366f5e774b don't remember exactly what I did -- much of this is from before the CVS
machine went down and I went on vacation.  Newer toolbars...  It now
compiles too (gicon.c had some broken code in it)
1999-01-18 21:25:55 +00:00
Miguel de Icaza 70d31806e1 Memory leak fix.
Double-free fixed.
Tree will do proper thing when dealing with symlinks

Miguel.
1999-01-15 19:02:39 +00:00
Miguel de Icaza e0faaa671f Merges from the FileOpContext-changes branch. Please see
the ChangeLogs for full information. - Federico
1999-01-14 01:10:32 +00:00
Miguel de Icaza 0fa363d984 1999-01-10 Ilya Zakharevich <ilya@math.ohio-state.edu>
* gtkedit/edit.c (edit_load_file): Off-by-one error disabled editing.

1999-01-11  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* configure.in (REGEX_O): Always include regex.o as the code we
	are using in gmc is not using regcomp/regexec, but the internal
	Emacs API.

	* src/regex.c: Do not compile the POSIX compatibility code, as we
	do not use it.

Tue Dec 29 15:49:45 1998  Norbert Warmuth  <nwarmuth@privat.circular.de>

	* doc/mc.sgml, mc1.in (Color section): minor polishing
	(Layout section): documented Highlight...
1999-01-12 09:08:31 +00:00
Miguel de Icaza 4c6fef14d8 Export access to the treestore
Make gtkdtree use the treestore cache.

Next step: store the ->scanned attribute of tree_entry (otherwise, no
speedup will be noticed at all).  It is a 10 minute hack, but I will go
have dinner now.

Miguel.
1999-01-12 05:55:12 +00:00
Miguel de Icaza 94d3dbac8b use notebook instead of hack, fixes 1998-12-30 00:32:41 +00:00
Miguel de Icaza 57be822a72 one line bug fix to get gmc to compile with new gnomedock 1998-12-15 06:35:51 +00:00
Owen Taylor 5f8bb62657 1998-12-12 Owen Taylor <otaylor@gtk.org>
* gscreen.c (panel_tree_drag_motion): Doubled timeout
	for autoexpand - reducing opening unwanted directories.
	(This, and auto-expand itself need to be configurable.)

	* gscreen.c (tree_drag_open_directory): Use
	gtk_ctree_expand() not gtk_ctree_expand_recursive,
	which increases confusion and could be
	_vvveeerrrryyyy_ expensive. (/afs ?)

	* gscreen.c (panel_tree_drag_leave): Fixed up
	signature - "drag_leave" has no x,y.

	* gscreen.[ch] (panel_tree_check_auto_expand): When
	we've expanded rows during a drag, collapse them
	again when the drag leaves that row. We try to
        collapse without changing the position of the current
        row on the screen.
1998-12-12 21:16:01 +00:00
Owen Taylor 5344eb2d94 1998-12-12 Owen Taylor <otaylor@gtk.org>
* gtkdtree.c (gtk_dtree_destroy): Remove timer upon
	destruction to be safe. (Should this, and
	dtree->timer_id itself be in gscreen.c instead?)

	* gscreen.c (panel_tree_drag_leave): Change == to !=
	so that timeouts are properly removed.
1998-12-12 19:29:38 +00:00
Jonathan Blandford 2f6ecf8738 1998-12-11 Jonathan Blandford <jrb@redhat.com>
* gtkdtree.c (gtk_dtree_do_select_dir): fixed a little bug --
	caused a segfault.

	* gscreen.c (x_create_panel): More changes.  The toolbar is moved
 	to a gtk_toolbar, and is movable.  The entry will be put in it's
 	own toolbar, too.
	(panel_create_cwd): For now, hardcode the usize of the entry
 	widget.  Later on, have it expand (when toolbar supports it)
1998-12-11 06:48:21 +00:00
Miguel de Icaza 2f018f6938 1998-12-08 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gtkdtree.c (gtk_dtree_new): Use imlib's visual and colormap.
1998-12-09 01:56:24 +00:00
Miguel de Icaza 4a72b02987 Metadata-aware Midnight Commander. WEEEcvs update . 1998-12-04 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gscreen.c (load_imlib_icons): Make it use the new gicon files.

	* gicon.c, gicon.h: New files: they keep an image cache and
	provide the right icon to use based on the filename.  They use the
	GNOME metadata to fecth the "icon-filename" and "icon-inline-png"
	keys.

	* gdialogs.c (file_mask_dialog): Commented the help messages until
	the warnings are figured out.
1998-12-05 21:54:25 +00:00
Miguel de Icaza 7d035cca51 Make the tree a drag source -mig 1998-12-04 21:32:19 +00:00
Miguel de Icaza ac7fc9b8b2 1998-12-03 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gscreen.c (panel_create_icon_display, panel_create_file_list):
	Hook up to drag_begin and drag_end events.

	(panel_tree_drag_motion): Either queue a scroll on the tree, or
	queue an open-directory event.

	(panel_tree_scroll): Scroll the tree when the drag pointer is in
	one of the boundaries of the tree.

	(panel_tree_scrolling_is_desirable): new function to figure out if
	it is a good plan to scroll the tree view instead of opening it.

	(panel_chdir): Do not sync with the tree when we are in the middle
	of a drag and drop operation.

	(panel_drag_begin, panel_drag_end): New functions to keep track
	of the dragging operations.
1998-12-03 21:56:11 +00:00
Miguel de Icaza 414df0f7b7 1998-12-02 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gscreen.c (panel_tree_drag_data_received): Perform drag and drop
	operations on the Tree.
1998-12-03 16:10:25 +00:00
Miguel de Icaza befc99bf8d 1998-12-02 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtkdtree.c (gtk_dtree_do_select_dir): Made static, as it is for
	internal use only.
	Fixed a little bunch of compiler warnings.

	* gscreen.c (x_fill_panel): Use gtk_dtree_select_dir(), not
	gtk_ctree_do_select_dir().

	* gpopup.c (gpopup_do_popup): Fixed incorrect assertion and
	actually create the menu (doh).
	(gpopup_do_popup): Do the same magic as in gnome-popup-menu to
	fetch the item that was activated in the menu.  Keep this code out
	of reach of children.
	(fill_menu): New function to fill the menu using the
	gnome-popup-menu magic for fetching the activated menu item.
	Removed ifdef'ed code.
1998-12-02 20:24:25 +00:00
Miguel de Icaza dabe341f88 1998-12-01 Miguel de Icaza <miguel@nuclecu.unam.mx>
* configure.in (slang_use_system_installed_lib): Define slang
	here, to avoid having this on LIBS.

1998-11-26  Herbert Valerio Riedel  <hvr@hvrlab.ml.org>
1998-12-02 06:51:40 +00:00
Miguel de Icaza 52a9fd62f5 1998-12-02 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gtkdtree.c (gtk_dtree_load_path): Further speed increase
1998-12-02 06:04:55 +00:00
Miguel de Icaza aaa7b5e9a2 Lots of changes:
- GNOME edition now compiles without any trace of the text mode
  dependencies.

- We no longer link with libraries we do not use (crypt, gpm), this
  fixes the recent bug reports.

- More tree updates, enhancements.

Miguel.
1998-12-02 05:18:20 +00:00