<commit_before>from gi.repository import Gio, GLib, Gtk

from rsr.connections.ui import ConnectionIndicator
from rsr.docview import DocViewer
from rsr.headerbar import HeaderBar


class MainWindow(Gtk.ApplicationWindow):

    def __init__(self, app):
        super(MainWindow, self).__init__(application=app, title='RunSQLRun')
        self.app = app
        self.settings = Gio.Settings.new('org.runsqlrun')

        self.set_default_size(800, 600)

        self.headerbar = HeaderBar(self)
        self.set_titlebar(self.headerbar)

        self.docview = DocViewer(self)
        self.statusbar = Gtk.Statusbar()
        self.statusbar.set_margin_top(0)
        self.statusbar.set_margin_bottom(0)
        self.statusbar.push(100, 'Ready when you are')
        self.statusbar.set_spacing(6)
        self.statusbar.pack_end(ConnectionIndicator(self), False, False, 0)

        vbox = Gtk.VBox()
        vbox.pack_start(self.docview, True, True, 0)
        vbox.pack_start(self.statusbar, False, False, 0)
        self.add(vbox)
        # TODO: Statusbar
<commit_msg>Hide welcome message after 3 seconds.<commit_after>from gi.repository import Gio, GLib, Gtk, GObject

from rsr.connections.ui import ConnectionIndicator
from rsr.docview import DocViewer
from rsr.headerbar import HeaderBar


class MainWindow(Gtk.ApplicationWindow):

    def __init__(self, app):
        super(MainWindow, self).__init__(application=app, title='RunSQLRun')
        self.app = app
        self.settings = Gio.Settings.new('org.runsqlrun')

        self.set_default_size(800, 600)

        self.headerbar = HeaderBar(self)
        self.set_titlebar(self.headerbar)

        self.docview = DocViewer(self)
        self.statusbar = Gtk.Statusbar()
        self.statusbar.set_margin_top(0)
        self.statusbar.set_margin_bottom(0)
        self.statusbar.push(303, 'Ready when you are')
        GObject.timeout_add(3000, self.statusbar.pop, 303)
        self.statusbar.set_spacing(6)
        self.statusbar.pack_end(ConnectionIndicator(self), False, False, 0)

        vbox = Gtk.VBox()
        vbox.pack_start(self.docview, True, True, 0)
        vbox.pack_start(self.statusbar, False, False, 0)
        self.add(vbox)
        # TODO: Statusbar

{'fraction_non_alphanumeric': 0.10467205750224619, 'fraction_numerical': 0.017070979335130278, 'mean_word_length': 3.078754578754579, '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': '4283275', 'n_tokens_mistral': 752, 'n_tokens_neox': 714, 'n_words': 137}