Browse Source

init

main
Inhji Y. 2 months ago
commit
afd07b5d27
6 changed files with 77 additions and 0 deletions
  1. +1
    -0
      .gitignore
  2. +11
    -0
      data/finder.appdata.xml
  3. +10
    -0
      data/finder.desktop
  4. +26
    -0
      meson.build
  5. BIN
      src/Application
  6. +29
    -0
      src/Application.vala

+ 1
- 0
.gitignore View File

@ -0,0 +1 @@
build/

+ 11
- 0
data/finder.appdata.xml View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2019 Your Name <you@email.com> -->
<component type="desktop">
<id>de.inhji.finder</id>
<metadata_license>CC0</metadata_license>
<name>Finder</name>
<summary>Find everything, do everything!</summary>
<description>
<p>A quick summary of your app's main selling points and features. Just a couple sentences per paragraph is best.</p>
</description>
</component>

+ 10
- 0
data/finder.desktop View File

@ -0,0 +1,10 @@
[Desktop Entry]
Name=Finder
GenericName=Finder App
Comment=Proves that we can use Vala and Gtk
Categories=Utility;Education;
Exec=de.inhji.finder
Icon=application-default-icon
Terminal=false
Type=Application
Keywords=Hello;World;Example;

+ 26
- 0
meson.build View File

@ -0,0 +1,26 @@
# project name and programming language
project('de.inhji.finder', 'vala', 'c')
# Create a new executable, list the files we want to compile, list the dependencies we need, and install
executable(
meson.project_name(),
'src/Application.vala',
dependencies: [
dependency('gtk+-3.0')
],
install: true
)
# Install our .desktop file so the Applications Menu will see it
install_data(
join_paths('data', 'finder.desktop'),
install_dir: join_paths(get_option('datadir'), 'applications'),
rename: meson.project_name() + '.desktop'
)
# Install our .appdata.xml file so AppCenter will see it
install_data(
join_paths('data', 'finder.appdata.xml'),
install_dir: join_paths(get_option('datadir'), 'metainfo'),
rename: meson.project_name() + '.appdata.xml'
)

BIN
src/Application View File


+ 29
- 0
src/Application.vala View File

@ -0,0 +1,29 @@
using Gtk;
namespace Vala {
class FinderApp : Gtk.Application {
public FinderApp() {
Object (
application_id: "de.inhji.finder",
flags: ApplicationFlags.FLAGS_NONE
);
}
protected override void activate() {
var main_window = new Gtk.ApplicationWindow(this) {
default_height = 300,
default_width = 300,
title = "Finder!"
};
var label = new Gtk.Label("Hello Again World!");
main_window.add(label);
main_window.show_all();
}
public static int main(string[] args) {
return new FinderApp().run(args);
}
}
}

Loading…
Cancel
Save