~dpm/qreator/snap

« back to all changes in this revision

Viewing changes to qreator/QreatorWindow.py

  • Committer: Stefan Schwarzburg
  • Date: 2012-10-30 08:57:13 UTC
  • mfrom: (89.7.4 qreator)
  • mto: (89.10.24 qreator_sms)
  • mto: This revision was merged to the branch mainline in revision 101.
  • Revision ID: stefan.schwarzburg@googlemail.com-20121030085713-2zk6dhgn13fqzx7g
added sms icons; added missing tools file; added a line to shrink the main window to a reasonable size...

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
from qreator_lib.i18n import _
27
27
from qreator_lib import Window
28
 
from qreator_lib.helpers import get_media_file
 
28
from qreator.tools import get_media_path
29
29
 
30
30
from QRCode import QRCode
31
31
from QRCode import QRCodeOutput
71
71
 
72
72
        # Load the background texture in the QR code page
73
73
        self.texture = cairo.ImageSurface.create_from_png(
74
 
                                                get_media_file("pattern.png"))
 
74
                                                get_media_path("pattern.png"))
75
75
 
76
76
        # Time to wait in milliseconds before switching to the next view
77
77
        # after having clicked once on an iconview icon
158
158
        self.curr_width = 0
159
159
 
160
160
        for qr_type in self.qr_types:
 
161
            qr_type.widget.grid.hide() # otherwise the main window gets too large!
161
162
            self.ui.qr_input_box.add(qr_type.widget.grid)
162
163
 
163
164
    def fill_qr_types_store(self):
164
165
        self.qr_types_store.clear()
165
166
 
166
167
        for qr_type in self.qr_types:
167
 
            icon = GdkPixbuf.Pixbuf.new_from_file(get_media_file(
168
 
                            qr_type.icon_path))
 
168
            icon = GdkPixbuf.Pixbuf.new_from_file(qr_type.icon_path)
169
169
            self.qr_types_store.append([qr_type.description,
170
170
                                        icon,
171
171
                                        qr_type.id])