Branch: refs/heads/master
Author: Abel Serrano Juste <akronix5(a)gmail.com>
Committer: GitHub <noreply(a)github.com>
Date: Thu, 28 Sep 2023 20:54:04 UTC
Commit: 579c0747437c3a99b93530b8a6e59e9a7d701fed
https://github.com/geany/geany/commit/579c0747437c3a99b93530b8a6e59e9a7d701…
Log Message:
-----------
Renamed pep8 to pycodestyle (#1776)
pep8 has been renamed to pycodestyle, see [1] , [2] and [3] for more info.
[1] https://github.com/PyCQA/pycodestyle/issues/466
[2] https://github.com/PyCQA/pycodestyle/issues/481
[3] https://github.com/PyCQA/pycodestyle/commit/2344a34a628b2f2e9df1c2539d93160…
Modified Paths:
--------------
data/filedefs/filetypes.python.in
doc/geany.txt
Modified: data/filedefs/filetypes.python.in
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -75,7 +75,7 @@ FT_00_LB=_Compile
FT_00_CM=@PYTHON_COMMAND@ -m py_compile "%f"
FT_00_WD=
FT_02_LB=_Lint
-FT_02_CM=pep8 --max-line-length=80 "%f"
+FT_02_CM=pycodestyle --max-line-length=80 "%f"
FT_02_WD=
error_regex=(.+):([0-9]+):([0-9]+)
EX_00_LB=_Execute
Modified: doc/geany.txt
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -3012,7 +3012,7 @@ division by zero, constant conditions, etc. Linters inspect the code and
issue warnings much like the compilers do. This is formally referred to as
static code analysis.
-Some common linters are pre-configured for you in the Build menu (``pep8``
+Some common linters are pre-configured for you in the Build menu (``pycodestyle``
for Python, ``cppcheck`` for C/C++, JSHint for JavaScript, ``xmllint`` for
XML, ``hlint`` for Haskell, ``shellcheck`` for shell code, ...), but all
these are standalone tools you need to obtain before using.
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Thomas Martitz <thomas.martitz(a)mailbox.org>
Committer: GitHub <noreply(a)github.com>
Date: Tue, 26 Sep 2023 06:05:18 UTC
Commit: b3dde4d21d55f97475b623f714a1156c8d2a46d9
https://github.com/geany/geany/commit/b3dde4d21d55f97475b623f714a1156c8d2a4…
Log Message:
-----------
Use gtk_show_uri_on_window() in utils_open_browser() by default (#3178)
Instead of requiring the user to specify a browser just try to
use the system default browser through gtk_show_uri_on_window().
This is done when tool_prefs.browser_cmd is empty which is
also the new default.
This aligns with windows where we do this already. Though we're
bypassing tool_prefs.browser_cmd there entirely, while on non-Windows
we still honor tool_prefs.browser_cmd when it's set.
This is primarily useful for flatpak support where we cannot just
execute arbitrary commands on the host (unless using flatpak-spawn).
Also, firefox is arguably a bad default these days, given the
declined market share.
Modified Paths:
--------------
data/geany.glade
src/keyfile.c
src/utils.c
Modified: data/geany.glade
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -4908,6 +4908,7 @@
<property name="tooltip-text" translatable="yes">Path (and possibly additional arguments) to your favorite browser</property>
<property name="primary-icon-activatable">False</property>
<property name="secondary-icon-activatable">False</property>
+ <property name="placeholder-text" translatable="yes">System default</property>
</object>
<packing>
<property name="left-attach">1</property>
Modified: src/keyfile.c
3 lines changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -91,7 +91,8 @@
#define GEANY_DEFAULT_FONT_MSG_WINDOW "Menlo Medium 12"
#define GEANY_DEFAULT_FONT_EDITOR "Menlo Medium 12"
#else
-#define GEANY_DEFAULT_TOOLS_BROWSER "firefox"
+/* Browser chosen by GTK */
+#define GEANY_DEFAULT_TOOLS_BROWSER ""
#define GEANY_DEFAULT_FONT_SYMBOL_LIST "Sans 9"
#define GEANY_DEFAULT_FONT_MSG_WINDOW "Monospace 9"
#define GEANY_DEFAULT_FONT_EDITOR "Monospace 10"
Modified: src/utils.c
27 lines changed, 20 insertions(+), 7 deletions(-)
===================================================================
@@ -64,8 +64,10 @@
/**
* Tries to open the given URI in a browser.
* On Windows, the system's default browser is opened.
- * On non-Windows systems, the browser command set in the preferences dialog is used. In case
- * that fails or it is unset, the user is asked to correct or fill it.
+ * On non-Windows systems, the browser command can be set in the preferences dialog.
+ * If unset (empty) the system's default browser is used. If set it specifies the
+ * command to execute. Either way, if it fails the user is prompted to correct the
+ * pref.
*
* @param uri The URI to open in the web browser.
*
@@ -78,15 +80,26 @@ void utils_open_browser(const gchar *uri)
g_return_if_fail(uri != NULL);
win32_open_browser(uri);
#else
- gchar *argv[2] = { (gchar *) uri, NULL };
+ gchar *new_cmd, *argv[2] = { (gchar *) uri, NULL };
g_return_if_fail(uri != NULL);
- while (!spawn_async(NULL, tool_prefs.browser_cmd, argv, NULL, NULL, NULL))
+ while (1)
{
- gchar *new_cmd = dialogs_show_input(_("Select Browser"), GTK_WINDOW(main_widgets.window),
- _("Failed to spawn the configured browser command. "
- "Please correct it or enter another one."),
+ /* Uses the user's default browser akin to xdg-open (in flatpak through a portal) */
+ if (EMPTY(tool_prefs.browser_cmd))
+ {
+ if (gtk_show_uri_on_window(GTK_WINDOW(main_widgets.window), uri, GDK_CURRENT_TIME, NULL))
+ break;
+ }
+ else if (spawn_async(NULL, tool_prefs.browser_cmd, argv, NULL, NULL, NULL))
+ break;
+
+ /* Allow the user to correct the pref. new_cmd may become empty. */
+ new_cmd = dialogs_show_input(_("Select Browser"), GTK_WINDOW(main_widgets.window),
+ _("Failed to spawn the configured browser command. Please "
+ "enter a valid command or leave it empty in order "
+ "to spawn the system default browser."),
tool_prefs.browser_cmd);
if (new_cmd == NULL) /* user canceled */
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).