Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Tue, 24 Oct 2023 16:32:09 UTC
Commit: 35043402562a8ba8566f0cd4d7be6a1c94f006ba
https://github.com/geany/geany/commit/35043402562a8ba8566f0cd4d7be6a1c94f00…
Log Message:
-----------
Autotools: regenerate gmo files when po files are updated
Make sure the gmo files are regenerated when the corresponding po files
are updated, not to have stale translations after updating a po file.
This behavior most likely changed with the switch from GLib gettext
infrastructure to to plain gettext one in
32977676a90244e0410524614757d2cf214bae43.
I had a hard time finding a rationale for the behavior of not
automatically updating the gmo files when their source changed; all I
could find is [1] which suggests it's intentional. Still, at least
with our configuration of PO_DEPENDS_ON_POT=no, which means po files
are not updated all the time, the point seems moot and does more harm
than good.
Fix this by manually adding the correct dependency to the main target
so the gmo files are updated automatically when the po changes.
The only case where I can see it performing "useless" work is when
calling update-po, which will effectively update all po files, and thus
rebuild all gmo files. But that doesn't sound like any kind of
problem, and rather expected.
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=400453#24
Modified Paths:
--------------
po/Rules-gmo
Modified: po/Rules-gmo
12 lines changed, 12 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,12 @@
+# Make sure the gmo files are regenerated when the po files are updated,
+# without the need for manually calling `make update-gmo` or `make ll.gmo`.
+# See e.g. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=400453#24, I
+# couldn't find any canonical info on this.
+
+DISTFILES.common += Rules-gmo
+
+# Make sure changing this files updates the generated Makefile
+Makefile: Rules-gmo
+
+# Just make the gmo files a default dependency, the rest is done automatically.
+all-yes: $(GMOFILES)
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Wed, 12 Jun 2024 20:50:46 UTC
Commit: a0964041b874f79a435271356326d0ac87721b6d
https://github.com/geany/geany/commit/a0964041b874f79a435271356326d0ac87721…
Log Message:
-----------
Merge pull request #3650 from b4n/autotools-gmo-update
Autotools: regenerate gmo files when po files are updated
Modified Paths:
--------------
po/Rules-gmo
Modified: po/Rules-gmo
12 lines changed, 12 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,12 @@
+# Make sure the gmo files are regenerated when the po files are updated,
+# without the need for manually calling `make update-gmo` or `make ll.gmo`.
+# See e.g. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=400453#24, I
+# couldn't find any canonical info on this.
+
+DISTFILES.common += Rules-gmo
+
+# Make sure changing this files updates the generated Makefile
+Makefile: Rules-gmo
+
+# Just make the gmo files a default dependency, the rest is done automatically.
+all-yes: $(GMOFILES)
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Jiří Techet <techet(a)gmail.com>
Committer: Jiří Techet <techet(a)gmail.com>
Date: Tue, 11 Jun 2024 11:06:44 UTC
Commit: f1a2870609d855c4ba3acbfc341bb314cc96b687
https://github.com/geany/geany/commit/f1a2870609d855c4ba3acbfc341bb314cc96b…
Log Message:
-----------
Remove some more win32 code that was previously used by native dialogs
Modified Paths:
--------------
src/win32.c
Modified: src/win32.c
121 lines changed, 0 insertions(+), 121 deletions(-)
===================================================================
@@ -60,127 +60,6 @@
#include <gdk/gdkwin32.h>
-/* The timer handle used to refresh windows below modal native dialogs. If
- * ever more than one dialog can be shown at a time, this needs to be changed
- * to be for specific dialogs. */
-static UINT_PTR dialog_timer = 0;
-
-
-G_INLINE_FUNC void win32_dialog_reset_timer(HWND hwnd)
-{
- if (G_UNLIKELY(dialog_timer != 0))
- {
- KillTimer(hwnd, dialog_timer);
- dialog_timer = 0;
- }
-}
-
-
-static VOID CALLBACK
-win32_dialog_update_main_window(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
-{
- gint i;
-
- /* Pump the main window loop a bit, but not enough to lock-up.
- * The typical `while(gtk_events_pending()) gtk_main_iteration();`
- * loop causes the entire operating system to lock-up. */
- for (i = 0; i < 4 && gtk_events_pending(); i++)
- gtk_main_iteration();
-
- /* Cancel any pending timers since we just did an update */
- win32_dialog_reset_timer(hwnd);
-}
-
-
-G_INLINE_FUNC UINT_PTR win32_dialog_queue_main_window_redraw(HWND dlg, UINT msg,
- WPARAM wParam, LPARAM lParam, gboolean postpone)
-{
- switch (msg)
- {
- /* Messages that likely mean the window below a dialog needs to be re-drawn. */
- case WM_WINDOWPOSCHANGED:
- case WM_MOVE:
- case WM_SIZE:
- case WM_THEMECHANGED:
- if (postpone)
- {
- win32_dialog_reset_timer(dlg);
- dialog_timer = SetTimer(dlg, 0, 33 /* around 30fps */, win32_dialog_update_main_window);
- }
- else
- win32_dialog_update_main_window(dlg, msg, wParam, lParam);
- break;
- }
- return 0; /* always let the default proc handle it */
-}
-
-
-/* This function is called for OPENFILENAME lpfnHook function and it establishes
- * a timer that is reset each time which will update the main window loop eventually. */
-static UINT_PTR CALLBACK win32_dialog_explorer_hook_proc(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- return win32_dialog_queue_main_window_redraw(dlg, msg, wParam, lParam, TRUE);
-}
-
-
-/* This function is called for old-school win32 dialogs that accept a proper
- * lpfnHook function for all messages, it doesn't use a timer. */
-static UINT_PTR CALLBACK win32_dialog_hook_proc(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- return win32_dialog_queue_main_window_redraw(dlg, msg, wParam, lParam, FALSE);
-}
-
-
-/* Converts the given UTF-8 filename or directory name into something usable for Windows and
- * returns the directory part of the given filename. */
-static wchar_t *get_dir_for_path(const gchar *utf8_filename)
-{
- static wchar_t w_dir[MAX_PATH];
- gchar *result;
-
- if (g_file_test(utf8_filename, G_FILE_TEST_IS_DIR))
- result = (gchar*) utf8_filename;
- else
- result = g_path_get_dirname(utf8_filename);
-
- MultiByteToWideChar(CP_UTF8, 0, result, -1, w_dir, G_N_ELEMENTS(w_dir));
-
- if (result != utf8_filename)
- g_free(result);
-
- return w_dir;
-}
-
-
-/* Callback function for setting the initial directory of the folder open dialog. This could also
- * be done with BROWSEINFO.pidlRoot and SHParseDisplayName but SHParseDisplayName is not available
- * on systems below Windows XP. So, we go the hard way by creating a callback which will set up the
- * folder when the dialog is initialised. Yeah, I like Windows. */
-static INT CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData)
-{
- win32_dialog_hook_proc(hwnd, uMsg, lp, pData);
- switch (uMsg)
- {
- case BFFM_INITIALIZED:
- {
- SendMessageW(hwnd, BFFM_SETSELECTIONW, TRUE, pData);
- break;
- }
- case BFFM_SELCHANGED:
- {
- /* set the status window to the currently selected path. */
- static wchar_t szDir[MAX_PATH];
- if (SHGetPathFromIDListW((LPITEMIDLIST) lp, szDir))
- {
- SendMessageW(hwnd, BFFM_SETSTATUSTEXTW, 0, (LPARAM) szDir);
- }
- break;
- }
- }
- return 0;
-}
-
-
/* Creates a native Windows message box of the given type and returns always TRUE
* or FALSE representing th pressed Yes or No button.
* If type is not GTK_MESSAGE_QUESTION, it returns always TRUE. */
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Jiří Techet <techet(a)gmail.com>
Committer: Jiří Techet <techet(a)gmail.com>
Date: Sun, 09 Jun 2024 17:15:46 UTC
Commit: 2337e3e9e4334b8c9ce44460b6f6f8ed94ab2986
https://github.com/geany/geany/commit/2337e3e9e4334b8c9ce44460b6f6f8ed94ab2…
Log Message:
-----------
Reword help tooltip for the native dialogs
Modified Paths:
--------------
data/geany.glade
Modified: data/geany.glade
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -1317,7 +1317,7 @@
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
- <property name="tooltip-text" translatable="yes">Defines whether to use the platform-native file dialogs or whether to use the GTK default dialogs</property>
+ <property name="tooltip-text" translatable="yes">Defines whether to use the platform-native file dialogs or the GTK default dialogs</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
</object>
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).