[ruby-gnome2-doc-cvs] [Ruby-GNOME2 Project Website] update - tut-gtk2-dnd-intro

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2012年 12月 7日 (金) 13:30:24 JST


-------------------------
REMOTE_ADDR = 74.14.158.129
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-dnd-intro
-------------------------
@@ -247,7 +247,6 @@
     ((*hiki-dnd-dbg.rb*))
 
      module HikiDBG
-     
        def blow_up(targs)
          target_names="\n"
          line=""
@@ -260,19 +259,11 @@
          end
          target_names + line.chop.chop + ";\n"
        end
-     
-     
-     # NOTE:
-     #       Global value {{ $DEBUG }} must be set to true for this method to run!
-     # ALSO:
-     #	If you are using Gtk::TextView as source and/or destination, you
-     #	may alse need to initialize {{ $text_buffer }} global variable to
-     #	your {{ Gtk::TextView#buffer }}
-     
+       # NOTE:
+       #       Global value {{ $DEBUG }} must be set to true for this method to run!
+       #       If set the {{ $MONITOR }} global variable to true this method only 
+       #       reports which signals were caught.
        def prn_dnd_sig_parms(sig, *parms)
-     
          return if (!($DEBUG||=false)) && (!($MONITOR||=false))
-     
          w=dc=x=y=d=i=t=nil
          case sig
          when /drag-begin/;		w, dc			= parms
@@ -284,7 +276,-2 @@
          when /drag-leave/;		w, dc, t		= parms
          when /drag-motion/;		w, dc, x, y, t		= parms
          end
-     
          # -- ignore all remaining 'drag-motion' signals, but keep
          #    recording the latest x, y positions!
          if ($prev_sig||=nil) == sig && sig == 'drag-motion'
@@ -304,7 +295,-3 @@
          else
            print ":\n"
          end
-     
          # -- Note: 
          #       display targets only for 'drag-data-received' and 
          #       'drag-data-get' signals
@@ -319,7 +309,-4 @@
          end
          print "\tx,y=(#{x},#{y}), "	 if !x.nil?
          if !d.nil?
-           
            print "\n\tdata.class=#{d.class}, "
            print "\n\tdata.target.class=#{d.target.class}; "
            print "\n\tdata.target.name /atom.name/ = #{d.target.name}" #=> GTK_TREE_MODEL_ROW | tv_item |...
@@ -327,7 +316,-5 @@
          end
          print "\n\tinfo=#{i}, "	 if !i.nil?
          print "time=#{t} "		 if !t.nil?
-     
          if $prev_x != nil
              print "\n\n ....\t( [final x,y=(#{$prev_x},#{$prev_y})] .... " +
                    "remaining 'drag-motion' signals\n     \t   before final one were blocked! )\n"
@@ -335,7 +323,-5 @@
          end
          puts
        end
-       
+
        def show_if_widget_contains_its_own_gdk_window(w)
          answer = "#{w.class} does not contain its own Gdk::Window"
          if w.respond_to? :no_window?
@@ -344,7 +332,-6 @@
          end
          answer    
        end
-     
      end
 
 




ruby-gnome2-cvs メーリングリストの案内
Back to archive index