From e8a82961623f994e3493a7e2e181986e81bb926e Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Fri, 23 Feb 2024 20:26:30 -0500 Subject: Application: switch to AdwApplication --- Makefile | 2 +- README.md | 2 +- main.c | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index de13188..13631bb 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,2 @@ shemuvi: main.c - gcc $$( pkg-config --cflags gtk4 ) -o shemuvi main.c $$( pkg-config --libs gtk4 ) -lverovio + gcc $$( pkg-config --cflags gtk4 libadwaita-1) -o shemuvi main.c $$( pkg-config --libs gtk4 libadwaita-1) -lverovio diff --git a/README.md b/README.md index e181979..02c4327 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # SheMuVi - Sheet Music Viewer -SheMuVi is a [GTK4](https://docs.gtk.org/gtk4/) application powered by [Verovio](https://www.verovio.org/index.xhtml). +SheMuVi is a [GTK4](https://docs.gtk.org/gtk4/)/[libadwaita](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/) application powered by [Verovio](https://www.verovio.org/index.xhtml). Dependencies * gtk4.0-dev diff --git a/main.c b/main.c index 3d32820..9c20f52 100644 --- a/main.c +++ b/main.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -140,6 +141,7 @@ static void activate(GtkApplication *app, gpointer user_data) { // Header header = gtk_header_bar_new(); button = gtk_button_new_from_icon_name("document-open-symbolic"); + gtk_widget_add_css_class(button, "raised"); gtk_widget_set_tooltip_text(button, "Load file"); g_signal_connect(button, "clicked", G_CALLBACK(open_file), NULL); gtk_header_bar_pack_start(GTK_HEADER_BAR(header), button); @@ -156,10 +158,10 @@ void app_open(GtkApplication *app, GFile **files, gint n_files, const gchar *hin } int main(int argc, char **argv) { - GtkApplication *app; + AdwApplication *app; int status; - app = gtk_application_new( + app = adw_application_new( "com.zachdecook.shemuvi", G_APPLICATION_DEFAULT_FLAGS | G_APPLICATION_HANDLES_OPEN ); g_signal_connect(app, "activate", G_CALLBACK(activate), NULL); -- cgit 1.4.1