* gdnd.c (file_has_drop_action): New function to test whether a
file has the drop-action metadata or MIME action property.
(gdnd_validate_action): Take the drop-action metadata/MIME
property into account.
(gdnd_can_drop_on_file): New function to see whether a
non-directory file can take drops.
* gscreen.c (drop_on_panel): New helper function to drop stuff on
a panel. This uses gdnd_can_drop_on_file so that we have the
correct behavior. This enables dropping on executables and files
with the drop-action metadata/MIME property again.
(panel_icon_list_drag_data_received): Use drop_on_panel().
(panel_clist_drag_data_received): Use drop_on_panel(). Normalize
the Y coordinate to the clist_window.
* 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.
* gdesktop-prefs.[ch]: New files that handle the desktop
preferences page. Now we have a nice way to configure the
position of desktop icons.
* gprefs.c (create_prop_box): Use desktop_prefs_new() to create
the desktop preferences page.
(apply_page_changes): Do not update the desktop here.
(apply_callback): Take the desktop page into account.
* gdesktop.c (desktop_use_shaped_text): Renamed from
desktop_use_transparent_text.
* Makefile.in: Added gdesktop-prefs.[ch] to the list of sources.
* 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.
* 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.
* gcmd.[ch]
* glayout.c
* gprefs.c
* gdesktop.[ch] (mostly auto_pos and desktop_arrange_icons):
Reworking of the desktop's Arrange Icon code -- in addition to
being able to sort by various criteria now (name, file size, etc),
there are now 3 options (Right to Left, Bottom to Top, Rows instead
of Columns) controlling layout positioning. (Located in the "Desktop"
Preferences tab)
* gdesktop.c (try_rename): New function to rename a desktop icon's
file by using a file operation context.
(text_changed): Use try_rename() instead of fiddling with the VFS
directly. BUGFIX: GNOME bug tracker #707. Also, destroy the old
icon before updating the desktop.
* gdesktop.c (set_icon_wmclass): New function to set the wmclass
and wmname for desktop icons. This lets them be managed correctly
by WMs who try to manage X11R5 clients decently.
(text_changed): Call set_icon_wmclass().
(desktop_icon_info_new): Call set_icon_wmclass().
* gdesktop-icon.c (desktop_icon_realize): Do not clear the
WM_CLIENT_LEADER property.
* gdesktop.c (icon_is_in_area): Fixed off-by-one error in
intersection computation.
* gdesktop-icon.c (desktop_icon_reshape): Set the correct values
for dicon->text_x and dicon->text_y.
* gdesktop.c (new_terminal): New function to open a terminal from
the popup menu. If the user opens a terminal from the desktop,
then its cwd should be the user's home directory, not the desktop
directory. Fixes bug #2868 in the Red Hat bugzilla.
* gdesktop.c (click_proxy_motion): Terminate rubberbanding if the
event mask does not contain GDK_BUTTON1_MASK. There is a race
condition where we will not get the button release event if we
manage to grab the server in the button_press handler before the
window manager proxies the button release to us.
(perform_release): New function to terminate rubberbanding; this
used to be in click_proxy_button_release(). Also, update the drag
selection based on the last known mouse position, not on the
current one (which is not meaningful if the race condition
mentioned above kicks in).
(click_proxy_button_release): Use perform_release().
* main.c (_do_panel_cd): If we are using GNOME, and the panel is a
desktop panel, open up a new panel for the contents.
gnome/
* gdesktop.c (create_panel_from_desktop): Assign selected_index
when we find the last selected icon.
(desktop_icon_info_open): Desktop directory open case moved to
main.c to handle both general and action cd commands.
vfs/
* extfs.c (extfs_unlink):
(extfs_mkdir):
(extfs_rmdir):
(remove_entry): New functions.
(vfs_extfs_ops): Add unlink, mkdir and rmdir functions to table.
Add descriptions for these to the extfs README.
* gtkflist.[ch]: New files. This is a "file list" widget derived
from GtkCList that does several things:
- Overrides all mouse and keyboard event handlers.
- Implements its own, *sane* selection behavior, unlike
GtkCList's, which is broken.
- Implements the same selection behavior as the desktop,
which is a) correct, and b) consistent.
* gscreen.c (panel_create_file_list): Use the GtkFList widget.
(panel_widget_motion): Changed the drag thresholds to be the same
as in gtkdnd.c.
(start_drag): New convenience function to begin a drag operation.
(panel_widget_motion): Use start_drag().
(panel_clist_scrolling_is_desirable): Offsets must be with respect
to the clist_window, not to the allocation.
(panel_clist_drag_motion): Normalize the y coordinate of the
motion event to the clist_window.
* gdesktop.c (desktop_icon_info_destroy): Reset the
last_selected_icon to NULL if it is destroyed.
* Makefile.in: Added gtkflist to the list of files.
* gscreen.c: make sure that we bring up an open_with if
open it.
* gcmd.c (gnome_select): new selection dialog.
* gdesktop-init.c (desktop_init_at): do not use access for it is
poor when you are root.
1999-04-07 Jonathan Blandford <jrb@redhat.com>
* screen.c (do_enter_on_file_entry): added a consistent behaviour
for GNOME stuff.
* glayout.c (create_container): Use gtk_window_set_default_size(),
not gtk_widget_set_usize().
* gdesktop.c (get_slot_from_pos): Clamp the slot positions to be
inside the screen.
* gmain.c (gnome_check_super_user): Improved the message a bit.
* gmetadata.c (gmeta_del_icon_pos): New function to delete the
icon position metadata from a file.
* gcmd.c: Removed unused function gnome_quit_cmd().
1999-04-05 Federico Mena Quintero <federico@nuclecu.unam.mx>
* main.c (main): Call mc_tree_store_save() when the program
terminates.
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'.
Ok, so this time I got the stuff to auto-load desktop startup links.
This means you can ship stuff to pre-configure the desktop of the
users now.
We support program-based setup and url-links.
Details on the lib/README.desktop file
* gcmd.c (dentry_apply_callback): new function.
(gnome_new_launcher): We can now create new
1999-03-19 Jonathan Blandford <jrb@redhat.com>
* file.c (panel_operate): Ugly hack for GNOME. We only treat the
copy as if it were many files, and skip the only_one branch.
* gdesktop.c (text_changed): If the file has the "icon-caption"
metadata set, then change that instead of renaming the file. This
can be used by URLs and is also needed by the mountable device
icons.
(text_changed_url): Removed this function now that text_changed()
can handle all cases.
* gdnd.c (drop_url_on_directory): Set the "icon-caption" metadata
for URLs.
* gdesktop.c (icon_event): Handle button-2 clicks and drags
properly.
* file.c (erase_file): Here we need to mc_lstat(), not mc_stat().
Since we use the resulting buf.st_size to update the progress, we
need the size of unresolved links. This also makes it consistent
with screen.c:do_file_mark().
* screen.c (select_item): Return immediately if this is a desktop
panel.
1999-03-12 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdesktop.c (create_panel_from_desktop): Do not assert that
panel->count > 0, because we may actually not have any icons in
the desktop.
(desktop_popup): Reload the desktop once the popup menu is done.
(create_panel_from_desktop): Be consistent with the way totals are
computed in screen.c:do_file_mark().
* gdesktop.c (create_panel_from_desktop): Do not assert that
panel->count > 0, because we may actually not have any icons in
the desktop.
(desktop_popup): Reload the desktop once the popup menu is done.
* gpopup2.c (perform_mount_unmount): Set the icon's cursor while it is
being operated on.
(handle_mount): Use perform_mount_unmount().
(handle_unmount): Likewise.
(handle_eject): Set the icon's cursor while it is being ejected.
* gdesktop.c (desktop_icon_set_busy): New function to set a watch
or normal cursor for a desktop icon.
* gdesktop.c (desktop_icon_info_open): Set the cursor to a watch
while the icon is being opened. Also, fixed memory leaks.
(do_eject): Added a missing return value.
* gdesktop.c (do_mount_umount): Use g_readlink here.
* gpopup2.c (handle_eject): Small tuning. And use g_readlink :-).
* gmount.c (mount_point_to_device): New function. Mapes a mount
point to its device. Required since we are now using the mount
point (as this is not ambiguous) as the key for the devices and
the eject command needs the device name, not the mount point.
* gdesktop.c (desktop_icon_info_open): First try to see if
filename is mountable. Then do the directory tests and the file
launching tests. Fixes mount-by-double click.
* gmount.c (setup_devices): Use new tigert icon.
* gdesktop.c (update_url): Made static.
(desktop_reload_icons): Call update_url() when updating an
existing icon.
* gpopup2.c (handle_properties): Do not update the icon url here.
This is a semi-big slew of changes to integrate the DESKTOP_BRANCH
into the main trunk. Now the gdesktop code creates a temprary
WPanel structure and passes it on to the core file management
functions. Also, the menu code is improved (we now use gpopup2;
gpopup should go away shortly and gpopup2 should replace it).
This makes the desktop act consistently with the file panels.
Thanks to Jonathan for his help with this branch.
* gdnd.c (perform_action): Use mc_lstat(), not mc_stat().
* glayout.c (update_panels): Do not update the panels that are
desktop panels.
* gdesktop.c (icon_is_in_area): An icon is not considered to be in
a 0x0 area.
* gpopup2.c (handle_open): Fetch the desktop icon from the
filename and call desktop_icon_info_open().
* gdesktop.c (desktop_icon_info_get_by_filename): New function to
look up a desktop icon by its filename.
* glayout.c (create_new_menu_from): Test for the ".desktop" suffix
correctly.
* gpopup2.c (handle_properties): If the file comes from a desktop
panel, always allow edition of the icon image.
1999-03-10 Federico Mena Quintero <federico@nuclecu.unam.mx>
* file.c (erase_dir): Erase metadata for directories as well.
(erase_dir_iff_empty): Likewise.
(copy_file_file): Delete/copy the metadata even for
char/block/sock/fifo files. Same thing for when copying symlinks.
(copy_dir_dir): Delete/copy the metadata.
(move_dir_dir): Delete/move the metadata.
(recursive_erase): Delete the metadata.
* gdesktop.c (icon_drag_data_received): Pass the full directory
name to gdnd_perform_drop.
* gpopup.c (create_regexp_actions): This routine no longer creates
the default copy/move/delete context menu entries.
(file_actions): Include the copy/move/delete options here. This
also enabled me to reorder things to put "Delete" closer to the
top, as it is a pretty common operation.
* gutil.c (my_system_get_child_pid): reset SIGPIPE to a sensible
value.
(my_system_get_child_pid): Close also stdin/stdout/stderr
* gdesktop.c (is_mountable): Allow user-nfs devices to be mounted
* gdesktop.c (desktop_icon_info_open): Ugly. Needs to share more
code here. Use the metadata first, and the is_exe to find out how
to launch an application.
* gicon.c (gicon_get_filename_for_icon): Return const char *, this
tells the user of this routine "you better not touch or free this
you dofus".
* gnome-file-property-dialog.c (apply_metadata_change): Always set
the name of the icon to the new value, as the entry will always
match the imlib image anyways (due to the fixes I did to const
correctness).
(generate_icon_sel): Do not free the value. We do not own this
return value.
* gdesktop.c (is_mountable): NULL terminate string returned from
readlink. Yes guys, readlink does not NULL terminate things.
(do_mount_umount): ditto.
* gnome-file-property-dialog.c (init_metadata): ditto
* gdesktop.c (desktop_drag_data_received): Simplify.
* gscreen.c (panel_icon_list_drag_data_received): Pass the full
path to gdnd_perform_drop.
(panel_clist_drag_data_received): same.
* gdnd.c (drop_on_directory): We no longer take a file_entry
here. The directory we get passed is already a fully qualified
name of the target location.
* gwidget.c (x_create_input): Hook to the changed signal and sync
the input with our view of the entry. This fixes the paste bug
reported.
* gdesktop.c (desktop_icon_info_open): Launch a panel at the
location of the mount point.
* gmount.c (setup_devices): Use g_list_free, not g_free. Fed,
test your fixes to my code ;-)
* glayout.c (create_container): Add a Desktop menu if the WM is
not GNOME compliant.
* setup.c: Declare extern int tree_panel_visible for the GNOME
version.
1999-02-18 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gmount.c (gmount_setup_devices): New function to set up the
mountable devices on the desktop directory. Moved over from
gdesktop.c. Added an argument that specifies whether it should
clean up the device list first.
(cleanup_devices): Delete the metadata for the devices.
(setup_devices): Free the list of device names. Use the proper
icon for each device.
(create_device_link): Better error checking.
* gdesktop.c (create_desktop_dir): Use gmount_setup_devices().
(desktop_icon_info_destroy): Made static.
(desktop_popup_items): The command for rescanning mountable
devices should go here.
(handle_rescan_devices): Call gmount and refresh the desktop.
* gdesktop.h: Removed the declaration of tree_panel_visible, since
it has nothing to do with the desktop.
* glayout.c (gnome_panel_commands_menu): Removed the recreate
devices command.
* gdesktop.c (desktop_popup_items): Added a new command to create
a file window.