* 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.
* 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.
* gdesktop.c (click_proxy_button_press): Use a nice arrow cursor
for rubberbanding.
(click_proxy_filter): Keep a firm jaw when the window manager dies
and thus the proxy window is destroyed.
(setup_desktop_click_proxy_window): Moved the proxy window
creation code to this function.
(click_proxy_property_notify): Handle PropertyNotify events from
the root window for when the proxy window changes. Now the window
manager can restart itself as it pleases and GMC will handle it
correctly.
Wheeeee! Desktop icons can be selected by rubberbanding. You
need Englightenment to do this, as so far it seems to be the only
WM with support for the _WIN_DESKTOP_BUTTON_PROXY property.
* gdesktop.c (click_proxy_filter): New event filter for button
presses and releases on the root window.
(click_proxy_button_press): New function to handle button presses
on the desktop.
(click_proxy_button_release): New function to handle button
releases on the desktop.
(click_proxy_motion): New function to handle rubberbanding motion
on the desktop.
(setup_xdnd_proxy): Flush the server after ungrabbing it.
(find_click_proxy_window): Flush the server after ungrabbing it.
(store_temp_selection): Stores the temporary selection to the
master selection, or viceversa. This is needed for dynamic
updating while the user rubberbands.
(update_drag_selection): New function to update the selection
while the user is rubberbanding on the desktop.
(icon_is_in_area): New function to see if an icon is inside the
rubberbanding area.
* gdesktop-icon.h: Added fields for querying the icon and text
position and size.
* gdesktop-icon.c (desktop_icon_reshape): Set the position and
size fields as computed for layout.
* gdesktop.c (editing_started): Grab on the window for the
icon, not on the canvas, so we can properly detect
clicks elsewhere.
(icon_button_release_after): When the user stops selecting,
regrab the pointer.
* 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)
* gcmd.c: #include "../vfs/vfs.h"
* gdesktop.c (setup_icon_dnd_actions): Moved the code that calls
gtk_drag_source_set() for an icon here.
(editing_started): Temporarily disable drags while the icon's text
is being edited.
(editing_stopped): Re-enable DnD from the icon once editing has
stopped.
* gcmd.c: #include "../vfs/vfs.h"
* gdesktop.c (setup_icon_dnd_actions): Moved the code that calls
gtk_drag_source_set() for an icon here.
(editing_started): Temporarily disable drags while the icon's text
is being edited.
(editing_stopped): Re-enable DnD from the icon once editing has
stopped.
* gcmd.c (gnome_close_panel): When a panel is destroyed, chdir to
root directory, as the process will be holding the inode for the
directory that was selected until an operation is performed in
another panel.
* gicon.c (gicon_get_icon_for_file): Invert the way the testing
for icons is done to handle directories properly.
* gdesktop.c (dnd_select_icon_pending): Added this flag that
specifies whether a selection is pending for an icon if the user
was holding the Control key down while clicking. We have to delay
selection in this case so that DnD will work correctly, just like
Windows.
(icon_button_press): New function that handles button presses on
icons; it obsoletes the old desktop_icon_info_event().
(icon_button_release): New function that handles button releases
on desktop icons; it will do what is appropriate if there was a
pending icon selection.
(drag_begin): Handle pending selections as appropriate.
(unselect_all): Added an paremeter that specifies which icon to
exclude from unselection.
(editing_started): Unselect all icons but the one for which
editing has started.
(dnd_icon_sources): Changed the MIME-types for internal drops to
"application/x-mc-desktop-icon".
(click_proxy_window): New variable that stores the proxy window
for clicks on the desktop.
(setup_desktop_clicks): New function that sets up clicks on the
root window.
(find_click_proxy_window): New function to find and set up the
window for proxying clicks from the root window.
* image.metadata.in: Added case for `jpg', as there was only a
case for `jpeg'.
* gicon.c (gnome_file_entry_color): If we do not have permissions
for this directory, indicate this with a special icon.
* gscreen.c (panel_icon_list_select_icon): Middle button opens a
new panel on a directory.
* gdesktop.c: Moved the old DnD cruft to olddnd.c to keep it there
for reference purposes.
* gmetadata.c: Removed the gmeta_get_icon_for_file() function, as
it is obsoleted by gicon_get_icon_for_file().
* gdesktop.c (desktop_icon_info_new): Made it use
gicon_get_icon_for_file().
* gdesktop-icon.c (set_icon): Now we handle things internally
using an imlib image, not a filename.
(desktop_icon_new): Now takes an imlib image for the icon instead
of a filename.
(desktop_icon_set_icon): Likewise.
* gdesktop.c (desktop_icon_info_new): Do not stat the file, as we
do not need that information anymore.
(setup_icon_dnd_source): Moved the DnD-as-source code to here.
(setup_icon_dnd_dest): New function to set up an icon as a DnD
destination.
* gdesktop.c (desktop_icon_info_place): Doh, do not place icons
past the edge of the *whole* screen :-)
(dnd_press_x dnd_press_y): New variables to store the cursor
hotspot for DnD icons. Moved these over from the
desktop_icon_info structure, as it does not make sense to have
this inside every icon.
(button_press): Use dnd_press_x and dnd_press_y.
(drag_begin): Likewise.
(drop_desktop_icons): Use dnd_press_x and dnd_press_y to fix the offsets.
(drag_data_received): Fix the proxy window offsets for all types
of targets.
(drop_desktop_icons): Snap the coordinates as appropriate.
* gdesktop.c (drop_desktop_icons): New function to perform a drop
from desktop icons to the desktop. It effectively moves the icons
around.
(desktop_icon_info_place): Do not place the icons past the edge of
the screen.
* gdesktop.c (file_entry_from_file): Finished implementing
file_entry_from_file().
(struct desktop_icon_info): Removed the `type' field. We now stat
the file when needed to figure out the file type.
(desktop_icon_info_event): Test whether the file is a directory by
ourselves, and if it is, open a new panel for it.
(drag_data_get): Generate the uri-list for internal desktop icon
drags as well.
* Makefile.in (codedirs): Dropped xv and tk ports from the
distribution. include idl directory.
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>
* gtkedit.c: changed occurence of 'va_list *ap' to 'va_list ap'
Thu Nov 26 12:20:06 1998 Pavel Roskin <pavel_roskin@geocities.com>
* config.h.in: Removed from CVS, added to .cvsignore
* acconfig.h, macros/curses.m4, src/xcurses.c, src/tty.h,
configure.in:
* 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.
* 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.
* gdesktop.c (load_desktop_icons): Added arguments that specify
where to place the newly-created icons. This needs some tweaking still.
(reload_desktop_icons): Now takes arguments for the position of
the new icons.
(drag_data_received): Pass in the drop position to reload_desktop_icons().
* gscreen.c (panel_tree_drag_motion): Added missing variable declaration.
* gdesktop.c (load_desktop_icons): Added an incremental flag that
specifies whether icon creation is unconditional regardless of
whether there is an icon for a file or not.
(reload_desktop_icons): Use the incremental flag in load_desktop_icons().
(drag_data_received): Reload the desktop incrementally, to avoid flicker.
(desktop_icon_info_new): Use mc_lstat(), not mc_stat(). We do
want to read symlinks, even dangling ones, if they exist.
(load_desktop_icons): While we are reading the desktop directory,
first place all the icons that have their metadata icon-position
set, and build a list of the ones that don't. *Then* place
those. This fixes overlapping icons on weird situations.
* directory.xpm: Removed bogus garbage. There was a stale pixmap here.
* gdesktop.c (setup_desktop_dnd): Allow for GDK_ACTION_ASK as well.
* gscreen.c (panel_widget_motion): The action argument to
gtk_drag_begin() is a mask of possible actions, not a single action.
* gdesktop.c (drag_data_received): Only reload the icons if the
drop was successful.
* 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.
* 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.
* 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.
* gscreen.c (tree_drag_open_directory, panel_tree_drag_motion,
panel_tree_drag_leave): Drag and Drop support routines for the
tree to auto-expand the tree when the user stays still on top of a
directory.
* 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>
* glayout.c (file_menu): Use view_cmd and view_simple_cmd in the
menu instead of panel_action_view and
panel_action_view_unfiltered, respectively.
* gpopup.c (create_regexp_actions): Create the menu items using
gnome-app-helper, for visual consistency.
(create_actions): Likewise. Also, fixed S_ISLNK() confusion.
(get_label_text): Extract the label from the GnomeUIInfo item in
an ugly way.
* gscreen.c (panel_switch_new_display_mode): Destroy the old
widget. Add the list view to the proper table.
* glayout.c: Remove the exit menu option.
* gtree.c (gtk_dtree_contains): New routine used to avoid
duplicate entries in the tree display.
* gwidget.c (x_update_input): Use gtk_editable_changed on the entry.
(x_create_listbox): Fix more CList api change.
* gscreen.c (CLIST_FROM_SW): Adapt to new GtkScrolledWindow
inheritance.
* Makefile.in (OOBJS): Add filegui.o back until the GTK-specific
filegui is written.
* gdesktop.c (check_window_in_one_panel): Provide better error
messages here for debugging purposes.
Disable stubs for filegui.c until they are actually implemented.
I need to debug stuff.
* gdnd.c (find_panel_owning_window): Use the new
gtk_drag_get_source_widget function to find out reliably if the
drag source happens to be in this application.
* gscreen.c (x_create_panel): Set the usize for the ministatus
label to be (0, -1), this means: do not request any horizontal
space, use any vertical space given.
Put the ministatus inside an hbox, and use
gtk_container_set_resize_mode in this hbox to stop any queue
events from being propagated up in the hierachy of widgets
This kills all of the CList/GnomeIconList/Scrollbar/Toolbar
flickering now.
* gscreen.c (x_create_panel): Set the usize for the ministatus
label to be (0, -1), this means: do not request any horizontal
space, use any vertical space given.
Put the ministatus inside an hbox, and use
gtk_container_set_resize_mode in this hbox to stop any queue
events from being propagated up in the hierachy of widgets
This kills all of the CList/GnomeIconList/Scrollbar/Toolbar
flickering now.
* gdesktop.c (desktop_icon_info_event): Run the popup menu for the
icons in the desktop.
* gpopup.[ch]: New files that take care of the popup menus for
files in the desktop and in the panels.
* Makefile.in: Added gpopup.[ch] to the list of sources.
* gdesktop.c (desktop_icon_info_place): Save the icon position
when it is moved.
(desktop_destroy): Removed the save_icons_pos() function and do
not invoke it from desktop_destroy().
* gdesktop.c: Put in a bunch of stubs for the functions in
filegui.h. These will be removed as the dialogs get
custom-written for Gnome.
* gmetadata.[ch]: Changed the function names to "gmeta_*".
* gscreen.c (CLIST_FROM_SW): Use scrolled_window->child, as
viewport is obsolete.
1998-11-23 Federico Mena Quintero <federico@nuclecu.unam.mx>
* dlg.c (dlg_try_hotkey): Removed unused declaration of input_event.
(dlg_key_event): Return 1 if handled the tab key.
* filegui.h: Added prototypes for file_progress_show_{source,target,deleting}().
* Makefile.in (OOBJS): Do not link ../src/filegui.o. GMC does not
link right now, but I guess I'll add stubs until we finish with
the dialog boxes.
* gdnd.c: #include <sys/types.h>
* Makefile.in (checklinks): Fix sourcelinks -> maksourcelinks typo.
* 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-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdnd.c: New file that handles all the DnD stuff. Mainly used to
clean up gdesktop.c.
* gscreen.c (panel_icon_list_drag_data_received): Use
gdnd_drop_on_directory().
(CLIST_FROM_SW): Added this macro to fetch the clist from the
scrolled window in panel->list.
(panel_create_file_list): Create a scrolled window and put the
clist inside it. This is required per the new clist API.
(panel_configure_file_list): Use the scrolled window's adjustment.
(panel_file_list_size_allocate_hook): Use the scrolled window
instead of the clist.
(panel_file_list_compute_lines): Use the scrolled window instead
of the clist.
(panel_file_list_configure_contents): Use the scrolled window
instead of the clist.
(panel_create_file_list): Do the DnD setup here, not in the
realization callback.
(x_create_panel): Do not realize the panel explicitly.
(panel_create_pixmaps): Create the pixmaps using imlib instead of
Gdk.
* gdesktop.c: Now desktop icons are stored in the layout_slots
array. We need to know which icons are in which slots.
(unselect_all): Use the layout_slots array.
(desktop_icon_info_place): Append the icon to the list in the
proper slot.
(desktop_icon_info_new): Initialize the position and slot fields
in the desktop icon info structure.
(desktop_icon_info_free): Remove the icon from its slot.
(desktop_destroy): Destroy the layout slots and the icons
properly.
(remove_from_slot): New convenience function to remove an icon
from the slot it is in.
(get_icon_snap_pos): Do a bit nicer snapping by really using the
closest slot.
Added a last_selected_icon variable to keep track of the icon that
was last selected, for shift+click selections.
(select_icon): Finish selection semantics and clean up. Now it is
nice and simple and complete.
(select_range): New function that handles range selections.
* gdesktop-icon.h (DesktopIcon): Added a child item for stippling
the icon when it is selected.
* gdesktop-icon.c (desktop_icon_select): Show/hide the stippling
as appropriate.
* gdesktop.c (desktop_icon_info_event): Handler for events on
desktop icons.
(select_icon): New function that handles icon selection based on
mouse clicks and modifier keys.
* gdesktop.c (struct desktop_icon_info): Added a type field to the
structure. It specifies the type of icon (file, directory), and
is used to determine the DnD and menu behavior.
* 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.
Documentation update.
1998-10-30 Miguel de Icaza <miguel@nuclecu.unam.mx>
* fish.c (command): Replace vnsprintf with g_strdup_vprintf. This
is both safe and more correct, as there is no limit on the
pathname.
* ftpfs.c (command): Same as above.
* util-alone.c (print_vfs_message): Same as above.
1998-10-30 Miguel de Icaza <miguel@nuclecu.unam.mx>
* layout.c (print_vfs_message): Use g_snprintf instead of
vnsprintf.
* gdesktop-icon.c (create_window_shape): Use shaped icons only
when the user has selected them.
(desktop_icon_reshape): New public function to recompute the shape
of the icon. This should be used when the global
desktop_use_shaped_icons flag changes.
Added documentation comments to the public functions.
* gdesktop.c (desktop_icon_set_position): Do not lower the
window. The gnome-compliant wm will know what to do with windows
on the Desktop layer.
(post_setup_desktop_icon): Likewise.
* desktop-icon.c (create_window_shape): Fetch the mask of the
image "by hand", as we cannot rely on the canvas item having
created it yet.
* desktop-icon.c (desktop_icon_realize): Doh. We need to
initialize the gnome_win_hints before we set any of the hints.
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.
MC now depends on glib (currently only the assertions are used).
VFS structure declaration fixes.
Uses the new icon list (it is dog slow, need to fix this tonight at home).
* gscreen.c (display_mini_info): Removed calls to
gtk_clip_label_set() hack, since its cut-n-paste code didn't work
with new GTK's. If excessive resizes are a problem, they can be
solved by adding an adjustment around the label, and calling
gtk_container_set_resize_mode().
* gdesktop.c - changed dnd setting routine for desktop icon to set
events on child window...
* gtrans.c - chnaged routines to make window with
child rawing area and set shape on parent window