Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
- ### BEGIN LICENSE
- # This file is in the public domain
- ### END LICENSE
- import os
- from gi.repository import GLib # pylint: disable=E0611
- from locale import gettext as _
- from gi.repository import Gtk # pylint: disable=E0611
- from gi.repository import Gdk
- import logging
- logger = logging.getLogger('jotty')
- from jotty_lib import Window
- from jotty.AboutJottyDialog import AboutJottyDialog
- from jotty.PreferencesJottyDialog import PreferencesJottyDialog
- from jotty_lib import setup_tree_view
- from jotty_lib import get_projects
- # See jotty_lib.Window.py for more details about how this class works
- class JottyWindow(Window):
- __gtype_name__ = "JottyWindow"
- def finish_initializing(self, builder): # pylint: disable=E1002
- """Set up the main window"""
- super(JottyWindow, self).finish_initializing(builder)
- css = Gtk.CssProvider()
- # css.load_from_file(file)
- css.load_from_data('''
- GtkWindow {
- background-color: #333;
- }
- GtkEventBox {
- background-color: #333;
- }
- #statusbarwrap, #textview_event_wrap, #box1 {
- background-color: #333;
- }
- ''')
- style_context = self.get_style_context()
- style_context.add_provider(
- css,
- Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
- self.AboutDialog = AboutJottyDialog
- self.PreferencesDialog = PreferencesJottyDialog
- self.set_default_size(800, 500)
- self.set_border_width(10)
- txtView = self.builder.get_object("textview_event_wrap")
- # style = txtView.get_style()
- # txtView.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse("blue"))
- # txtView.set_style(style)
- editor_statusbar = self.builder.get_object('editor_statusbar')
- context_id = editor_statusbar.get_context_id('progress_message')
- editor_statusbar.push(context_id, "Almost done...")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement