diff --git a/gnome/ChangeLog b/gnome/ChangeLog index 2b898de55..e9e2dc0a1 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,3 +1,15 @@ +1999-03-09 Miguel de Icaza + + * 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. + 1999-03-08 Miguel de Icaza * gmain.c (session_save_state): Add call to gnome_config_sync(). diff --git a/gnome/gcmd.c b/gnome/gcmd.c index d9072b9b3..e921eaf41 100644 --- a/gnome/gcmd.c +++ b/gnome/gcmd.c @@ -143,7 +143,6 @@ void gnome_close_panel (GtkWidget *widget, WPanel *panel) { Dlg_head *h = panel->widget.parent; - g_print ("closing the panel\n"); if (panel->timer_id){ gtk_timeout_remove (panel->timer_id); panel->timer_id = -1; diff --git a/gnome/gdesktop.c b/gnome/gdesktop.c index 5bf5ae0d2..853e01515 100644 --- a/gnome/gdesktop.c +++ b/gnome/gdesktop.c @@ -1654,14 +1654,16 @@ icon_drag_data_received (GtkWidget *widget, GdkDragContext *context, gint x, gin full_name = g_concat_dir_and_file (desktop_directory, dii->filename); fe = file_entry_from_file (full_name); - g_free (full_name); - if (!fe) - return; /* eeeek */ + if (!fe){ + g_free (full_name); + return; + } - if (gdnd_perform_drop (context, data, desktop_directory, fe)) + if (gdnd_perform_drop (context, data, full_name, fe)) desktop_reload_icons (FALSE, 0, 0); file_entry_free (fe); + g_free (full_name); } } diff --git a/gnome/gpopup.c b/gnome/gpopup.c index e8f948836..650e824a2 100644 --- a/gnome/gpopup.c +++ b/gnome/gpopup.c @@ -256,6 +256,8 @@ fill_menu (GtkMenuShell *menu_shell, GnomeUIInfo *uiinfo, int pos) */ static struct action file_actions[] = { { N_("Properties"), F_SINGLE | F_PANEL, (GtkSignalFunc) panel_action_properties }, + { N_("Delete"), F_PANEL | F_ALL, (GtkSignalFunc) delete_cmd }, + { N_("Delete"), F_DICON | F_ALL, (GtkSignalFunc) dicon_delete }, { N_("Properties"), F_SINGLE | F_DICON, (GtkSignalFunc) dicon_properties }, { N_("Mount device"), F_SINGLE|F_MOUNTABLE|F_DICON, (GtkSignalFunc) dicon_mount }, { N_("Unmount device"), F_SINGLE|F_UNMOUNTABLE|F_DICON, (GtkSignalFunc) dicon_unmount }, @@ -268,34 +270,15 @@ static struct action file_actions[] = { { N_("View unfiltered"), F_PANEL | F_NOTDIR, (GtkSignalFunc) panel_action_view_unfiltered }, { N_("Edit"), F_PANEL | F_NOTDIR, (GtkSignalFunc) panel_action_edit }, { "", 0, NULL }, + { N_("Move/rename..."), F_PANEL | F_ALL, (GtkSignalFunc) ren_cmd }, + { N_("Copy..."), F_PANEL | F_ALL, (GtkSignalFunc) copy_cmd }, + { "", 0, NULL }, { N_("Link..."), F_PANEL | F_REGULAR | F_SINGLE, (GtkSignalFunc) link_cmd }, { N_("Symlink..."), F_PANEL | F_SINGLE, (GtkSignalFunc) symlink_cmd }, { N_("Edit symlink..."), F_PANEL | F_SYMLINK, (GtkSignalFunc) edit_symlink_cmd }, { NULL, 0, NULL }, }; -/* Menu entries for files from a panel window */ -static GnomeUIInfo panel_actions[] = { - GNOMEUIINFO_SEPARATOR, - GNOMEUIINFO_ITEM_NONE (N_("Move/rename..."), NULL, ren_cmd), - GNOMEUIINFO_ITEM_NONE (N_("Copy..."), NULL, copy_cmd), - GNOMEUIINFO_ITEM_NONE (N_("Delete"), NULL, delete_cmd), - GNOMEUIINFO_SEPARATOR, - GNOMEUIINFO_END -}; - -/* Menu entries for files from desktop icons */ -static GnomeUIInfo dicon_actions[] = { - GNOMEUIINFO_SEPARATOR, -#if 0 - GNOMEUIINFO_ITEM_NONE (N_("Move/rename..."), NULL, dicon_move), - GNOMEUIINFO_ITEM_NONE (N_("Copy..."), NULL, dicon_copy), -#endif - GNOMEUIINFO_ITEM_NONE (N_("Delete"), NULL, dicon_delete), - GNOMEUIINFO_SEPARATOR, - GNOMEUIINFO_END -}; - /* Creates the menu items for the standard actions. Returns the position at which additional menu * items should be inserted. @@ -528,7 +511,6 @@ create_regexp_actions (GtkWidget *menu, WPanel *panel, int panel_row, char *filename, int insert_pos) { gpointer closure, regex_closure; - GnomeUIInfo *a_uiinfo; int i; GtkSignalFunc regex_callback; const char *mime_type; @@ -538,26 +520,15 @@ create_regexp_actions (GtkWidget *menu, WPanel *panel, GNOMEUIINFO_END }; + regex_callback = mime_command_from_desktop_icon; if (panel) { - a_uiinfo = panel_actions; closure = panel; - regex_callback = mime_command_from_desktop_icon; regex_closure = filename; } else { - a_uiinfo = dicon_actions; closure = dii; - regex_callback = mime_command_from_desktop_icon; regex_closure = filename; } - /* Fill in the common part of the menus */ - - for (i = 0; a_uiinfo [i].type != GNOME_APP_UI_ENDOFINFO; i++) - a_uiinfo[i].user_data = closure; - - fill_menu (GTK_MENU_SHELL (menu), a_uiinfo, insert_pos); - insert_pos += 5; /* the number of items from the common menus */ - /* Fill in the regex command part */ mime_type = gnome_mime_type_or_default (filename, NULL); diff --git a/gnome/gutil.c b/gnome/gutil.c index 4b824a7fb..4a38a3699 100644 --- a/gnome/gutil.c +++ b/gnome/gutil.c @@ -132,7 +132,6 @@ int my_system_get_child_pid (int flags, const char *shell, const char *command, } if ((*pid = fork ()) < 0){ - fprintf (stderr, "\n\nfork () = -1\n"); return -1; } if (*pid == 0){