/[classpath]/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c
ViewVC logotype

Diff of /classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7.2.4 by gnu_andrew, Sat Sep 10 15:32:00 2005 UTC revision 1.7.2.5 by gnu_andrew, Sun Nov 27 21:00:42 2005 UTC
# Line 53  jstring cp_gtk_imageTarget; Line 53  jstring cp_gtk_imageTarget;
53  jstring cp_gtk_filesTarget;  jstring cp_gtk_filesTarget;
54    
55  /* Simple id to keep track of the selection we are currently managing. */  /* Simple id to keep track of the selection we are currently managing. */
56  static int current_selection = 0;  static gint current_selection = 0;
57    
58  /* Whether we "own" the clipboard. And may clear it. */  /* Whether we "own" the clipboard. And may clear it. */
59  static int owner = 0;  static int owner = 0;
# Line 261  static void Line 261  static void
261  clipboard_clear_func (GtkClipboard *clipboard __attribute__((unused)),  clipboard_clear_func (GtkClipboard *clipboard __attribute__((unused)),
262                        gpointer user_data)                        gpointer user_data)
263  {  {
264    if (owner && (int) user_data == current_selection)    if (owner && GPOINTER_TO_INT(user_data) == current_selection)
265      {      {
266        JNIEnv *env = cp_gtk_gdk_env();        JNIEnv *env = cp_gtk_gdk_env();
267        owner = 0;        owner = 0;
# Line 351  Java_gnu_java_awt_peer_gtk_GtkClipboard_ Line 351  Java_gnu_java_awt_peer_gtk_GtkClipboard_
351        if (gtk_clipboard_set_with_data (cp_gtk_clipboard, targets, n,        if (gtk_clipboard_set_with_data (cp_gtk_clipboard, targets, n,
352                                         clipboard_get_func,                                         clipboard_get_func,
353                                         clipboard_clear_func,                                         clipboard_clear_func,
354                                         (gpointer) current_selection))                                         GINT_TO_POINTER(current_selection)))
355          {          {
356            owner = 1;            owner = 1;
357            if (gtk_clipboard_instance == NULL)            if (gtk_clipboard_instance == NULL)

Legend:
Removed from v.1.7.2.4  
changed lines
  Added in v.1.7.2.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26