/gtk/prep-images

To get this branch, use:
bzr branch http://bzr.ed.am/gtk/prep-images

« back to all changes in this revision

Viewing changes to src/add_copyright_to_images/preferences.py

  • Committer: edam
  • Date: 2011-02-23 19:43:45 UTC
  • Revision ID: edam@waxworlds.org-20110223194345-f7ichg83dzo6m87x
- initial commit, includes project and build setup

Show diffs side-by-side

added added

removed removed

2
2
#
3
3
# Copyright (C) 2011 Tim Marston <edam@waxworlds.org>
4
4
#
5
 
# This file is part of prep-images (hereafter referred to as "this program").
6
 
# See http://www.waxworlds.org/edam/software/gtk/prep-images for more
 
5
# This file is part of add-copyright-to-images (hereafter referred to as "this
 
6
# program").
 
7
# See http://www.waxworlds.org/edam/software/add-copyright-to-images for more
7
8
# information.
8
9
#
9
10
# This program is free software: you can redistribute it and/or modify
10
 
# it under the terms of the GNU General Public License as published by
11
 
# the Free Software Foundation, either version 3 of the License, or
 
11
# it under the terms of the GNU Lesser General Public License as published
 
12
# by the Free Software Foundation, either version 3 of the License, or
12
13
# (at your option) any later version.
13
14
#
14
15
# This program is distributed in the hope that it will be useful,
15
16
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16
17
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 
# GNU General Public License for more details.
 
18
# GNU Lesser General Public License for more details.
18
19
#
19
 
# You should have received a copy of the GNU General Public License
 
20
# You should have received a copy of the GNU Lesser General Public License
20
21
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
22
 
22
23
 
28
29
 
29
30
class Preferences:
30
31
 
31
 
        RCFILE = '~/.config/prep-images.rc'
 
32
        RCFILE = '~/.config/add-copyright-to-images.rc'
32
33
 
33
34
        def __init__( self ):
34
35
 
48
49
                                rclines = f.readlines()
49
50
                        except IOError as e:
50
51
                                dialog = gtk.MessageDialog( None, gtk.DIALOG_MODAL, \
51
 
                                        gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, \
52
 
                                        e.strerror )
 
52
                                                gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, \
 
53
                                                e.strerror )
53
54
                                dialog.run()
54
55
                                dialog.destroy()
55
56
                                exit( 1 )
85
86
                        f.write( "export-append " + self.export_append + "\n" )
86
87
                except IOError as e:
87
88
                        dialog = gtk.MessageDialog( None, gtk.DIALOG_MODAL, \
88
 
                                gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, e.strerror )
 
89
                                        gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, e.strerror )
89
90
                        dialog.run()
90
91
                        dialog.destroy()
91
92
                        exit( 1 )