move ui to data

parent 0beb02ee
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<gresources> <gresources>
<gresource prefix="/ru/eepm/PlayGUI"> <gresource prefix="/ru/eepm/PlayGUI">
<file>style.css</file> <file>style.css</file>
<file preprocess="xml-stripblanks">window.ui</file> <file preprocess="xml-stripblanks">ui/window.ui</file>
<file preprocess="xml-stripblanks">logdialog.ui</file> <file preprocess="xml-stripblanks">ui/logdialog.ui</file>
<file preprocess="xml-stripblanks">gtk/help-overlay.ui</file> <file alias="gtk/help-overlay.ui" preprocess="xml-stripblanks">ui/help-overlay.ui</file>
</gresource> </gresource>
</gresources> </gresources>
...@@ -12,6 +12,13 @@ if desktop_utils.found() ...@@ -12,6 +12,13 @@ if desktop_utils.found()
test('Validate desktop file', desktop_utils, args: [desktop_file]) test('Validate desktop file', desktop_utils, args: [desktop_file])
endif endif
gnome.compile_resources('eepm-play-gui',
'eepm-play-gui.gresource.xml',
gresource_bundle: true,
install: true,
install_dir: pkgdatadir,
)
appstream_file = i18n.merge_file( appstream_file = i18n.merge_file(
input: 'ru.eepm.PlayGUI.metainfo.xml.in', input: 'ru.eepm.PlayGUI.metainfo.xml.in',
output: 'ru.eepm.PlayGUI.metainfo.xml', output: 'ru.eepm.PlayGUI.metainfo.xml',
......
...@@ -6,8 +6,10 @@ project('eepm-play-gui', ...@@ -6,8 +6,10 @@ project('eepm-play-gui',
i18n = import('i18n') i18n = import('i18n')
gnome = import('gnome') gnome = import('gnome')
python = import('python')
pkgdatadir = get_option('prefix') / get_option('datadir') / meson.project_name()
moduledir = pkgdatadir / 'eepm_play_gui'
subdir('data') subdir('data')
subdir('src') subdir('src')
......
...@@ -36,11 +36,6 @@ class EepmPlayGuiApplication(Adw.Application): ...@@ -36,11 +36,6 @@ class EepmPlayGuiApplication(Adw.Application):
self.create_action('quit', lambda *_: self.quit(), ['<primary>q']) self.create_action('quit', lambda *_: self.quit(), ['<primary>q'])
self.create_action('about', self.on_about_action) self.create_action('about', self.on_about_action)
provider = Gtk.CssProvider()
provider.load_from_resource("/ru/eepm/PlayGUI/style.css")
display = Gdk.Display.get_default()
Gtk.StyleContext.add_provider_for_display(display, provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
def do_activate(self): def do_activate(self):
"""Called when the application is activated. """Called when the application is activated.
......
pkgdatadir = get_option('prefix') / get_option('datadir') / meson.project_name()
moduledir = pkgdatadir / 'eepm_play_gui'
gnome = import('gnome')
gnome.compile_resources('eepm-play-gui',
'eepm-play-gui.gresource.xml',
gresource_bundle: true,
install: true,
install_dir: pkgdatadir,
)
python = import('python')
conf = configuration_data() conf = configuration_data()
conf.set('PYTHON', python.find_installation('python3').full_path()) conf.set('PYTHON', python.find_installation('python3').full_path())
conf.set('VERSION', meson.project_version()) conf.set('VERSION', meson.project_version())
......
...@@ -65,7 +65,7 @@ class ApplicationRow(Adw.ActionRow): ...@@ -65,7 +65,7 @@ class ApplicationRow(Adw.ActionRow):
print("marked-unchanged") print("marked-unchanged")
@Gtk.Template(resource_path='/ru/eepm/PlayGUI/logdialog.ui') @Gtk.Template(resource_path='/ru/eepm/PlayGUI/ui/logdialog.ui')
class LogDialog(Adw.Dialog): class LogDialog(Adw.Dialog):
__gtype_name__ = 'LogDialog' __gtype_name__ = 'LogDialog'
logdialog_textview = Gtk.Template.Child() logdialog_textview = Gtk.Template.Child()
...@@ -81,7 +81,7 @@ class LogDialog(Adw.Dialog): ...@@ -81,7 +81,7 @@ class LogDialog(Adw.Dialog):
runner.run_command(command, self) runner.run_command(command, self)
@Gtk.Template(resource_path='/ru/eepm/PlayGUI/window.ui') @Gtk.Template(resource_path='/ru/eepm/PlayGUI/ui/window.ui')
class EepmPlayGuiWindow(Adw.ApplicationWindow): class EepmPlayGuiWindow(Adw.ApplicationWindow):
__gtype_name__ = 'EepmPlayGuiWindow' __gtype_name__ = 'EepmPlayGuiWindow'
search_entry = Gtk.Template.Child() search_entry = Gtk.Template.Child()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment