Skip to content

Commit

Permalink
added symbolic icon, set window icon, some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
GabMus committed Feb 23, 2018
1 parent 4b16c71 commit 69ca1ef
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 24 deletions.
63 changes: 63 additions & 0 deletions data/icons/org.gabmus.hydrapaper-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/icons/org.gabmus.hydrapaper.png
Binary file not shown.
44 changes: 22 additions & 22 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -50,37 +50,37 @@ configure_file(
install_dir: join_paths(get_option('datadir'), 'dbus-1/services')
)

# install_data(app_id + '.gschema.xml',
# install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas')
# )
install_data(app_id + '.gschema.xml',
install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas')
)

# if false
# gtk_encode_symbolic = find_program('gtk-encode-symbolic-svg')
# sizes = ['32x32', '64x64']
# icon_targets = []
# foreach size: sizes
# icon_targets += custom_target('symbolic-icon-' + size,
# input: 'icons/turtle-symbolic.svg',
# output: 'turtle-symbolic.symbolic.png',
# command: [gtk_encode_symbolic, '--output=' + meson.current_build_dir(), '@INPUT@', size]
# )
# endforeach
# endif
if false
gtk_encode_symbolic = find_program('gtk-encode-symbolic-svg')
sizes = ['32x32', '64x64']
icon_targets = []
foreach size: sizes
icon_targets += custom_target('symbolic-icon-' + size,
input: 'icons/org.gabmus.hydrapaper-symbolic.svg',
output: 'org.gabmus.hydrapaper-symbolic.png',
command: [gtk_encode_symbolic, '--output=' + meson.current_build_dir(), '@INPUT@', size]
)
endforeach
endif

icondir = join_paths(get_option('datadir'), 'icons/hicolor')
install_data('icons/org.gabmus.hydrapaper.svg',
install_dir: join_paths(icondir, 'scalable/apps')
)
# install_data('icons/se.tingping.Trg-symbolic.svg',
# install_dir: join_paths(icondir, 'symbolic/apps')
# )
install_data('icons/org.gabmus.hydrapaper-symbolic.svg',
install_dir: join_paths(icondir, 'symbolic/apps')
)

hydrapaper_resources = gnome.compile_resources(app_id,
app_id + '.gresource.xml',
app_id + '.gresource.xml',
gresource_bundle: true,
# dependencies: desktop_service,
install: true,
install_dir: pkgdatadir
# dependencies: desktop_service,
install: true,
install_dir: pkgdatadir
)

hydrapaper_settings = gnome.compile_schemas()
Expand Down
2 changes: 1 addition & 1 deletion data/org.gabmus.hydrapaper.gresource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<file preprocess="xml-stripblanks">ui/ui.glade</file>

<file preprocess="xml-stripblanks">icons/org.gabmus.hydrapaper.svg</file>
<file>icons/org.gabmus.hydrapaper.png</file>
<file preprocess="xml-stripblanks">icons/org.gabmus.hydrapaper-symbolic.svg</file>

</gresource>
</gresources>
5 changes: 4 additions & 1 deletion hydrapaper/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
'.svg'
]


class Application(Gtk.Application):
def __init__(self, **kwargs):
self.builder = Gtk.Builder.new_from_resource(
Expand All @@ -63,7 +64,7 @@ def __init__(self, **kwargs):
)
self.RESOURCE_PATH = '/org/gabmus/hydrapaper/'

self.CONFIG_FILE_PATH = G_CONFIG_FILE_PATH # G stands for Global (variable)
self.CONFIG_FILE_PATH = G_CONFIG_FILE_PATH # G stands for Global (variable)

self.configuration = self.get_config_file()

Expand All @@ -74,6 +75,8 @@ def __init__(self, **kwargs):

self.window = self.builder.get_object('window')

self.window.set_icon_name('org.gabmus.hydrapaper')

self.window.resize(
self.configuration['windowsize']['width'],
self.configuration['windowsize']['height']
Expand Down

0 comments on commit 69ca1ef

Please sign in to comment.