# Path: kano/window.py
# def gdk_window_settings(win, x=None, y=None, width=None, height=None,
#                         decoration=None, maximized=False, centered=False):
#     '''
#     Applies appeareance and position modifications to the Window identified by
#     win
#     '''
#     # Screen dimensions
#     scr_width = gdk.screen_width()
#     scr_height = gdk.screen_height() - BOTTOM_BAR_HEIGHT
# 
#     # Window dimensions and position
#     old_x, old_y = win.get_root_origin()
#     old_width, old_height = win.get_geometry()[2:4]
# 
#     # Sort out the decorations
#     if decoration is not None:
#         if decoration is False:
#             # Resize if the window was decorated before
#             if _is_decorated(win):
#                 dw, dh = _get_decoration_size(win)
#                 old_width += dw
#                 old_height += dh
# 
#                 win.set_decorations(0)
#                 gdk.window_process_all_updates()
#                 gdk.flush()
#         else:
#             # Resize if the window was not decorated before
#             if not _is_decorated(win):
#                 win.set_decorations(1)
#                 gdk.flush()
# 
#                 dw, dh = _get_decoration_size(win)
#                 old_width -= dw
#                 old_height -= dh
# 
#     # Resizing is irrelevant when maximizing, so just return afterwards
#     if maximized:
#         win.maximize()
#         gdk.window_process_all_updates()
#         gdk.flush()
#         return
# 
#     # Initialize the target values
#     new_x, new_y, new_width, new_height = old_x, old_y, old_width, old_height
# 
#     # Window position
#     if x is not None:
#         if x <= 1:
#             new_x = scr_width * x
#         else:
#             new_x = x
# 
#     if y is not None:
#         if y <= 1:
#             new_y = scr_height * y
#         else:
#             new_y = y
# 
#     # Window dimensions
#     if width is not None:
#         if width <= 1:
#             new_width = scr_width * width
#         else:
#             new_width = width
# 
#         if decoration is True:
#             new_width -= _get_decoration_size(win)[0]
# 
#     if height is not None:
#         if height <= 1:
#             new_height = scr_height * height
#         else:
#             new_height = height
# 
#         if decoration is True:
#             new_height -= _get_decoration_size(win)[1]
# 
#     # Should the window be centered?
#     if centered:
#         dec_w, dec_h = _get_decoration_size(win)
#         new_x = (scr_width - new_width - dec_w) / 2
#         new_y = (scr_height - new_height - dec_h) / 2
# 
#     # Do all the resizing at once
#     win.move_resize(int(new_x), int(new_y), int(new_width), int(new_height))
#     gdk.window_process_all_updates()
#     gdk.flush()


import gtk
import gobject
import webkit
import sys
import re
import os
import urllib
import warnings
import thread
import atexit
        import ast
from gtk import gdk
from kano.window import gdk_window_settings
        if hasattr(self.__class__, "_download"):
            view.connect('download-requested', self._download)

        splitter = gtk.VPaned()
        sw = gtk.ScrolledWindow()
        sw.add(view)
        splitter.add1(sw)

        inspector = view.get_web_inspector()
        inspector.connect(
            "inspect-web-view", self._activate_inspector, splitter
        )

        self._win = win = gtk.Window(gtk.WINDOW_TOPLEVEL)
        win.set_title(self._title)
        win.connect("destroy", gtk.main_quit)

        if self._app_icon is not None:
            if os.path.exists(self._app_icon):
                win.set_icon_from_file(self._app_icon)
            else:
                win.set_icon_name(self._app_icon)

        if self._taskbar is False:
            gtk.Window.set_skip_taskbar_hint(win, True)

        win.add(splitter)
        win.realize()
        win.show_all()


# Path: kano/window.py
# def gdk_window_settings(win, x=None, y=None, width=None, height=None,
#                         decoration=None, maximized=False, centered=False):
#     '''
#     Applies appeareance and position modifications to the Window identified by
#     win
#     '''
#     # Screen dimensions
#     scr_width = gdk.screen_width()
#     scr_height = gdk.screen_height() - BOTTOM_BAR_HEIGHT
# 
#     # Window dimensions and position
#     old_x, old_y = win.get_root_origin()
#     old_width, old_height = win.get_geometry()[2:4]
# 
#     # Sort out the decorations
#     if decoration is not None:
#         if decoration is False:
#             # Resize if the window was decorated before
#             if _is_decorated(win):
#                 dw, dh = _get_decoration_size(win)
#                 old_width += dw
#                 old_height += dh
# 
#                 win.set_decorations(0)
#                 gdk.window_process_all_updates()
#                 gdk.flush()
#         else:
#             # Resize if the window was not decorated before
#             if not _is_decorated(win):
#                 win.set_decorations(1)
#                 gdk.flush()
# 
#                 dw, dh = _get_decoration_size(win)
#                 old_width -= dw
#                 old_height -= dh
# 
#     # Resizing is irrelevant when maximizing, so just return afterwards
#     if maximized:
#         win.maximize()
#         gdk.window_process_all_updates()
#         gdk.flush()
#         return
# 
#     # Initialize the target values
#     new_x, new_y, new_width, new_height = old_x, old_y, old_width, old_height
# 
#     # Window position
#     if x is not None:
#         if x <= 1:
#             new_x = scr_width * x
#         else:
#             new_x = x
# 
#     if y is not None:
#         if y <= 1:
#             new_y = scr_height * y
#         else:
#             new_y = y
# 
#     # Window dimensions
#     if width is not None:
#         if width <= 1:
#             new_width = scr_width * width
#         else:
#             new_width = width
# 
#         if decoration is True:
#             new_width -= _get_decoration_size(win)[0]
# 
#     if height is not None:
#         if height <= 1:
#             new_height = scr_height * height
#         else:
#             new_height = height
# 
#         if decoration is True:
#             new_height -= _get_decoration_size(win)[1]
# 
#     # Should the window be centered?
#     if centered:
#         dec_w, dec_h = _get_decoration_size(win)
#         new_x = (scr_width - new_width - dec_w) / 2
#         new_y = (scr_height - new_height - dec_h) / 2
# 
#     # Do all the resizing at once
#     win.move_resize(int(new_x), int(new_y), int(new_width), int(new_height))
#     gdk.window_process_all_updates()
#     gdk.flush()


# Path: kano/webapp.py
import gtk
import gobject
import webkit
import sys
import re
import os
import urllib
import warnings
import thread
import atexit
        import ast
from gtk import gdk
from kano.window import gdk_window_settings

        if hasattr(self.__class__, "_download"):
            view.connect('download-requested', self._download)

        splitter = gtk.VPaned()
        sw = gtk.ScrolledWindow()
        sw.add(view)
        splitter.add1(sw)

        inspector = view.get_web_inspector()
        inspector.connect(
            "inspect-web-view", self._activate_inspector, splitter
        )

        self._win = win = gtk.Window(gtk.WINDOW_TOPLEVEL)
        win.set_title(self._title)
        win.connect("destroy", gtk.main_quit)

        if self._app_icon is not None:
            if os.path.exists(self._app_icon):
                win.set_icon_from_file(self._app_icon)
            else:
                win.set_icon_name(self._app_icon)

        if self._taskbar is False:
            gtk.Window.set_skip_taskbar_hint(win, True)

        win.add(splitter)
        win.realize()
        win.show_all()


        gdk_window_settings(win.window, self._x, self._y,