-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
208eb8b
commit 926a611
Showing
4 changed files
with
66 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,25 @@ | ||
/* | ||
* Copyright 2020 elementary, Inc. (https://elementary.io) | ||
* | ||
* 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, write to the | ||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
* Boston, MA 02110-1301 USA | ||
* | ||
* Authored by: Marius Meisenzahl <[email protected]> | ||
* | ||
*/ | ||
|
||
public class Application : Gtk.Application { | ||
private MainWindow window; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,25 @@ | ||
/* | ||
* Copyright 2020 elementary, Inc. (https://elementary.io) | ||
* | ||
* 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, write to the | ||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
* Boston, MA 02110-1301 USA | ||
* | ||
* Authored by: Marius Meisenzahl <[email protected]> | ||
* | ||
*/ | ||
|
||
public class MainWindow : Gtk.ApplicationWindow { | ||
private Gtk.Entry title_entry; | ||
private Gtk.Entry body_entry; | ||
|
@@ -11,43 +33,55 @@ public class MainWindow : Gtk.ApplicationWindow { | |
set_default_size (400, 400); | ||
|
||
var grid = new Gtk.Grid () { | ||
orientation = Gtk.Orientation.VERTICAL, | ||
halign = Gtk.Align.CENTER, | ||
valign = Gtk.Align.CENTER, | ||
row_spacing = 12, | ||
margin_start = margin_end = 6 | ||
row_spacing = 12 | ||
}; | ||
|
||
title_entry = new Gtk.Entry () { | ||
hexpand = true, | ||
placeholder_text = "Title", | ||
text = "Title" | ||
}; | ||
grid.attach (title_entry, 0, 0); | ||
grid.add (title_entry); | ||
|
||
body_entry = new Gtk.Entry () { | ||
hexpand = true, | ||
placeholder_text = "Body", | ||
text = "Body" | ||
}; | ||
grid.attach (body_entry, 0, 1); | ||
grid.add (body_entry); | ||
|
||
id_entry = new Gtk.Entry () { | ||
hexpand = true, | ||
placeholder_text = "Id" | ||
}; | ||
grid.attach (id_entry, 0, 2); | ||
grid.add (id_entry); | ||
|
||
var priority_label = new Gtk.Label ("Priority:"); | ||
|
||
priority_combobox = new Gtk.ComboBoxText (); | ||
priority_combobox = new Gtk.ComboBoxText () { | ||
hexpand = true | ||
}; | ||
priority_combobox.append_text ("low"); | ||
priority_combobox.append_text ("normal"); | ||
priority_combobox.append_text ("high"); | ||
priority_combobox.append_text ("urgent"); | ||
priority_combobox.set_active (1); | ||
grid.attach (priority_combobox, 0, 3); | ||
|
||
var priority_grid = new Gtk.Grid () { | ||
column_spacing = 6, | ||
margin = 6 | ||
}; | ||
priority_grid.add (priority_label); | ||
priority_grid.add (priority_combobox); | ||
grid.add (priority_grid); | ||
|
||
|
||
var send_button = new Gtk.Button.with_label ("Send notification"); | ||
send_button.clicked.connect (send_notification); | ||
grid.attach (send_button, 0, 4); | ||
grid.add (send_button); | ||
|
||
add (grid); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ executable( | |
) | ||
|
||
subdir('data') | ||
subdir('demo') | ||
subdir('po') | ||
|
||
meson.add_install_script('meson/post_install.py') |