#! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
try:
import pygtk
pygtk.require("2.0")
import gobject
except:
print("pygtk Not Availible")
sys.exit(1)
try:
import gtk
except:
print("GTK Not Availible")
sys.exit(1)
import functions
class Stock_Class(object):
def __init__(self, parent):
self._ = parent._
gtk.STOCK_IMPORT = 'gtk.STOCK_IMPORT'
gtk.STOCK_EXPORT = 'gtk.STOCK_EXPORT'
gtk.STOCK_RANDOM_CASE = 'gtk.STOCK_RANDOM_CASE'
gtk.STOCK_ADD_ALL = 'gtk.STOCK_ADD_ALL'
gtk.STOCK_START_EDIT = 'gtk.STOCK_START_EDIT'
gtk.STOCK_CLEAR_REFRESH = 'gtk.STOCK_CLEAR_REFRESH'
gtk.STOCK_DATE = 'gtk.STOCK_DATE'
gtk.STOCK_SAVE_AS_INITIAL_TABLE = 'gtk.STOCK_SAVE_AS_INITIAL_TABLE'
gtk.STOCK_INFORMATION = gtk.STOCK_INFO
self.factory = gtk.IconFactory()
self.factory.add_default()
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'import.png')
functions.add_icon(gtk.STOCK_IMPORT, self._('import'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'export.png')
functions.add_icon(gtk.STOCK_EXPORT, self._('export'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'random-case.png')
functions.add_icon(gtk.STOCK_RANDOM_CASE, self._('random_case'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'add-all.png')
functions.add_icon(gtk.STOCK_ADD_ALL, self._('add_all'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'start-edit.png')
functions.add_icon(gtk.STOCK_START_EDIT, self._('start_edit'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'clear-refresh.png')
functions.add_icon(gtk.STOCK_CLEAR_REFRESH, self._('clear_refresh'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'dialog-apply.png')
functions.add_icon(gtk.STOCK_APPLY, self._('apply'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'dialog-cancel.png')
functions.add_icon(gtk.STOCK_CANCEL, self._('cancel'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'dialog-apply.png')
functions.add_icon(gtk.STOCK_OK, self._('ok'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'network-transmit-receive.png')
functions.add_icon(gtk.STOCK_CONNECT, self._('connected'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'list-add.png')
functions.add_icon(gtk.STOCK_ADD, self._('add'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'edit-delete.png')
functions.add_icon(gtk.STOCK_DELETE, self._('delete'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'document-new.png')
functions.add_icon(gtk.STOCK_NEW, self._('new'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'document-open.png')
functions.add_icon(gtk.STOCK_OPEN, self._('open'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'document-save.png')
functions.add_icon(gtk.STOCK_SAVE, self._('save'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'preferences-system.png')
functions.add_icon(gtk.STOCK_PREFERENCES, self._('preferences'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'dialog-information.png')
functions.add_icon(gtk.STOCK_INFO, self._('information'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'gtk-edit.png')
functions.add_icon(gtk.STOCK_EDIT, self._('edit'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'edit-clear.png')
functions.add_icon(gtk.STOCK_CLEAR, self._('clear'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'help-about.png')
functions.add_icon(gtk.STOCK_ABOUT, self._('about'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'network-offline.png')
functions.add_icon(gtk.STOCK_DISCONNECT, self._('disconnect'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'dialog-cancel.png')
functions.add_icon(gtk.STOCK_CLOSE, self._('close'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'dialog-cancel.png')
functions.add_icon(gtk.STOCK_NO, self._('no'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'dialog-apply.png')
functions.add_icon(gtk.STOCK_YES, self._('yes'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'view-refresh.png')
functions.add_icon(gtk.STOCK_REFRESH, self._('refresh'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'print.png')
functions.add_icon(gtk.STOCK_PRINT, self._('print'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'quit.png')
functions.add_icon(gtk.STOCK_QUIT, self._('quit'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'date.png')
functions.add_icon(gtk.STOCK_DATE, self._('date'), image_file, self.factory)
image_file = os.path.join(os.path.dirname(sys.argv[0]), 'images', 'document-save.png')
functions.add_icon(gtk.STOCK_SAVE_AS_INITIAL_TABLE, self._('save_as_initial_table'), image_file, self.factory)