diff --git a/gnome/gcmd.c b/gnome/gcmd.c index b7554959d..8744de5da 100644 --- a/gnome/gcmd.c +++ b/gnome/gcmd.c @@ -67,7 +67,7 @@ void gnome_about_cmd (void) { GtkWidget *about; - gchar *authors[] = { + const gchar *authors[] = { "The Midnight Commander Team", "http://www.gnome.org/mc/", "bug reports: mc-bugs@nuclecu.unam.mx", diff --git a/gnome/gdesktop.c b/gnome/gdesktop.c index 024d95975..3a377d701 100644 --- a/gnome/gdesktop.c +++ b/gnome/gdesktop.c @@ -242,6 +242,7 @@ get_desktop_icon (char *pathname) /* * Hackisigh routine taken from GDK */ +#ifdef OLD_DND static void gdk_dnd_drag_begin (GdkWindow *initial_window) { @@ -309,6 +310,7 @@ artificial_drag_start (GdkWindow *window, int x, int y) } #endif } +#endif /* OLD_DND */ static int operation_value; @@ -436,6 +438,7 @@ perform_drop_on_directory (WPanel *source_panel, int operation, char *dest) } } +#if OLD_DND static void perform_drop_manually (int operation, GdkEventDropDataAvailable *event, char *dest) { @@ -589,6 +592,7 @@ drops_from_event (GdkEventDropDataAvailable *event, int *argc) return argv; } +#endif /* OLD_DND */ /* * 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); } +#ifdef OLD_DN static void 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_data_available_event", GTK_SIGNAL_FUNC (drop_cb), di); } +#endif /* OLD DND */ void 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 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); } } +#endif static GtkWidget *root_drag_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_not_ok_window = make_transparent_window (fname); 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, root_drag_not_ok_window->window, &root_icon_drag_hotspot); +#endif gtk_widget_show (root_drag_not_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)); obj = GTK_OBJECT (child->data); /* 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_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_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); +#endif } /* Called by the pop up menu: removes the icon from the desktop */ diff --git a/gnome/gdesktop.h b/gnome/gdesktop.h index e142f2be6..a51730ea5 100644 --- a/gnome/gdesktop.h +++ b/gnome/gdesktop.h @@ -44,9 +44,12 @@ GtkWidget *create_transparent_text_window (char *file, char *text, int extra_eve GtkWidget *make_transparent_window (char *file); /* gdesktop.c */ +#if 0 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); +#endif + +void gnome_arrange_icons (void); void start_desktop (void); void stop_desktop (void); diff --git a/gnome/glayout.c b/gnome/glayout.c index f079f7a19..23e422365 100644 --- a/gnome/glayout.c +++ b/gnome/glayout.c @@ -483,7 +483,7 @@ create_container (Dlg_head *h, char *name, char *geometry) } else if (!other_panel_ptr) other_panel_ptr = container; -/* bind_gtk_keys (GTK_WIDGET (app), h); */ + bind_gtk_keys (GTK_WIDGET (app), h); return panel; } diff --git a/gnome/gmain.c b/gnome/gmain.c index 9865fdeae..00104dbc6 100644 --- a/gnome/gmain.c +++ b/gnome/gmain.c @@ -185,8 +185,7 @@ xtoolkit_create_dialog (Dlg_head *h, int flags) bind_gtk_keys (GTK_WIDGET (ted), h); } 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; } @@ -412,7 +411,7 @@ dialog_panel_callback (struct Dlg_head *h, int id, int msg) if (msg == DLG_UNHANDLED_KEY || msg == DLG_HOTKEY_HANDLED) return midnight_callback (h, id, msg); - return default_dlg_callback (h, id, msg); + return 0; } extern GList *directory_list; diff --git a/gnome/gscreen.c b/gnome/gscreen.c index f79bc972d..3bf457009 100644 --- a/gnome/gscreen.c +++ b/gnome/gscreen.c @@ -961,6 +961,8 @@ panel_build_selected_file_list (WPanel *panel, int *file_list_len) return fullname; } } + +#ifdef OLD_DND /* * 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); } +#endif /* OLD_DND */ static GtkWidget * load_transparent_image (char *base) @@ -1177,7 +1180,8 @@ panel_realized (GtkWidget *file_list, WPanel *panel) GtkObject *obj = GTK_OBJECT (file_list); load_dnd_icons (); - + +#if OLD_DND /* DND: Drag setup */ 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); @@ -1191,6 +1195,7 @@ panel_realized (GtkWidget *file_list, WPanel *panel) gtk_signal_connect (obj, "motion_notify_event", 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); +#endif } /* @@ -1314,6 +1319,7 @@ load_imlib_icons (void) loaded = 1; } +#if OLD_DND static void 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); panel_update_contents (panel); } +#endif /* * Setup for the icon view @@ -1384,6 +1391,7 @@ panel_icon_list_realized (GtkObject *obj, WPanel *panel) load_imlib_icons (); load_dnd_icons (); +#ifdef OLD_DND /* DND: Drag setup */ 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); @@ -1397,6 +1405,7 @@ panel_icon_list_realized (GtkObject *obj, WPanel *panel) gtk_signal_connect (obj, "motion_notify_event", 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); +#endif } /*