From 88cfe53c23083d9fe45e6a05fce8514aa5912308 Mon Sep 17 00:00:00 2001 From: Gergo Koteles Date: Sat, 27 Jan 2024 02:16:59 +0100 Subject: [PATCH 1/5] rename com.github.tsmetana.mpk3-settings to io.github.tsmetana.mpk3-settings This is a new rule for app ids. --- ...tings.desktop => io.github.tsmetana.mpk3-settings.desktop} | 2 +- ...info.xml => io.github.tsmetana.mpk3-settings.metainfo.xml} | 4 ++-- ...mpk3-settings.svg => io.github.tsmetana.mpk3-settings.svg} | 2 +- src/main.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename pkg/{com.github.tsmetana.mpk3-settings.desktop => io.github.tsmetana.mpk3-settings.desktop} (79%) rename pkg/{com.github.tsmetana.mpk3-settings.metainfo.xml => io.github.tsmetana.mpk3-settings.metainfo.xml} (90%) rename pkg/{com.github.tsmetana.mpk3-settings.svg => io.github.tsmetana.mpk3-settings.svg} (99%) diff --git a/pkg/com.github.tsmetana.mpk3-settings.desktop b/pkg/io.github.tsmetana.mpk3-settings.desktop similarity index 79% rename from pkg/com.github.tsmetana.mpk3-settings.desktop rename to pkg/io.github.tsmetana.mpk3-settings.desktop index 35996bc..8017986 100644 --- a/pkg/com.github.tsmetana.mpk3-settings.desktop +++ b/pkg/io.github.tsmetana.mpk3-settings.desktop @@ -4,6 +4,6 @@ Version=1.0 Name=MPK3 Settings Comment=AKAI MPK Mini MK3 settings Exec=mpk3-settings -Icon=com.github.tsmetana.mpk3-settings +Icon=io.github.tsmetana.mpk3-settings Terminal=false Categories=Settings; diff --git a/pkg/com.github.tsmetana.mpk3-settings.metainfo.xml b/pkg/io.github.tsmetana.mpk3-settings.metainfo.xml similarity index 90% rename from pkg/com.github.tsmetana.mpk3-settings.metainfo.xml rename to pkg/io.github.tsmetana.mpk3-settings.metainfo.xml index 43905c1..582e8cc 100644 --- a/pkg/com.github.tsmetana.mpk3-settings.metainfo.xml +++ b/pkg/io.github.tsmetana.mpk3-settings.metainfo.xml @@ -1,7 +1,7 @@ - com.github.tsmetana.mpk3-settings - com.github.tsmetana.mpk3-settings + io.github.tsmetana.mpk3-settings + io.github.tsmetana.mpk3-settings MPK3 Settings AKAI MPK Mini MK3 settings diff --git a/pkg/com.github.tsmetana.mpk3-settings.svg b/pkg/io.github.tsmetana.mpk3-settings.svg similarity index 99% rename from pkg/com.github.tsmetana.mpk3-settings.svg rename to pkg/io.github.tsmetana.mpk3-settings.svg index b141602..82f3c80 100644 --- a/pkg/com.github.tsmetana.mpk3-settings.svg +++ b/pkg/io.github.tsmetana.mpk3-settings.svg @@ -9,7 +9,7 @@ id="svg1" inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)" sodipodi:docname="logo.svg" - inkscape:export-filename="com.github.tsmetana.mpk3-settings.svg" + inkscape:export-filename="io.github.tsmetana.mpk3-settings.svg" inkscape:export-xdpi="125.04616" inkscape:export-ydpi="125.04616" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" diff --git a/src/main.c b/src/main.c index 5ec46e9..f35318e 100644 --- a/src/main.c +++ b/src/main.c @@ -46,7 +46,7 @@ int main(int argc, char ** argv) show_error(); return -1; } - app = gtk_application_new("com.github.tsmetana.mpk3-settings", G_APPLICATION_DEFAULT_FLAGS); + app = gtk_application_new("io.github.tsmetana.mpk3-settings", G_APPLICATION_DEFAULT_FLAGS); g_signal_connect(app, "activate", G_CALLBACK(activate), NULL); status = g_application_run(G_APPLICATION(app), argc, argv); g_object_unref(app); From eff76832fa26a41dde7efbe07f09b29fe5d8032d Mon Sep 17 00:00:00 2001 From: Gergo Koteles Date: Sat, 27 Jan 2024 02:17:27 +0100 Subject: [PATCH 2/5] fix metainfo launchable id --- pkg/io.github.tsmetana.mpk3-settings.metainfo.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/io.github.tsmetana.mpk3-settings.metainfo.xml b/pkg/io.github.tsmetana.mpk3-settings.metainfo.xml index 582e8cc..c7f61cb 100644 --- a/pkg/io.github.tsmetana.mpk3-settings.metainfo.xml +++ b/pkg/io.github.tsmetana.mpk3-settings.metainfo.xml @@ -1,7 +1,7 @@ io.github.tsmetana.mpk3-settings - io.github.tsmetana.mpk3-settings + io.github.tsmetana.mpk3-settings.desktop MPK3 Settings AKAI MPK Mini MK3 settings From b28ab111bdfac80bba0ca684ce48492ab64ce949 Mon Sep 17 00:00:00 2001 From: Gergo Koteles Date: Sat, 27 Jan 2024 02:18:11 +0100 Subject: [PATCH 3/5] fix metainfo screenshot link --- pkg/io.github.tsmetana.mpk3-settings.metainfo.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/io.github.tsmetana.mpk3-settings.metainfo.xml b/pkg/io.github.tsmetana.mpk3-settings.metainfo.xml index c7f61cb..3f35572 100644 --- a/pkg/io.github.tsmetana.mpk3-settings.metainfo.xml +++ b/pkg/io.github.tsmetana.mpk3-settings.metainfo.xml @@ -24,7 +24,7 @@ https://github.com/tsmetana/mpk3-settings/issues - https://github.com/tsmetana/mpk3-settings/raw/main/pkg/gui_screen_1.png + https://github.com/tsmetana/mpk3-settings/raw/master/pkg/gui_screen_1.png From 69057ca32b77a7dddb7088906da98020fc423455 Mon Sep 17 00:00:00 2001 From: Gergo Koteles Date: Sat, 27 Jan 2024 04:23:57 +0100 Subject: [PATCH 4/5] use GtkFileChooserNative In a sandboxed environment (eg flatpak) GtkFileChooserNative calls the proper APIs (portals) to open/save the files. --- src/app_win.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app_win.c b/src/app_win.c index a8fd73a..6d67d52 100644 --- a/src/app_win.c +++ b/src/app_win.c @@ -60,7 +60,7 @@ typedef enum _file_dialog_e file_dialog_t; static gchar *file_choose_dialog(GtkWidget *app_win, file_dialog_t dlg_type) { - GtkWidget *dialog; + GtkFileChooserNative *dialog; GtkFileChooserAction action; const gchar *title; const gchar *btn_label; @@ -77,8 +77,8 @@ static gchar *file_choose_dialog(GtkWidget *app_win, file_dialog_t dlg_type) title = "Save File"; btn_label = "Save"; } - dialog = gtk_file_chooser_dialog_new(title, GTK_WINDOW(app_win), action, - "Cancel", GTK_RESPONSE_CANCEL, btn_label, GTK_RESPONSE_ACCEPT, NULL); + dialog = gtk_file_chooser_native_new(title, GTK_WINDOW(app_win), action, + btn_label, "Cancel"); if (dlg_type == FILE_SAVE_DIALOG) gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(dialog), TRUE); else @@ -91,9 +91,9 @@ static gchar *file_choose_dialog(GtkWidget *app_win, file_dialog_t dlg_type) gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter_mpk); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter_all); - if ((gtk_dialog_run(GTK_DIALOG (dialog))) == GTK_RESPONSE_ACCEPT) + if ((gtk_native_dialog_run(GTK_NATIVE_DIALOG(dialog))) == GTK_RESPONSE_ACCEPT) filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); - gtk_widget_destroy(dialog); + g_object_unref(dialog); return filename; } From 90b687ea4b0bb83db4ad6933bed29c8cd918c8f7 Mon Sep 17 00:00:00 2001 From: Gergo Koteles Date: Sat, 27 Jan 2024 15:13:21 +0100 Subject: [PATCH 5/5] make the icon font more similar --- pkg/io.github.tsmetana.mpk3-settings.svg | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/pkg/io.github.tsmetana.mpk3-settings.svg b/pkg/io.github.tsmetana.mpk3-settings.svg index 82f3c80..296a386 100644 --- a/pkg/io.github.tsmetana.mpk3-settings.svg +++ b/pkg/io.github.tsmetana.mpk3-settings.svg @@ -8,7 +8,7 @@ version="1.1" id="svg1" inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)" - sodipodi:docname="logo.svg" + sodipodi:docname="io.github.tsmetana.mpk3-settings.svg" inkscape:export-filename="io.github.tsmetana.mpk3-settings.svg" inkscape:export-xdpi="125.04616" inkscape:export-ydpi="125.04616" @@ -27,9 +27,9 @@ inkscape:deskcolor="#505050" inkscape:document-units="mm" showgrid="false" - inkscape:zoom="1.4689925" - inkscape:cx="240.64112" - inkscape:cy="321.64902" + inkscape:zoom="2.7371462" + inkscape:cx="51.330835" + inkscape:cy="103.20969" inkscape:window-width="1440" inkscape:window-height="831" inkscape:window-x="0" @@ -99,22 +99,25 @@ rx="1" /> + aria-label="M" + sodipodi:nodetypes="scccscscsssscsscccsscsssscscssccssccsssccccccsss" /> + aria-label="P" + sodipodi:nodetypes="ccccccsssccscsscsccsssssssssssscccccc" /> + aria-label="K" + sodipodi:nodetypes="sccsssssssccccscccssssccccsssccssccscccccscc" />