<commit_before>#!/usr/bin/env ruby
=begin
  checkbutton.rb - Ruby/GTK2 sample script.

  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team 
  This program is licenced under the same licence as Ruby-GNOME2.

  $Id: checkbutton.rb,v 1.10 2006/06/17 13:18:12 mutoh Exp $
=end

require 'gtk3'

window = Gtk::Window.new("check buttons")
window.border_width = 0

box1 = Gtk::Box.new(:vertical)
window.add(box1)

box2 = Gtk::Box.new(:vertical, 10)
box2.border_width = 10
box1.pack_start(box2)

button1 = Gtk::CheckButton.new("_button1")
button2 = Gtk::CheckButton.new("_button2", false)
button3 = Gtk::CheckButton.new(Gtk::Stock::QUIT)
box2.add(button1)
box2.add(button2)
box2.add(button3)

box1.pack_start(Gtk::Separator.new(:horizontal))

box2 = Gtk::Box.new(:vertical, 10)
box2.border_width = 10
box1.pack_start(box2)

close = Gtk::Button.new(:label => "close")
close.signal_connect("clicked") do
  Gtk.main_quit<commit_msg>gtk3: add a signal handler for main window to destroy properly gtk3/sample/misc/checkbutton.rb<commit_after>#!/usr/bin/env ruby
=begin
  checkbutton.rb - Ruby/GTK2 sample script.

  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team 
  This program is licenced under the same licence as Ruby-GNOME2.

  $Id: checkbutton.rb,v 1.10 2006/06/17 13:18:12 mutoh Exp $
=end

require 'gtk3'

window = Gtk::Window.new("check buttons")
window.border_width = 0
window.signal_connect("delete_event") do
  Gtk.main_quit
end

box1 = Gtk::Box.new(:vertical)
window.add(box1)

box2 = Gtk::Box.new(:vertical, 10)
box2.border_width = 10
box1.pack_start(box2)

button1 = Gtk::CheckButton.new("_button1")
button2 = Gtk::CheckButton.new("_button2", false)
button3 = Gtk::CheckButton.new(Gtk::Stock::QUIT)
box2.add(button1)
box2.add(button2)
box2.add(button3)

box1.pack_start(Gtk::Separator.new(:horizontal))

box2 = Gtk::Box.new(:vertical, 10)
box2.border_width = 10
box1.pack_start(box2)

close = Gtk::Button.new(:label => "close")
close.signal_connect("clicked") do
  Gtk.main_quit
{'fraction_non_alphanumeric': 0.14696969696969697, 'fraction_numerical': 0.06161616161616162, 'mean_word_length': 5.516447368421052, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4715672', 'n_tokens_mistral': 842, 'n_tokens_neox': 762, 'n_words': 154}