Commit Graph

31 Commits

Author SHA1 Message Date
Miguel de Icaza
1bc1eea3d0 Amazing. GTK broke the API once again 1999-01-18 22:37:39 +00:00
Miguel de Icaza
4c196a6559 1999-01-18 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdesktop.c (icon_event): Rewrote event handling for icons on the
	desktop.  This function handles button presses and releases and
	does some anal-retentive checking to avoid stuck pointer grabs.
	(icon_event_after): New fallback function for button presses.
	This is only called when an icon is being edited and the user
	clicks outside the icon's text item, indicating that editing
	should be accepted and terminated.
	(selection_stopped): New callback used to re-install the mouse
	grab once the icon text item stops selecting text.

	* gdesktop.h (DesktopIconInfo): Removed the finishing_selection
	flag now that the event handling code is cleaned up.
1999-01-18 19:22:23 +00:00
Miguel de Icaza
d24a313845 Small bug fixes 1999-01-17 04:17:20 +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
8544e153ba 1999-01-01 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdesktop.c (select_range): Fixed selection of ranges where the
	starting and ending icons are in the same vertical or horizontal
	slot.
	(reload_desktop_icons): Fixed incorrect usage of
	g_list_remove_link().  Also, moved the functionality from the old
	load_desktop_icons() here.  Now all icons are always loaded
	efficiently, and there is no need for the "incremental" flag.
	(desktop_icon_info_delete): Delete the icon position information.

	* gmetadata.c (gmeta_del_icon_pos): New public function to delete
	the icon position information from a file.
1999-01-02 18:41:59 +00:00
Miguel de Icaza
3491af5408 1998-12-30 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdesktop.c (find_icon_by_drag_context): Made static.

	* gdesktop.h (DesktopIconInfo): Now that this type is public,
	renamed it from struct desktop_icon_info, for consistency.
1998-12-31 01:43:11 +00:00
Miguel de Icaza
d24269087f Lots of usability changes for the desktop.
1998-12-29  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* gdesktop.c (desktop_icon_delete): New function, used for
	dicon_delete.
	(load_desktop_icons): Implemented the incremental reloading of
	desktop icons.  This should make the code much nicer.
	(reload_desktop_icons): Call x_flush_events to force a display at
	that point.

	* gpopup.c (dicon_delete): Implement this operation.
	(desktop_icon_execute): Use the existing implementation for
	launching desktop icons instead of a new hacked up version

	(desktop_icon_actions): Until copy/move is implemented, do not
	even list them to the user.

	* gdesktop.c (create_desktop_dir): No trashcan setup until it
	works.

	* gscren.c (panel_widget_motion): Use button 2 for dragging and
	asking.
1998-12-30 02:51:01 +00:00
Elliot Lee
913f34276e well, it does 'open' and 'properties' on the desktop icons, SLIGHTLY.
gmc is a big piece of junk.
1998-12-21 23:29:46 +00:00
Miguel de Icaza
6067afb1fc 1998-12-04 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdesktop.c (desktop_icon_info_new): Connect the signals for DnD
	so that we can drag icons from the desktop.
	(drag_begin): New function to set the drag cursor for icons on the desktop.
	(button_press): New function that stores the hot spot position for
	DnD cursors.
	(drag_data_get): New function to fetch the URI-list of selected icons.

	* gdialogs.c: Fixed some includes.

	* gdesktop.h: Removed the DnD target enum from here, since it is
	specific to each submodule.

	* gdnd.h: Moved the DnD target enums to here.  Added a new
	TARGET_MC_DESKTOP_ICON.

	* gdesktop.c (get_icon_snap_pos): Fixed icon snapping; the
	coordinates not being updated correctly.

	* gscreen.c (panel_drag_data_get): Free the uri list; it was being leaked.
1998-12-05 01:01:13 +00:00
Miguel de Icaza
c0ac4984ab 1998-12-02 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdesktop.c (setup_desktop_dnd): New function to set up drops
	to the root window.
	(setup_xdnd_proxy): Function by Owen Taylor to set up a DnD proxy
	window.
	(drag_data_received): Function to handle drops on the root window.
	(desktop_destroy): Destroy the DnD setup.
	(reload_desktop_icons): New function to reload the desktop.

	* gscreen.c (drag_types, drop_types): Removed url-list; only
	uri-list should be there.

	* gdesktop.h: Removed TARGET_URL_LIST from the DnD enumerations.
1998-12-02 23:37:27 +00:00
Miguel de Icaza
c346f8892e 1998-11-10 Federico Mena Quintero <federico@nuclecu.unam.mx>
* Makefile.in: Removed gtrans.c from the list of sources.

	* gdesktop-icon.c: #ifdef cleanups.

	* gscreen.c (panel_create_file_list): Doh.  Return the scrolled
	window, not the clist.

	* gdnd.c (get_action): Implement the DnD actions menu.

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

	* setup.c: Removed the icons_snap_to_grid and
	want_transparent_{icons,text} options.
1998-11-11 00:05:12 +00:00
Miguel de Icaza
4aeaf0099f Make it compile 1998-11-02 07:26:19 +00:00
Miguel de Icaza
f64d6da2e4 1998-10-30 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdesktop.c: We are now using the new desktop icon code.  It is
	not yet complete, but what is there does work.  We have icon
	creation, auto-layout and snapping.  Next step is drag and drop
	and popup menus.

	* glayout.c: #ifdef out the stuff that uses the old desktop code.
	I will replace it gradually.
	* gmain.c: Likewise.
	* gscreen.c: Likewise.
1998-10-30 23:22:35 +00:00
Miguel de Icaza
e704d53f77 sync sync - Federico 1998-10-30 17:08:03 +00:00
Miguel de Icaza
903eb5a880 Sync to laptop; I ifdef-ed the old code just so that it will compile - Federico 1998-10-30 00:47:54 +00:00
Miguel de Icaza
e7911e2b15 Sync sync - debugging time - Federico
1998-10-21  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* gdesktop.c (create_desktop_icon): Renamed from
	my_create_transparent_text_window.  Now uses the DesktopIcon
	widget for its work.
	(get_desktop_icon_for_dentry): Renamed from
	get_transparent_window_for_dentry.  Uses the DesktopIcon widget.
	(get_desktop_icon_for_di): Renamed from
	get_transparent_window_for_di.
	(desktop_icon_properties): Do not size_request the icon, since now
	we can get its dimensions directly from the DesktopIcon structure.

	* desktop-icon.[ch]: New file that takes care of desktop icons.
	It provides the spiffy widget that is used for them.

	* Makefile.in: Added desktop-icon.[ch] to the list of sources.
	MC should use Automake, I think.
1998-10-22 00:32:21 +00:00
Miguel de Icaza
cd9efdc2dd Yes, we are a drop target. With all of the features requested on the
mail I got from DrMike some months ago :-)

It needs a bit of debugging still

Miguel
1998-10-21 18:05:08 +00:00
Miguel de Icaza
215cd45d16 Sync for laptop, do not touch this for now 1998-10-20 01:52:16 +00:00
Miguel de Icaza
a416ee4f7b Cool changes:
1998-05-22  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* gwidget.c (x_create_input): Disable the use of the GNOME entries
	for now, as they are very slow.  We need to figure out what is
	wrong with this.

	With this change, dialog boxes close quickly instead of taking
	ages to close.

	* gscreen.c, gdesktop.c (file_popup_add_context, file_popup):
	Share the context menu code in gdesktop.c and gscreen.c.  The
	desktop pop up menus now include all of the stuff that would have
	appeared in the Panel.

	* gdesktop.c (desktop_icon_remove): Remove the file associated
	with this desktop entry if it is on the ~/desktop directory.
1998-05-23 00:55:03 +00:00
Miguel de Icaza
d6e872a113 1998-05-20 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gpageprop.c (item_properties): Restore the arrow cursor for the
	desktop icon windows.

	* gdesktop.h (desktop_icon_t): Removed unused title field.
1998-05-20 22:10:06 +00:00
Miguel de Icaza
3b2ad8a238 Lots of prototypes added, warnings removed -miguel 1998-04-17 00:59:58 +00:00
Miguel de Icaza
515e64efdc 1. Use the old artificial drag start code.
2. Load/Save desktop-icon transparent state.
3. Add arrange icons code.
4. Add snap to grid option (default now).
5. Fixed viewer crash.

Still left to do:
- Nice config dialog to set the above variables.
1998-04-15 03:16:29 +00:00
Miguel de Icaza
1ff37554b8 1998-04-14 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdesktop.h: Added extern declarations for the
	want_transparent_icons and want_transparent_text variables.

	* gtrans.c (set_window_text): Now we use the new global variables
	want_transparent_icons and want_transparent_text to decide how to
	paint the pixmap and mask.  The want_transparent_* variables can
	thus be configured for the smartness/speed of your X server when
	using shaped windows.
1998-04-14 19:08:15 +00:00
Miguel de Icaza
442ad09caf 1998-03-19 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdesktop.c (get_transparent_window_for_dentry): New function,
	creates the proper transparent icon window for a dentry.
	(post_setup_desktop_icon): New function, does post-setup stuff for
	a desktop icon (setting it as a drop target, positioning it, etc.).

	* gpageprop.c (item_properties): Now the dentry parameter is a
	desktop_icon_t instead.
	We now return a bitmask that indicates what stuff changed.  The
	caller can use this information to decide what to update, repaint, etc.

	* gdesktop.h: Moved the icon_t and desktop_icon_t structures here.

	* gpageprop.c (item_properties): Insert icon control if appropriate.

	* gprop.c (gprop_icon_new):
	(gprop_icon_get_data): Renamed from gprop_dir_*().

	* gscreen.c (panel_action_properties): Re-reads panel only if necessary.

	*gpageprop.c (item_properties): now returns TRUE if something got
	changed, FALSE otherwise.  This should be used to decide whether
	to re-read the panel or not.

	* gpageprop.c: #include "../vfs/vfs.h".
	#include "dialog.h".

	* gprop.c (gprop_dir_new):
	(gprop_perm_new):
	(gprop_general_new): Connect to the destroy signal of the toplevel
	widget and destroy the Gprop structure on the callback.
1998-03-20 02:00:09 +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
c996c5ddd2 Lots 1998-03-18 06:24:20 +00:00
Miguel de Icaza
33929b0be0 Make it compile - miguel 1998-03-06 06:16:30 +00:00
Miguel de Icaza
73ba8fe2d5 Panels support drops now + some other changes 1998-03-06 06:03:30 +00:00
Miguel de Icaza
d80470500b Sync up so that Elliot can fix shaped-windows dnd -mig 1998-03-06 03:48:31 +00:00
Miguel de Icaza
89821ca886 Piles of bug fixes; piles of new toys; running to a dinner, comment later -mig 1998-03-05 04:53:47 +00:00
Miguel de Icaza
b58d39008d No wonder nobody who got the tar file got mc to work with gnome :-) -- TAKE 2 1998-02-27 05:12:09 +00:00