~ubuntu-branches/ubuntu/trusty/rgtk2/trusty

« back to all changes in this revision

Viewing changes to inst/examples/GtkWidget-6.R

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2010-11-03 11:35:46 UTC
  • mfrom: (1.3.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20101103113546-a7fi7jdxdebp0tw1
Tags: 2.20.1-1
* New upstream release

* debian/control: Set (Build-)Depends: to current R version
* debian/control: Set Standards-Version: to current version 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
drag_data_received <- function(widget, drag_context, x, y, data, info, time)
2
 
{
3
 
  if ((data[["length"]] >= 0) && (data[["format"]] == 8)) {
4
 
    if (drag_context[["action"]] == "ask")  {
5
 
      dialog <- gtkMessageDialog(NULL, c("modal", "destroy-with-parent"),
6
 
                                 "info", "yes-no", "Move the data ?")
7
 
      response <- dialog$run()
8
 
      dialog$destroy()
9
 
      
10
 
      gtkDragFinish(drag_context, TRUE, response == "yes", time)
11
 
    }
12
 
  } else gtkDragFinish(drag_context, FALSE, FALSE, time)
13
 
}
14