get GDK_BUTTON_RELEASE, so move middle button processing ...
(panel_icon_list_button_release): ... here.
* gtkflist.c (gtk_flist_button_release): Open new window if the
middle button is released and DnD is not attempted.
* gdesktop.c (desktop_icon_set_busy): Use a pretty arrow instead
of GDK_TOP_LEFT_ARROW.
(click_proxy_button_press): Likewise.
* gcmd.c (set_cursor_normal): Set the cursor to NULL so that we
pick up the cursor that the window manager set for us.
* gscreen.c (panel_tree_scan_begin): Use set_cursor_busy().
(panel_tree_scan_end): Uset set_cursor_normal().
* gdesktop.c (should_hide_nautilus_file): New function, used to
decide if things should be hidden (handles nautilus home key,
trash key, and .nautilus-metafile.xml for now)
(desktop_reload_icons): Hook up above function.
* gdesktop-init.c (migrate): New function to help migrate metadata
information.
* gscreen.c (file_list_popup): Changed here too.
* gdesktop-init.c (gdesktop_links_init): Migrate from Trash to
Trash.gmc to integrate with Nautilus on the same computer.
* gcmd.c (create_trash_panel): ditto
* gpopup2.c (check_trash_func): Rename trash directory to Trash.gmc
* gtkdtree.c (gtk_dtree_construct):
* gscreen.c (panel_create_tree_view): don't set the tree's line
style
* gprefs.[ch] (create_prop_box): only set the parent if the parent
exists
(create_prop_box): only show the custom tab if we have a parent
panel
(gnome_configure_box_with_desktop): add a param for optionally
doing the desktop prefs
(gnome_configure_box): wrap the other function
* gdesktop.c (set_desktop_icons): show icon properties
(desktop_popup_items): add an item to configure icons
* gpopup2.c (handle_empty_trash): Finished trash can. Now I just
need an icon.
2000-06-15 Jonathan Blandford <jrb@redhat.com>
* gpopup2.c: Add "Move to Trash" as an option to the popup menu.
Also, "Empty Trash" as appropriate.
* gscreen.c (file_list_popup): Removed New File command. It
wasn't working, and didn't do anything useful, anyways. Added
"Empty Trash" to the options for the menu.
* gscreen.c (panel_chdir): Clear the lists if the chdir operation
was not successful.
* gtkflist.c (gtk_flist_button_press): Only emit the open_row
signal if we are not on the empty area.
* gscreen.c (x_create_panel): Do not change the dialog head's
current pointer.
* gmain.c (x_init_dlg): Only call x_focus_widget() if there is a
current widget.
(non_corba_create_panels): Removed the nasty hack that created a
dummy panel and destroyed it in the idle loop. Wheeeeeee!
1999-09-21 Federico Mena Quintero <federico@redhat.com>
* dlg.c (init_dlg): Walk the list of widgets only if it exists.
(dlg_broadcast_msg_to): Use safer list-walking code for if someone
inserts a widget inside the message broadcast.
The following is a patch from Volker Braun
<volker.braun@physik.hu-berlin.de> to fix column resizing in the
file panels.
* gcustom-layout.c (custom_layout_apply): Set the
default_user_format to the new format.
* gscreen.c (panel_fill_panel_list): Set the column widths
according to the previously stored values.
Nuked the old and hideous panel_file_list_configure_contents().
(panel_file_list_configure): Connect to resize_column in the clist.
(panel_create_file_list): Do not connect to size_allocate.
(x_create_panel): Set the column width array for this panel. Set
the user format from the default one if it exists.
* gsession.c (PanelInfo): Added information about column widths
and the user format.
(save_panel_info): Save the complete information.
(load_panel_info): Load the complete information.
(free_panel_info): Free the user format.
(idle_create_panels): Set the user format and column widths.
1999-09-20 Federico Mena Quintero <federico@redhat.com>
The following is a patch from Volker Braun
<volker.braun@physik.hu-berlin.de> to fix column resizing in the
file panels.
* setup.c (options): Declare the column width option values.
(save_configure): Save the default user format.
(load_setup): Load the default user format.
* panel.h (WPanel): Added a field for the column widths.
* gtkdtree.c (scan_subtree): Do not set the current path here,
just load the subtree.
(gtk_dtree_get_row_path): Removed the column argument, since it
was never used.
(scan_subtree): Added a path argument that can be calculated
upstream.
(gtk_dtree_expand): Compute the path for scan_subtree().
(gtk_dtree_select_row): Compute the path for scan_subtree(), and
set the tree's current path here. This is the right thing;
setting the current path is completely orthogonal from scanning a
subtree.
* gtkdtree.c (gtk_dtree_class_init): Sigh. Create a new signal,
called "possibly_ungrab", used to request the client to ungrab the
mouse at the proper time. This is required because the stupid
clist button press handler grabs the mouse, and we don't want that.
(gtk_dtree_select_row): Emit the possibly_ungrab signal here.
* gscreen.c (panel_tree_drag_motion): Set the
panel->drag_tree_dragging_over flag.
(panel_tree_drag_leave): Unset said flag.
(panel_tree_possibly_ungrab): Ungrab the mouse here.
* gscreen.c: Added it here too.
* glayout.c: Add File-new option here
* gcmd.c (gnome_newfile_cmd): Added new routine. Invoke when you
want to create a new file.
* 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.
* 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 (panel_fill_panel_list): Select or unselect the rows
as appropriate, not just select them. This is needed because the
clist changes the selection under us when appending rows.
Finally, do not call select_item() at the end; just reset the
panel->selected value.
(panel_fill_panel_icons): Likewise.
(tree_drag_open_directory): Disabled the auto-collapse
functionality yet again, since it has numerous problems. BUGFIX:
GNOME bug tracker #1656.
* gcmd.c (gnome_reverse_selection_cmd_panel): Re-enabled this
function. The reverse selection bug was somewhere else after all.
* glayout.c (gnome_panel_edit_menu): Re-inserted the item for
reverse selection. It was pointing to the wrong callback, that is
why it never worked.
The two following entries are BUGFIX: GNOME bug tracker #1789.
* gscreen.c (panel_fill_panel_list): Do not allow selection of "..".
(panel_icon_list_select_icon): Likewise.
* glayout.c (gnome_panel_edit_menu): Removed the Invert Selection
command. It is completely broken for the expected GNOME
semantics.
* 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.
* gcorba.c (corba_create_window): Ensure that the directory we
pass to the CORBA server is not NULL.
* gscreen.c: Removed a bunch of unused functions for filters.
* gscreen.c (panel_tree_button_press): Beginning of context menu
on tree.
* gtkdtree.c (gtk_dtree_load_path): Comment out the phantom code.
Need to review this code. Lets fix the problem Federico needs
solved now.
* gscreen.c (panel_fill_panel_icons): Add a hack to work around
gnome-libs/gnome-icon-list bug that did not reset the proper
values. A fix will be available in gnome-libs-1.0.10.
Fixes bug #1338.
* 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.
* gscreen.c (panel_setup_drag_scroll): Made it not return
anything, since scrolling is independent from any other
prelighting actions.
(panel_tree_drag_begin): Do not print debugging message.
(panel_drag_data_get): Assert that we were requested a valid data
type.
(panel_create_tree_view): Only specify GTK_DEST_DEFAULT_DROP for
the tree, since we want to present the correct feedback when the
user is hovering over the blank area in the tree.
(panel_build_selected_file_list): Made it return char *.
(panel_tree_drag_end): Free dtree->drag_dir, not dtree->current_path.
(tree_drag_open_directory): Use panel->drag_tree_node instead of
the coordinates hack.
1999-04-15 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gscreen.c (panel_setup_drag_scroll): Made it not return
anything, since scrolling is independent from any other
prelighting actions.
(panel_tree_drag_begin): Do not print debugging message.
(panel_drag_data_get): Assert that we were requested a valid data
type.
* gscreen.c (panel_icon_list_button_press): Ignore double clicks.
(panel_widget_motion): Don't do anything if the button state does
not match the button we are expecting.
* gtkflist.c (gtk_flist_button_press): Remove pending selections
when we receive a double click.
* gaction.c: #include "view.h"
* 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.
* gscreen.c (file_list_popup_items): Use "New Directory", not "New
Folder", to be consistent with the desktop and File menus. Thanks
to Kevin Fox for pointing this out.
(panel_icon_list_drag_data_received): Update the panels properly.
(panel_clist_drag_data_received): Likewise.
(panel_tree_drag_data_received): Likewise.
* gcmd.c (gnome_close_panel): Doh. Do not access g_free()d
memory.
* glayout.c (copy_uiinfo_widgets): Return the copied array as a
return value, not in an argument.
* gcmd.c (set_view_type): Added a sanity check.
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
* gscreen.c (panel_tree_drag_motion): Dragging now automatically
highlights the tree. God does it flicker... )-:
* gtkdtree.h (gtk_dtree_construct): removed unused prototype.
* gscreen.c (panel_tree_check_auto_expand): removed the
auto-collapse of trees, as it is confusing to the user.
* gscreen.c (x_select_item): It is not necessary to call
gnome_canvas_update_now() here.
* gdesktop-icon.c (set_icon): Do not destroy the icon image.
* gnome-file-property-dialog.c
(gnome_file_property_dialog_finalize): Do not destroy the icon
image, since it is a shared resource.