gnucash maint: Multiple changes pushed

Geert Janssens gjanssens at code.gnucash.org
Sun Nov 4 07:07:44 EST 2018


Updated	 via  https://github.com/Gnucash/gnucash/commit/67174dd0 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/2283df71 (commit)
	from  https://github.com/Gnucash/gnucash/commit/0467dd0b (commit)



commit 67174dd0b1543817d5c02fc0ba27a84e33bda3f2
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Sun Nov 4 13:07:36 2018 +0100

    Prevent temporary editor files from being picked up for POTFILES.in generation
    
    Aparently cmake's file glob also picks up hidden files and doesn't have
    an easy way to avoid that.

diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
index 79c310d..52b0a03 100644
--- a/po/CMakeLists.txt
+++ b/po/CMakeLists.txt
@@ -88,7 +88,11 @@ function(make_gnucash_potfiles)
   foreach (path ${FILES_IN})
     if (${path} MATCHES "^(bindings/|borrowed/|common/|doc/|libgnucash/|gnucash/)"
         AND
-        NOT ${path} MATCHES "gw-|test|experimental|python-bindings|swig-.*\\.c")
+        NOT ${path} MATCHES "gw-|test|experimental|python-bindings|swig-.*\\.c"
+        # Skip POSIX style hidden files even if they have the proper extension
+        # These are typically temporary files from editors like emacs
+        AND
+        NOT ${path} MATCHES "/[.][^/]*$")
         list (APPEND GOOD_FILES ${path})
     endif ()
   endforeach (path)

commit 2283df719ad2d33373c4be964931daaad805b9ae
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Sat Nov 3 18:20:55 2018 +0100

    Drop code to work around gtk bug 326200 (bugzilla)
    
    This bug has been fixed in 2006 and I have verified the version of gtk we
    currently depend on carries this fix.

diff --git a/gnucash/gnome-utils/gnc-embedded-window.c b/gnucash/gnome-utils/gnc-embedded-window.c
index 617da3e..2d0c514 100644
--- a/gnucash/gnome-utils/gnc-embedded-window.c
+++ b/gnucash/gnome-utils/gnc-embedded-window.c
@@ -382,7 +382,7 @@ gnc_embedded_window_new (const gchar *action_group_name,
 
     /* Create menu and toolbar information */
     priv->action_group = gtk_action_group_new (action_group_name);
-    gnc_gtk_action_group_set_translation_domain(priv->action_group, GETTEXT_PACKAGE);
+    gtk_action_group_set_translation_domain(priv->action_group, GETTEXT_PACKAGE);
     gtk_action_group_add_actions (priv->action_group, action_entries,
                                   n_action_entries, user_data);
     gtk_ui_manager_insert_action_group (window->ui_merge, priv->action_group, 0);
diff --git a/gnucash/gnome-utils/gnc-main-window.c b/gnucash/gnome-utils/gnc-main-window.c
index 58cb72a..fb86d24 100644
--- a/gnucash/gnome-utils/gnc-main-window.c
+++ b/gnucash/gnome-utils/gnc-main-window.c
@@ -3197,7 +3197,7 @@ gnc_main_window_merge_actions (GncMainWindow *window,
     priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
     entry = g_new0 (MergedActionEntry, 1);
     entry->action_group = gtk_action_group_new (group_name);
-    gnc_gtk_action_group_set_translation_domain (entry->action_group, GETTEXT_PACKAGE);
+    gtk_action_group_set_translation_domain (entry->action_group, GETTEXT_PACKAGE);
     gtk_action_group_add_actions (entry->action_group, actions, n_actions, data);
     if (toggle_actions != NULL && n_toggle_actions > 0)
     {
@@ -3645,7 +3645,7 @@ gnc_main_window_setup_window (GncMainWindow *window)
 
     /* Create menu and toolbar information */
     priv->action_group = gtk_action_group_new ("MainWindowActions");
-    gnc_gtk_action_group_set_translation_domain (priv->action_group, GETTEXT_PACKAGE);
+    gtk_action_group_set_translation_domain (priv->action_group, GETTEXT_PACKAGE);
     gtk_action_group_add_actions (priv->action_group, gnc_menu_actions,
                                   gnc_menu_n_actions, window);
     gtk_action_group_add_toggle_actions (priv->action_group,
@@ -4877,39 +4877,6 @@ gnc_main_window_button_press_cb (GtkWidget *whatever,
     return FALSE;
 }
 
-
-/* CS: Code copied from gtk/gtkactiongroup.c */
-static gchar *
-dgettext_swapped (const gchar *msgid,
-                  const gchar *domainname)
-{
-    /* CS: Pass this through dgettext if and only if msgid is
-       nonempty. */
-    return (msgid && *msgid) ? dgettext (domainname, msgid) : (gchar*) msgid;
-}
-
-/*
- * This is copied into GnuCash from Gtk in order to fix problems when
- * empty msgids were passed through gettext().
- *
- * TODO: See https://bugzilla.gnome.org/show_bug.cgi?id=326200 . If that bug
- * is fixed in the gtk that we can rely on, then
- * gnc_gtk_action_group_set_translation_domain can be replaced by
- * gtk_action_group_set_translation_domain again.
- */
-void
-gnc_gtk_action_group_set_translation_domain (GtkActionGroup *action_group,
-        const gchar    *domain)
-{
-    g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
-
-    gtk_action_group_set_translate_func (action_group,
-                                         (GtkTranslateFunc)dgettext_swapped,
-                                         g_strdup (domain),
-                                         g_free);
-}
-/* CS: End of code copied from gtk/gtkactiongroup.c */
-
 void
 gnc_main_window_all_action_set_sensitive (const gchar *action_name,
         gboolean sensitive)
diff --git a/gnucash/gnome-utils/gnc-main-window.h b/gnucash/gnome-utils/gnc-main-window.h
index 7c1b26d..cec14f1 100644
--- a/gnucash/gnome-utils/gnc-main-window.h
+++ b/gnucash/gnome-utils/gnc-main-window.h
@@ -356,28 +356,6 @@ void gnc_main_window_save_all_windows(GKeyFile *keyfile);
  */
 void gnc_main_window_restore_default_state(GncMainWindow *window);
 
-/**
- * gnc_gtk_action_group_set_translation_domain:
- * @param action_group a #GtkActionGroup
- * @param domain the translation domain to use for dgettext() calls
- *
- * Sets the translation domain and uses dgettext() for translating the
- * @a label and @a tooltip of #GtkActionEntry<!-- -->s added by
- * gtk_action_group_add_actions().
- *
- * This is copied from gtk's gtk_action_group_set_translation_domain()
- * into GnuCash in order to fix problems when empty msgids were passed
- * through gettext().
- *
- * See https://bugs.gnucash.org/show_bug.cgi?id=326200 . If that bug
- * is fixed in the gtk that we can rely open, then
- * gnc_gtk_action_group_set_translation_domain can be replaced by
- * gtk_action_group_set_translation_domain again.
- **/
-void
-gnc_gtk_action_group_set_translation_domain (GtkActionGroup *action_group,
-        const gchar    *domain);
-
 
 /** Tell a window to finish any outstanding activities.  This function
  *  will call gnc_plugin_page_finish_pending for each installed page.
diff --git a/gnucash/gnome-utils/gnc-plugin-menu-additions.c b/gnucash/gnome-utils/gnc-plugin-menu-additions.c
index 082d794..cb2c587 100644
--- a/gnucash/gnome-utils/gnc-plugin-menu-additions.c
+++ b/gnucash/gnome-utils/gnc-plugin-menu-additions.c
@@ -41,7 +41,6 @@
 
 #include "guile-util.h"
 #include "gnc-engine.h"
-#include "gnc-main-window.h"
 #include "gnc-plugin-menu-additions.h"
 #include "gnc-window.h"
 #include "gnc-ui.h"
@@ -452,7 +451,7 @@ gnc_plugin_menu_additions_add_to_window (GncPlugin *plugin,
     per_window.window = window;
     per_window.ui_manager = window->ui_merge;
     per_window.group = gtk_action_group_new ("MenuAdditions" );
-    gnc_gtk_action_group_set_translation_domain (per_window.group, GETTEXT_PACKAGE);
+    gtk_action_group_set_translation_domain (per_window.group, GETTEXT_PACKAGE);
     per_window.merge_id = gtk_ui_manager_new_merge_id(window->ui_merge);
     gtk_ui_manager_insert_action_group(window->ui_merge, per_window.group, 0);
 
diff --git a/gnucash/gnome-utils/gnc-plugin-page.c b/gnucash/gnome-utils/gnc-plugin-page.c
index 76d8ebb..8d5529c 100644
--- a/gnucash/gnome-utils/gnc-plugin-page.c
+++ b/gnucash/gnome-utils/gnc-plugin-page.c
@@ -1024,7 +1024,7 @@ gnc_plugin_page_create_action_group (GncPluginPage *page, const gchar *group_nam
 
     priv = GNC_PLUGIN_PAGE_GET_PRIVATE(page);
     group = gtk_action_group_new(group_name);
-    gnc_gtk_action_group_set_translation_domain(group, GETTEXT_PACKAGE);
+    gtk_action_group_set_translation_domain(group, GETTEXT_PACKAGE);
     priv->action_group = group;
     return group;
 }
diff --git a/gnucash/gnome/window-reconcile.c b/gnucash/gnome/window-reconcile.c
index 46adc39..df61d15 100644
--- a/gnucash/gnome/window-reconcile.c
+++ b/gnucash/gnome/window-reconcile.c
@@ -49,7 +49,7 @@
 #include "gnc-event.h"
 #include "gnc-filepath-utils.h"
 #include "gnc-gnome-utils.h"
-#include "gnc-main-window.h"
+//#include "gnc-main-window.h"
 #include "gnc-plugin-page-register.h"
 #include "gnc-prefs.h"
 #include "gnc-ui.h"
@@ -1765,7 +1765,7 @@ recnWindowWithBalance (GtkWidget *parent, Account *account, gnc_numeric new_endi
 
         action_group = gtk_action_group_new ("ReconcileWindowActions");
         recnData->action_group = action_group;
-        gnc_gtk_action_group_set_translation_domain(action_group, GETTEXT_PACKAGE);
+        gtk_action_group_set_translation_domain(action_group, GETTEXT_PACKAGE);
         gtk_action_group_add_actions (action_group, recnWindow_actions,
                                       recnWindow_n_actions, recnData);
         action =
diff --git a/gnucash/gnome/window-reconcile2.c b/gnucash/gnome/window-reconcile2.c
index 658b154..50cdf74 100644
--- a/gnucash/gnome/window-reconcile2.c
+++ b/gnucash/gnome/window-reconcile2.c
@@ -49,7 +49,6 @@
 #include "gnc-event.h"
 #include "gnc-filepath-utils.h"
 #include "gnc-gnome-utils.h"
-#include "gnc-main-window.h"
 #include "gnc-plugin-page-register2.h"
 #include "gnc-prefs.h"
 #include "gnc-ui.h"
@@ -1706,7 +1705,7 @@ recnWindow2WithBalance (GtkWidget *parent, Account *account,
 
         action_group = gtk_action_group_new ("ReconcileWindowActions");
         recnData->action_group = action_group;
-        gnc_gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE);
+        gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE);
         gtk_action_group_add_actions (action_group, recnWindow2_actions,
                                       recnWindow2_n_actions, recnData);
         action =



Summary of changes:
 gnucash/gnome-utils/gnc-embedded-window.c       |  2 +-
 gnucash/gnome-utils/gnc-main-window.c           | 37 ++-----------------------
 gnucash/gnome-utils/gnc-main-window.h           | 22 ---------------
 gnucash/gnome-utils/gnc-plugin-menu-additions.c |  3 +-
 gnucash/gnome-utils/gnc-plugin-page.c           |  2 +-
 gnucash/gnome/window-reconcile.c                |  4 +--
 gnucash/gnome/window-reconcile2.c               |  3 +-
 po/CMakeLists.txt                               |  6 +++-
 8 files changed, 13 insertions(+), 66 deletions(-)



More information about the gnucash-changes mailing list