[POS-commit] r1155 - fiscalprinter/trunk/fiscalprinter/gui

Adriano Monteiro Marques pyone at async.com.br
Fri Sep 9 09:36:13 BRT 2005


Author: pyone
Date: Thu Sep  8 18:59:13 2005
New Revision: 1155

Added:
   fiscalprinter/trunk/fiscalprinter/gui/main.glade
   fiscalprinter/trunk/fiscalprinter/gui/main.py
Log:
Changed MainWindow to main


Added: fiscalprinter/trunk/fiscalprinter/gui/main.glade
==============================================================================
--- (empty file)
+++ fiscalprinter/trunk/fiscalprinter/gui/main.glade	Thu Sep  8 18:59:13 2005
@@ -0,0 +1,192 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://gazpacho.sicem.biz/gazpacho-0.1.dtd">
+<glade-interface>
+    <object class="GtkUIManager" id="uimanager">
+        <child>
+            <object class="GtkActionGroup" id="DefaultActions">
+                <child>
+                    <object class="GtkAction" id="Copy">
+                        <property name="name">Copy</property>
+                        <property name="tooltip">Copy selected object into the clipboard</property>
+                        <property name="stock_id">gtk-copy</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="Cut">
+                        <property name="name">Cut</property>
+                        <property name="tooltip">Cut selected object into the clipboard</property>
+                        <property name="stock_id">gtk-cut</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="EditMenu">
+                        <property name="name">EditMenu</property>
+                        <property name="label" translatable="yes">_Edit</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="FileMenu">
+                        <property name="name">FileMenu</property>
+                        <property name="label" translatable="yes">_File</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="New">
+                        <property name="name">New</property>
+                        <property name="tooltip">Create a new file</property>
+                        <property name="stock_id">gtk-new</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="Open">
+                        <property name="name">Open</property>
+                        <property name="tooltip">Open a file</property>
+                        <property name="stock_id">gtk-open</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="Paste">
+                        <property name="name">Paste</property>
+                        <property name="tooltip">Paste object from the Clipboard</property>
+                        <property name="stock_id">gtk-paste</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="Quit">
+                        <property name="name">Quit</property>
+                        <property name="tooltip">Quit the program</property>
+                        <property name="stock_id">gtk-quit</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="Save">
+                        <property name="name">Save</property>
+                        <property name="tooltip">Save a file</property>
+                        <property name="stock_id">gtk-save</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="SaveAs">
+                        <property name="name">SaveAs</property>
+                        <property name="tooltip">Save with a different name</property>
+                        <property name="stock_id">gtk-save-as</property>
+                    </object>
+                </child>
+            </object>
+        </child>
+        <child>
+            <object class="GtkActionGroup" id="Printer">
+                <child>
+                    <object class="GtkAction" id="connect_printer">
+                        <property name="name">connect_printer</property>
+                        <property name="label" translatable="yes">Connect to Printer</property>
+                        <property name="tooltip">Connect to Fiscal Printer</property>
+                        <property name="stock_id">gtk-print</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="printer">
+                        <property name="name">printer</property>
+                        <property name="label" translatable="yes">Printer</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="summarize">
+                        <property name="name">summarize</property>
+                        <property name="label" translatable="yes">Summarize</property>
+                        <property name="stock_id">gtk-add</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="summarize_close">
+                        <property name="name">summarize_close</property>
+                        <property name="label" translatable="yes">Summarize and close</property>
+                        <property name="stock_id">gtk-close</property>
+                    </object>
+                </child>
+            </object>
+        </child>
+        <child>
+            <object class="GtkActionGroup" id="Coupon">
+                <child>
+                    <object class="GtkAction" id="cancel_last_coupon">
+                        <property name="name">cancel_last_coupon</property>
+                        <property name="label" translatable="yes">Cancel last coupon</property>
+                        <property name="stock_id">gtk-cancel</property>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkAction" id="coupon">
+                        <property name="name">coupon</property>
+                        <property name="label" translatable="yes">Coupon</property>
+                    </object>
+                </child>
+            </object>
+        </child>
+        <ui id="initial-state"><![CDATA[<ui><menubar action="menubar1" name="menubar1">
+  
+  
+<menu action="printer" name="printer"><menuitem action="connect_printer" name="connect_printer"/><separator/><menuitem action="summarize" name="summarize"/><menuitem action="summarize_close" name="summarize_close"/><separator/><menuitem action="Quit" name="Quit"/></menu><menu action="coupon" name="coupon"><menuitem action="cancel_last_coupon" name="cancel_last_coupon"/></menu></menubar></ui>]]></ui>
+    </object>
+    <widget class="GtkWindow" id="MainWindow">
+        <property name="default_height">250</property>
+        <property name="default_width">440</property>
+        <property name="title" context="yes" translatable="yes">FiscalPrinter </property>
+        <child>
+            <widget class="GtkVBox" id="vbox1">
+                <property name="visible">True</property>
+                <child>
+                    <widget constructor="initial-state" class="GtkMenuBar" id="menubar1">
+                        <property name="visible">True</property>
+                    </widget>
+                    <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                    </packing>
+                </child>
+                <child>
+                    <widget class="GtkNotebook" id="notebook1">
+                        <property name="is_focus">True</property>
+                        <property name="visible">True</property>
+                        <child>
+                            <widget class="GtkVBox" id="vbox2">
+                                <property name="visible">True</property>
+                                <child>
+                                    <placeholder/>
+                                </child>
+                            </widget>
+                            <packing>
+                                <property name="tab_label" context="yes" translatable="yes">Monitor</property>
+                            </packing>
+                        </child>
+                        <child>
+                            <widget class="GtkVBox" id="vbox3">
+                                <property name="visible">True</property>
+                                <child>
+                                    <placeholder/>
+                                </child>
+                            </widget>
+                            <packing>
+                                <property name="position">1</property>
+                                <property name="tab_label" context="yes" translatable="yes">Status</property>
+                            </packing>
+                        </child>
+                    </widget>
+                    <packing>
+                        <property name="position">1</property>
+                    </packing>
+                </child>
+                <child>
+                    <widget class="GtkStatusbar" id="statusbar1">
+                        <property name="visible">True</property>
+                    </widget>
+                    <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">2</property>
+                    </packing>
+                </child>
+            </widget>
+        </child>
+    </widget>
+</glade-interface>

Added: fiscalprinter/trunk/fiscalprinter/gui/main.py
==============================================================================
--- (empty file)
+++ fiscalprinter/trunk/fiscalprinter/gui/main.py	Thu Sep  8 18:59:13 2005
@@ -0,0 +1,39 @@
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright (C) 2004 Cleber Rodrigues
+
+_ = str
+
+import gtk
+
+from kiwi.environ import require_gazpacho
+require_gazpacho()
+
+from kiwi.datatypes import ValidationError
+from kiwi.ui.delegates import Delegate
+
+class MainWindow(Delegate):
+    def __init__(self):
+        Delegate.__init__(self, 
+                                    gladefile='MainWindow',
+                                    delete_handler=self.quit_cb)
+
+
+    def quit_cb(self, widget, extra=None):
+        gtk.main_quit()
+
+m = MainWindow()
+m.show_all()
+gtk.main()


More information about the POS-commit mailing list