<commit_before>#!/usr/local/bin/python

import gtk as Gtk
import gobject as GObject
import sys
#from gi.repository import Gtk
#from gi.repository import GObject
sys.path.append("/home/ericbsd/update-station/update-station")
from updateHandler import lookFbsdUpdate, checkFbsdUpdate


class Window:
    def close_application(self, widget):
        quit()

    def hideWindow(self, widget):
        self.window.hide()

    def showWindow(self):
        self.window.show_all()

    def create_bbox(self, horizontal, spacing, layout):
        table = Gtk.Table(1, 5, True)
        button = Gtk.Button("Install update")
        table.attach(button, 0, 1, 0, 1)
        button.connect("clicked", self.hideWindow)
        button = Gtk.Button(stock=Gtk.STOCK_CLOSE)
        table.attach(button, 4, 5, 0, 1)
        button.connect("clicked", self.hideWindow)
        return table

    def __init__(self):
        self.window = Gtk.Window()
        self.window.connect("destroy", self.hideWindow)
        self.window.set_size_request(600, 400)
        self.window.set_resizable(False)
        self.window.set_title("Update Manager")
        self.window.set_border_width(0)
        self.window.set_position(Gtk.WIN_POS_CENTER)
        box1 = Gtk.VBox(False, 0)
        self.window.add(box1)<commit_msg>Fix closing window from window X buton<commit_after>#!/usr/local/bin/python

import gtk as Gtk
import gobject as GObject
import sys
#from gi.repository import Gtk
#from gi.repository import GObject
sys.path.append("/home/ericbsd/update-station/update-station")
from updateHandler import lookFbsdUpdate, checkFbsdUpdate


class Window:
    def close_application(self, widget):
        quit()

    def hideWindow(self, widget):
        self.window.hide()

    def showWindow(self):
        self.window.show_all()

    def delete_event(self, window, event):
        #don't delete; hide instead
        self.window.hide_on_delete()
        return True

    def create_bbox(self, horizontal, spacing, layout):
        table = Gtk.Table(1, 5, True)
        button = Gtk.Button("Install update")
        table.attach(button, 0, 1, 0, 1)
        button.connect("clicked", self.hideWindow)
        button = Gtk.Button(stock=Gtk.STOCK_CLOSE)
        table.attach(button, 4, 5, 0, 1)
        button.connect("clicked", self.hideWindow)
        return table

    def __init__(self):
        self.window = Gtk.Window()
        self.window.connect("delete-event", self.delete_event)
        self.window.set_size_request(600, 400)
        self.window.set_resizable(False)
        self.window.set_title("Update Manager")
        self.window.set_border_width(0)
        self.window.set_position(Gtk.WIN_POS_CENTER)
        box1 = Gtk.VBox(False, 0)
        self.window.add(box1)
{'fraction_non_alphanumeric': 0.11304980007270084, 'fraction_numerical': 0.014540167211922937, 'mean_word_length': 2.954022988505747, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7037204', 'n_tokens_mistral': 915, 'n_tokens_neox': 859, 'n_words': 186}