Initial commit with a non-working version
This commit is contained in:
11
src/Makefile.am
Normal file
11
src/Makefile.am
Normal file
@@ -0,0 +1,11 @@
|
||||
bin_PROGRAMS = gauthenticator
|
||||
|
||||
gresource_file = $(top_srcdir)/data/gauthenticator.gresource.xml
|
||||
|
||||
gauthenticator_SOURCES = main.vala gauth-app.vala gauth-window.vala
|
||||
gauthenticator_CPPFLAGS = $(GAUTHENTICATOR_CFLAGS)
|
||||
gauthenticator_VALAFLAGS = --pkg gtk+-3.0 --gresources $(gresource_file) --target-glib=2.38
|
||||
|
||||
gauthenticator_LDADD = $(GAUTHENTICATOR_LIBS)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
14
src/gauth-app.vala
Normal file
14
src/gauth-app.vala
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace GAuthenticator {
|
||||
class App : Gtk.Application {
|
||||
private GAuthenticator.Window? window = null;
|
||||
|
||||
protected override void activate() {
|
||||
if (window == null) {
|
||||
window = new GAuthenticator.Window(this);
|
||||
window.show_all();
|
||||
}
|
||||
|
||||
window.present();
|
||||
}
|
||||
}
|
||||
}
|
11
src/gauth-window.vala
Normal file
11
src/gauth-window.vala
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace GAuthenticator {
|
||||
[GtkTemplate (ui = "/eu/polonkai/gergely/gauthenticator/gauth-window.ui")]
|
||||
class Window : Gtk.ApplicationWindow {
|
||||
[GtkChild]
|
||||
private Gtk.ProgressBar countdown;
|
||||
|
||||
public Window(GAuthenticator.App app) {
|
||||
Object(application: app);
|
||||
}
|
||||
}
|
||||
}
|
27
src/main.vala
Normal file
27
src/main.vala
Normal file
@@ -0,0 +1,27 @@
|
||||
/* main.vala
|
||||
*
|
||||
* Copyright (C) 2017 Gergely Polonkai
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using Gtk;
|
||||
|
||||
int main (string[] args) {
|
||||
Gtk.init (ref args);
|
||||
|
||||
var app = new GAuthenticator.App();
|
||||
|
||||
return app.run();
|
||||
}
|
Reference in New Issue
Block a user