-
115Denso/SimpleGladeApp.py
-
BINDenso/SimpleGladeApp.pyc
-
190Denso/denso.glade
-
8Denso/denso.gladep
-
86Denso/denso.py
-
2Denso/scanLegal.sh
-
2Denso/scanLetter.sh
-
442Denso/simple-glade-codegen.py
-
BINGDM/OTHER-SoftBlueGlow_1024x768.png
-
BINGDM/VIP.1/Background.png
-
BINGDM/VIP.1/Background2.png
-
9GDM/VIP.1/GdmGreeterTheme.desktop
-
292GDM/VIP.1/VIP.xml
-
BINGDM/VIP.1/icon-language-active.png
-
BINGDM/VIP.1/icon-language-prelight.png
-
BINGDM/VIP.1/icon-language.png
-
BINGDM/VIP.1/icon-reboot-active.png
-
BINGDM/VIP.1/icon-reboot-prelight.png
-
BINGDM/VIP.1/icon-reboot.png
-
BINGDM/VIP.1/icon-session-active.png
-
BINGDM/VIP.1/icon-session-prelight.png
-
BINGDM/VIP.1/icon-session.png
-
BINGDM/VIP.1/icon-shutdown-active.png
-
BINGDM/VIP.1/icon-shutdown-prelight.png
-
BINGDM/VIP.1/icon-shutdown.png
-
BINGDM/VIP/Background.jpg
-
BINGDM/VIP/Background.png
-
9GDM/VIP/GdmGreeterTheme.desktop
-
292GDM/VIP/VIP.xml
-
292GDM/VIP/VIP.xml~
-
BINGDM/VIP/icon-language-active.png
-
BINGDM/VIP/icon-language-prelight.png
-
BINGDM/VIP/icon-language.png
-
BINGDM/VIP/icon-reboot-active.png
-
BINGDM/VIP/icon-reboot-prelight.png
-
BINGDM/VIP/icon-reboot.png
-
BINGDM/VIP/icon-session-active.png
-
BINGDM/VIP/icon-session-prelight.png
-
BINGDM/VIP/icon-session.png
-
BINGDM/VIP/icon-shutdown-active.png
-
BINGDM/VIP/icon-shutdown-prelight.png
-
BINGDM/VIP/icon-shutdown.png
-
BINGDM/p9200128.jpg
-
BINGDM/p9200129.jpg
-
BINGDM/p9200130.jpg
-
BINGDM/p9200131.jpg
-
BINGDM/p9200132.jpg
-
9GDM/test1/GdmGreeterTheme.desktop
-
BINGDM/test1/background.jpg
-
BINGDM/test1/captura.png
-
BINGDM/test1/puesta_de_sol.png
-
372GDM/test1/puesta_de_sol.xml
-
115Scan/SimpleGladeApp.py
-
BINScan/SimpleGladeApp.pyc
-
442Scan/simple-glade-codegen.py
-
BINlogo/logo.gif
-
BINlogo/logo.png
-
BINlogo/logo_bg.jpg
@ -0,0 +1,115 @@ |
|||
# SimpleGladeApp.py |
|||
# Module that provides an object oriented abstraction to pygtk and libglade. |
|||
# Copyright (C) 2004 Sandino Flores Moreno |
|||
|
|||
# This library is free software; you can redistribute it and/or |
|||
# modify it under the terms of the GNU Lesser General Public |
|||
# License as published by the Free Software Foundation; either |
|||
# version 2.1 of the License, or (at your option) any later version. |
|||
# |
|||
# This library is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
# Lesser General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Lesser General Public |
|||
# License along with this library; if not, write to the Free Software |
|||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
|||
# USA |
|||
|
|||
try: |
|||
import os |
|||
import sys |
|||
import gtk |
|||
import gtk.glade |
|||
except ImportError: |
|||
print "Error importing pygtk2 and pygtk2-libglade" |
|||
sys.exit(1) |
|||
|
|||
class SimpleGladeApp(dict): |
|||
def __init__(self, glade_filename, main_widget_name=None, domain=None): |
|||
gtk.glade.set_custom_handler(self.custom_handler) |
|||
if os.path.isfile(glade_filename): |
|||
self.glade_path = glade_filename |
|||
else: |
|||
glade_dir = os.path.split( sys.argv[0] )[0] |
|||
self.glade_path = os.path.join(glade_dir, glade_filename) |
|||
self.glade = gtk.glade.XML(self.glade_path, main_widget_name, domain) |
|||
if main_widget_name: |
|||
self.main_widget = self.glade.get_widget(main_widget_name) |
|||
else: |
|||
self.main_widget = None |
|||
self.signal_autoconnect() |
|||
self.new() |
|||
|
|||
def signal_autoconnect(self): |
|||
signals = {} |
|||
for attr_name in dir(self): |
|||
attr = getattr(self, attr_name) |
|||
if callable(attr): |
|||
signals[attr_name] = attr |
|||
self.glade.signal_autoconnect(signals) |
|||
|
|||
def custom_handler(self, |
|||
glade, function_name, widget_name, |
|||
str1, str2, int1, int2): |
|||
if hasattr(self, function_name): |
|||
handler = getattr(self, function_name) |
|||
return handler(str1, str2, int1, int2) |
|||
|
|||
def __getattr__(self, data_name): |
|||
if data_name in self: |
|||
data = self[data_name] |
|||
return data |
|||
else: |
|||
widget = self.glade.get_widget(data_name) |
|||
if widget != None: |
|||
self[data_name] = widget |
|||
return widget |
|||
else: |
|||
raise AttributeError, data_name |
|||
|
|||
def __setattr__(self, name, value): |
|||
self[name] = value |
|||
|
|||
def new(self): |
|||
pass |
|||
|
|||
def on_keyboard_interrupt(self): |
|||
pass |
|||
|
|||
def gtk_widget_show(self, widget, *args): |
|||
widget.show() |
|||
|
|||
def gtk_widget_hide(self, widget, *args): |
|||
widget.hide() |
|||
|
|||
def gtk_widget_grab_focus(self, widget, *args): |
|||
widget.grab_focus() |
|||
|
|||
def gtk_widget_destroy(self, widget, *args): |
|||
widget.destroy() |
|||
|
|||
def gtk_window_activate_default(self, widget, *args): |
|||
widget.activate_default() |
|||
|
|||
def gtk_true(self, *args): |
|||
return gtk.TRUE |
|||
|
|||
def gtk_false(self, *args): |
|||
return gtk.FALSE |
|||
|
|||
def gtk_main_quit(self, *args): |
|||
gtk.main_quit() |
|||
|
|||
def main(self): |
|||
gtk.main() |
|||
|
|||
def quit(self): |
|||
gtk.main_quit() |
|||
|
|||
def run(self): |
|||
try: |
|||
self.main() |
|||
except KeyboardInterrupt: |
|||
self.on_keyboard_interrupt() |
@ -0,0 +1,190 @@ |
|||
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> |
|||
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> |
|||
|
|||
<glade-interface> |
|||
|
|||
<widget class="GtkWindow" id="window1"> |
|||
<property name="visible">True</property> |
|||
<property name="title" translatable="yes">Denso Activity Report Scan</property> |
|||
<property name="type">GTK_WINDOW_TOPLEVEL</property> |
|||
<property name="window_position">GTK_WIN_POS_CENTER</property> |
|||
<property name="modal">False</property> |
|||
<property name="resizable">False</property> |
|||
<property name="destroy_with_parent">False</property> |
|||
<property name="decorated">True</property> |
|||
<property name="skip_taskbar_hint">False</property> |
|||
<property name="skip_pager_hint">False</property> |
|||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> |
|||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property> |
|||
<signal name="destroy" handler="gtk_main_quit" last_modification_time="Mon, 28 Mar 2005 15:48:54 GMT"/> |
|||
|
|||
<child> |
|||
<widget class="GtkVBox" id="vbox1"> |
|||
<property name="visible">True</property> |
|||
<property name="homogeneous">False</property> |
|||
<property name="spacing">0</property> |
|||
|
|||
<child> |
|||
<widget class="GtkHBox" id="hbox1"> |
|||
<property name="visible">True</property> |
|||
<property name="homogeneous">False</property> |
|||
<property name="spacing">0</property> |
|||
|
|||
<child> |
|||
<widget class="GtkCalendar" id="calendar"> |
|||
<property name="visible">True</property> |
|||
<property name="can_focus">True</property> |
|||
<property name="display_options">GTK_CALENDAR_SHOW_HEADING|GTK_CALENDAR_SHOW_DAY_NAMES</property> |
|||
<signal name="day_selected" handler="on_calendar_day_selected" last_modification_time="Mon, 28 Mar 2005 15:48:00 GMT"/> |
|||
</widget> |
|||
<packing> |
|||
<property name="padding">0</property> |
|||
<property name="expand">True</property> |
|||
<property name="fill">True</property> |
|||
</packing> |
|||
</child> |
|||
|
|||
<child> |
|||
<widget class="GtkLabel" id="message"> |
|||
<property name="visible">True</property> |
|||
<property name="label" translatable="yes"><b>Select the date of the |
|||
report you are scanning</b></property> |
|||
<property name="use_underline">False</property> |
|||
<property name="use_markup">True</property> |
|||
<property name="justify">GTK_JUSTIFY_CENTER</property> |
|||
<property name="wrap">False</property> |
|||
<property name="selectable">False</property> |
|||
<property name="xalign">0.5</property> |
|||
<property name="yalign">0.5</property> |
|||
<property name="xpad">6</property> |
|||
<property name="ypad">0</property> |
|||
</widget> |
|||
<packing> |
|||
<property name="padding">0</property> |
|||
<property name="expand">False</property> |
|||
<property name="fill">False</property> |
|||
</packing> |
|||
</child> |
|||
</widget> |
|||
<packing> |
|||
<property name="padding">0</property> |
|||
<property name="expand">True</property> |
|||
<property name="fill">True</property> |
|||
</packing> |
|||
</child> |
|||
|
|||
<child> |
|||
<widget class="GtkHButtonBox" id="hbuttonbox1"> |
|||
<property name="visible">True</property> |
|||
<property name="layout_style">GTK_BUTTONBOX_SPREAD</property> |
|||
<property name="spacing">0</property> |
|||
|
|||
<child> |
|||
<widget class="GtkButton" id="close"> |
|||
<property name="border_width">6</property> |
|||
<property name="visible">True</property> |
|||
<property name="can_default">True</property> |
|||
<property name="can_focus">True</property> |
|||
<property name="label">gtk-close</property> |
|||
<property name="use_stock">True</property> |
|||
<property name="relief">GTK_RELIEF_NORMAL</property> |
|||
<property name="focus_on_click">True</property> |
|||
<signal name="clicked" handler="gtk_main_quit" last_modification_time="Mon, 28 Mar 2005 15:48:20 GMT"/> |
|||
</widget> |
|||
</child> |
|||
|
|||
<child> |
|||
<widget class="GtkButton" id="scan"> |
|||
<property name="border_width">6</property> |
|||
<property name="visible">True</property> |
|||
<property name="can_default">True</property> |
|||
<property name="can_focus">True</property> |
|||
<property name="relief">GTK_RELIEF_NORMAL</property> |
|||
<property name="focus_on_click">True</property> |
|||
<signal name="clicked" handler="on_scan_clicked" last_modification_time="Mon, 28 Mar 2005 15:48:30 GMT"/> |
|||
|
|||
<child> |
|||
<widget class="GtkAlignment" id="alignment1"> |
|||
<property name="visible">True</property> |
|||
<property name="xalign">0.5</property> |
|||
<property name="yalign">0.5</property> |
|||
<property name="xscale">0</property> |
|||
<property name="yscale">0</property> |
|||
<property name="top_padding">0</property> |
|||
<property name="bottom_padding">0</property> |
|||
<property name="left_padding">0</property> |
|||
<property name="right_padding">0</property> |
|||
|
|||
<child> |
|||
<widget class="GtkHBox" id="hbox2"> |
|||
<property name="visible">True</property> |
|||
<property name="homogeneous">False</property> |
|||
<property name="spacing">2</property> |
|||
|
|||
<child> |
|||
<widget class="GtkImage" id="image1"> |
|||
<property name="visible">True</property> |
|||
<property name="stock">gtk-apply</property> |
|||
<property name="icon_size">4</property> |
|||
<property name="xalign">0.5</property> |
|||
<property name="yalign">0.5</property> |
|||
<property name="xpad">0</property> |
|||
<property name="ypad">0</property> |
|||
</widget> |
|||
<packing> |
|||
<property name="padding">0</property> |
|||
<property name="expand">False</property> |
|||
<property name="fill">False</property> |
|||
</packing> |
|||
</child> |
|||
|
|||
<child> |
|||
<widget class="GtkLabel" id="label2"> |
|||
<property name="visible">True</property> |
|||
<property name="label" translatable="yes">Scan</property> |
|||
<property name="use_underline">True</property> |
|||
<property name="use_markup">False</property> |
|||
<property name="justify">GTK_JUSTIFY_LEFT</property> |
|||
<property name="wrap">False</property> |
|||
<property name="selectable">False</property> |
|||
<property name="xalign">0.5</property> |
|||
<property name="yalign">0.5</property> |
|||
<property name="xpad">0</property> |
|||
<property name="ypad">0</property> |
|||
</widget> |
|||
<packing> |
|||
<property name="padding">0</property> |
|||
<property name="expand">False</property> |
|||
<property name="fill">False</property> |
|||
</packing> |
|||
</child> |
|||
</widget> |
|||
</child> |
|||
</widget> |
|||
</child> |
|||
</widget> |
|||
</child> |
|||
</widget> |
|||
<packing> |
|||
<property name="padding">0</property> |
|||
<property name="expand">True</property> |
|||
<property name="fill">True</property> |
|||
</packing> |
|||
</child> |
|||
|
|||
<child> |
|||
<widget class="GtkStatusbar" id="status"> |
|||
<property name="visible">True</property> |
|||
<property name="has_resize_grip">False</property> |
|||
</widget> |
|||
<packing> |
|||
<property name="padding">0</property> |
|||
<property name="expand">False</property> |
|||
<property name="fill">False</property> |
|||
</packing> |
|||
</child> |
|||
</widget> |
|||
</child> |
|||
</widget> |
|||
|
|||
</glade-interface> |
@ -0,0 +1,8 @@ |
|||
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> |
|||
<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd"> |
|||
|
|||
<glade-project> |
|||
<name>Denso</name> |
|||
<program_name>denso</program_name> |
|||
<gnome_support>FALSE</gnome_support> |
|||
</glade-project> |
@ -0,0 +1,86 @@ |
|||
#!/usr/bin/env python |
|||
# -*- coding: UTF8 -*- |
|||
|
|||
# Python module denso.py |
|||
# Autogenerated from denso.glade |
|||
# Generated on Mon Mar 28 09:49:06 2005 |
|||
|
|||
# Warning: Do not delete or modify comments related to context |
|||
# They are required to keep user's code |
|||
|
|||
import os, gtk |
|||
from SimpleGladeApp import SimpleGladeApp |
|||
|
|||
glade_dir = "" |
|||
|
|||
# Put your modules and data here |
|||
selected = False |
|||
|
|||
# From here through main() codegen inserts/updates a class for |
|||
# every top-level widget in the .glade file. |
|||
|
|||
class Window1(SimpleGladeApp): |
|||
def __init__(self, glade_path="denso.glade", root="window1", domain=None): |
|||
glade_path = os.path.join(glade_dir, glade_path) |
|||
SimpleGladeApp.__init__(self, glade_path, root, domain) |
|||
|
|||
def new(self): |
|||
#context Window1.new { |
|||
pass |
|||
#context Window1.new } |
|||
|
|||
#context Window1 custom methods { |
|||
|
|||
def scan(self): |
|||
id = self.status.get_context_id("scan") |
|||
self.status.push(id, "Scanning...") |
|||
scanargs = '--brightness 30 --mode Gray --resolution 160' |
|||
scanpnm = 'scanimage %s > %s%s' % (scanargs,temp,pnmfile) |
|||
os.system(scanpnm) |
|||
|
|||
def convert(self): |
|||
id = self.status.get_context_id("scan") |
|||
self.status.push(id, "Converting...") |
|||
convert = 'pnmscale 0.5 %s%s | pnmtojpeg > %s%s' % (temp,pnmfile,path,jpgfile) |
|||
cleanup = 'rm -f %s%s' % (temp,pnmfile) |
|||
os.system(convert) |
|||
os.system(cleanup) |
|||
|
|||
#context Window1 custom methods } |
|||
|
|||
def on_calendar_day_selected(self, widget, *args): |
|||
#context Window1.on_calendar_day_selected { |
|||
global file, temp, path, selected, pnmfile, jpgfile |
|||
year,month,day = self.calendar.get_date() |
|||
mo = month + 1 |
|||
dy = day |
|||
yr = year - 2000 |
|||
path = '~/Denso/' |
|||
temp = '/tmp/' |
|||
file = 'dar%02d%02d%02d' % (mo,dy,yr) |
|||
selection = '%02d/%02d/%02d' % (mo,dy,yr) |
|||
pnmfile = file + '.pnm' |
|||
jpgfile = file + '.jpg' |
|||
id = self.status.get_context_id("select") |
|||
self.status.push(id, selection) |
|||
selected = True |
|||
#context Window1.on_calendar_day_selected } |
|||
|
|||
def on_scan_clicked(self, widget, *args): |
|||
#context Window1.on_scan_clicked { |
|||
id = self.status.get_context_id("click") |
|||
if not selected: |
|||
self.status.push(id, "Please select a date first!") |
|||
else: |
|||
self.scan() |
|||
self.convert() |
|||
result = 'Saved: %s%s' % (path,jpgfile) |
|||
self.status.push(id, result) |
|||
#context Window1.on_scan_clicked } |
|||
|
|||
def main(): |
|||
window1 = Window1() |
|||
window1.run() |
|||
|
|||
if __name__ == "__main__": |
|||
main() |
@ -0,0 +1,2 @@ |
|||
#!/bin/sh |
|||
scanimage --brightness 30 --mode Gray --resolution 160 | pnmtojpeg >legalScan.jpg |
@ -0,0 +1,2 @@ |
|||
#!/bin/sh |
|||
scanimage -y 279.3 --brightness 30 --mode Gray --resolution 160 | pnmtojpeg >letterScan.jpg |
@ -0,0 +1,442 @@ |
|||
#!/usr/bin/env python |
|||
|
|||
# simple-glade-codegen.py |
|||
# A code generator that uses pygtk, glade and SimpleGladeApp.py |
|||
# Copyright (C) 2004 Sandino Flores Moreno |
|||
|
|||
# This library is free software; you can redistribute it and/or |
|||
# modify it under the terms of the GNU Lesser General Public |
|||
# License as published by the Free Software Foundation; either |
|||
# version 2.1 of the License, or (at your option) any later version. |
|||
# |
|||
# This library is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
# Lesser General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Lesser General Public |
|||
# License along with this library; if not, write to the Free Software |
|||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
|||
# USA |
|||
|
|||
import sys, os, re, codecs |
|||
import tokenize, shutil, time |
|||
import xml.sax |
|||
from xml.sax._exceptions import SAXParseException |
|||
|
|||
header_format = """\ |
|||
#!/usr/bin/env python |
|||
# -*- coding: UTF8 -*- |
|||
|
|||
# Python module %(module)s.py |
|||
# Autogenerated from %(glade)s |
|||
# Generated on %(date)s |
|||
|
|||
# Warning: Do not delete or modify comments related to context |
|||
# They are required to keep user's code |
|||
|
|||
import os, gtk |
|||
from SimpleGladeApp import SimpleGladeApp |
|||
|
|||
glade_dir = "" |
|||
|
|||
# Put your modules and data here |
|||
|
|||
# From here through main() codegen inserts/updates a class for |
|||
# every top-level widget in the .glade file. |
|||
|
|||
""" |
|||
|
|||
class_format = """\ |
|||
class %(class)s(SimpleGladeApp): |
|||
%(t)sdef __init__(self, glade_path="%(glade)s", root="%(root)s", domain=None): |
|||
%(t)s%(t)sglade_path = os.path.join(glade_dir, glade_path) |
|||
%(t)s%(t)sSimpleGladeApp.__init__(self, glade_path, root, domain) |
|||
|
|||
%(t)sdef new(self): |
|||
%(t)s%(t)s#context %(class)s.new { |
|||
%(t)s%(t)sprint "A new %(class)s has been created" |
|||
%(t)s%(t)s#context %(class)s.new } |
|||
|
|||
%(t)s#context %(class)s custom methods { |
|||
%(t)s#--- Write your own methods here ---# |
|||
%(t)s#context %(class)s custom methods } |
|||
|
|||
""" |
|||
|
|||
callback_format = """\ |
|||
%(t)sdef %(handler)s(self, widget, *args): |
|||
%(t)s%(t)s#context %(class)s.%(handler)s { |
|||
%(t)s%(t)sprint "%(handler)s called with self.%%s" %% widget.get_name() |
|||
%(t)s%(t)s#context %(class)s.%(handler)s } |
|||
|
|||
""" |
|||
|
|||
creation_format = """\ |
|||
%(t)sdef %(handler)s(self, str1, str2, int1, int2): |
|||
%(t)s%(t)s#context %(class)s.%(handler)s { |
|||
%(t)s%(t)swidget = gtk.Label("%(handler)s") |
|||
%(t)s%(t)swidget.show_all() |
|||
%(t)s%(t)sreturn widget |
|||
%(t)s%(t)s#context %(class)s.%(handler)s } |
|||
|
|||
""" |
|||
|
|||
main_format = """\ |
|||
def main(): |
|||
""" |
|||
|
|||
instance_format = """\ |
|||
%(t)s%(root)s = %(class)s() |
|||
""" |
|||
run_format = """\ |
|||
|
|||
%(t)s%(root)s.run() |
|||
|
|||
if __name__ == "__main__": |
|||
%(t)smain() |
|||
""" |
|||
|
|||
class NotGladeDocumentException(SAXParseException): |
|||
def __init__(self, glade_writer): |
|||
strerror = "Not a glade-2 document" |
|||
SAXParseException.__init__(self, strerror, None, glade_writer.sax_parser) |
|||
|
|||
class SimpleGladeCodeWriter(xml.sax.handler.ContentHandler): |
|||
def __init__(self, glade_file): |
|||
self.indent = "\t" |
|||
self.code = "" |
|||
self.roots_list = [] |
|||
self.widgets_stack = [] |
|||
self.creation_functions = [] |
|||
self.callbacks = [] |
|||
self.parent_is_creation_function = False |
|||
self.glade_file = glade_file |
|||
self.data = {} |
|||
self.input_dir, self.input_file = os.path.split(glade_file) |
|||
base = os.path.splitext(self.input_file)[0] |
|||
module = self.normalize_symbol(base) |
|||
self.output_file = os.path.join(self.input_dir, module) + ".py" |
|||
self.sax_parser = xml.sax.make_parser() |
|||
self.sax_parser.setFeature(xml.sax.handler.feature_external_ges, False) |
|||
self.sax_parser.setContentHandler(self) |
|||
self.data["glade"] = self.input_file |
|||
self.data["module"] = module |
|||
self.data["date"] = time.asctime() |
|||
|
|||
def normalize_symbol(self, base): |
|||
return "_".join( re.findall(tokenize.Name, base) ) |
|||
|
|||
def capitalize_symbol(self, base): |
|||
ClassName = "[a-zA-Z0-9]+" |
|||
base = self.normalize_symbol(base) |
|||
capitalize_map = lambda s : s[0].upper() + s[1:] |
|||
return "".join( map(capitalize_map, re.findall(ClassName, base)) ) |
|||
|
|||
def uncapitalize_symbol(self, base): |
|||
InstanceName = "([a-z])([A-Z])" |
|||
action = lambda m: "%s_%s" % ( m.groups()[0], m.groups()[1].lower() ) |
|||
base = self.normalize_symbol(base) |
|||
base = base[0].lower() + base[1:] |
|||
return re.sub(InstanceName, action, base) |
|||
|
|||
def startElement(self, name, attrs): |
|||
if name == "widget": |
|||
widget_id = attrs.get("id") |
|||
widget_class = attrs.get("class") |
|||
if not widget_id or not widget_class: |
|||
raise NotGladeDocumentException(self) |
|||
if not self.widgets_stack: |
|||
self.creation_functions = [] |
|||
self.callbacks = [] |
|||
class_name = self.capitalize_symbol(widget_id) |
|||
self.data["class"] = class_name |
|||
self.data["root"] = widget_id |
|||
self.roots_list.append(widget_id) |
|||
self.code += class_format % self.data |
|||
self.widgets_stack.append(widget_id) |
|||
elif name == "signal": |
|||
if not self.widgets_stack: |
|||
raise NotGladeDocumentException(self) |
|||
widget = self.widgets_stack[-1] |
|||
signal_object = attrs.get("object") |
|||
if signal_object: |
|||
return |
|||
handler = attrs.get("handler") |
|||
if not handler: |
|||
raise NotGladeDocumentException(self) |
|||
if handler.startswith("gtk_"): |
|||
return |
|||
signal = attrs.get("name") |
|||
if not signal: |
|||
raise NotGladeDocumentException(self) |
|||
self.data["widget"] = widget |
|||
self.data["signal"] = signal |
|||
self.data["handler"]= handler |
|||
if handler not in self.callbacks: |
|||
self.code += callback_format % self.data |
|||
self.callbacks.append(handler) |
|||
elif name == "property": |
|||
if not self.widgets_stack: |
|||
raise NotGladeDocumentException(self) |
|||
widget = self.widgets_stack[-1] |
|||
prop_name = attrs.get("name") |
|||
if not prop_name: |
|||
raise NotGladeDocumentException(self) |
|||
if prop_name == "creation_function": |
|||
self.parent_is_creation_function = True |
|||
|
|||
def characters(self, content): |
|||
if self.parent_is_creation_function: |
|||
if not self.widgets_stack: |
|||
raise NotGladeDocumentException(self) |
|||
handler = content.strip() |
|||
if handler not in self.creation_functions: |
|||
self.data["handler"] = handler |
|||
self.code += creation_format % self.data |
|||
self.creation_functions.append(handler) |
|||
|
|||
def endElement(self, name): |
|||
if name == "property": |
|||
self.parent_is_creation_function = False |
|||
elif name == "widget": |
|||
if not self.widgets_stack: |
|||
raise NotGladeDocumentException(self) |
|||
self.widgets_stack.pop() |
|||
|
|||
def write(self): |
|||
self.data["t"] = self.indent |
|||
self.code += header_format % self.data |
|||
try: |
|||
glade = open(self.glade_file, "r") |
|||
self.sax_parser.parse(glade) |
|||
except xml.sax._exceptions.SAXParseException, e: |
|||
sys.stderr.write("Error parsing document\n") |
|||
return None |
|||
except IOError, e: |
|||
sys.stderr.write("%s\n" % e.strerror) |
|||
return None |
|||
|
|||
self.code += main_format % self.data |
|||
|
|||
for root in self.roots_list: |
|||
self.data["class"] = self.capitalize_symbol(root) |
|||
self.data["root"] = self.uncapitalize_symbol(root) |
|||
self.code += instance_format % self.data |
|||
|
|||
self.data["root"] = self.uncapitalize_symbol(self.roots_list[0]) |
|||
self.code += run_format % self.data |
|||
|
|||
try: |
|||
self.output = codecs.open(self.output_file, "w", "utf-8") |
|||
self.output.write(self.code) |
|||
self.output.close() |
|||
except IOError, e: |
|||
sys.stderr.write("%s\n" % e.strerror) |
|||
return None |
|||
return self.output_file |
|||
|
|||
def usage(): |
|||
program = sys.argv[0] |
|||
print """\ |
|||
Write a simple python file from a glade file. |
|||
Usage: %s <file.glade> |
|||
""" % program |
|||
|
|||
def which(program): |
|||
if sys.platform.startswith("win"): |
|||
exe_ext = ".exe" |
|||
else: |
|||
exe_ext = "" |
|||
path_list = os.environ["PATH"].split(os.pathsep) |
|||
for path in path_list: |
|||
program_path = os.path.join(path, program) + exe_ext |
|||
if os.path.isfile(program_path): |
|||
return program_path |
|||
return None |
|||
|
|||
def check_for_programs(): |
|||
packages = {"diff" : "diffutils", "patch" : "patch"} |
|||
for package in packages.keys(): |
|||
if not which(package): |
|||
sys.stderr.write("Required program %s could not be found\n" % package) |
|||
sys.stderr.write("Is the package %s installed?\n" % packages[package]) |
|||
if sys.platform.startswith("win"): |
|||
sys.stderr.write("Download it from http://gnuwin32.sourceforge.net/packages.html\n") |
|||
sys.stderr.write("Also, be sure it is in the PATH\n") |
|||
return False |
|||
return True |
|||
|
|||
def main(): |
|||
if not check_for_programs(): |
|||
return -1 |
|||
if len(sys.argv) == 2: |
|||
code_writer = SimpleGladeCodeWriter( sys.argv[1] ) |
|||
glade_file = code_writer.glade_file |
|||
output_file = code_writer.output_file |
|||
output_file_orig = output_file + ".orig" |
|||
output_file_bak = output_file + ".bak" |
|||
short_f = os.path.split(output_file)[1] |
|||
short_f_orig = short_f + ".orig" |
|||
short_f_bak = short_f + ".bak" |
|||
helper_module = os.path.join(code_writer.input_dir,SimpleGladeApp_py) |
|||
custom_diff = "custom.diff" |
|||
|
|||
exists_output_file = os.path.exists(output_file) |
|||
exists_output_file_orig = os.path.exists(output_file_orig) |
|||
if not exists_output_file_orig and exists_output_file: |
|||
sys.stderr.write('File "%s" exists\n' % short_f) |
|||
sys.stderr.write('but "%s" does not.\n' % short_f_orig) |
|||
sys.stderr.write("That means your custom code would be overwritten.\n") |
|||
sys.stderr.write('Please manually remove "%s"\n' % short_f) |
|||
sys.stderr.write("from this directory.\n") |
|||
sys.stderr.write("Anyway, I\'ll create a backup for you in\n") |
|||
sys.stderr.write('"%s"\n' % short_f_bak) |
|||
shutil.copy(output_file, output_file_bak) |
|||
return -1 |
|||
if exists_output_file_orig and exists_output_file: |
|||
os.system("diff -U1 %s %s > %s" % (output_file_orig, output_file, custom_diff) ) |
|||
if not code_writer.write(): |
|||
os.remove(custom_diff) |
|||
return -1 |
|||
shutil.copy(output_file, output_file_orig) |
|||
if os.system("patch -fp0 < %s" % custom_diff): |
|||
os.remove(custom_diff) |
|||
return -1 |
|||
os.remove(custom_diff) |
|||
else: |
|||
if not code_writer.write(): |
|||
return -1 |
|||
shutil.copy(output_file, output_file_orig) |
|||
os.chmod(output_file, 0755) |
|||
if not os.path.isfile(helper_module): |
|||
open(helper_module, "w").write(SimpleGladeApp_content) |
|||
print "Wrote", output_file |
|||
return 0 |
|||
else: |
|||
usage() |
|||
return -1 |
|||
|
|||
SimpleGladeApp_py = "SimpleGladeApp.py" |
|||
|
|||
SimpleGladeApp_content = """\ |
|||
# SimpleGladeApp.py |
|||
# Module that provides an object oriented abstraction to pygtk and libglade. |
|||
# Copyright (C) 2004 Sandino Flores Moreno |
|||
|
|||
# This library is free software; you can redistribute it and/or |
|||
# modify it under the terms of the GNU Lesser General Public |
|||
# License as published by the Free Software Foundation; either |
|||
# version 2.1 of the License, or (at your option) any later version. |
|||
# |
|||
# This library is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
# Lesser General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Lesser General Public |
|||
# License along with this library; if not, write to the Free Software |
|||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
|||
# USA |
|||
|
|||
try: |
|||
import os |
|||
import sys |
|||
import gtk |
|||
import gtk.glade |
|||
except ImportError: |
|||
print "Error importing pygtk2 and pygtk2-libglade" |
|||
sys.exit(1) |
|||
|
|||
class SimpleGladeApp(dict): |
|||
def __init__(self, glade_filename, main_widget_name=None, domain=None): |
|||
gtk.glade.set_custom_handler(self.custom_handler) |
|||
if os.path.isfile(glade_filename): |
|||
self.glade_path = glade_filename |
|||
else: |
|||
glade_dir = os.path.split( sys.argv[0] )[0] |
|||
self.glade_path = os.path.join(glade_dir, glade_filename) |
|||
self.glade = gtk.glade.XML(self.glade_path, main_widget_name, domain) |
|||
if main_widget_name: |
|||
self.main_widget = self.glade.get_widget(main_widget_name) |
|||
else: |
|||
self.main_widget = None |
|||
self.signal_autoconnect() |
|||
self.new() |
|||
|
|||
def signal_autoconnect(self): |
|||
signals = {} |
|||
for attr_name in dir(self): |
|||
attr = getattr(self, attr_name) |
|||
if callable(attr): |
|||
signals[attr_name] = attr |
|||
self.glade.signal_autoconnect(signals) |
|||
|
|||
def custom_handler(self, |
|||
glade, function_name, widget_name, |
|||
str1, str2, int1, int2): |
|||
if hasattr(self, function_name): |
|||
handler = getattr(self, function_name) |
|||
return handler(str1, str2, int1, int2) |
|||
|
|||
def __getattr__(self, data_name): |
|||
if data_name in self: |
|||
data = self[data_name] |
|||
return data |
|||
else: |
|||
widget = self.glade.get_widget(data_name) |
|||
if widget != None: |
|||
self[data_name] = widget |
|||
return widget |
|||
else: |
|||
raise AttributeError, data_name |
|||
|
|||
def __setattr__(self, name, value): |
|||
self[name] = value |
|||
|
|||
def new(self): |
|||
pass |
|||
|
|||
def on_keyboard_interrupt(self): |
|||
pass |
|||
|
|||
def gtk_widget_show(self, widget, *args): |
|||
widget.show() |
|||
|
|||
def gtk_widget_hide(self, widget, *args): |
|||
widget.hide() |
|||
|
|||
def gtk_widget_grab_focus(self, widget, *args): |
|||
widget.grab_focus() |
|||
|
|||
def gtk_widget_destroy(self, widget, *args): |
|||
widget.destroy() |
|||
|
|||
def gtk_window_activate_default(self, widget, *args): |
|||
widget.activate_default() |
|||
|
|||
def gtk_true(self, *args): |
|||
return gtk.TRUE |
|||
|
|||
def gtk_false(self, *args): |
|||
return gtk.FALSE |
|||
|
|||
def gtk_main_quit(self, *args): |
|||
gtk.main_quit() |
|||
|
|||
def main(self): |
|||
gtk.main() |
|||
|
|||
def quit(self): |
|||
gtk.main_quit() |
|||
|
|||
def run(self): |
|||
try: |
|||
self.main() |
|||
except KeyboardInterrupt: |
|||
self.on_keyboard_interrupt() |
|||
""" |
|||
|
|||
if __name__ == "__main__": |
|||
exit_code = main() |
|||
sys.exit(exit_code) |
After Width: 1024 | Height: 769 | Size: 140 KiB |
After Width: 1024 | Height: 769 | Size: 123 KiB |
After Width: 1024 | Height: 769 | Size: 140 KiB |
@ -0,0 +1,9 @@ |
|||
# This is not really a .desktop file like the rest, but it's useful to treat |
|||
# it as such |
|||
|
|||
[GdmGreeterTheme] |
|||
Greeter=VIP.xml |
|||
Name=VIP |
|||
Description=VIP Express Login |
|||
Author=Jim Infield <jimi@bullseyecomputing.com> |
|||
Screenshot= |
@ -0,0 +1,292 @@ |
|||
<?xml version="1.0"?> |
|||
<!DOCTYPE greeter SYSTEM "greeter.dtd"> |
|||
<greeter> |
|||
<item type="pixmap"> |
|||
<normal file="Background.jpg"/> |
|||
<pos x="0" y="0" width="100%" height="100%"/> |
|||
</item> |
|||
|
|||
<!-- |
|||
This is the box in the botton left "command box" |
|||
--> |
|||
|
|||
<!-- bottom bar --> |
|||
<item type="rect"> |
|||
<normal color="#ffffff" alpha="0.15"/> |
|||
<pos y="100%" x="0" width="100%" height="42" anchor="sw"/> |
|||
<box xpadding="10" spacing="10" orientation="horizontal"> |
|||
<!-- reboot --> |
|||
<item type="rect" id="reboot_button" button="true"> |
|||
<show type="reboot" modes="console"/> |
|||
<pos y="50%" width="box" height="box" anchor="w"/> |
|||
<box xpadding="0" spacing="2" orientation="horizontal"> |
|||
<item type="pixmap"> |
|||
<normal file="icon-reboot.png"/> |
|||
<prelight file="icon-reboot-prelight.png"/> |
|||
<active file="icon-reboot-active.png"/> |
|||
</item> |
|||
<item type="label"> |
|||
<normal font="Bitstream Vera Sans 11" color="#ffffff"/> |
|||
<prelight font="Bitstream Vera Sans 11" color="#000000"/> |
|||
<active font="Bitstream Vera Sans 11" color="#dc292b"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<stock type="reboot"/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
<!-- halt --> |
|||
<item type="rect" id="halt_button" button="true"> |
|||
<show type="halt" modes="console"/> |
|||
<pos y="50%" width="box" height="box" anchor="w"/> |
|||
<box xpadding="0" spacing="2" orientation="horizontal"> |
|||
<item type="pixmap"> |
|||
<normal file="icon-shutdown.png"/> |
|||
<prelight file="icon-shutdown-prelight.png"/> |
|||
<active file="icon-shutdown-active.png"/> |
|||
</item> |
|||
<item type="label"> |
|||
<normal font="Bitstream Vera Sans 11" color="#ffffff"/> |
|||
<prelight font="Bitstream Vera Sans 11" color="#000000"/> |
|||
<active font="Bitstream Vera Sans 11" color="#dc292b"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<stock type="halt"/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
<!-- quit / disconnect --> |
|||
<item type="rect" id="disconnect_button" button="true"> |
|||
<normal/> |
|||
<show modes="flexi,remote"/> |
|||
<pos y="50%" width="box" height="box" anchor="w"/> |
|||
<box xpadding="0" spacing="2" orientation="horizontal"> |
|||
<item type="pixmap"> |
|||
<normal file="icon-shutdown.png"/> |
|||
<prelight file="icon-shutdown-prelight.png"/> |
|||
<active file="icon-shutdown-active.png"/> |
|||
</item> |
|||
<item type="label"> |
|||
<normal font="Bitstream Vera Sans 11" color="#ffffff"/> |
|||
<prelight font="Bitstream Vera Sans 11" color="#000000"/> |
|||
<active font="Bitstream Vera Sans 11" color="#dc292b"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<stock type="disconnect"/> |
|||
<show modes="remote"/> |
|||
</item> |
|||
<item type="label"> |
|||
<normal font="Bitstream Vera Sans 11" color="#ffffff"/> |
|||
<prelight font="Bitstream Vera Sans 11" color="#000000"/> |
|||
<active font="Bitstream Vera Sans 11" color="#dc292b"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<stock type="quit"/> |
|||
<show modes="flexi"/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
|
|||
|
|||
<!-- |
|||
This is the center box "login box" |
|||
--> |
|||
|
|||
<!-- password box --> |
|||
<item type="rect"> |
|||
<pos x="50%" y="75%" width="box" height="box" anchor="c"/> |
|||
<box xpadding="0" ypadding="0" spacing="5" orientation="vertical"> |
|||
<item type="rect"> |
|||
<pos x="0" y="0" width="box" height="box" expand="true"/> |
|||
<normal color="#ffffff" alpha="0.15"/> |
|||
<box xpadding="50" ypadding="15" spacing="10" orientation="vertical"> |
|||
<item type="label" id="pam-prompt"> |
|||
<pos x="0"/> |
|||
<normal font="Bitstream Vera Sans Bold 10" color="#ffffff"/> |
|||
<stock type="username-label"/> |
|||
</item> |
|||
<item type="rect"> |
|||
<normal color="#523921"/> |
|||
<pos width="160" height="24"/> |
|||
<fixed> |
|||
<item type="entry" id="user-pw-entry"> |
|||
<pos y="1" x="1" width="-2" height="-2" anchor="nw"/> |
|||
</item> |
|||
</fixed> |
|||
</item> |
|||
<!-- timer warning --> |
|||
<item type="label" id="timed-label"> |
|||
<show type="timed"/> |
|||
<normal font="Bitstream Vera Sans Bold 11" color="#ffffff"/> |
|||
<stock type="timed-label"/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
<item type="rect"> |
|||
<pos x="0" y="0" width="100%" height="box" expand="true"/> |
|||
<normal color="#ffffff" alpha="0.15"/> |
|||
<box xpadding="10" ypadding="8" spacing="10" orientation="horizontal" homogeneous="true"> |
|||
<!-- language --> |
|||
<item type="rect" id="language_button" button="true"> |
|||
<pos x="50%" y="50%" width="box" height="box" anchor="c"/> |
|||
<box xpadding="0" spacing="2" orientation="horizontal"> |
|||
<item type="pixmap"> |
|||
<pos width="24" height="24"/> |
|||
<normal file="icon-language.png"/> |
|||
<prelight file="icon-language-prelight.png"/> |
|||
<active file="icon-language-active.png"/> |
|||
</item> |
|||
<item type="label"> |
|||
<normal font="Bitstream Vera Sans 9" color="#ffffff"/> |
|||
<prelight font="Bitstream Vera Sans 9" color="#223b52"/> |
|||
<active font="Bitstream Vera Sans 9" color="#4d4d4d"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<stock type="language"/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
<!-- session --> |
|||
<item type="rect" id="session_button" button="true"> |
|||
<pos x="50%" y="50%" width="box" height="box" anchor="c"/> |
|||
<box xpadding="0" spacing="2" orientation="horizontal"> |
|||
<item type="pixmap"> |
|||
<pos width="24" height="24"/> |
|||
<normal file="icon-session.png"/> |
|||
<prelight file="icon-session-prelight.png"/> |
|||
<active file="icon-session-active.png"/> |
|||
</item> |
|||
<item type="label"> |
|||
<normal font="Bitstream Vera Sans 9" color="#ffffff"/> |
|||
<prelight font="Bitstream Vera Sans 9" color="#223b52"/> |
|||
<active font="Bitstream Vera Sans 9" color="#4d4d4d"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<stock type="session"/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
|
|||
<!-- |
|||
This is the "date box" |
|||
--> |
|||
|
|||
<!-- hostname and clock --> |
|||
<item type="rect"> |
|||
<pos x="100%" y="100%" width="box" height="42" anchor="se"/> |
|||
<box xpadding="10" spacing="10" orientation="horizontal"> |
|||
<item type="label"> |
|||
<pos x="100%" y="50%" anchor="e"/> |
|||
<normal font="Bitstream Vera Sans Bold 11" color="#ffffff"/> |
|||
<text>%h //</text> |
|||
</item> |
|||
<item type="label" id="clock"> |
|||
<pos x="100%" y="50%" anchor="e"/> |
|||
<normal font="Bitstream Vera Sans 11" color="#ffffff"/> |
|||
<text>%c</text> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
|
|||
|
|||
<!-- |
|||
caps lock warning |
|||
--> |
|||
|
|||
<item type="rect" id="caps-lock-warning"> |
|||
<normal color="#bfe3ff" alpha="0.0"/> |
|||
<pos anchor="c" x="50%" y="72%" width="box" height="box"/> |
|||
<box orientation="vertical" min-width="400" xpadding="10" ypadding="5" spacing="10"> |
|||
<item type="label"> |
|||
<normal color="#bfe3ff" font="Arial Black 12"/> |
|||
<pos x="50%" anchor="n"/> |
|||
<text>You've got capslock on!</text> |
|||
<text xml:lang="ca">Teniu capslock activat!</text> |
|||
<text xml:lang="da">Caps lock-tasten er slået til!</text> |
|||
<text xml:lang="es">Tiene activado el bloqueo de mayúsculas.</text> |
|||
<text xml:lang="et">Sul on caplock peal!</text> |
|||
<text xml:lang="fi">Sinulla on caps lock päällä!</text> |
|||
<text xml:lang="fr">Vous avez la touche Verr. Maj. activé !</text> |
|||
<text xml:lang="ko">Caps Lock이 켜져 있습니다!</text> |
|||
<text xml:lang="lt">Jūsų Caps Lock yra įjungtas!</text> |
|||
<text xml:lang="ms">Anda mempunyai capslock dihidupkan!</text> |
|||
<text xml:lang="nl">Caps-lock staat aan!</text> |
|||
<text xml:lang="no">Du har capslock på!</text> |
|||
<text xml:lang="pl">Włączony jest klawisz Caps Lock!</text> |
|||
<text xml:lang="pt">Tem o capslock ligado!</text> |
|||
<text xml:lang="sk">Máte zapnutý CAPS LOCK.</text> |
|||
<text xml:lang="sl">Vključene imate velike črke!</text> |
|||
<text xml:lang="sv">Du har CapsLock på!</text> |
|||
<text xml:lang="vi">Bạn đang bật CapsLock!</text> |
|||
<text xml:lang="zh_TW">請留意不要按下 capslock!</text> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
|
|||
<!-- |
|||
timed login info |
|||
--> |
|||
|
|||
<item type="rect" id="timed-rect"> |
|||
<show type="timed"/> |
|||
<normal color="#bfe3ff" alpha="0.0"/> |
|||
<pos anchor="c" x="50%" y="75%" width="box" height="box"/> |
|||
<box orientation="vertical" min-width="400" xpadding="10" ypadding="5" spacing="0"> |
|||
<item type="label" id="timed-label"> |
|||
<normal color="#bfe3ff" font="Arial Black 12"/> |
|||
<pos x="50%" anchor="n"/> |
|||
<text>User %s will login in %d seconds</text> |
|||
<text xml:lang="az">%s istifadəçisi %d saniyə içində sistemə girəcəkdir</text> |
|||
<text xml:lang="ca">L'usuari %s entrarà en %d segons</text> |
|||
<text xml:lang="cs">Uživatel %s bude přihlášen za %d vteřin</text> |
|||
<text xml:lang="da">Brugeren %s logger på om %d sekunder</text> |
|||
<text xml:lang="de">Benutzer %s wird in %d Sekunden angemeldet</text> |
|||
<text xml:lang="es">El usuario %s accederá en %d segundos</text> |
|||
<text xml:lang="et">Kasutaja %s logitakse sisse %d sekundi pärast</text> |
|||
<text xml:lang="eu">%s erabiltzaileak %d segundo barru hasiko du saioa</text> |
|||
<text xml:lang="fi">käyttäjä %s kirjautuu %d sekunnin kuluttua</text> |
|||
<text xml:lang="fr">L'utilisateur %s se connectera dans %d secondes</text> |
|||
<text xml:lang="gl">A/O usuaria/o %s conectará en %d segundos</text> |
|||
<text xml:lang="hu">%s felhasználó beléptetése %d másodperc múlva</text> |
|||
<text xml:lang="it">L'utente %s effettuerà il login fra %d secondi</text> |
|||
<text xml:lang="ja">ユーザ%sは%d秒後にログイン</text> |
|||
<text xml:lang="ko">사용자 %s는 %d 초 이내에 로그인 하여야 합니다</text> |
|||
<text xml:lang="lt">Vartotojas %s bus prijungtas per %d sek.</text> |
|||
<text xml:lang="lv">Lietotājs %s ielogosies %d sekundēs</text> |
|||
<text xml:lang="ms">Pengguna %s akan logmasuk dalam %d saat</text> |
|||
<text xml:lang="nl">Gebruiker %s wordt aangemeld over %d seconden</text> |
|||
<text xml:lang="nn">Brukar %s vil logge inn om %d sekund</text> |
|||
<text xml:lang="no">Bruker %s vil logge på om %d sekunder</text> |
|||
<text xml:lang="pl">Użytkownik %s zostanie zalogowany w ciągu %d sekund</text> |
|||
<text xml:lang="pt">Utilizador %s iniciará sessão em %d segundos</text> |
|||
<text xml:lang="pt_BR">O usuário %s efetuará login em %d segundos</text> |
|||
<text xml:lang="ro">Utilizatorul %s va fi logat în %d secunde</text> |
|||
<text xml:lang="sk">Používateľ %s bude automaticky prihlásený za %d sekúnd</text> |
|||
<text xml:lang="sl">Uporabnik %s se bo prijavil v %d sekundah</text> |
|||
<text xml:lang="sv">Användaren %s kommer att logga in om %d sekunder</text> |
|||
<text xml:lang="tr">%s kullanıcısı %d saniye içinde giriş yapacak</text> |
|||
<text xml:lang="vi">Người dùng %s sẽ đăng nhập trong vòng %d giây</text> |
|||
<text xml:lang="zh_CN">用户 %s 将在 %d 秒后登录</text> |
|||
<text xml:lang="zh_TW">使用者 %s 將會在 %d 內登入</text> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
|
|||
<!-- |
|||
login error message |
|||
--> |
|||
|
|||
<item type="rect" id="pam-mess"> |
|||
<normal color="#ffffff" alpha="0.0"/> |
|||
<pos anchor="c" x="50%" y="78%" width="box" height="box"/> |
|||
<box orientation="vertical" min-width="400" xpadding="10" ypadding="5" spacing="0"> |
|||
<item type="label" id="pam-error"> |
|||
<pos anchor="n" x="50%"/> |
|||
<normal color="#ffffff" font="Arial Black 12"/> |
|||
<text/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
|
|||
</greeter> |
|||
|
After Width: 32 | Height: 32 | Size: 620 B |
After Width: 32 | Height: 32 | Size: 640 B |
After Width: 32 | Height: 32 | Size: 577 B |
After Width: 32 | Height: 32 | Size: 456 B |
After Width: 32 | Height: 32 | Size: 556 B |
After Width: 32 | Height: 32 | Size: 455 B |
After Width: 32 | Height: 32 | Size: 933 B |
After Width: 32 | Height: 32 | Size: 974 B |
After Width: 32 | Height: 32 | Size: 831 B |
After Width: 32 | Height: 32 | Size: 515 B |
After Width: 32 | Height: 32 | Size: 607 B |
After Width: 32 | Height: 32 | Size: 536 B |
After Width: 1280 | Height: 1024 | Size: 75 KiB |
After Width: 1024 | Height: 769 | Size: 140 KiB |
@ -0,0 +1,9 @@ |
|||
# This is not really a .desktop file like the rest, but it's useful to treat |
|||
# it as such |
|||
|
|||
[GdmGreeterTheme] |
|||
Greeter=VIP.xml |
|||
Name=VIP |
|||
Description=VIP Express Login |
|||
Author=Jim Infield <jimi@bullseyecomputing.com> |
|||
Screenshot= |
@ -0,0 +1,292 @@ |
|||
<?xml version="1.0"?> |
|||
<!DOCTYPE greeter SYSTEM "greeter.dtd"> |
|||
<greeter> |
|||
<item type="pixmap"> |
|||
<normal file="Background.jpg"/> |
|||
<pos x="0" y="0" width="100%" height="100%"/> |
|||
</item> |
|||
|
|||
<!-- |
|||
This is the box in the botton left "command box" |
|||
--> |
|||
|
|||
<!-- bottom bar --> |
|||
<item type="rect"> |
|||
<normal color="#ffffff" alpha="0.15"/> |
|||
<pos y="100%" x="0" width="100%" height="42" anchor="sw"/> |
|||
<box xpadding="10" spacing="10" orientation="horizontal"> |
|||
<!-- reboot --> |
|||
<item type="rect" id="reboot_button" button="true"> |
|||
<show type="reboot" modes="console"/> |
|||
<pos y="50%" width="box" height="box" anchor="w"/> |
|||
<box xpadding="0" spacing="2" orientation="horizontal"> |
|||
<item type="pixmap"> |
|||
<normal file="icon-reboot.png"/> |
|||
<prelight file="icon-reboot-prelight.png"/> |
|||
<active file="icon-reboot-active.png"/> |
|||
</item> |
|||
<item type="label"> |
|||
<normal font="Bitstream Vera Sans 11" color="#ffffff"/> |
|||
<prelight font="Bitstream Vera Sans 11" color="#000000"/> |
|||
<active font="Bitstream Vera Sans 11" color="#dc292b"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<stock type="reboot"/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
<!-- halt --> |
|||
<item type="rect" id="halt_button" button="true"> |
|||
<show type="halt" modes="console"/> |
|||
<pos y="50%" width="box" height="box" anchor="w"/> |
|||
<box xpadding="0" spacing="2" orientation="horizontal"> |
|||
<item type="pixmap"> |
|||
<normal file="icon-shutdown.png"/> |
|||
<prelight file="icon-shutdown-prelight.png"/> |
|||
<active file="icon-shutdown-active.png"/> |
|||
</item> |
|||
<item type="label"> |
|||
<normal font="Bitstream Vera Sans 11" color="#ffffff"/> |
|||
<prelight font="Bitstream Vera Sans 11" color="#000000"/> |
|||
<active font="Bitstream Vera Sans 11" color="#dc292b"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<stock type="halt"/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
<!-- quit / disconnect --> |
|||
<item type="rect" id="disconnect_button" button="true"> |
|||
<normal/> |
|||
<show modes="flexi,remote"/> |
|||
<pos y="50%" width="box" height="box" anchor="w"/> |
|||
<box xpadding="0" spacing="2" orientation="horizontal"> |
|||
<item type="pixmap"> |
|||
<normal file="icon-shutdown.png"/> |
|||
<prelight file="icon-shutdown-prelight.png"/> |
|||
<active file="icon-shutdown-active.png"/> |
|||
</item> |
|||
<item type="label"> |
|||
<normal font="Bitstream Vera Sans 11" color="#ffffff"/> |
|||
<prelight font="Bitstream Vera Sans 11" color="#000000"/> |
|||
<active font="Bitstream Vera Sans 11" color="#dc292b"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<stock type="disconnect"/> |
|||
<show modes="remote"/> |
|||
</item> |
|||
<item type="label"> |
|||
<normal font="Bitstream Vera Sans 11" color="#ffffff"/> |
|||
<prelight font="Bitstream Vera Sans 11" color="#000000"/> |
|||
<active font="Bitstream Vera Sans 11" color="#dc292b"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<stock type="quit"/> |
|||
<show modes="flexi"/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
|
|||
|
|||
<!-- |
|||
This is the center box "login box" |
|||
--> |
|||
|
|||
<!-- password box --> |
|||
<item type="rect"> |
|||
<pos x="50%" y="75%" width="box" height="box" anchor="c"/> |
|||
<box xpadding="0" ypadding="0" spacing="5" orientation="vertical"> |
|||
<item type="rect"> |
|||
<pos x="0" y="0" width="box" height="box" expand="true"/> |
|||
<normal color="#ffffff" alpha="0.15"/> |
|||
<box xpadding="50" ypadding="15" spacing="10" orientation="vertical"> |
|||
<item type="label" id="pam-prompt"> |
|||
<pos x="0"/> |
|||
<normal font="Bitstream Vera Sans Bold 10" color="#ffffff"/> |
|||
<stock type="username-label"/> |
|||
</item> |
|||
<item type="rect"> |
|||
<normal color="#523921"/> |
|||
<pos width="160" height="24"/> |
|||
<fixed> |
|||
<item type="entry" id="user-pw-entry"> |
|||
<pos y="1" x="1" width="-2" height="-2" anchor="nw"/> |
|||
</item> |
|||
</fixed> |
|||
</item> |
|||
<!-- timer warning --> |
|||
<item type="label" id="timed-label"> |
|||
<show type="timed"/> |
|||
<normal font="Bitstream Vera Sans Bold 11" color="#ffffff"/> |
|||
<stock type="timed-label"/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
<item type="rect"> |
|||
<pos x="0" y="0" width="100%" height="box" expand="true"/> |
|||
<normal color="#ffffff" alpha="0.15"/> |
|||
<box xpadding="10" ypadding="8" spacing="10" orientation="horizontal" homogeneous="true"> |
|||
<!-- language --> |
|||
<item type="rect" id="language_button" button="true"> |
|||
<pos x="50%" y="50%" width="box" height="box" anchor="c"/> |
|||
<box xpadding="0" spacing="2" orientation="horizontal"> |
|||
<item type="pixmap"> |
|||
<pos width="24" height="24"/> |
|||
<normal file="icon-language.png"/> |
|||
<prelight file="icon-language-prelight.png"/> |
|||
<active file="icon-language-active.png"/> |
|||
</item> |
|||
<item type="label"> |
|||
<normal font="Bitstream Vera Sans 9" color="#ffffff"/> |
|||
<prelight font="Bitstream Vera Sans 9" color="#223b52"/> |
|||
<active font="Bitstream Vera Sans 9" color="#4d4d4d"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<stock type="language"/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
<!-- session --> |
|||
<item type="rect" id="session_button" button="true"> |
|||
<pos x="50%" y="50%" width="box" height="box" anchor="c"/> |
|||
<box xpadding="0" spacing="2" orientation="horizontal"> |
|||
<item type="pixmap"> |
|||
<pos width="24" height="24"/> |
|||
<normal file="icon-session.png"/> |
|||
<prelight file="icon-session-prelight.png"/> |
|||
<active file="icon-session-active.png"/> |
|||
</item> |
|||
<item type="label"> |
|||
<normal font="Bitstream Vera Sans 9" color="#ffffff"/> |
|||
<prelight font="Bitstream Vera Sans 9" color="#223b52"/> |
|||
<active font="Bitstream Vera Sans 9" color="#4d4d4d"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<stock type="session"/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
|
|||
<!-- |
|||
This is the "date box" |
|||
--> |
|||
|
|||
<!-- hostname and clock --> |
|||
<item type="rect"> |
|||
<pos x="100%" y="100%" width="box" height="42" anchor="se"/> |
|||
<box xpadding="10" spacing="10" orientation="horizontal"> |
|||
<item type="label"> |
|||
<pos x="100%" y="50%" anchor="e"/> |
|||
<normal font="Bitstream Vera Sans Bold 11" color="#ffffff"/> |
|||
<text>%h //</text> |
|||
</item> |
|||
<item type="label" id="clock"> |
|||
<pos x="100%" y="50%" anchor="e"/> |
|||
<normal font="Bitstream Vera Sans 11" color="#ffffff"/> |
|||
<text>%c</text> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
|
|||
|
|||
<!-- |
|||
caps lock warning |
|||
--> |
|||
|
|||
<item type="rect" id="caps-lock-warning"> |
|||
<normal color="#bfe3ff" alpha="0.0"/> |
|||
<pos anchor="c" x="50%" y="72%" width="box" height="box"/> |
|||
<box orientation="vertical" min-width="400" xpadding="10" ypadding="5" spacing="10"> |
|||
<item type="label"> |
|||
<normal color="#bfe3ff" font="Arial Black 12"/> |
|||
<pos x="50%" anchor="n"/> |
|||
<text>You've got capslock on!</text> |
|||
<text xml:lang="ca">Teniu capslock activat!</text> |
|||
<text xml:lang="da">Caps lock-tasten er slået til!</text> |
|||
<text xml:lang="es">Tiene activado el bloqueo de mayúsculas.</text> |
|||
<text xml:lang="et">Sul on caplock peal!</text> |
|||
<text xml:lang="fi">Sinulla on caps lock päällä!</text> |
|||
<text xml:lang="fr">Vous avez la touche Verr. Maj. activé !</text> |
|||
<text xml:lang="ko">Caps Lock이 켜져 있습니다!</text> |
|||
<text xml:lang="lt">Jūsų Caps Lock yra įjungtas!</text> |
|||
<text xml:lang="ms">Anda mempunyai capslock dihidupkan!</text> |
|||
<text xml:lang="nl">Caps-lock staat aan!</text> |
|||
<text xml:lang="no">Du har capslock på!</text> |
|||
<text xml:lang="pl">Włączony jest klawisz Caps Lock!</text> |
|||
<text xml:lang="pt">Tem o capslock ligado!</text> |
|||
<text xml:lang="sk">Máte zapnutý CAPS LOCK.</text> |
|||
<text xml:lang="sl">Vključene imate velike črke!</text> |
|||
<text xml:lang="sv">Du har CapsLock på!</text> |
|||
<text xml:lang="vi">Bạn đang bật CapsLock!</text> |
|||
<text xml:lang="zh_TW">請留意不要按下 capslock!</text> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
|
|||
<!-- |
|||
timed login info |
|||
--> |
|||
|
|||
<item type="rect" id="timed-rect"> |
|||
<show type="timed"/> |
|||
<normal color="#bfe3ff" alpha="0.0"/> |
|||
<pos anchor="c" x="50%" y="75%" width="box" height="box"/> |
|||
<box orientation="vertical" min-width="400" xpadding="10" ypadding="5" spacing="0"> |
|||
<item type="label" id="timed-label"> |
|||
<normal color="#bfe3ff" font="Arial Black 12"/> |
|||
<pos x="50%" anchor="n"/> |
|||
<text>User %s will login in %d seconds</text> |
|||
<text xml:lang="az">%s istifadəçisi %d saniyə içində sistemə girəcəkdir</text> |
|||
<text xml:lang="ca">L'usuari %s entrarà en %d segons</text> |
|||
<text xml:lang="cs">Uživatel %s bude přihlášen za %d vteřin</text> |
|||
<text xml:lang="da">Brugeren %s logger på om %d sekunder</text> |
|||
<text xml:lang="de">Benutzer %s wird in %d Sekunden angemeldet</text> |
|||
<text xml:lang="es">El usuario %s accederá en %d segundos</text> |
|||
<text xml:lang="et">Kasutaja %s logitakse sisse %d sekundi pärast</text> |
|||
<text xml:lang="eu">%s erabiltzaileak %d segundo barru hasiko du saioa</text> |
|||
<text xml:lang="fi">käyttäjä %s kirjautuu %d sekunnin kuluttua</text> |
|||
<text xml:lang="fr">L'utilisateur %s se connectera dans %d secondes</text> |
|||
<text xml:lang="gl">A/O usuaria/o %s conectará en %d segundos</text> |
|||
<text xml:lang="hu">%s felhasználó beléptetése %d másodperc múlva</text> |
|||
<text xml:lang="it">L'utente %s effettuerà il login fra %d secondi</text> |
|||
<text xml:lang="ja">ユーザ%sは%d秒後にログイン</text> |
|||
<text xml:lang="ko">사용자 %s는 %d 초 이내에 로그인 하여야 합니다</text> |
|||
<text xml:lang="lt">Vartotojas %s bus prijungtas per %d sek.</text> |
|||
<text xml:lang="lv">Lietotājs %s ielogosies %d sekundēs</text> |
|||
<text xml:lang="ms">Pengguna %s akan logmasuk dalam %d saat</text> |
|||
<text xml:lang="nl">Gebruiker %s wordt aangemeld over %d seconden</text> |
|||
<text xml:lang="nn">Brukar %s vil logge inn om %d sekund</text> |
|||
<text xml:lang="no">Bruker %s vil logge på om %d sekunder</text> |
|||
<text xml:lang="pl">Użytkownik %s zostanie zalogowany w ciągu %d sekund</text> |
|||
<text xml:lang="pt">Utilizador %s iniciará sessão em %d segundos</text> |
|||
<text xml:lang="pt_BR">O usuário %s efetuará login em %d segundos</text> |
|||
<text xml:lang="ro">Utilizatorul %s va fi logat în %d secunde</text> |
|||
<text xml:lang="sk">Používateľ %s bude automaticky prihlásený za %d sekúnd</text> |
|||
<text xml:lang="sl">Uporabnik %s se bo prijavil v %d sekundah</text> |
|||
<text xml:lang="sv">Användaren %s kommer att logga in om %d sekunder</text> |
|||
<text xml:lang="tr">%s kullanıcısı %d saniye içinde giriş yapacak</text> |
|||
<text xml:lang="vi">Người dùng %s sẽ đăng nhập trong vòng %d giây</text> |
|||
<text xml:lang="zh_CN">用户 %s 将在 %d 秒后登录</text> |
|||
<text xml:lang="zh_TW">使用者 %s 將會在 %d 內登入</text> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
|
|||
<!-- |
|||
login error message |
|||
--> |
|||
|
|||
<item type="rect" id="pam-mess"> |
|||
<normal color="#ffffff" alpha="0.0"/> |
|||
<pos anchor="c" x="50%" y="78%" width="box" height="box"/> |
|||
<box orientation="vertical" min-width="400" xpadding="10" ypadding="5" spacing="0"> |
|||
<item type="label" id="pam-error"> |
|||
<pos anchor="n" x="50%"/> |
|||
<normal color="#ffffff" font="Arial Black 12"/> |
|||
<text/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
|
|||
</greeter> |
|||
|
@ -0,0 +1,292 @@ |
|||
<?xml version="1.0"?> |
|||
<!DOCTYPE greeter SYSTEM "greeter.dtd"> |
|||
<greeter> |
|||
<item type="pixmap"> |
|||
<normal file="Background.png"/> |
|||
<pos x="0" y="0" width="100%" height="100%"/> |
|||
</item> |
|||
|
|||
<!-- |
|||
This is the box in the botton left "command box" |
|||
--> |
|||
|
|||
<!-- bottom bar --> |
|||
<item type="rect"> |
|||
<normal color="#ffffff" alpha="0.15"/> |
|||
<pos y="100%" x="0" width="100%" height="42" anchor="sw"/> |
|||
<box xpadding="10" spacing="10" orientation="horizontal"> |
|||
<!-- reboot --> |
|||
<item type="rect" id="reboot_button" button="true"> |
|||
<show type="reboot" modes="console"/> |
|||
<pos y="50%" width="box" height="box" anchor="w"/> |
|||
<box xpadding="0" spacing="2" orientation="horizontal"> |
|||
<item type="pixmap"> |
|||
<normal file="icon-reboot.png"/> |
|||
<prelight file="icon-reboot-prelight.png"/> |
|||
<active file="icon-reboot-active.png"/> |
|||
</item> |
|||
<item type="label"> |
|||
<normal font="Bitstream Vera Sans 11" color="#ffffff"/> |
|||
<prelight font="Bitstream Vera Sans 11" color="#000000"/> |
|||
<active font="Bitstream Vera Sans 11" color="#dc292b"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<stock type="reboot"/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
<!-- halt --> |
|||
<item type="rect" id="halt_button" button="true"> |
|||
<show type="halt" modes="console"/> |
|||
<pos y="50%" width="box" height="box" anchor="w"/> |
|||
<box xpadding="0" spacing="2" orientation="horizontal"> |
|||
<item type="pixmap"> |
|||
<normal file="icon-shutdown.png"/> |
|||
<prelight file="icon-shutdown-prelight.png"/> |
|||
<active file="icon-shutdown-active.png"/> |
|||
</item> |
|||
<item type="label"> |
|||
<normal font="Bitstream Vera Sans 11" color="#ffffff"/> |
|||
<prelight font="Bitstream Vera Sans 11" color="#000000"/> |
|||
<active font="Bitstream Vera Sans 11" color="#dc292b"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<stock type="halt"/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
<!-- quit / disconnect --> |
|||
<item type="rect" id="disconnect_button" button="true"> |
|||
<normal/> |
|||
<show modes="flexi,remote"/> |
|||
<pos y="50%" width="box" height="box" anchor="w"/> |
|||
<box xpadding="0" spacing="2" orientation="horizontal"> |
|||
<item type="pixmap"> |
|||
<normal file="icon-shutdown.png"/> |
|||
<prelight file="icon-shutdown-prelight.png"/> |
|||
<active file="icon-shutdown-active.png"/> |
|||
</item> |
|||
<item type="label"> |
|||
<normal font="Bitstream Vera Sans 11" color="#ffffff"/> |
|||
<prelight font="Bitstream Vera Sans 11" color="#000000"/> |
|||
<active font="Bitstream Vera Sans 11" color="#dc292b"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<stock type="disconnect"/> |
|||
<show modes="remote"/> |
|||
</item> |
|||
<item type="label"> |
|||
<normal font="Bitstream Vera Sans 11" color="#ffffff"/> |
|||
<prelight font="Bitstream Vera Sans 11" color="#000000"/> |
|||
<active font="Bitstream Vera Sans 11" color="#dc292b"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<stock type="quit"/> |
|||
<show modes="flexi"/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
|
|||
|
|||
<!-- |
|||
This is the center box "login box" |
|||
--> |
|||
|
|||
<!-- password box --> |
|||
<item type="rect"> |
|||
<pos x="50%" y="50%" width="box" height="box" anchor="c"/> |
|||
<box xpadding="0" ypadding="0" spacing="5" orientation="vertical"> |
|||
<item type="rect"> |
|||
<pos x="0" y="0" width="box" height="box" expand="true"/> |
|||
<normal color="#ffffff" alpha="0.15"/> |
|||
<box xpadding="50" ypadding="15" spacing="10" orientation="vertical"> |
|||
<item type="label" id="pam-prompt"> |
|||
<pos x="0"/> |
|||
<normal font="Bitstream Vera Sans Bold 10" color="#ffffff"/> |
|||
<stock type="username-label"/> |
|||
</item> |
|||
<item type="rect"> |
|||
<normal color="#523921"/> |
|||
<pos width="160" height="24"/> |
|||
<fixed> |
|||
<item type="entry" id="user-pw-entry"> |
|||
<pos y="1" x="1" width="-2" height="-2" anchor="nw"/> |
|||
</item> |
|||
</fixed> |
|||
</item> |
|||
<!-- timer warning --> |
|||
<item type="label" id="timed-label"> |
|||
<show type="timed"/> |
|||
<normal font="Bitstream Vera Sans Bold 11" color="#ffffff"/> |
|||
<stock type="timed-label"/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
<item type="rect"> |
|||
<pos x="0" y="0" width="100%" height="box" expand="true"/> |
|||
<normal color="#ffffff" alpha="0.15"/> |
|||
<box xpadding="10" ypadding="8" spacing="10" orientation="horizontal" homogeneous="true"> |
|||
<!-- language --> |
|||
<item type="rect" id="language_button" button="true"> |
|||
<pos x="50%" y="50%" width="box" height="box" anchor="c"/> |
|||
<box xpadding="0" spacing="2" orientation="horizontal"> |
|||
<item type="pixmap"> |
|||
<pos width="24" height="24"/> |
|||
<normal file="icon-language.png"/> |
|||
<prelight file="icon-language-prelight.png"/> |
|||
<active file="icon-language-active.png"/> |
|||
</item> |
|||
<item type="label"> |
|||
<normal font="Bitstream Vera Sans 9" color="#ffffff"/> |
|||
<prelight font="Bitstream Vera Sans 9" color="#223b52"/> |
|||
<active font="Bitstream Vera Sans 9" color="#4d4d4d"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<stock type="language"/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
<!-- session --> |
|||
<item type="rect" id="session_button" button="true"> |
|||
<pos x="50%" y="50%" width="box" height="box" anchor="c"/> |
|||
<box xpadding="0" spacing="2" orientation="horizontal"> |
|||
<item type="pixmap"> |
|||
<pos width="24" height="24"/> |
|||
<normal file="icon-session.png"/> |
|||
<prelight file="icon-session-prelight.png"/> |
|||
<active file="icon-session-active.png"/> |
|||
</item> |
|||
<item type="label"> |
|||
<normal font="Bitstream Vera Sans 9" color="#ffffff"/> |
|||
<prelight font="Bitstream Vera Sans 9" color="#223b52"/> |
|||
<active font="Bitstream Vera Sans 9" color="#4d4d4d"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<stock type="session"/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
|
|||
<!-- |
|||
This is the "date box" |
|||
--> |
|||
|
|||
<!-- hostname and clock --> |
|||
<item type="rect"> |
|||
<pos x="100%" y="100%" width="box" height="42" anchor="se"/> |
|||
<box xpadding="10" spacing="10" orientation="horizontal"> |
|||
<item type="label"> |
|||
<pos x="100%" y="50%" anchor="e"/> |
|||
<normal font="Bitstream Vera Sans Bold 11" color="#ffffff"/> |
|||
<text>%h //</text> |
|||
</item> |
|||
<item type="label" id="clock"> |
|||
<pos x="100%" y="50%" anchor="e"/> |
|||
<normal font="Bitstream Vera Sans 11" color="#ffffff"/> |
|||
<text>%c</text> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
|
|||
|
|||
<!-- |
|||
caps lock warning |
|||
--> |
|||
|
|||
<item type="rect" id="caps-lock-warning"> |
|||
<normal color="#bfe3ff" alpha="0.0"/> |
|||
<pos anchor="c" x="50%" y="72%" width="box" height="box"/> |
|||
<box orientation="vertical" min-width="400" xpadding="10" ypadding="5" spacing="10"> |
|||
<item type="label"> |
|||
<normal color="#bfe3ff" font="Arial Black 12"/> |
|||
<pos x="50%" anchor="n"/> |
|||
<text>You've got capslock on!</text> |
|||
<text xml:lang="ca">Teniu capslock activat!</text> |
|||
<text xml:lang="da">Caps lock-tasten er slået til!</text> |
|||
<text xml:lang="es">Tiene activado el bloqueo de mayúsculas.</text> |
|||
<text xml:lang="et">Sul on caplock peal!</text> |
|||
<text xml:lang="fi">Sinulla on caps lock päällä!</text> |
|||
<text xml:lang="fr">Vous avez la touche Verr. Maj. activé !</text> |
|||
<text xml:lang="ko">Caps Lock이 켜져 있습니다!</text> |
|||
<text xml:lang="lt">Jūsų Caps Lock yra įjungtas!</text> |
|||
<text xml:lang="ms">Anda mempunyai capslock dihidupkan!</text> |
|||
<text xml:lang="nl">Caps-lock staat aan!</text> |
|||
<text xml:lang="no">Du har capslock på!</text> |
|||
<text xml:lang="pl">Włączony jest klawisz Caps Lock!</text> |
|||
<text xml:lang="pt">Tem o capslock ligado!</text> |
|||
<text xml:lang="sk">Máte zapnutý CAPS LOCK.</text> |
|||
<text xml:lang="sl">Vključene imate velike črke!</text> |
|||
<text xml:lang="sv">Du har CapsLock på!</text> |
|||
<text xml:lang="vi">Bạn đang bật CapsLock!</text> |
|||
<text xml:lang="zh_TW">請留意不要按下 capslock!</text> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
|
|||
<!-- |
|||
timed login info |
|||
--> |
|||
|
|||
<item type="rect" id="timed-rect"> |
|||
<show type="timed"/> |
|||
<normal color="#bfe3ff" alpha="0.0"/> |
|||
<pos anchor="c" x="50%" y="75%" width="box" height="box"/> |
|||
<box orientation="vertical" min-width="400" xpadding="10" ypadding="5" spacing="0"> |
|||
<item type="label" id="timed-label"> |
|||
<normal color="#bfe3ff" font="Arial Black 12"/> |
|||
<pos x="50%" anchor="n"/> |
|||
<text>User %s will login in %d seconds</text> |
|||
<text xml:lang="az">%s istifadəçisi %d saniyə içində sistemə girəcəkdir</text> |
|||
<text xml:lang="ca">L'usuari %s entrarà en %d segons</text> |
|||
<text xml:lang="cs">Uživatel %s bude přihlášen za %d vteřin</text> |
|||
<text xml:lang="da">Brugeren %s logger på om %d sekunder</text> |
|||
<text xml:lang="de">Benutzer %s wird in %d Sekunden angemeldet</text> |
|||
<text xml:lang="es">El usuario %s accederá en %d segundos</text> |
|||
<text xml:lang="et">Kasutaja %s logitakse sisse %d sekundi pärast</text> |
|||
<text xml:lang="eu">%s erabiltzaileak %d segundo barru hasiko du saioa</text> |
|||
<text xml:lang="fi">käyttäjä %s kirjautuu %d sekunnin kuluttua</text> |
|||
<text xml:lang="fr">L'utilisateur %s se connectera dans %d secondes</text> |
|||
<text xml:lang="gl">A/O usuaria/o %s conectará en %d segundos</text> |
|||
<text xml:lang="hu">%s felhasználó beléptetése %d másodperc múlva</text> |
|||
<text xml:lang="it">L'utente %s effettuerà il login fra %d secondi</text> |
|||
<text xml:lang="ja">ユーザ%sは%d秒後にログイン</text> |
|||
<text xml:lang="ko">사용자 %s는 %d 초 이내에 로그인 하여야 합니다</text> |
|||
<text xml:lang="lt">Vartotojas %s bus prijungtas per %d sek.</text> |
|||
<text xml:lang="lv">Lietotājs %s ielogosies %d sekundēs</text> |
|||
<text xml:lang="ms">Pengguna %s akan logmasuk dalam %d saat</text> |
|||
<text xml:lang="nl">Gebruiker %s wordt aangemeld over %d seconden</text> |
|||
<text xml:lang="nn">Brukar %s vil logge inn om %d sekund</text> |
|||
<text xml:lang="no">Bruker %s vil logge på om %d sekunder</text> |
|||
<text xml:lang="pl">Użytkownik %s zostanie zalogowany w ciągu %d sekund</text> |
|||
<text xml:lang="pt">Utilizador %s iniciará sessão em %d segundos</text> |
|||
<text xml:lang="pt_BR">O usuário %s efetuará login em %d segundos</text> |
|||
<text xml:lang="ro">Utilizatorul %s va fi logat în %d secunde</text> |
|||
<text xml:lang="sk">Používateľ %s bude automaticky prihlásený za %d sekúnd</text> |
|||
<text xml:lang="sl">Uporabnik %s se bo prijavil v %d sekundah</text> |
|||
<text xml:lang="sv">Användaren %s kommer att logga in om %d sekunder</text> |
|||
<text xml:lang="tr">%s kullanıcısı %d saniye içinde giriş yapacak</text> |
|||
<text xml:lang="vi">Người dùng %s sẽ đăng nhập trong vòng %d giây</text> |
|||
<text xml:lang="zh_CN">用户 %s 将在 %d 秒后登录</text> |
|||
<text xml:lang="zh_TW">使用者 %s 將會在 %d 內登入</text> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
|
|||
<!-- |
|||
login error message |
|||
--> |
|||
|
|||
<item type="rect" id="pam-mess"> |
|||
<normal color="#ffffff" alpha="0.0"/> |
|||
<pos anchor="c" x="50%" y="78%" width="box" height="box"/> |
|||
<box orientation="vertical" min-width="400" xpadding="10" ypadding="5" spacing="0"> |
|||
<item type="label" id="pam-error"> |
|||
<pos anchor="n" x="50%"/> |
|||
<normal color="#ffffff" font="Arial Black 12"/> |
|||
<text/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
|
|||
</greeter> |
|||
|
After Width: 32 | Height: 32 | Size: 620 B |
After Width: 32 | Height: 32 | Size: 640 B |
After Width: 32 | Height: 32 | Size: 577 B |
After Width: 32 | Height: 32 | Size: 456 B |
After Width: 32 | Height: 32 | Size: 556 B |
After Width: 32 | Height: 32 | Size: 455 B |
After Width: 32 | Height: 32 | Size: 933 B |
After Width: 32 | Height: 32 | Size: 974 B |
After Width: 32 | Height: 32 | Size: 831 B |
After Width: 32 | Height: 32 | Size: 515 B |
After Width: 32 | Height: 32 | Size: 607 B |
After Width: 32 | Height: 32 | Size: 536 B |
After Width: 2240 | Height: 1680 | Size: 709 KiB |
After Width: 2240 | Height: 1680 | Size: 707 KiB |
After Width: 2240 | Height: 1680 | Size: 680 KiB |
After Width: 2240 | Height: 1680 | Size: 696 KiB |
After Width: 2240 | Height: 1680 | Size: 704 KiB |
@ -0,0 +1,9 @@ |
|||
# This is not really a .desktop file like the rest, but it's useful to treat |
|||
# it as such |
|||
|
|||
[GdmGreeterTheme] |
|||
Greeter=puesta_de_sol.xml |
|||
Name=puesta_de_sol |
|||
Description=La puesta de sol en la bahia de Almería (España). |
|||
Author=Pexi (jfestrada@gmail.com) |
|||
Screenshot=captura.png |
After Width: 1280 | Height: 1024 | Size: 195 KiB |
After Width: 374 | Height: 280 | Size: 135 KiB |
After Width: 1024 | Height: 760 | Size: 934 KiB |
@ -0,0 +1,372 @@ |
|||
<?xml version="1.0"?> |
|||
<!DOCTYPE greeter SYSTEM "greeter.dtd"> |
|||
<greeter> |
|||
<item type="pixmap"> |
|||
<normal file="background.jpg"/> |
|||
<pos x="0" y="0" width="100%" height="100%"/> |
|||
</item> |
|||
|
|||
|
|||
<item type="rect"> |
|||
<normal color="#ffffff" alpha="0"/> |
|||
<pos anchor="sw" x="0" y="-20" width="100%" height="20"/> |
|||
<fixed> |
|||
<item type="rect"> |
|||
<pos x="0" y="0" width="100%" height="100%"/> |
|||
<box orientation="horizontal" spacing="20" xpadding="10"> |
|||
<item type="rect" id="language_button" button="true"> |
|||
<normal color="#000000" alpha="0.0"/> |
|||
<pos y="50%" anchor="w" width="box" height="box"/> |
|||
<box orientation="horizontal" spacing="10" xpadding="10"> |
|||
<item type="label"> |
|||
<normal color="#cccccc" font="Sans 14"/> |
|||
<prelight color="#ffffff" font="Sans 14"/> |
|||
<active color="#ffffff" font="Sans 14"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<text>Language</text> |
|||
<text xml:lang="ca">Opció</text> |
|||
<text xml:lang="cs">Možnosti</text> |
|||
<text xml:lang="da">Indstillinger</text> |
|||
<text xml:lang="es">Opción</text> |
|||
<text xml:lang="et">Valikud</text> |
|||
<text xml:lang="fi">Valinta</text> |
|||
<text xml:lang="fr">Option</text> |
|||
<text xml:lang="ko">옵션</text> |
|||
<text xml:lang="lt">Parinktis</text> |
|||
<text xml:lang="ms">Opsyen</text> |
|||
<text xml:lang="nl">Optie</text> |
|||
<text xml:lang="no">Alternativ</text> |
|||
<text xml:lang="pl">Opcja</text> |
|||
<text xml:lang="pt">Opção</text> |
|||
<text xml:lang="sk">Možnosť</text> |
|||
<text xml:lang="sl">Možnost</text> |
|||
<text xml:lang="sv">Alternativ</text> |
|||
<text xml:lang="vi">Tùy chọn</text> |
|||
<text xml:lang="zh_TW">選項</text> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
<item type="rect" id="session_button" button="true"> |
|||
<normal color="#000000" alpha="0.0"/> |
|||
<pos y="50%" anchor="w" width="box" height="box"/> |
|||
<box orientation="horizontal" spacing="10" xpadding="10"> |
|||
<item type="label"> |
|||
<normal color="#cccccc" font="Sans 14"/> |
|||
<prelight color="#ffffff" font="Sans 14"/> |
|||
<active color="#ffffff" font="Sans 14"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<text>Session</text> |
|||
<text xml:lang="az">Iclas</text> |
|||
<text xml:lang="ca">Sessió</text> |
|||
<text xml:lang="cs">Sezení</text> |
|||
<text xml:lang="da">Session</text> |
|||
<text xml:lang="de">Sitzung</text> |
|||
<text xml:lang="el">Συνεδρία</text> |
|||
<text xml:lang="es">Sesión</text> |
|||
<text xml:lang="et">Sessioon</text> |
|||
<text xml:lang="eu">Saioa</text> |
|||
<text xml:lang="fi">Istunto</text> |
|||
<text xml:lang="fr">Session</text> |
|||
<text xml:lang="ga">Seisiún</text> |
|||
<text xml:lang="gl">Sesión</text> |
|||
<text xml:lang="hu">Munkafolyamat</text> |
|||
<text xml:lang="it">Sessione</text> |
|||
<text xml:lang="ja">セッション</text> |
|||
<text xml:lang="ko">세션</text> |
|||
<text xml:lang="lt">Sesija</text> |
|||
<text xml:lang="lv">Sesija</text> |
|||
<text xml:lang="ms">Sesi</text> |
|||
<text xml:lang="nl">Sessie</text> |
|||
<text xml:lang="nn">Økt</text> |
|||
<text xml:lang="no">Sesjon</text> |
|||
<text xml:lang="pl">Typ sesji</text> |
|||
<text xml:lang="pt">Sessão</text> |
|||
<text xml:lang="pt_BR">Sessões</text> |
|||
<text xml:lang="ro">Sesiune</text> |
|||
<text xml:lang="ru">Сеанс</text> |
|||
<text xml:lang="sk">Sedenie</text> |
|||
<text xml:lang="sl">Seja</text> |
|||
<text xml:lang="sv">Session</text> |
|||
<text xml:lang="ta">«Á÷×</text> |
|||
<text xml:lang="tr">Oturum</text> |
|||
<text xml:lang="uk">Сеанс</text> |
|||
<text xml:lang="vi">Session</text> |
|||
<text xml:lang="zh_CN">会话</text> |
|||
<text xml:lang="zh_TW">作業階段</text> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
<item type="rect" id="system_button" button="true"> |
|||
<normal color="#000000" alpha="0.0"/> |
|||
<show modes="console" type="system"/> |
|||
<pos y="50%" anchor="w" width="box" height="box"/> |
|||
<box orientation="horizontal" spacing="10" xpadding="10"> |
|||
<item type="label"> |
|||
<normal color="#cccccc" font="Sans 14"/> |
|||
<prelight color="#ffffff" font="Sans 14"/> |
|||
<active color="#ffffff" font="Sans 14"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<text>System</text> |
|||
<text xml:lang="az">Sistem</text> |
|||
<text xml:lang="ca">Sistema</text> |
|||
<text xml:lang="cs">Systém</text> |
|||
<text xml:lang="da">System</text> |
|||
<text xml:lang="de">System</text> |
|||
<text xml:lang="el">Σύστημα</text> |
|||
<text xml:lang="es">Sistema</text> |
|||
<text xml:lang="et">Süsteem</text> |
|||
<text xml:lang="eu">Sistema</text> |
|||
<text xml:lang="fi">Järjestelmä</text> |
|||
<text xml:lang="fr">Système</text> |
|||
<text xml:lang="ga">Corás</text> |
|||
<text xml:lang="gl">Sistema</text> |
|||
<text xml:lang="hu">Rendszer</text> |
|||
<text xml:lang="it">Sistema</text> |
|||
<text xml:lang="ja">システム</text> |
|||
<text xml:lang="ko">시스템</text> |
|||
<text xml:lang="lt">Sistema</text> |
|||
<text xml:lang="lv">Sistēma</text> |
|||
<text xml:lang="ms">Sistem</text> |
|||
<text xml:lang="nl">Systeem</text> |
|||
<text xml:lang="nn">System</text> |
|||
<text xml:lang="no">System</text> |
|||
<text xml:lang="pl">Systemowe</text> |
|||
<text xml:lang="pt">Sistema</text> |
|||
<text xml:lang="pt_BR">Sistema</text> |
|||
<text xml:lang="ro">Sistem</text> |
|||
<text xml:lang="ru">Система</text> |
|||
<text xml:lang="sk">Systém</text> |
|||
<text xml:lang="sl">Sistem</text> |
|||
<text xml:lang="sv">System</text> |
|||
<text xml:lang="ta">«¨ÁôÒ</text> |
|||
<text xml:lang="tr">Sistem</text> |
|||
<text xml:lang="uk">Система</text> |
|||
<text xml:lang="vi">Hệ thống</text> |
|||
<text xml:lang="zh_CN">系统</text> |
|||
<text xml:lang="zh_TW">系統</text> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
<item type="rect" id="disconnect_button" button="true"> |
|||
<normal color="#ffffff" alpha="0.0"/> |
|||
<show modes="flexi,remote"/> |
|||
<pos y="50%" anchor="w" width="box" height="box"/> |
|||
<box orientation="horizontal" spacing="10" xpadding="10"> |
|||
<item type="label"> |
|||
<normal color="#cccccc" font="Sans 14"/> |
|||
<prelight color="#ffffff" font="Sans 14"/> |
|||
<active color="#ffffff" font="Sans 14"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<text>Disconnect</text> |
|||
<text xml:lang="az">Bağlantını kəs</text> |
|||
<text xml:lang="ca">Desconnecta</text> |
|||
<text xml:lang="cs">Odpojit se</text> |
|||
<text xml:lang="da">Frakobl</text> |
|||
<text xml:lang="es">Desconectar</text> |
|||
<text xml:lang="et">Lahuta ühendus</text> |
|||
<text xml:lang="eu">Deskonektatu</text> |
|||
<text xml:lang="fi">Katkaise yhteys</text> |
|||
<text xml:lang="fr">Déconnecter</text> |
|||
<text xml:lang="gl">Desconectar</text> |
|||
<text xml:lang="it">Disconnetti</text> |
|||
<text xml:lang="ja">接続切断</text> |
|||
<text xml:lang="ko">연결 해제</text> |
|||
<text xml:lang="lt">Atsijungti</text> |
|||
<text xml:lang="lv">Atslēgties</text> |
|||
<text xml:lang="ms">Putus</text> |
|||
<text xml:lang="nl">Verbreek verbinding</text> |
|||
<text xml:lang="nn">Kople frå</text> |
|||
<text xml:lang="no">Koble fra</text> |
|||
<text xml:lang="pl">Rozłącz</text> |
|||
<text xml:lang="pt">Desligar</text> |
|||
<text xml:lang="pt_BR">Desconectar</text> |
|||
<text xml:lang="ro">Deconectează</text> |
|||
<text xml:lang="ru">Отключиться</text> |
|||
<text xml:lang="sk">Odpojiť</text> |
|||
<text xml:lang="sl">Odklopi se</text> |
|||
<text xml:lang="sv">Koppla från</text> |
|||
<text xml:lang="uk">Від'єднатись</text> |
|||
<text xml:lang="vi">Ngắt kết nối</text> |
|||
<text xml:lang="zh_CN">断开连接</text> |
|||
<text xml:lang="zh_TW">中斷連線</text> |
|||
<show modes="remote"/> |
|||
</item> |
|||
<item type="label"> |
|||
<normal color="#cccccc" font="Sans 14"/> |
|||
<prelight color="#ffffff" font="Sans 14"/> |
|||
<active color="#ffffff" font="Sans 14"/> |
|||
<pos y="50%" anchor="w"/> |
|||
<text>Quit</text> |
|||
<text xml:lang="az">Çıx</text> |
|||
<text xml:lang="ca">Surt</text> |
|||
<text xml:lang="cs">Konec</text> |
|||
<text xml:lang="da">Afslut</text> |
|||
<text xml:lang="de">Beenden</text> |
|||
<text xml:lang="es">Salir</text> |
|||
<text xml:lang="et">Lõpeta</text> |
|||
<text xml:lang="eu">Irten</text> |
|||
<text xml:lang="fi">Lopeta</text> |
|||
<text xml:lang="fr">Quitter</text> |
|||
<text xml:lang="gl">Saír</text> |
|||
<text xml:lang="hu">Kilépés</text> |
|||
<text xml:lang="it">Esci</text> |
|||
<text xml:lang="ja">終了</text> |
|||
<text xml:lang="ko">끝내기</text> |
|||
<text xml:lang="lt">Išeiti</text> |
|||
<text xml:lang="lv">Iziet</text> |
|||
<text xml:lang="ms">Keluar</text> |
|||
<text xml:lang="nl">Afsluiten</text> |
|||
<text xml:lang="nn">Avslutt</text> |
|||
<text xml:lang="no">Avslutt</text> |
|||
<text xml:lang="pl">Zakończ</text> |
|||
<text xml:lang="pt">Sair</text> |
|||
<text xml:lang="pt_BR">Sair</text> |
|||
<text xml:lang="ro">Renunţă</text> |
|||
<text xml:lang="ru">Выйти</text> |
|||
<text xml:lang="sk">Koniec</text> |
|||
<text xml:lang="sl">Izhod</text> |
|||
<text xml:lang="sv">Avsluta</text> |
|||
<text xml:lang="tr">Çık</text> |
|||
<text xml:lang="uk">Вийти</text> |
|||
<text xml:lang="vi">Thoát</text> |
|||
<text xml:lang="zh_CN">退出</text> |
|||
<text xml:lang="zh_TW">離開</text> |
|||
<show modes="flexi"/> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
<item type="label" id="clock"> |
|||
<normal color="#ffffff" font="Sans 15"/> |
|||
<pos anchor="ne" x="-15" y="0"/> |
|||
<text>%c</text> |
|||
</item> |
|||
</fixed> |
|||
</item> |
|||
|
|||
<item type="rect" id="caps-lock-warning"> |
|||
<normal color="#ffffff" alpha="0.5"/> |
|||
<pos anchor="c" x="50%" y="75%" width="box" height="box"/> |
|||
<box orientation="vertical" min-width="400" xpadding="10" ypadding="5" spacing="0"> |
|||
<item type="label"> |
|||
<normal color="#ffffff" font="Sans 12"/> |
|||
<pos x="50%" anchor="n"/> |
|||
<text>You've got capslock on!</text> |
|||
<text xml:lang="ca">Teniu capslock activat!</text> |
|||
<text xml:lang="da">Caps lock-tasten er slået til!</text> |
|||
<text xml:lang="es">Tiene activado el bloqueo de mayúsculas.</text> |
|||
<text xml:lang="et">Sul on caplock peal!</text> |
|||
<text xml:lang="fi">Sinulla on caps lock päällä!</text> |
|||
<text xml:lang="fr">Vous avez la touche Verr. Maj. activé !</text> |
|||
<text xml:lang="ko">Caps Lock이 켜져 있습니다!</text> |
|||
<text xml:lang="lt">Jūsų Caps Lock yra įjungtas!</text> |
|||
<text xml:lang="ms">Anda mempunyai capslock dihidupkan!</text> |
|||
<text xml:lang="nl">Caps-lock staat aan!</text> |
|||
<text xml:lang="no">Du har capslock på!</text> |
|||
<text xml:lang="pl">Włączony jest klawisz Caps Lock!</text> |
|||
<text xml:lang="pt">Tem o capslock ligado!</text> |
|||
<text xml:lang="sk">Máte zapnutý CAPS LOCK.</text> |
|||
<text xml:lang="sl">Vključene imate velike črke!</text> |
|||
<text xml:lang="sv">Du har CapsLock på!</text> |
|||
<text xml:lang="vi">Bạn đang bật CapsLock!</text> |
|||
<text xml:lang="zh_TW">請留意不要按下 capslock!</text> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
<item type="rect" id="timed-rect"> |
|||
<show type="timed"/> |
|||
<normal color="#ffffff" alpha="0.5"/> |
|||
<pos anchor="c" x="50%" y="25%" width="box" height="box"/> |
|||
<box orientation="vertical" min-width="400" xpadding="10" ypadding="5" spacing="0"> |
|||
<item type="label" id="timed-label"> |
|||
<normal color="#ffffff" font="Sans 12"/> |
|||
<pos x="50%" anchor="n"/> |
|||
<text>User %s will login in %d seconds</text> |
|||
<text xml:lang="az">%s istifadəçisi %d saniyə içində sistemə girəcəkdir</text> |
|||
<text xml:lang="ca">L'usuari %s entrarà en %d segons</text> |
|||
<text xml:lang="cs">Uživatel %s bude přihlášen za %d vteřin</text> |
|||
<text xml:lang="da">Brugeren %s logger på om %d sekunder</text> |
|||
<text xml:lang="de">Benutzer %s wird in %d Sekunden angemeldet</text> |
|||
<text xml:lang="es">El usuario %s accederá en %d segundos</text> |
|||
<text xml:lang="et">Kasutaja %s logitakse sisse %d sekundi pärast</text> |
|||
<text xml:lang="eu">%s erabiltzaileak %d segundo barru hasiko du saioa</text> |
|||
<text xml:lang="fi">käyttäjä %s kirjautuu %d sekunnin kuluttua</text> |
|||
<text xml:lang="fr">L'utilisateur %s se connectera dans %d secondes</text> |
|||
<text xml:lang="gl">A/O usuaria/o %s conectará en %d segundos</text> |
|||
<text xml:lang="hu">%s felhasználó beléptetése %d másodperc múlva</text> |
|||
<text xml:lang="it">L'utente %s effettuerà il login fra %d secondi</text> |
|||
<text xml:lang="ja">ユーザ%sは%d秒後にログイン</text> |
|||
<text xml:lang="ko">사용자 %s는 %d 초 이내에 로그인 하여야 합니다</text> |
|||
<text xml:lang="lt">Vartotojas %s bus prijungtas per %d sek.</text> |
|||
<text xml:lang="lv">Lietotājs %s ielogosies %d sekundēs</text> |
|||
<text xml:lang="ms">Pengguna %s akan logmasuk dalam %d saat</text> |
|||
<text xml:lang="nl">Gebruiker %s wordt aangemeld over %d seconden</text> |
|||
<text xml:lang="nn">Brukar %s vil logge inn om %d sekund</text> |
|||
<text xml:lang="no">Bruker %s vil logge på om %d sekunder</text> |
|||
<text xml:lang="pl">Użytkownik %s zostanie zalogowany w ciągu %d sekund</text> |
|||
<text xml:lang="pt">Utilizador %s iniciará sessão em %d segundos</text> |
|||
<text xml:lang="pt_BR">O usuário %s efetuará login em %d segundos</text> |
|||
<text xml:lang="ro">Utilizatorul %s va fi logat în %d secunde</text> |
|||
<text xml:lang="sk">Používateľ %s bude automaticky prihlásený za %d sekúnd</text> |
|||
<text xml:lang="sl">Uporabnik %s se bo prijavil v %d sekundah</text> |
|||
<text xml:lang="sv">Användaren %s kommer att logga in om %d sekunder</text> |
|||
<text xml:lang="tr">%s kullanıcısı %d saniye içinde giriş yapacak</text> |
|||
<text xml:lang="vi">Người dùng %s sẽ đăng nhập trong vòng %d giây</text> |
|||
<text xml:lang="zh_CN">用户 %s 将在 %d 秒后登录</text> |
|||
<text xml:lang="zh_TW">使用者 %s 將會在 %d 內登入</text> |
|||
</item> |
|||
</box> |
|||
</item> |
|||
<item type="rect"> |
|||
<normal color="#955623" alpha="0"/> |
|||
<pos anchor="c" x="75%" y="26%" width="box" height="box"/> |
|||
<box orientation="vertical" min-width="300" xpadding="30" ypadding="30" spacing="10"> |
|||
<item type="label"> |
|||
<pos anchor="n" x="50%"/> |
|||
<normal color="#ffffff" font="Sans 12"/> |
|||
<text>Welcome at %h</text> |
|||
<text xml:lang="ca">Benvingut a %h</text> |
|||
<text xml:lang="cs">Vítejte na %h</text> |
|||
<text xml:lang="da">Velkommen til %h</text> |
|||
<text xml:lang="es">Bienvenido a %h</text> |
|||
<text xml:lang="et">Tere tulemast masinasse %h</text> |
|||
<text xml:lang="fi">%h - tervetuloa.</text> |
|||
<text xml:lang="fr">Bienvenue sur %h</text> |
|||
<text xml:lang="ko">%n에 오신 것을 환영합니다</text> |
|||
<text xml:lang="lt">Sveiki atvykę į %h</text> |
|||
<text xml:lang="ms">Selamat Datang ke %h</text> |
|||
<text xml:lang="nl">Welkom bij %h</text> |
|||
<text xml:lang="no">Velkommen til %h</text> |
|||
<text xml:lang="pl">Witaj w systemie %h</text> |
|||
<text xml:lang="pt">Bem Vindo ao %h</text> |
|||
<text xml:lang="sk">Víta vás %h</text> |
|||
<text xml:lang="sl">Dobrodošli na %h</text> |
|||
<text xml:lang="sv">Välkommen till %h</text> |
|||
<text xml:lang="vi">Chào mừng tới %h</text> |
|||
<text xml:lang="zh_TW">歡迎來到 %h</text> |
|||
</item> |
|||
<item type="rect"> |
|||
<normal color="#ffffff"/> |
|||
<pos anchor="n" x="50%" height="24" width="80%"/> |
|||
<fixed> |
|||
<item type="entry" id="user-pw-entry"> |
|||
<pos anchor="nw" x="1" y="1" height="-2" width="-2"/> |
|||
</item> |
|||
</fixed> |
|||
</item> |
|||
<item type="label" id="pam-message"> |
|||
<pos anchor="n" x="50%"/> |
|||
<normal color="#ffffff" font="Sans 12"/> |
|||
<text/> |
|||
</item> |
|||
</box> |
|||
<fixed> |
|||
<item type="label" id="pam-error"> |
|||
<pos anchor="n" x="50%" y="110%"/> |
|||
<normal color="#ffffff" font="Sans 12"/> |
|||
<text/> |
|||
</item> |
|||
</fixed> |
|||
</item> |
|||
</greeter> |
@ -0,0 +1,115 @@ |
|||
# SimpleGladeApp.py |
|||
# Module that provides an object oriented abstraction to pygtk and libglade. |
|||
# Copyright (C) 2004 Sandino Flores Moreno |
|||
|
|||
# This library is free software; you can redistribute it and/or |
|||
# modify it under the terms of the GNU Lesser General Public |
|||
# License as published by the Free Software Foundation; either |
|||
# version 2.1 of the License, or (at your option) any later version. |
|||
# |
|||
# This library is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
# Lesser General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Lesser General Public |
|||
# License along with this library; if not, write to the Free Software |
|||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
|||
# USA |
|||
|
|||
try: |
|||
import os |
|||
import sys |
|||
import gtk |
|||
import gtk.glade |
|||
except ImportError: |
|||
print "Error importing pygtk2 and pygtk2-libglade" |
|||
sys.exit(1) |
|||
|
|||
class SimpleGladeApp(dict): |
|||
def __init__(self, glade_filename, main_widget_name=None, domain=None): |
|||
gtk.glade.set_custom_handler(self.custom_handler) |
|||
if os.path.isfile(glade_filename): |
|||
self.glade_path = glade_filename |
|||
else: |
|||
glade_dir = os.path.split( sys.argv[0] )[0] |
|||
self.glade_path = os.path.join(glade_dir, glade_filename) |
|||
self.glade = gtk.glade.XML(self.glade_path, main_widget_name, domain) |
|||
if main_widget_name: |
|||
self.main_widget = self.glade.get_widget(main_widget_name) |
|||
else: |
|||
self.main_widget = None |
|||
self.signal_autoconnect() |
|||
self.new() |
|||
|
|||
def signal_autoconnect(self): |
|||
signals = {} |
|||
for attr_name in dir(self): |
|||
attr = getattr(self, attr_name) |
|||
if callable(attr): |
|||
signals[attr_name] = attr |
|||
self.glade.signal_autoconnect(signals) |
|||
|
|||
def custom_handler(self, |
|||
glade, function_name, widget_name, |
|||
str1, str2, int1, int2): |
|||
if hasattr(self, function_name): |
|||
handler = getattr(self, function_name) |
|||
return handler(str1, str2, int1, int2) |
|||
|
|||
def __getattr__(self, data_name): |
|||
if data_name in self: |
|||
data = self[data_name] |
|||
return data |
|||
else: |
|||
widget = self.glade.get_widget(data_name) |
|||
if widget != None: |
|||
self[data_name] = widget |
|||
return widget |
|||
else: |
|||
raise AttributeError, data_name |
|||
|
|||
def __setattr__(self, name, value): |
|||
self[name] = value |
|||
|
|||
def new(self): |
|||
pass |
|||
|
|||
def on_keyboard_interrupt(self): |
|||
pass |
|||
|
|||
def gtk_widget_show(self, widget, *args): |
|||
widget.show() |
|||
|
|||
def gtk_widget_hide(self, widget, *args): |
|||
widget.hide() |
|||
|
|||
def gtk_widget_grab_focus(self, widget, *args): |
|||
widget.grab_focus() |
|||
|
|||
def gtk_widget_destroy(self, widget, *args): |
|||
widget.destroy() |
|||
|
|||
def gtk_window_activate_default(self, widget, *args): |
|||
widget.activate_default() |
|||
|
|||
def gtk_true(self, *args): |
|||
return gtk.TRUE |
|||
|
|||
def gtk_false(self, *args): |
|||
return gtk.FALSE |
|||
|
|||
def gtk_main_quit(self, *args): |
|||
gtk.main_quit() |
|||
|
|||
def main(self): |
|||
gtk.main() |
|||
|
|||
def quit(self): |
|||
gtk.main_quit() |
|||
|
|||
def run(self): |
|||
try: |
|||
self.main() |
|||
except KeyboardInterrupt: |
|||
self.on_keyboard_interrupt() |
@ -0,0 +1,442 @@ |
|||
#!/usr/bin/env python |
|||
|
|||
# simple-glade-codegen.py |
|||
# A code generator that uses pygtk, glade and SimpleGladeApp.py |
|||
# Copyright (C) 2004 Sandino Flores Moreno |
|||
|
|||
# This library is free software; you can redistribute it and/or |
|||
# modify it under the terms of the GNU Lesser General Public |
|||
# License as published by the Free Software Foundation; either |
|||
# version 2.1 of the License, or (at your option) any later version. |
|||
# |
|||
# This library is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
# Lesser General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Lesser General Public |
|||
# License along with this library; if not, write to the Free Software |
|||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
|||
# USA |
|||
|
|||
import sys, os, re, codecs |
|||
import tokenize, shutil, time |
|||
import xml.sax |
|||
from xml.sax._exceptions import SAXParseException |
|||
|
|||
header_format = """\ |
|||
#!/usr/bin/env python |
|||
# -*- coding: UTF8 -*- |
|||
|
|||
# Python module %(module)s.py |
|||
# Autogenerated from %(glade)s |
|||
# Generated on %(date)s |
|||
|
|||
# Warning: Do not delete or modify comments related to context |
|||
# They are required to keep user's code |
|||
|
|||
import os, gtk |
|||
from SimpleGladeApp import SimpleGladeApp |
|||
|
|||
glade_dir = "" |
|||
|
|||
# Put your modules and data here |
|||
|
|||
# From here through main() codegen inserts/updates a class for |
|||
# every top-level widget in the .glade file. |
|||
|
|||
""" |
|||
|
|||
class_format = """\ |
|||
class %(class)s(SimpleGladeApp): |
|||
%(t)sdef __init__(self, glade_path="%(glade)s", root="%(root)s", domain=None): |
|||
%(t)s%(t)sglade_path = os.path.join(glade_dir, glade_path) |
|||
%(t)s%(t)sSimpleGladeApp.__init__(self, glade_path, root, domain) |
|||
|
|||
%(t)sdef new(self): |
|||
%(t)s%(t)s#context %(class)s.new { |
|||
%(t)s%(t)sprint "A new %(class)s has been created" |
|||
%(t)s%(t)s#context %(class)s.new } |
|||
|
|||
%(t)s#context %(class)s custom methods { |
|||
%(t)s#--- Write your own methods here ---# |
|||
%(t)s#context %(class)s custom methods } |
|||
|
|||
""" |
|||
|
|||
callback_format = """\ |
|||
%(t)sdef %(handler)s(self, widget, *args): |
|||
%(t)s%(t)s#context %(class)s.%(handler)s { |
|||
%(t)s%(t)sprint "%(handler)s called with self.%%s" %% widget.get_name() |
|||
%(t)s%(t)s#context %(class)s.%(handler)s } |
|||
|
|||
""" |
|||
|
|||
creation_format = """\ |
|||
%(t)sdef %(handler)s(self, str1, str2, int1, int2): |
|||
%(t)s%(t)s#context %(class)s.%(handler)s { |
|||
%(t)s%(t)swidget = gtk.Label("%(handler)s") |
|||
%(t)s%(t)swidget.show_all() |
|||
%(t)s%(t)sreturn widget |
|||
%(t)s%(t)s#context %(class)s.%(handler)s } |
|||
|
|||
""" |
|||
|
|||
main_format = """\ |
|||
def main(): |
|||
""" |
|||
|
|||
instance_format = """\ |
|||
%(t)s%(root)s = %(class)s() |
|||
""" |
|||
run_format = """\ |
|||
|
|||
%(t)s%(root)s.run() |
|||
|
|||
if __name__ == "__main__": |
|||
%(t)smain() |
|||
""" |
|||
|
|||
class NotGladeDocumentException(SAXParseException): |
|||
def __init__(self, glade_writer): |
|||
strerror = "Not a glade-2 document" |
|||
SAXParseException.__init__(self, strerror, None, glade_writer.sax_parser) |
|||
|
|||
class SimpleGladeCodeWriter(xml.sax.handler.ContentHandler): |
|||
def __init__(self, glade_file): |
|||
self.indent = "\t" |
|||
self.code = "" |
|||
self.roots_list = [] |
|||
self.widgets_stack = [] |
|||
self.creation_functions = [] |
|||
self.callbacks = [] |
|||
self.parent_is_creation_function = False |
|||
self.glade_file = glade_file |
|||
self.data = {} |
|||
self.input_dir, self.input_file = os.path.split(glade_file) |
|||
base = os.path.splitext(self.input_file)[0] |
|||
module = self.normalize_symbol(base) |
|||
self.output_file = os.path.join(self.input_dir, module) + ".py" |
|||
self.sax_parser = xml.sax.make_parser() |
|||
self.sax_parser.setFeature(xml.sax.handler.feature_external_ges, False) |
|||
self.sax_parser.setContentHandler(self) |
|||
self.data["glade"] = self.input_file |
|||
self.data["module"] = module |
|||
self.data["date"] = time.asctime() |
|||
|
|||
def normalize_symbol(self, base): |
|||
return "_".join( re.findall(tokenize.Name, base) ) |
|||
|
|||
def capitalize_symbol(self, base): |
|||
ClassName = "[a-zA-Z0-9]+" |
|||
base = self.normalize_symbol(base) |
|||
capitalize_map = lambda s : s[0].upper() + s[1:] |
|||
return "".join( map(capitalize_map, re.findall(ClassName, base)) ) |
|||
|
|||
def uncapitalize_symbol(self, base): |
|||
InstanceName = "([a-z])([A-Z])" |
|||
action = lambda m: "%s_%s" % ( m.groups()[0], m.groups()[1].lower() ) |
|||
base = self.normalize_symbol(base) |
|||
base = base[0].lower() + base[1:] |
|||
return re.sub(InstanceName, action, base) |
|||
|
|||
def startElement(self, name, attrs): |
|||
if name == "widget": |
|||
widget_id = attrs.get("id") |
|||
widget_class = attrs.get("class") |
|||
if not widget_id or not widget_class: |
|||
raise NotGladeDocumentException(self) |
|||
if not self.widgets_stack: |
|||
self.creation_functions = [] |
|||
self.callbacks = [] |
|||
class_name = self.capitalize_symbol(widget_id) |
|||
self.data["class"] = class_name |
|||
self.data["root"] = widget_id |
|||
self.roots_list.append(widget_id) |
|||
self.code += class_format % self.data |
|||
self.widgets_stack.append(widget_id) |
|||
elif name == "signal": |
|||
if not self.widgets_stack: |
|||
raise NotGladeDocumentException(self) |
|||
widget = self.widgets_stack[-1] |
|||
signal_object = attrs.get("object") |
|||
if signal_object: |
|||
return |
|||
handler = attrs.get("handler") |
|||
if not handler: |
|||
raise NotGladeDocumentException(self) |
|||
if handler.startswith("gtk_"): |
|||
return |
|||
signal = attrs.get("name") |
|||
if not signal: |
|||
raise NotGladeDocumentException(self) |
|||
self.data["widget"] = widget |
|||
self.data["signal"] = signal |
|||
self.data["handler"]= handler |
|||
if handler not in self.callbacks: |
|||
self.code += callback_format % self.data |
|||
self.callbacks.append(handler) |
|||
elif name == "property": |
|||
if not self.widgets_stack: |
|||
raise NotGladeDocumentException(self) |
|||
widget = self.widgets_stack[-1] |
|||
prop_name = attrs.get("name") |
|||
if not prop_name: |
|||
raise NotGladeDocumentException(self) |
|||
if prop_name == "creation_function": |
|||
self.parent_is_creation_function = True |
|||
|
|||
def characters(self, content): |
|||
if self.parent_is_creation_function: |
|||
if not self.widgets_stack: |
|||
raise NotGladeDocumentException(self) |
|||
handler = content.strip() |
|||
if handler not in self.creation_functions: |
|||
self.data["handler"] = handler |
|||
self.code += creation_format % self.data |
|||
self.creation_functions.append(handler) |
|||
|
|||
def endElement(self, name): |
|||
if name == "property": |
|||
self.parent_is_creation_function = False |
|||
elif name == "widget": |
|||
if not self.widgets_stack: |
|||
raise NotGladeDocumentException(self) |
|||
self.widgets_stack.pop() |
|||
|
|||
def write(self): |
|||
self.data["t"] = self.indent |
|||
self.code += header_format % self.data |
|||
try: |
|||
glade = open(self.glade_file, "r") |
|||
self.sax_parser.parse(glade) |
|||
except xml.sax._exceptions.SAXParseException, e: |
|||
sys.stderr.write("Error parsing document\n") |
|||
return None |
|||
except IOError, e: |
|||
sys.stderr.write("%s\n" % e.strerror) |
|||
return None |
|||
|
|||
self.code += main_format % self.data |
|||
|
|||
for root in self.roots_list: |
|||
self.data["class"] = self.capitalize_symbol(root) |
|||
self.data["root"] = self.uncapitalize_symbol(root) |
|||
self.code += instance_format % self.data |
|||
|
|||
self.data["root"] = self.uncapitalize_symbol(self.roots_list[0]) |
|||
self.code += run_format % self.data |
|||
|
|||
try: |
|||
self.output = codecs.open(self.output_file, "w", "utf-8") |
|||
self.output.write(self.code) |
|||
self.output.close() |
|||
except IOError, e: |
|||
sys.stderr.write("%s\n" % e.strerror) |
|||
return None |
|||
return self.output_file |
|||
|
|||
def usage(): |
|||
program = sys.argv[0] |
|||
print """\ |
|||
Write a simple python file from a glade file. |
|||
Usage: %s <file.glade> |
|||
""" % program |
|||
|
|||
def which(program): |
|||
if sys.platform.startswith("win"): |
|||
exe_ext = ".exe" |
|||
else: |
|||
exe_ext = "" |
|||
path_list = os.environ["PATH"].split(os.pathsep) |
|||
for path in path_list: |
|||
program_path = os.path.join(path, program) + exe_ext |
|||
if os.path.isfile(program_path): |
|||
return program_path |
|||
return None |
|||
|
|||
def check_for_programs(): |
|||
packages = {"diff" : "diffutils", "patch" : "patch"} |
|||
for package in packages.keys(): |
|||
if not which(package): |
|||
sys.stderr.write("Required program %s could not be found\n" % package) |
|||
sys.stderr.write("Is the package %s installed?\n" % packages[package]) |
|||
if sys.platform.startswith("win"): |
|||
sys.stderr.write("Download it from http://gnuwin32.sourceforge.net/packages.html\n") |
|||
sys.stderr.write("Also, be sure it is in the PATH\n") |
|||
return False |
|||
return True |
|||
|
|||
def main(): |
|||
if not check_for_programs(): |
|||
return -1 |
|||
if len(sys.argv) == 2: |
|||
code_writer = SimpleGladeCodeWriter( sys.argv[1] ) |
|||
glade_file = code_writer.glade_file |
|||
output_file = code_writer.output_file |
|||
output_file_orig = output_file + ".orig" |
|||
output_file_bak = output_file + ".bak" |
|||
short_f = os.path.split(output_file)[1] |
|||
short_f_orig = short_f + ".orig" |
|||
short_f_bak = short_f + ".bak" |
|||
helper_module = os.path.join(code_writer.input_dir,SimpleGladeApp_py) |
|||
custom_diff = "custom.diff" |
|||
|
|||
exists_output_file = os.path.exists(output_file) |
|||
exists_output_file_orig = os.path.exists(output_file_orig) |
|||
if not exists_output_file_orig and exists_output_file: |
|||
sys.stderr.write('File "%s" exists\n' % short_f) |
|||
sys.stderr.write('but "%s" does not.\n' % short_f_orig) |
|||
sys.stderr.write("That means your custom code would be overwritten.\n") |
|||
sys.stderr.write('Please manually remove "%s"\n' % short_f) |
|||
sys.stderr.write("from this directory.\n") |
|||
sys.stderr.write("Anyway, I\'ll create a backup for you in\n") |
|||
sys.stderr.write('"%s"\n' % short_f_bak) |
|||
shutil.copy(output_file, output_file_bak) |
|||
return -1 |
|||
if exists_output_file_orig and exists_output_file: |
|||
os.system("diff -U1 %s %s > %s" % (output_file_orig, output_file, custom_diff) ) |
|||
if not code_writer.write(): |
|||
os.remove(custom_diff) |
|||
return -1 |
|||
shutil.copy(output_file, output_file_orig) |
|||
if os.system("patch -fp0 < %s" % custom_diff): |
|||
os.remove(custom_diff) |
|||
return -1 |
|||
os.remove(custom_diff) |
|||
else: |
|||
if not code_writer.write(): |
|||
return -1 |
|||
shutil.copy(output_file, output_file_orig) |
|||
os.chmod(output_file, 0755) |
|||
if not os.path.isfile(helper_module): |
|||
open(helper_module, "w").write(SimpleGladeApp_content) |
|||
print "Wrote", output_file |
|||
return 0 |
|||
else: |
|||
usage() |
|||
return -1 |
|||
|
|||
SimpleGladeApp_py = "SimpleGladeApp.py" |
|||
|
|||
SimpleGladeApp_content = """\ |
|||
# SimpleGladeApp.py |
|||
# Module that provides an object oriented abstraction to pygtk and libglade. |
|||
# Copyright (C) 2004 Sandino Flores Moreno |
|||
|
|||
# This library is free software; you can redistribute it and/or |
|||
# modify it under the terms of the GNU Lesser General Public |
|||
# License as published by the Free Software Foundation; either |
|||
# version 2.1 of the License, or (at your option) any later version. |
|||
# |
|||
# This library is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
# Lesser General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Lesser General Public |
|||
# License along with this library; if not, write to the Free Software |
|||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
|||
# USA |
|||
|
|||
try: |
|||
import os |
|||
import sys |
|||
import gtk |
|||
import gtk.glade |
|||
except ImportError: |
|||
print "Error importing pygtk2 and pygtk2-libglade" |
|||
sys.exit(1) |
|||
|
|||
class SimpleGladeApp(dict): |
|||
def __init__(self, glade_filename, main_widget_name=None, domain=None): |
|||
gtk.glade.set_custom_handler(self.custom_handler) |
|||
if os.path.isfile(glade_filename): |
|||
self.glade_path = glade_filename |
|||
else: |
|||
glade_dir = os.path.split( sys.argv[0] )[0] |
|||
self.glade_path = os.path.join(glade_dir, glade_filename) |
|||
self.glade = gtk.glade.XML(self.glade_path, main_widget_name, domain) |
|||
if main_widget_name: |
|||
self.main_widget = self.glade.get_widget(main_widget_name) |
|||
else: |
|||
self.main_widget = None |
|||
self.signal_autoconnect() |
|||
self.new() |
|||
|
|||
def signal_autoconnect(self): |
|||
signals = {} |
|||
for attr_name in dir(self): |
|||
attr = getattr(self, attr_name) |
|||
if callable(attr): |
|||
signals[attr_name] = attr |
|||
self.glade.signal_autoconnect(signals) |
|||
|
|||
def custom_handler(self, |
|||
glade, function_name, widget_name, |
|||
str1, str2, int1, int2): |
|||
if hasattr(self, function_name): |
|||
handler = getattr(self, function_name) |
|||
return handler(str1, str2, int1, int2) |
|||
|
|||
def __getattr__(self, data_name): |
|||
if data_name in self: |
|||
data = self[data_name] |
|||
return data |
|||
else: |
|||
widget = self.glade.get_widget(data_name) |
|||
if widget != None: |
|||
self[data_name] = widget |
|||
return widget |
|||
else: |
|||
raise AttributeError, data_name |
|||
|
|||
def __setattr__(self, name, value): |
|||
self[name] = value |
|||
|
|||
def new(self): |
|||
pass |
|||
|
|||
def on_keyboard_interrupt(self): |
|||
pass |
|||
|
|||
def gtk_widget_show(self, widget, *args): |
|||
widget.show() |
|||
|
|||
def gtk_widget_hide(self, widget, *args): |
|||
widget.hide() |
|||
|
|||
def gtk_widget_grab_focus(self, widget, *args): |
|||
widget.grab_focus() |
|||
|
|||
def gtk_widget_destroy(self, widget, *args): |
|||
widget.destroy() |
|||
|
|||
def gtk_window_activate_default(self, widget, *args): |
|||
widget.activate_default() |
|||
|
|||
def gtk_true(self, *args): |
|||
return gtk.TRUE |
|||
|
|||
def gtk_false(self, *args): |
|||
return gtk.FALSE |
|||
|
|||
def gtk_main_quit(self, *args): |
|||
gtk.main_quit() |
|||
|
|||
def main(self): |
|||
gtk.main() |
|||
|
|||
def quit(self): |
|||
gtk.main_quit() |
|||
|
|||
def run(self): |
|||
try: |
|||
self.main() |
|||
except KeyboardInterrupt: |
|||
self.on_keyboard_interrupt() |
|||
""" |
|||
|
|||
if __name__ == "__main__": |
|||
exit_code = main() |
|||
sys.exit(exit_code) |
After Width: 276 | Height: 202 | Size: 4.9 KiB |
After Width: 276 | Height: 202 | Size: 3.5 KiB |
After Width: 552 | Height: 404 | Size: 9.4 KiB |