Exemplo n.º 1
0
def main():
  import time
  from widgets import d
  from model import Model
  from handlers import Handler
  from session import load_settings

  start = time.process_time()
  # --------
  win = g.Window(title = 'options-gtk')

  css_provider = g.CssProvider.new()
  css_provider.load_from_path('static/css.css')
  g.StyleContext.add_provider_for_screen(
    d.Screen.get_default(),
    css_provider,
    g.STYLE_PROVIDER_PRIORITY_APPLICATION
  )

  m = Model(load_settings()[0])
  _ = Notebook(m, Handler(win, m))
  win.add(_)

  win.connect('destroy', g.main_quit)
  win.show_all()
  # --------
  end = time.process_time()
  print('loading cost: %.3f Seconds' % (end - start))
  g.main()
Exemplo n.º 2
0
def main():
    from widgets import d, g
    from sqlmap_gtk import Window

    win = Window()

    css_provider = g.CssProvider.new()
    css_provider.load_from_path('css.css')
    g.StyleContext.add_provider_for_screen(
        d.Screen.get_default(), css_provider,
        g.STYLE_PROVIDER_PRIORITY_APPLICATION)

    win.connect('destroy', g.main_quit)
    win.show_all()
    g.main()
Exemplo n.º 3
0
def main():
    import time

    start = time.process_time()
    # --------
    win = Window()

    css_provider = g.CssProvider.new()
    css_provider.load_from_path('static/css.css')
    g.StyleContext.add_provider_for_screen(
        d.Screen.get_default(), css_provider,
        g.STYLE_PROVIDER_PRIORITY_APPLICATION)

    win.connect('destroy', lambda x: win.on_quit())
    # win.maximize()
    win.show_all()
    # --------
    end = time.process_time()
    print('loading cost: %.3f Seconds' % (end - start))
    g.main()