comparison src/device-gtk.c @ 746:b13b1b7b11f1

[xemacs-hg @ 2002-02-08 13:04:18 by wmperry] GTK selection fixes from Eric Gillespie, Jr. <epg@pretzelnet.org>
author wmperry
date Fri, 08 Feb 2002 13:04:21 +0000
parents 183866b06e0b
children 2923009caf47
comparison
equal deleted inserted replaced
745:4aa6e26cd8ba 746:b13b1b7b11f1
124 extern void emacs_gtk_selection_handle (GtkWidget *, 124 extern void emacs_gtk_selection_handle (GtkWidget *,
125 GtkSelectionData *selection_data, 125 GtkSelectionData *selection_data,
126 guint info, 126 guint info,
127 guint time_stamp, 127 guint time_stamp,
128 gpointer data); 128 gpointer data);
129 extern void emacs_gtk_selection_clear_event_handle (GtkWidget *widget,
130 GdkEventSelection *event,
131 gpointer data);
129 extern void emacs_gtk_selection_received (GtkWidget *widget, 132 extern void emacs_gtk_selection_received (GtkWidget *widget,
130 GtkSelectionData *selection_data, 133 GtkSelectionData *selection_data,
131 gpointer user_data); 134 gpointer user_data);
132 135
133 #ifdef HAVE_BONOBO 136 #ifdef HAVE_BONOBO
282 gtk_widget_realize (GTK_WIDGET (app_shell)); 285 gtk_widget_realize (GTK_WIDGET (app_shell));
283 286
284 /* Need to set up some selection handlers */ 287 /* Need to set up some selection handlers */
285 gtk_selection_add_target (GTK_WIDGET (app_shell), GDK_SELECTION_PRIMARY, 288 gtk_selection_add_target (GTK_WIDGET (app_shell), GDK_SELECTION_PRIMARY,
286 GDK_SELECTION_TYPE_STRING, 0); 289 GDK_SELECTION_TYPE_STRING, 0);
290 gtk_selection_add_target (GTK_WIDGET (app_shell),
291 gdk_atom_intern("CLIPBOARD", FALSE),
292 GDK_SELECTION_TYPE_STRING, 0);
287 293
288 gtk_signal_connect (GTK_OBJECT (app_shell), "selection_get", 294 gtk_signal_connect (GTK_OBJECT (app_shell), "selection_get",
289 GTK_SIGNAL_FUNC (emacs_gtk_selection_handle), NULL); 295 GTK_SIGNAL_FUNC (emacs_gtk_selection_handle), NULL);
296 gtk_signal_connect (GTK_OBJECT (app_shell), "selection_clear_event",
297 GTK_SIGNAL_FUNC (emacs_gtk_selection_clear_event_handle),
298 NULL);
290 gtk_signal_connect (GTK_OBJECT (app_shell), "selection_received", 299 gtk_signal_connect (GTK_OBJECT (app_shell), "selection_received",
291 GTK_SIGNAL_FUNC (emacs_gtk_selection_received), NULL); 300 GTK_SIGNAL_FUNC (emacs_gtk_selection_received), NULL);
292 301
293 DEVICE_GTK_WM_COMMAND_FRAME (d) = Qnil; 302 DEVICE_GTK_WM_COMMAND_FRAME (d) = Qnil;
294 303