Advertisement
Guest User

Untitled

a guest
May 24th, 2013
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
  2. ### BEGIN LICENSE
  3. # This file is in the public domain
  4. ### END LICENSE
  5.  
  6. import os
  7. from gi.repository import GLib # pylint: disable=E0611
  8.  
  9. from locale import gettext as _
  10.  
  11. from gi.repository import Gtk # pylint: disable=E0611
  12. from gi.repository import Gdk
  13. import logging
  14. logger = logging.getLogger('jotty')
  15.  
  16. from jotty_lib import Window
  17. from jotty.AboutJottyDialog import AboutJottyDialog
  18. from jotty.PreferencesJottyDialog import PreferencesJottyDialog
  19.  
  20. from jotty_lib import setup_tree_view
  21. from jotty_lib import get_projects
  22.  
  23.  
  24. # See jotty_lib.Window.py for more details about how this class works
  25. class JottyWindow(Window):
  26. __gtype_name__ = "JottyWindow"
  27.  
  28. def finish_initializing(self, builder): # pylint: disable=E1002
  29. """Set up the main window"""
  30.  
  31. super(JottyWindow, self).finish_initializing(builder)
  32. css = Gtk.CssProvider()
  33.  
  34. # css.load_from_file(file)
  35. css.load_from_data('''
  36.  
  37. GtkWindow {
  38. background-color: #333;
  39. }
  40.  
  41. GtkEventBox {
  42. background-color: #333;
  43. }
  44.  
  45. #statusbarwrap, #textview_event_wrap, #box1 {
  46. background-color: #333;
  47. }
  48.  
  49. ''')
  50.  
  51. style_context = self.get_style_context()
  52. style_context.add_provider(
  53. css,
  54. Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
  55.  
  56. self.AboutDialog = AboutJottyDialog
  57. self.PreferencesDialog = PreferencesJottyDialog
  58.  
  59. self.set_default_size(800, 500)
  60. self.set_border_width(10)
  61.  
  62. txtView = self.builder.get_object("textview_event_wrap")
  63. # style = txtView.get_style()
  64. # txtView.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse("blue"))
  65. # txtView.set_style(style)
  66.  
  67. editor_statusbar = self.builder.get_object('editor_statusbar')
  68. context_id = editor_statusbar.get_context_id('progress_message')
  69. editor_statusbar.push(context_id, "Almost done...")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement