[gnome-calculator/wip/exalm/styles: 1/2] calculator: Use AdwApplication
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calculator/wip/exalm/styles: 1/2] calculator: Use AdwApplication
- Date: Sun, 13 Feb 2022 19:30:06 +0000 (UTC)
commit cfaed4179c213c89239e0b92dcec4b78dd269cf1
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Mon Feb 14 00:25:08 2022 +0500
calculator: Use AdwApplication
Load styles automatically, remove manual Adw.init().
src/gnome-calculator.vala | 4 ++--
src/ui/gnome-calculator.gresource.xml | 2 +-
src/ui/{calculator.css => style.css} | 0
3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/gnome-calculator.vala b/src/gnome-calculator.vala
index 86d8fb30..6a998596 100644
--- a/src/gnome-calculator.vala
+++ b/src/gnome-calculator.vala
@@ -9,7 +9,7 @@
* license.
*/
-public class Calculator : Gtk.Application
+public class Calculator : Adw.Application
{
private Settings settings;
private MathWindow last_opened_window;
@@ -42,6 +42,7 @@ public class Calculator : Gtk.Application
{
Object (flags : ApplicationFlags.NON_UNIQUE, application_id : APP_ID);
+ set_resource_base_path ("/org/gnome/calculator");
add_main_option_entries (option_entries);
}
@@ -106,7 +107,6 @@ public class Calculator : Gtk.Application
{
base.startup ();
- Adw.init ();
GtkSource.init ();
settings = new Settings ("org.gnome.calculator");
diff --git a/src/ui/gnome-calculator.gresource.xml b/src/ui/gnome-calculator.gresource.xml
index 434d1920..fbc8a850 100644
--- a/src/ui/gnome-calculator.gresource.xml
+++ b/src/ui/gnome-calculator.gresource.xml
@@ -13,6 +13,6 @@
<file preprocess="xml-stripblanks">math-window.ui</file>
<file preprocess="xml-stripblanks">math-shortcuts.ui</file>
<file preprocess="xml-stripblanks">math-preferences.ui</file>
- <file>calculator.css</file>
+ <file>style.css</file>
</gresource>
</gresources>
diff --git a/src/ui/calculator.css b/src/ui/style.css
similarity index 100%
rename from src/ui/calculator.css
rename to src/ui/style.css
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]