Sync for laptop, do not touch this for now

This commit is contained in:
Miguel de Icaza 1998-10-20 01:52:16 +00:00
parent 2f1692a46e
commit 215cd45d16
6 changed files with 31 additions and 7 deletions

View File

@ -67,7 +67,7 @@ void
gnome_about_cmd (void) gnome_about_cmd (void)
{ {
GtkWidget *about; GtkWidget *about;
gchar *authors[] = { const gchar *authors[] = {
"The Midnight Commander Team", "The Midnight Commander Team",
"http://www.gnome.org/mc/", "http://www.gnome.org/mc/",
"bug reports: mc-bugs@nuclecu.unam.mx", "bug reports: mc-bugs@nuclecu.unam.mx",

View File

@ -242,6 +242,7 @@ get_desktop_icon (char *pathname)
/* /*
* Hackisigh routine taken from GDK * Hackisigh routine taken from GDK
*/ */
#ifdef OLD_DND
static void static void
gdk_dnd_drag_begin (GdkWindow *initial_window) gdk_dnd_drag_begin (GdkWindow *initial_window)
{ {
@ -309,6 +310,7 @@ artificial_drag_start (GdkWindow *window, int x, int y)
} }
#endif #endif
} }
#endif /* OLD_DND */
static int operation_value; static int operation_value;
@ -436,6 +438,7 @@ perform_drop_on_directory (WPanel *source_panel, int operation, char *dest)
} }
} }
#if OLD_DND
static void static void
perform_drop_manually (int operation, GdkEventDropDataAvailable *event, char *dest) perform_drop_manually (int operation, GdkEventDropDataAvailable *event, char *dest)
{ {
@ -589,6 +592,7 @@ drops_from_event (GdkEventDropDataAvailable *event, int *argc)
return argv; return argv;
} }
#endif /* OLD_DND */
/* /*
* destroys a desktop_icon_t structure and anything that was held there, * destroys a desktop_icon_t structure and anything that was held there,
@ -672,6 +676,7 @@ desktop_icon_remove (desktop_icon_t *di)
desktop_release_desktop_icon_t (di, 1); desktop_release_desktop_icon_t (di, 1);
} }
#ifdef OLD_DN
static void static void
drop_on_launch_entry (GtkWidget *widget, GdkEventDropDataAvailable *event, desktop_icon_t *di) drop_on_launch_entry (GtkWidget *widget, GdkEventDropDataAvailable *event, desktop_icon_t *di)
{ {
@ -757,6 +762,7 @@ connect_drop_signals (GtkWidget *widget, desktop_icon_t *di)
gtk_signal_connect (o, "drop_leave_event", GTK_SIGNAL_FUNC (drop_enter_leave), di); gtk_signal_connect (o, "drop_leave_event", GTK_SIGNAL_FUNC (drop_enter_leave), di);
gtk_signal_connect (o, "drop_data_available_event", GTK_SIGNAL_FUNC (drop_cb), di); gtk_signal_connect (o, "drop_data_available_event", GTK_SIGNAL_FUNC (drop_cb), di);
} }
#endif /* OLD DND */
void void
desktop_icon_execute (GtkWidget *ignored, desktop_icon_t *di) desktop_icon_execute (GtkWidget *ignored, desktop_icon_t *di)
@ -796,6 +802,7 @@ desktop_icon_configure_position (desktop_icon_t *di, int x, int y)
} }
} }
#ifdef OLD_DND
static void static void
desktop_icon_drag_request (GtkWidget *widget, GdkEventDragRequest *event, desktop_icon_t *di) desktop_icon_drag_request (GtkWidget *widget, GdkEventDragRequest *event, desktop_icon_t *di)
{ {
@ -823,6 +830,7 @@ desktop_icon_drag_request (GtkWidget *widget, GdkEventDragRequest *event, deskto
desktop_icon_configure_position (di, drop_x, drop_y); desktop_icon_configure_position (di, drop_x, drop_y);
} }
} }
#endif
static GtkWidget *root_drag_ok_window; static GtkWidget *root_drag_ok_window;
static GtkWidget *root_drag_not_ok_window; static GtkWidget *root_drag_not_ok_window;
@ -891,8 +899,10 @@ desktop_icon_drag_start (GtkWidget *widget, GdkEvent *event, desktop_icon_t *di)
root_drag_ok_window = make_transparent_window (fname); root_drag_ok_window = make_transparent_window (fname);
root_drag_not_ok_window = make_transparent_window (fname); root_drag_not_ok_window = make_transparent_window (fname);
if (root_drag_not_ok_window && root_drag_ok_window){ if (root_drag_not_ok_window && root_drag_ok_window){
#ifdef OLD_DND
gdk_dnd_set_drag_shape (root_drag_ok_window->window, &root_icon_drag_hotspot, gdk_dnd_set_drag_shape (root_drag_ok_window->window, &root_icon_drag_hotspot,
root_drag_not_ok_window->window, &root_icon_drag_hotspot); root_drag_not_ok_window->window, &root_icon_drag_hotspot);
#endif
gtk_widget_show (root_drag_not_ok_window); gtk_widget_show (root_drag_not_ok_window);
gtk_widget_show (root_drag_ok_window); gtk_widget_show (root_drag_ok_window);
} }
@ -920,12 +930,15 @@ desktop_icon_make_draggable (desktop_icon_t *di)
child = gtk_container_children(GTK_CONTAINER(di->widget)); child = gtk_container_children(GTK_CONTAINER(di->widget));
obj = GTK_OBJECT (child->data); obj = GTK_OBJECT (child->data);
/* To artificially start up drag and drop */ /* To artificially start up drag and drop */
#ifdef OLD_DND
/* gtk_signal_connect (obj, "motion_notify_event", GTK_SIGNAL_FUNC (start_icon_drag), di); */ /* gtk_signal_connect (obj, "motion_notify_event", GTK_SIGNAL_FUNC (start_icon_drag), di); */
gtk_widget_dnd_drag_set (GTK_WIDGET(child->data), TRUE, drag_types, ELEMENTS (drag_types)); gtk_widget_dnd_drag_set (GTK_WIDGET(child->data), TRUE, drag_types, ELEMENTS (drag_types));
gtk_signal_connect (obj, "drag_request_event", GTK_SIGNAL_FUNC (desktop_icon_drag_request), di); gtk_signal_connect (obj, "drag_request_event", GTK_SIGNAL_FUNC (desktop_icon_drag_request), di);
gtk_signal_connect (obj, "drag_begin_event", GTK_SIGNAL_FUNC (desktop_icon_drag_start), di); gtk_signal_connect (obj, "drag_begin_event", GTK_SIGNAL_FUNC (desktop_icon_drag_start), di);
gtk_signal_connect (obj, "drag_end_event", GTK_SIGNAL_FUNC (desktop_icon_drag_end), di); gtk_signal_connect (obj, "drag_end_event", GTK_SIGNAL_FUNC (desktop_icon_drag_end), di);
#endif
} }
/* Called by the pop up menu: removes the icon from the desktop */ /* Called by the pop up menu: removes the icon from the desktop */

View File

@ -44,9 +44,12 @@ GtkWidget *create_transparent_text_window (char *file, char *text, int extra_eve
GtkWidget *make_transparent_window (char *file); GtkWidget *make_transparent_window (char *file);
/* gdesktop.c */ /* gdesktop.c */
#if 0
void drop_on_directory (GdkEventDropDataAvailable *event, char *dest, int force_manually); void drop_on_directory (GdkEventDropDataAvailable *event, char *dest, int force_manually);
void gnome_arrange_icons (void);
void artificial_drag_start (GdkWindow *source_window, int x, int y); void artificial_drag_start (GdkWindow *source_window, int x, int y);
#endif
void gnome_arrange_icons (void);
void start_desktop (void); void start_desktop (void);
void stop_desktop (void); void stop_desktop (void);

View File

@ -483,7 +483,7 @@ create_container (Dlg_head *h, char *name, char *geometry)
} else if (!other_panel_ptr) } else if (!other_panel_ptr)
other_panel_ptr = container; other_panel_ptr = container;
/* bind_gtk_keys (GTK_WIDGET (app), h); */ bind_gtk_keys (GTK_WIDGET (app), h);
return panel; return panel;
} }

View File

@ -185,7 +185,6 @@ xtoolkit_create_dialog (Dlg_head *h, int flags)
bind_gtk_keys (GTK_WIDGET (ted), h); bind_gtk_keys (GTK_WIDGET (ted), h);
} }
if (win){ if (win){
if (h->callback != dialog_panel_callback)
bind_gtk_keys (GTK_WIDGET (win), h); bind_gtk_keys (GTK_WIDGET (win), h);
} }
return (widget_data) win; return (widget_data) win;
@ -412,7 +411,7 @@ dialog_panel_callback (struct Dlg_head *h, int id, int msg)
if (msg == DLG_UNHANDLED_KEY || msg == DLG_HOTKEY_HANDLED) if (msg == DLG_UNHANDLED_KEY || msg == DLG_HOTKEY_HANDLED)
return midnight_callback (h, id, msg); return midnight_callback (h, id, msg);
return default_dlg_callback (h, id, msg); return 0;
} }
extern GList *directory_list; extern GList *directory_list;

View File

@ -961,6 +961,8 @@ panel_build_selected_file_list (WPanel *panel, int *file_list_len)
return fullname; return fullname;
} }
} }
#ifdef OLD_DND
/* /*
* Handler for text/plain and url:ALL drag types * Handler for text/plain and url:ALL drag types
* *
@ -1133,6 +1135,7 @@ panel_artificial_drag_start (GtkCList *window, GdkEventMotion *event)
{ {
artificial_drag_start (window->clist_window, event->x, event->y); artificial_drag_start (window->clist_window, event->x, event->y);
} }
#endif /* OLD_DND */
static GtkWidget * static GtkWidget *
load_transparent_image (char *base) load_transparent_image (char *base)
@ -1178,6 +1181,7 @@ panel_realized (GtkWidget *file_list, WPanel *panel)
load_dnd_icons (); load_dnd_icons ();
#if OLD_DND
/* DND: Drag setup */ /* DND: Drag setup */
gtk_signal_connect (obj, "drag_request_event", GTK_SIGNAL_FUNC (panel_clist_drag_request), panel); gtk_signal_connect (obj, "drag_request_event", GTK_SIGNAL_FUNC (panel_clist_drag_request), panel);
gtk_signal_connect (obj, "drag_begin_event", GTK_SIGNAL_FUNC (panel_drag_begin), panel); gtk_signal_connect (obj, "drag_begin_event", GTK_SIGNAL_FUNC (panel_drag_begin), panel);
@ -1191,6 +1195,7 @@ panel_realized (GtkWidget *file_list, WPanel *panel)
gtk_signal_connect (obj, "motion_notify_event", gtk_signal_connect (obj, "motion_notify_event",
GTK_SIGNAL_FUNC (panel_artificial_drag_start), panel); GTK_SIGNAL_FUNC (panel_artificial_drag_start), panel);
gdk_window_dnd_drop_set (GTK_CLIST (file_list)->clist_window, TRUE, drop_types, ELEMENTS (drop_types), FALSE); gdk_window_dnd_drop_set (GTK_CLIST (file_list)->clist_window, TRUE, drop_types, ELEMENTS (drop_types), FALSE);
#endif
} }
/* /*
@ -1314,6 +1319,7 @@ load_imlib_icons (void)
loaded = 1; loaded = 1;
} }
#if OLD_DND
static void static void
panel_icon_list_artificial_drag_start (GtkObject *obj, GdkEventMotion *event) panel_icon_list_artificial_drag_start (GtkObject *obj, GdkEventMotion *event)
{ {
@ -1372,6 +1378,7 @@ panel_icon_list_drop_data_available (GtkWidget *widget, GdkEventDropDataAvailabl
update_one_panel_widget (panel, 0, UP_KEEPSEL); update_one_panel_widget (panel, 0, UP_KEEPSEL);
panel_update_contents (panel); panel_update_contents (panel);
} }
#endif
/* /*
* Setup for the icon view * Setup for the icon view
@ -1384,6 +1391,7 @@ panel_icon_list_realized (GtkObject *obj, WPanel *panel)
load_imlib_icons (); load_imlib_icons ();
load_dnd_icons (); load_dnd_icons ();
#ifdef OLD_DND
/* DND: Drag setup */ /* DND: Drag setup */
gtk_signal_connect (obj, "drag_request_event", GTK_SIGNAL_FUNC (panel_icon_list_drag_request), panel); gtk_signal_connect (obj, "drag_request_event", GTK_SIGNAL_FUNC (panel_icon_list_drag_request), panel);
gtk_signal_connect (obj, "drag_begin_event", GTK_SIGNAL_FUNC (panel_icon_list_drag_begin), panel); gtk_signal_connect (obj, "drag_begin_event", GTK_SIGNAL_FUNC (panel_icon_list_drag_begin), panel);
@ -1397,6 +1405,7 @@ panel_icon_list_realized (GtkObject *obj, WPanel *panel)
gtk_signal_connect (obj, "motion_notify_event", gtk_signal_connect (obj, "motion_notify_event",
GTK_SIGNAL_FUNC (panel_icon_list_artificial_drag_start), panel); GTK_SIGNAL_FUNC (panel_icon_list_artificial_drag_start), panel);
gdk_window_dnd_drop_set (GTK_WIDGET (icon)->window, TRUE, drop_types, ELEMENTS (drop_types), FALSE); gdk_window_dnd_drop_set (GTK_WIDGET (icon)->window, TRUE, drop_types, ELEMENTS (drop_types), FALSE);
#endif
} }
/* /*