From b3fa876da3b985a2c22e4c966dd2522ea3cdc3a7 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Sun, 1 Jan 2023 16:31:10 +0100 Subject: [PATCH] Drop ui path specifier from resources paths They were only there due to how the source directories are organized and not really adding useful detail. Removing it from the resource paths gives more freeedom wrt to the organization of source files. --- common/cmake_modules/GncGenerateGResources.cmake | 3 ++- gnucash/gnome-utils/gnc-embedded-window.c | 2 +- gnucash/gnome-utils/gnc-main-window.cpp | 4 ++-- gnucash/gnome-utils/gnc-plugin-page.c | 2 +- gnucash/gnome/window-reconcile.c | 2 +- gnucash/import-export/aqb/CMakeLists.txt | 2 +- gnucash/import-export/aqb/{ui => }/gnc-plugin-aqbanking.ui | 0 gnucash/import-export/ofx/CMakeLists.txt | 2 +- gnucash/import-export/ofx/{ui => }/gnc-plugin-ofx.ui | 0 po/POTFILES.in | 4 ++-- 10 files changed, 11 insertions(+), 10 deletions(-) rename gnucash/import-export/aqb/{ui => }/gnc-plugin-aqbanking.ui (100%) rename gnucash/import-export/ofx/{ui => }/gnc-plugin-ofx.ui (100%) diff --git a/common/cmake_modules/GncGenerateGResources.cmake b/common/cmake_modules/GncGenerateGResources.cmake index 600201dcf4..536e5b06b6 100644 --- a/common/cmake_modules/GncGenerateGResources.cmake +++ b/common/cmake_modules/GncGenerateGResources.cmake @@ -38,7 +38,8 @@ function(gnc_generate_gresources) file(APPEND ${TMP_FILE} " \n") foreach(res_file ${GR_RESOURCE_FILES}) - file(APPEND ${TMP_FILE} " ${res_file}\n") + get_filename_component(res_file_short ${res_file} NAME) + file(APPEND ${TMP_FILE} " ${res_file}\n") endforeach() file(APPEND ${TMP_FILE} " \n") file(APPEND ${TMP_FILE} "\n") diff --git a/gnucash/gnome-utils/gnc-embedded-window.c b/gnucash/gnome-utils/gnc-embedded-window.c index 7ff112bb43..57278c60b8 100644 --- a/gnucash/gnome-utils/gnc-embedded-window.c +++ b/gnucash/gnome-utils/gnc-embedded-window.c @@ -343,7 +343,7 @@ gnc_embedded_window_new (const gchar *action_group_name, builder = gtk_builder_new (); gtk_builder_set_translation_domain (builder, PROJECT_NAME); - ui_fullname = g_strconcat ("/org/gnucash/ui/", ui_filename, NULL); + ui_fullname = g_strconcat ("/org/gnucash/", ui_filename, NULL); gtk_builder_add_from_resource (builder, ui_fullname, &error); diff --git a/gnucash/gnome-utils/gnc-main-window.cpp b/gnucash/gnome-utils/gnc-main-window.cpp index 33873f2414..3bce64fb8c 100644 --- a/gnucash/gnome-utils/gnc-main-window.cpp +++ b/gnucash/gnome-utils/gnc-main-window.cpp @@ -3427,7 +3427,7 @@ update_menu_model (GncMainWindow *window, const gchar *ui_filename, priv = GNC_MAIN_WINDOW_GET_PRIVATE(window); gtk_builder_set_translation_domain (builder, PROJECT_NAME); - res_name = g_strconcat ("/org/gnucash/ui/", ui_filename, NULL); + res_name = g_strconcat ("/org/gnucash/", ui_filename, NULL); gtk_builder_add_from_resource (builder, res_name, &error); g_free (res_name); @@ -4127,7 +4127,7 @@ gnc_main_window_setup_window (GncMainWindow *window) builder = gtk_builder_new (); gtk_builder_set_translation_domain (builder, PROJECT_NAME); - gtk_builder_add_from_resource (builder, "/org/gnucash/ui/gnc-main-window.ui", &error); + gtk_builder_add_from_resource (builder, "/org/gnucash/gnc-main-window.ui", &error); if (error) { diff --git a/gnucash/gnome-utils/gnc-plugin-page.c b/gnucash/gnome-utils/gnc-plugin-page.c index ee570f4b11..e650907829 100644 --- a/gnucash/gnome-utils/gnc-plugin-page.c +++ b/gnucash/gnome-utils/gnc-plugin-page.c @@ -265,7 +265,7 @@ gnc_plugin_page_merge_actions (GncPluginPage *page) if (!priv->builder) priv->builder = gtk_builder_new (); - resource = g_strconcat ("/org/gnucash/ui/", priv->ui_description, NULL); + resource = g_strconcat ("/org/gnucash/", priv->ui_description, NULL); gtk_builder_set_translation_domain (priv->builder, PROJECT_NAME); diff --git a/gnucash/gnome/window-reconcile.c b/gnucash/gnome/window-reconcile.c index f419316e92..26e3177a47 100644 --- a/gnucash/gnome/window-reconcile.c +++ b/gnucash/gnome/window-reconcile.c @@ -1847,7 +1847,7 @@ recnWindowWithBalance (GtkWidget *parent, Account *account, gnc_numeric new_endi GMenuModel *menu_model; GtkWidget *menu_bar; GtkAccelGroup *accel_group = gtk_accel_group_new (); - const gchar *ui = "/org/gnucash/ui/gnc-reconcile-window.ui"; + const gchar *ui = "/org/gnucash/gnc-reconcile-window.ui"; GError *error = NULL; #ifdef MAC_INTEGRATION GtkosxApplication *theApp = g_object_new (GTKOSX_TYPE_APPLICATION, diff --git a/gnucash/import-export/aqb/CMakeLists.txt b/gnucash/import-export/aqb/CMakeLists.txt index 181f793f42..264ee7fddd 100644 --- a/gnucash/import-export/aqb/CMakeLists.txt +++ b/gnucash/import-export/aqb/CMakeLists.txt @@ -41,7 +41,7 @@ set (aqbanking_noinst_HEADERS set(aqbanking_GLADE assistant-ab-initial.glade dialog-ab.glade dialog-ab-pref.glade) -set(aqbanking_UI ui/gnc-plugin-aqbanking.ui) +set(aqbanking_UI gnc-plugin-aqbanking.ui) if(WITH_AQBANKING) diff --git a/gnucash/import-export/aqb/ui/gnc-plugin-aqbanking.ui b/gnucash/import-export/aqb/gnc-plugin-aqbanking.ui similarity index 100% rename from gnucash/import-export/aqb/ui/gnc-plugin-aqbanking.ui rename to gnucash/import-export/aqb/gnc-plugin-aqbanking.ui diff --git a/gnucash/import-export/ofx/CMakeLists.txt b/gnucash/import-export/ofx/CMakeLists.txt index 695f4fe34e..e998b6b448 100644 --- a/gnucash/import-export/ofx/CMakeLists.txt +++ b/gnucash/import-export/ofx/CMakeLists.txt @@ -15,7 +15,7 @@ set(ofx_noinst_HEADERS gnc-plugin-ofx.h ) -set(ofx_UI ui/gnc-plugin-ofx.ui) +set(ofx_UI gnc-plugin-ofx.ui) if (WITH_OFX) diff --git a/gnucash/import-export/ofx/ui/gnc-plugin-ofx.ui b/gnucash/import-export/ofx/gnc-plugin-ofx.ui similarity index 100% rename from gnucash/import-export/ofx/ui/gnc-plugin-ofx.ui rename to gnucash/import-export/ofx/gnc-plugin-ofx.ui diff --git a/po/POTFILES.in b/po/POTFILES.in index 16b574a683..e5293495c3 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -315,9 +315,9 @@ gnucash/import-export/aqb/gnc-flicker-gui.c gnucash/import-export/aqb/gnc-gwen-gui.c gnucash/import-export/aqb/gncmod-aqbanking.c gnucash/import-export/aqb/gnc-plugin-aqbanking.c +gnucash/import-export/aqb/gnc-plugin-aqbanking.ui gnucash/import-export/aqb/gschemas/org.gnucash.GnuCash.dialogs.flicker.gschema.xml.in gnucash/import-export/aqb/gschemas/org.gnucash.GnuCash.dialogs.import.hbci.gschema.xml.in -gnucash/import-export/aqb/ui/gnc-plugin-aqbanking.ui gnucash/import-export/bi-import/dialog-bi-import.c gnucash/import-export/bi-import/dialog-bi-import-gui.c gnucash/import-export/bi-import/dialog-bi-import-helper.c @@ -362,8 +362,8 @@ gnucash/import-export/log-replay/gnc-plugin-log-replay.c gnucash/import-export/ofx/gncmod-ofx-import.c gnucash/import-export/ofx/gnc-ofx-import.c gnucash/import-export/ofx/gnc-plugin-ofx.c +gnucash/import-export/ofx/gnc-plugin-ofx.ui gnucash/import-export/ofx/gschemas/org.gnucash.GnuCash.dialogs.import.ofx.gschema.xml.in -gnucash/import-export/ofx/ui/gnc-plugin-ofx.ui gnucash/import-export/qif-imp/assistant-qif-import.c gnucash/import-export/qif-imp/dialog-account-picker.c gnucash/import-export/qif-imp/gnc-plugin-qif-import.c