예제 #1
0
	def __init__(self):
		self.builder = gtk.Builder() 
		self.builder.add_from_file(localpath + 'zkiosk.ui')
		self.window = self.builder.get_object('window')
		self.browser = self.builder.get_object('Browser') 
		self.webview = webkit.WebView()
		self.browser.add(self.webview)

		#Cambia el user-agent (por cuestión estética y de identificación para estadísticas)
		Settings = self.webview.get_settings()		
		useragent = Settings.get_property("user-agent")
		useragent = useragent.replace(' Safari/',' zombieKiosk/DrunkEngine Safari/')
		Settings.set_property("user-agent",useragent)
		Settings.set_property("enable-plugins",False)
		#cambiando a pantalla completa la ventana
		maxx = gtk.gdk.screen_width() 
		maxy = gtk.gdk.screen_height() 
		self.window.set_size_request(maxx,maxy) 
		
		#Parseamos el archivo del estilo visual
		gtk.rc_reset_styles(self.window.get_settings())
		gtk.rc_parse(theme)
		gtk.rc_add_default_file(theme)
		gtk.rc_reparse_all()
		
		#muestra los elementos de la ventana
		self.window.show_all()
		#-------DEBUG---------
		self.webview.connect("navigation-policy-decision-requested",self.VerUri)
		#conectando los botones y eventos de la ventana a las funciones 
		self.builder.connect_signals(self)
예제 #2
0
 def run(self):
     gtk.rc_reparse_all()
     screen = gtk.gdk.screen_get_default()
     self.login.realize()
     self.background = LockScreenWindow()
     self.background.show()
     self.background.set_child_window(self.login)
예제 #3
0
 def run(self):
     gtk.rc_reparse_all()
     screen = gtk.gdk.screen_get_default()
     self.login.realize()
     self.background = LockScreenWindow()
     self.background.show()
     self.background.set_child_window(self.login)
예제 #4
0
    def run(self):
        gtk.rc_reparse_all()
        screen = gtk.gdk.screen_get_default()
        self.login.realize()
        self.background = LockScreenWindow()
	self.background.set_background_image("/usr/share/OcaraClient/icons/fundo_ocara.png")
        self.background.show()
        self.background.set_child_window(self.login)
예제 #5
0
파일: fanim.py 프로젝트: avrj/gimp-fanim
    def _setup_widgets(self):
        """
        create all the window staticaly placed widgets.
        """
        #load the saved setting before start.
        self.set_settings(Utils.load_conffile(CONF_FILENAME))

        # basic window definitions
        self.connect("destroy", self.destroy)
        self.connect("focus_in_event", self.on_window_focus)
        self.connect("configure_event", self.on_window_resize)

        self.set_default_size(self.win_size[0], self.win_size[1])
        self.set_keep_above(True)

        #self.set_position(gtk.WIN_POS_CENTER_ON_PARENT)
        self.move(self.win_pos[0], self.win_pos[1])

        # parse gimp theme gtkrc
        gtkrc_path = self._get_theme_gtkrc(gimp.personal_rc_file('themerc'))

        if os.name != 'nt':  # try apply the theme by parse a gtkrc file if is not a windows system.
            gtk.rc_parse(gtkrc_path)
        else:  # if error occur them parse the file in another way.
            gtk.rc_add_default_file(gtkrc_path)
            gtk.rc_reparse_all()

        # start creating basic layout
        base = gtk.VBox()

        # commands bar widgets
        cbar = gtk.HBox()
        cbar.pack_start(self._setup_playbackbar(), False, False, 10)
        cbar.pack_start(self._setup_editbar(), False, False, 10)
        cbar.pack_start(self._setup_onionskin(), False, False, 10)
        cbar.pack_start(self._setup_config(), False, False, 10)
        cbar.pack_start(self._setup_generalbar(), False, False, 10)

        # frames bar widgets
        self.frame_bar = gtk.HBox()
        scroll_window = gtk.ScrolledWindow()
        scroll_window.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
        scroll_window.add_with_viewport(self.frame_bar)
        scroll_window.set_size_request(-1, 140)

        # mount the widgets together
        base.pack_start(cbar, False, False, 0)
        base.pack_start(scroll_window, True, True, 0)
        self.add(base)

        # invert the image so onionskin can be used propely, with backward frames be
        # above the actual frame, sinse GIMP upper layers are firstly visible they cant
        # be backward frames.
        pdb.script_fu_reverse_layers(self.image, None)
        # scan all layers
        self._scan_image_layers()
        self.active = 0
        self.on_goto(None, GIMP_ACTIVE)

        # finalize showing all widgets
        self.show_all()