~marc.stewart/crebs/jane

« back to all changes in this revision

Viewing changes to crebs/bin/crebs

  • Committer: Marc Stewart
  • Date: 2010-06-03 00:13:52 UTC
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: marc.c.stewart@googlemail.com-20100603001352-k2k2rt069t5n89io
Rearranged source folder to mimic installed locations

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
#               <http://www.obfuscatepenguin.net/crebs/>
12
12
 
13
13
 
14
 
## ==== INFORMATION =====================================================
15
 
#
16
 
## ---- Licence ---------------------------------------------------------
 
14
## ==== LICENCE =========================================================
17
15
#
18
16
#   This program is free software: you can redistribute it and/or modify
19
17
#   it under the terms of the GNU General Public License as published by
28
26
#   You should have received a copy of the GNU General Public License
29
27
#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
30
28
#
31
 
## --------------------------------------------------------- Licence ----
32
 
 
33
 
## ---- Important Assumptions -------------------------------------------
34
 
#
35
 
#   * The user running the program has a /home/<USER>/.gnome2 directory;
36
 
#   * It contains backgrounds.xml, for listing the user's backgrounds;
37
 
#   * Only PNG, JPEG, GIF, and SVG formats are used for backgrounds.
38
 
#
39
 
## ------------------------------------------- Important Assumptions ----
40
 
 
41
 
## ===================================================== INFORMATION ====
 
29
## ========================================================= LICENCE ====
42
30
 
43
31
 
44
32
import sys
90
78
        # Set up GUIcombine arrays
91
79
        b = gtk.Builder()
92
80
 
93
 
        if (os.path.dirname(os.path.abspath(__file__)) == '/usr/bin'):
94
 
            # CreBS in installed
95
 
            b.add_from_file("/usr/share/crebs/glade/create-background-slideshow.glade")
96
 
            b.add_from_file("/usr/share/crebs/glade/add-images.glade")
97
 
            b.add_from_file("/usr/share/crebs/glade/clear-images.glade")
98
 
        else:
99
 
            # Use local (uninstalled) files
100
 
            b.add_from_file("glade/create-background-slideshow.glade")
101
 
            b.add_from_file("glade/add-images.glade")
102
 
            b.add_from_file("glade/clear-images.glade")
 
81
        b.add_from_file("../share/crebs/glade/create-background-slideshow.glade")
 
82
        b.add_from_file("../share/crebs/glade/add-images.glade")
 
83
        b.add_from_file("../share/crebs/glade/clear-images.glade")
103
84
 
104
85
        # Link to GUI actions
105
86
        b.connect_signals({