Commit b0c77fa6 authored by Francois Techene's avatar Francois Techene
Browse files

Added libhandy

parent 93c9aa04
A simple app that generates random numbers, choices and answers.
\ No newline at end of file
desktop_file = i18n.merge_file(
input: 'sm.puri.randomizer.desktop.in',
output: 'sm.puri.randomizer.desktop',
input: 'sm.puri.Randomizer.desktop.in',
output: 'sm.puri.Randomizer.desktop',
type: 'desktop',
po_dir: '../po',
install: true,
......@@ -15,8 +15,8 @@ if desktop_utils.found()
endif
appstream_file = i18n.merge_file(
input: 'sm.puri.randomizer.appdata.xml.in',
output: 'sm.puri.randomizer.appdata.xml',
input: 'sm.puri.Randomizer.appdata.xml.in',
output: 'sm.puri.Randomizer.appdata.xml',
po_dir: '../po',
install: true,
install_dir: join_paths(get_option('datadir'), 'appdata')
......@@ -29,7 +29,7 @@ if appstream_util.found()
)
endif
install_data('sm.puri.randomizer.gschema.xml',
install_data('sm.puri.Randomizer.gschema.xml',
install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas')
)
......
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>sm.puri.randomizer.desktop</id>
<id>sm.puri.Randomizer.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-or-later</project_license>
<description>
......
<?xml version="1.0" encoding="UTF-8"?>
<schemalist gettext-domain="randomizer">
<schema id="sm.puri.randomizer" path="/sm/puri/randomizer/">
<schema id="sm.puri.Randomizer" path="/sm/puri/Randomizer/">
</schema>
</schemalist>
data/sm.puri.randomizer.desktop.in
data/sm.puri.randomizer.appdata.xml.in
data/sm.puri.randomizer.gschema.xml
data/sm.puri.Randomizer.desktop.in
data/sm.puri.Randomizer.appdata.xml.in
data/sm.puri.Randomizer.gschema.xml
src/randomizer-window.ui
src/main.c
src/randomizer-window.c
......
{
"app-id" : "sm.puri.randomizer",
"app-id" : "sm.puri.Randomizer",
"runtime" : "org.gnome.Platform",
"runtime-version" : "3.38",
"sdk" : "org.gnome.Sdk",
......@@ -22,6 +22,21 @@
"*.a"
],
"modules" : [
{
"name" : "libhandy",
"buildsystem" : "meson",
"builddir" : true,
"config-opts": [
"-Dexamples=false",
"-Dtests=false"
],
"sources" : [
{
"type" : "git",
"url" : "https://gitlab.gnome.org/GNOME/libhandy.git"
}
]
},
{
"name" : "randomizer",
"builddir" : true,
......@@ -29,7 +44,7 @@
"sources" : [
{
"type" : "git",
"url" : "file:///home/feeef/dev-l5/randomizer"
"url" : "file:///home/feeef/dev/randomizer"
}
]
}
......
/* main.c
*
* Copyright 2021 francois.techene@puri.sm
* Copyright 2021 Françoischené
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -17,10 +17,18 @@
*/
#include <glib/gi18n.h>
#include <handy.h>
#include "randomizer-config.h"
#include "randomizer-window.h"
static void
on_startup (GtkApplication *app)
{
//g_print ("Init Libhandy\n");
hdy_init();
}
static void
on_activate (GtkApplication *app)
{
......@@ -62,7 +70,9 @@ main (int argc,
* application windows, integration with the window manager/compositor, and
* desktop features such as file opening and single-instance applications.
*/
app = gtk_application_new ("sm.puri.randomizer", G_APPLICATION_FLAGS_NONE);
app = gtk_application_new ("sm.puri.Randomizer", G_APPLICATION_FLAGS_NONE);
g_signal_connect (app, "startup", G_CALLBACK (on_startup), NULL);
/*
* We connect to the activate signal to create a window when the application
......
......@@ -6,6 +6,7 @@ randomizer_sources = [
randomizer_deps = [
dependency('gio-2.0', version: '>= 2.50'),
dependency('gtk+-3.0', version: '>= 3.22'),
dependency('libhandy-1')
]
gnome = import('gnome')
......
/* randomizer-window.c
*
* Copyright 2021 francois.techene@puri.sm
* Copyright 2021 Françoischené
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -35,7 +35,7 @@ randomizer_window_class_init (RandomizerWindowClass *klass)
{
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
gtk_widget_class_set_template_from_resource (widget_class, "/sm/puri/randomizer/randomizer-window.ui");
gtk_widget_class_set_template_from_resource (widget_class, "/sm/puri/Randomizer/randomizer-window.ui");
gtk_widget_class_bind_template_child (widget_class, RandomizerWindow, header_bar);
gtk_widget_class_bind_template_child (widget_class, RandomizerWindow, label);
}
......
/* randomizer-window.h
*
* Copyright 2021 francois.techene@puri.sm
* Copyright 2021 Françoischené
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/sm/puri/randomizer">
<gresource prefix="/sm/puri/Randomizer">
<file>randomizer-window.ui</file>
</gresource>
</gresources>
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