~stefan-schwarzburg/qreator/fix_bug_1208033

« back to all changes in this revision

Viewing changes to qreator/__init__.py

  • Committer: Stefan Schwarzburg
  • Date: 2013-05-27 08:57:21 UTC
  • mfrom: (159.2.6 desktop_missing_icons)
  • Revision ID: stefan.schwarzburg@gmail.com-20130527085721-d5un5bzoqv7knium
This fixes bug #1182766 ("Edit QR code" and "Change the QR colors" icons missing) 
by adding a custom search path to the default icon theme, and distributing the
icons in question within our codebase. 

The local path is "data/media/" and the icons are:
-preferences-color-symolic
-text-editor-symbolic
-printer-symbolc

The last icon was added to fix a scaling error in 12.04, and was renamed to 
-qreator-printer-symbolic

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# with this program.  If not, see <http://www.gnu.org/licenses/>.
15
15
### END LICENSE
16
16
 
 
17
import os.path
17
18
import optparse
18
19
 
19
20
from qreator_lib.i18n import _
20
21
from gi.repository import Gtk, Gdk, GLib, GObject  # pylint: disable=E0611
21
22
from qreator import QreatorWindow
22
 
from qreator_lib import set_up_logging, get_version, VendorError
 
23
from qreator_lib import set_up_logging, get_version, get_data_path, VendorError
23
24
from qreator.qrcodes.QRCodeType import QRCodeType
24
25
import logging
25
26
 
64
65
 
65
66
def main():
66
67
    'constructor for your class instances'
 
68
    # Fix icons which are missing in 12.04
 
69
    icontheme = Gtk.IconTheme.get_default()
 
70
    icontheme.append_search_path(os.path.join(get_data_path(), "media"))
 
71
 
67
72
    # Run the application
68
73
    window = QreatorWindow.QreatorWindow()
69
74