Add contributors for issue120

This commit is contained in:
Cédric Krier committed 2008-06-13 23:17:32 +02:00
1 parent c2c0a59106
commit 22ffeebc34
4 files changed
+53 -9

No files matched your search

+2 -1
View File
@@ -71,7 +71,8 @@ setup(name=PACKAGE,
('share/pixmaps', glob.glob('share/pixmaps/*.png') + \
glob.glob('share/pixmaps/*.svg')),
('share/tryton', glob.glob('share/tryton/tryton.glade') + \
glob.glob('share/tryton/tipoftheday.txt')),
glob.glob('share/tryton/tipoftheday.txt') + \
glob.glob('share/tryton/contributors.txt')),
],
scripts=['bin/tryton'],
classifiers=[
+2
View File
@@ -0,0 +1,2 @@
Cédric Krier
Bertrand Chenal
+11 -3
View File
@@ -1096,11 +1096,19 @@
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="help_licence">
<widget class="GtkImageMenuItem" id="help_license">
<property name="visible">True</property>
<property name="label" translatable="yes">_License</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_help_licence_activate"/>
<signal name="activate" handler="on_help_license_activate"/>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="help_credits">
<property name="visible">True</property>
<property name="label" translatable="yes">_Credits</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_help_credits_activate"/>
</widget>
</child>
</widget>
@@ -3007,7 +3015,7 @@ Save as CSV</property>
</widget>
</child>
</widget>
<widget class="GtkDialog" id="win_licence">
<widget class="GtkDialog" id="win_license">
<property name="width_request">484</property>
<property name="height_request">358</property>
<property name="title" translatable="yes">License</property>
+38 -5
View File
@@ -390,6 +390,35 @@ class Tips(object):
self.number -= 1
self.tip_set()
class Credits(object):
def __init__(self, parent):
self.win = gtk.Dialog(_('Credits'), parent,
gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT)
self.win.set_icon(TRYTON_ICON)
self.win.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)
vbox = gtk.VBox()
img = gtk.Image()
img.set_from_file(os.path.join(PIXMAPS_DIR, 'tryton.png'))
vbox.pack_start(img, False, False)
self.label = gtk.Label()
self.label.set_alignment(0.5, 0)
contributors_file = os.path.join(DATA_DIR, 'contributors.txt')
contributors = '\n' + _('<b>Contributors:</b>') + '\n\n'
contributors += file(contributors_file).read()
self.label.set_text(contributors)
self.label.set_use_markup(True)
vbox.pack_start(self.label, True, True)
self.win.vbox.pack_start(vbox)
self.win.show_all()
self.win.run()
parent.present()
self.win.destroy()
_MAIN = []
class Main(object):
@@ -469,7 +498,8 @@ class Main(object):
Main.sig_form_tab_orientation(90),
'on_opt_files_actions_activate': self.sig_files_actions,
'on_help_tips_activate': self.sig_tips,
'on_help_licence_activate': self.sig_licence,
'on_help_license_activate': self.sig_license,
'on_help_credits_activate': self.sig_credits,
'on_shortcuts_activate' : self.sig_shortcuts,
'on_db_new_activate': self.sig_db_new,
'on_db_restore_activate': self.sig_db_restore,
@@ -761,15 +791,18 @@ class Main(object):
def sig_tips(self, *args):
Tips(self.window)
def sig_licence(self, widget):
dialog = glade.XML(GLADE, "win_licence", gettext.textdomain())
def sig_license(self, widget):
dialog = glade.XML(GLADE, "win_license", gettext.textdomain())
dialog.signal_connect("on_but_ok_pressed",
lambda obj: dialog.get_widget('win_licence').destroy())
lambda obj: dialog.get_widget('win_license').destroy())
win = dialog.get_widget('win_licence')
win = dialog.get_widget('win_license')
win.set_transient_for(self.window)
win.show_all()
def sig_credits(self, widget):
Credits(self.window)
def sig_shortcuts(self, widget):
shortcuts_win = glade.XML(GLADE, 'shortcuts_dia', gettext.textdomain())
shortcuts_win.signal_connect("on_but_ok_pressed",