gnucash master: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Sun May 24 16:49:58 EDT 2020


Updated	 via  https://github.com/Gnucash/gnucash/commit/c12ae077 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/947b9ea7 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/77a8f71d (commit)
	from  https://github.com/Gnucash/gnucash/commit/608e700a (commit)



commit c12ae077f7e786b9f15e3503d07ea41851fef5f1
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun May 24 13:45:32 2020 -0700

    Exclude mock files from translation.

diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
index 47092ce07..5c4cbaefa 100644
--- a/po/CMakeLists.txt
+++ b/po/CMakeLists.txt
@@ -85,7 +85,7 @@ 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-|mocks|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

commit 947b9ea7aae1b78190801dadacf8563ac71587fc
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun May 24 13:37:26 2020 -0700

    Make static gnucash_sheet_cursor_get, used only internally.

diff --git a/gnucash/register/register-gnome/gnucash-sheet.c b/gnucash/register/register-gnome/gnucash-sheet.c
index 4d5c4d11d..b1ea6d2b8 100644
--- a/gnucash/register/register-gnome/gnucash-sheet.c
+++ b/gnucash/register/register-gnome/gnucash-sheet.c
@@ -206,7 +206,7 @@ gnucash_sheet_cell_valid (GnucashSheet *sheet, VirtualLocation virt_loc)
 }
 
 
-void
+static void
 gnucash_sheet_cursor_set (GnucashSheet *sheet, VirtualLocation virt_loc)
 {
     g_return_if_fail (sheet != NULL);
diff --git a/gnucash/register/register-gnome/gnucash-sheet.h b/gnucash/register/register-gnome/gnucash-sheet.h
index a7c70f106..9ed25c915 100644
--- a/gnucash/register/register-gnome/gnucash-sheet.h
+++ b/gnucash/register/register-gnome/gnucash-sheet.h
@@ -75,8 +75,6 @@ void gnucash_sheet_redraw_help (GnucashSheet *sheet);
 void gnucash_sheet_redraw_block (GnucashSheet *sheet,
                                  VirtualCellLocation vcell_loc);
 
-void gnucash_sheet_cursor_set (GnucashSheet *gsheet, VirtualLocation virt_loc);
-
 const char * gnucash_sheet_modify_current_cell(GnucashSheet *sheet,
         const gchar *new_text);
 

commit 77a8f71da2e2312042df9995af733e12ae01852f
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun May 24 13:34:30 2020 -0700

    Delete unused function gnucashsh_sheet_get_text_cursor_position.

diff --git a/gnucash/register/register-gnome/gnucash-sheet.c b/gnucash/register/register-gnome/gnucash-sheet.c
index 04eca835d..4d5c4d11d 100644
--- a/gnucash/register/register-gnome/gnucash-sheet.c
+++ b/gnucash/register/register-gnome/gnucash-sheet.c
@@ -353,47 +353,6 @@ gnucash_sheet_get_text_offset (GnucashSheet *sheet, const VirtualLocation virt_l
     return x_offset;
 }
 
-static gint
-gnucash_sheet_get_text_cursor_position (GnucashSheet *sheet, const VirtualLocation virt_loc)
-{
-    GncItemEdit *item_edit = GNC_ITEM_EDIT(sheet->item_editor);
-    Table *table = sheet->table;
-    const char *text = gnc_table_get_entry (table, virt_loc);
-    PangoLayout *layout;
-    PangoRectangle logical_rect;
-    GdkRectangle rect;
-    gint x, y, width, height;
-    gint index, trailing;
-    gboolean result;
-    gint x_offset = 0;
-
-    if ((text == NULL) || (*text == '\0'))
-        return 0;
-
-    // Get the item_edit position
-    gnc_item_edit_get_pixel_coords (item_edit, &x, &y, &width, &height);
-
-    layout = gtk_widget_create_pango_layout (GTK_WIDGET (sheet), text);
-
-    // We don't need word wrap or line wrap
-    pango_layout_set_width (layout, -1);
-
-    pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
-
-    gnucash_sheet_set_text_bounds (sheet, &rect, x, y, width, height);
-
-    x_offset = gnucash_sheet_get_text_offset (sheet, virt_loc,
-                                              rect.width, logical_rect.width);
-
-    pango_layout_xy_to_index (layout,
-                 PANGO_SCALE * (sheet->button_x - rect.x - x_offset),
-                 PANGO_SCALE * (height/2), &index, &trailing);
-
-    g_object_unref (layout);
-
-    return index + trailing;
-}
-
 static void
 gnucash_sheet_activate_cursor_cell (GnucashSheet *sheet,
                                     gboolean changed_cells)



Summary of changes:
 gnucash/register/register-gnome/gnucash-sheet.c | 43 +------------------------
 gnucash/register/register-gnome/gnucash-sheet.h |  2 --
 po/CMakeLists.txt                               |  2 +-
 3 files changed, 2 insertions(+), 45 deletions(-)



More information about the gnucash-changes mailing list