Skip to content

Commit

Permalink
Merge branch 'geany:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex313031 committed Jun 11, 2024
2 parents 2be0878 + 7909ce2 commit e9f931e
Show file tree
Hide file tree
Showing 14 changed files with 64 additions and 20 deletions.
2 changes: 1 addition & 1 deletion ctags/gnu_regex/regex_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ static unsigned int re_string_context_at (const re_string_t *input, int idx,
#define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx))
#define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx))

#ifdef WIN32
#ifdef _WIN32
# include <malloc.h>
#else
# include <alloca.h>
Expand Down
1 change: 1 addition & 0 deletions data/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ filetypes_dist = \
filedefs/filetypes.d \
filedefs/filetypes.diff \
filedefs/filetypes.docbook \
filedefs/filetypes.Dockerfile.conf \
filedefs/filetypes.erlang \
filedefs/filetypes.f77 \
filedefs/filetypes.forth \
Expand Down
14 changes: 14 additions & 0 deletions data/filedefs/filetypes.Dockerfile.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[styling=Sh]

[keywords]
primary=ADD ARG CMD COPY ENTRYPOINT ENV EXPOSE FROM HEALTHCHECK LABEL MAINTAINER ONBUILD RUN SHELL STOPSIGNAL USER VOLUME WORKDIR

[lexer_properties=Sh]

[settings]
lexer_filetype=Sh
tag_parser=Sh
extension=Dockerfile
comment_single=#
comment_use_indent=true
context_action_cmd=xdg-open "https://docs.docker.com/engine/reference/builder/"
4 changes: 2 additions & 2 deletions data/filedefs/filetypes.powershell
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ user1=keyword_3

[keywords]
# all items must be in one line and in lowercase
keywords=begin break catch continue default do else elseif end filter finally for foreach function if in process return trap throw try switch until where while
keywords=begin break catch class clean continue data define do dynamicparam else elseif end enum exit filter finally for foreach from function hidden if in param process return static switch throw trap try until using var while
cmdlets=add-computer add-content add-history add-member add-pssnapin add-type checkpoint-computer clear-content clear-eventlog clear-history clear-item clear-itemproperty clear-variable compare-object complete-transaction connect-pssession connect-wsman convert-path convertfrom-csv convertfrom-json convertfrom-securestring convertfrom-stringdata convertto-csv convertto-html convertto-json convertto-securestring convertto-xml copy-item copy-itemproperty debug-process disable-computerrestore disable-psbreakpoint disable-psremoting disable-pssessionconfiguration disable-wsmancredssp disconnect-pssession disconnect-wsman enable-computerrestore enable-psbreakpoint enable-psremoting enable-pssessionconfiguration enable-wsmancredssp enter-pssession exit-pssession export-alias export-cimcommand export-clixml export-console export-counter export-csv export-formatdata export-modulemember export-pssession foreach-object format-custom format-list format-table format-wide get-acl get-alias get-authenticodesignature get-childitem get-command get-computerrestorepoint get-content get-controlpanelitem get-counter get-credential get-culture get-date get-event get-eventlog get-eventsubscriber get-executionpolicy get-formatdata get-help get-history get-host get-hotfix get-item get-itemproperty get-job get-location get-member get-module get-pfxcertificate get-process get-psbreakpoint get-pscallstack get-psdrive get-psprovider get-pssession get-pssessionconfiguration get-pssnapin get-random get-service get-tracesource get-transaction get-typedata get-uiculture get-unique get-variable get-winevent get-wmiobject get-wsmancredssp get-wsmaninstance group-object import-alias import-clixml import-counter import-csv import-localizeddata import-module import-pssession invoke-command invoke-expression invoke-history invoke-item invoke-restmethod invoke-webrequest invoke-wmimethod invoke-wsmanaction join-path limit-eventlog measure-command measure-object move-item move-itemproperty new-alias new-event new-eventlog new-item new-itemproperty new-module new-modulemanifest new-object new-psdrive new-pssession new-pssessionconfigurationfile new-pssessionoption new-pstransportoption new-service new-timespan new-variable new-webserviceproxy new-winevent new-wsmaninstance new-wsmansessionoption out-default out-file out-gridview out-host out-null out-printer out-string pop-location push-location read-host receive-job receive-pssession register-engineevent register-jobevent register-objectevent register-pssessionconfiguration register-wmievent remove-computer remove-event remove-eventlog remove-item remove-itemproperty remove-job remove-module remove-psbreakpoint remove-psdrive remove-pssession remove-pssnapin remove-typedata remove-variable remove-wmiobject remove-wsmaninstance rename-computer rename-item rename-itemproperty reset-computermachinepassword resolve-path restart-computer restart-service restore-computer resume-job resume-service save-help select-object select-string select-xml send-mailmessage set-acl set-alias set-authenticodesignature set-content set-date set-executionpolicy set-item set-itemproperty set-location set-psbreakpoint set-psdebug set-pssessionconfiguration set-service set-strictmode set-tracesource set-variable set-wmiinstance set-wsmaninstance set-wsmanquickconfig show-command show-controlpanelitem show-eventlog sort-object split-path start-job start-process start-service start-sleep start-transaction start-transcript stop-computer stop-job stop-process stop-service stop-transcript suspend-job suspend-service tee-object test-computersecurechannel test-connection test-modulemanifest test-path test-pssessionconfigurationfile test-wsman trace-command unblock-file undo-transaction unregister-event unregister-pssessionconfiguration update-formatdata update-help update-list update-typedata use-transaction wait-event wait-job wait-process where-object write-debug write-error write-eventlog write-host write-output write-progress write-verbose write-warning
aliases=ac asnp cat cd chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp cvpa dbp del diff dir dnsn ebp echo epal epcsv epsn erase etsn exsn fc fl ft fw gal gbp gc gci gcm gcs gdr ghy gi gjb gl gm gmo gp gps group gsn gsnp gsv gu gv gwmi h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mount move mp mv nal ndr ni nmo nsn nv ogv oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc select set si sl sleep sls sort sp spjb spps spsv start sujb sv swmi tee type wjb write
aliases=ac asnp cat cd chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp cvpa dbp del diff dir dnsn ebp echo epal epcsv epsn erase etsn exsn fc fl foreach ft fw gal gbp gc gci gcm gcs gdr ghy gi gjb gl gm gmo gp gps group gsn gsnp gsv gu gv gwmi h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mount move mp mv nal ndr ni nmo nsn nv ogv oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc select set si sl sleep sls sort sp spjb spps spsv start sujb sv swmi tee type where wjb write
functions=clear-host get-verb help importsystemmodules mkdir more oss param parameter prompt psedit tabexpansion2
docComment=component description example externalhelp forwardhelpcategory forwardhelptargetname functionality inputs link notes outputs parameter remotehelprunspace role synopsis
user1=
Expand Down
5 changes: 3 additions & 2 deletions data/filetype_extensions.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Cython=*.pyx;*.pxd;*.pxi;
D=*.d;*.di;
Diff=*.diff;*.patch;*.rej;
Docbook=*.docbook;
Dockerfile=Dockerfile;dockerfile;*.dockerfile;*.Dockerfile;Dockerfile.*;
Erlang=*.erl;*.hrl;
F77=*.f;*.for;*.ftn;*.f77;*.F;*.FOR;*.FTN;*.fpp;*.FPP;*.F77;
Forth=*.fs;*.fth;
Expand Down Expand Up @@ -74,7 +75,7 @@ SQL=*.sql;
Swift=*.swift;
Tcl=*.tcl;*.tk;*.wish;*.exp;
Txt2tags=*.t2t;
TypeScript=*.ts;
TypeScript=*.ts;*.cts;*.mts;
Vala=*.vala;*.vapi;
Verilog=*.v;
VHDL=*.vhd;*.vhdl;
Expand All @@ -86,7 +87,7 @@ None=*;
# Note: restarting is required after editing groups
[Groups]
Programming=Arduino;Clojure;CUDA;Cython;Genie;Groovy;Kotlin;Nim;Scala;Swift;
Script=Graphviz;TypeScript;Meson;
Script=Dockerfile;Graphviz;TypeScript;Meson;
Markup=
Misc=JSON;
None=
2 changes: 2 additions & 0 deletions geany.nsi.in
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ Section -AdditionalIcons
SectionEnd

Section -Post
Exec '"$INSTDIR\bin\glib-compile-schemas.exe" "$INSTDIR\share\glib-2.0\schemas"'

WriteUninstaller "$INSTDIR\uninst.exe"
WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" Path "$INSTDIR"
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "StartMenu" "$SMPROGRAMS\$StartmenuFolder"
Expand Down
1 change: 0 additions & 1 deletion m4/geany-mingw.m4
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ AC_DEFUN([GEANY_CHECK_MINGW],
[
case "${host}" in
*mingw*)
AC_DEFINE([WIN32], [1], [we are cross compiling for WIN32])
GEANY_CHECK_VTE([no])
GEANY_CHECK_SOCKET([yes])
AM_CONDITIONAL([MINGW], true)
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ cdata.set_quoted('PACKAGE_NAME','Geany')
cdata.set_quoted('PACKAGE_STRING', 'Geany ' + meson.project_version())
cdata.set_quoted('PACKAGE_VERSION', meson.project_version())
cdata.set('GETTEXT_PACKAGE', 'PACKAGE')
cdata.set('VERSION', meson.project_version())
cdata.set_quoted('VERSION', meson.project_version())
cdata.set('ENABLE_NLS', 1)
if (host_machine.system() != 'windows' and get_option('vte'))
cdata.set('HAVE_VTE', 1)
Expand Down
2 changes: 1 addition & 1 deletion plugins/filebrowser.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#elif defined(__APPLE__)
# define OPEN_CMD "open \"%d\""
#else
# define OPEN_CMD "nautilus \"%d\""
# define OPEN_CMD "xdg-open \"%d\""
#endif

GeanyPlugin *geany_plugin;
Expand Down
8 changes: 4 additions & 4 deletions po/nl.po
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ msgstr ""
"Project-Id-Version: Geany 2.0\n"
"Report-Msgid-Bugs-To: https://github.com/geany/geany/issues\n"
"POT-Creation-Date: 2023-10-04 23:48+0200\n"
"PO-Revision-Date: 2023-10-08 12:21+0200\n"
"PO-Revision-Date: 2024-05-23 08:47+0200\n"
"Last-Translator: Peter Scholtens <peter.scholtens@freedom.nl>\n"
"Language-Team: Dutch <geany-i18n@uvena.de>\n"
"Language: nl\n"
Expand Down Expand Up @@ -5045,7 +5045,7 @@ msgstr "Zijbalk _verbergen"

#: src/sidebar.c:1173
msgid "D_ocuments Only"
msgstr "All_een bestanden weergevn"
msgstr "All_een bestanden weergeven"

#: src/sidebar.c:1174
msgid "Show _Paths"
Expand Down Expand Up @@ -6199,9 +6199,9 @@ msgid ""
"Date/_Time format for backup files (for a list of available conversion "
"specifiers see https://docs.gtk.org/glib/method.DateTime.format.html):"
msgstr ""
"Aangepaste datum- en tijdsindeling voor backupbestanden. Een lijst van "
"Aangepaste datum- en tijdsindeling voor back-upbestanden. Een lijst van "
"beschikbare conversie-opties staat op: https://docs.gtk.org/glib/method."
"DateTime.format.html."
"DateTime.format.html:"

#: plugins/saveactions.c:830
msgid "Directory _levels to include in the backup destination:"
Expand Down
4 changes: 2 additions & 2 deletions scripts/gtk-bundle-from-msys2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ cleanup_unnecessary_files() {
rm -rf share/vala
rm -rf share/xml
rm -rf usr/share/libalpm
# cleanup binaries and libs (delete anything except *.dll and GSpawn helper binaries)
find bin ! -name '*.dll' ! -name 'grep.exe' ! -name 'gspawn-win32-helper*.exe' -type f -delete
# cleanup binaries and libs (delete anything except *.dll, glib-compile-schemas and GSpawn helper binaries)
find bin ! -name '*.dll' ! -name 'grep.exe' ! -name 'gspawn-win32-helper*.exe' ! -name 'glib-compile-schemas.exe' -type f -delete
# cleanup empty directories
find . -type d -empty -delete
}
Expand Down
13 changes: 10 additions & 3 deletions src/build.c
Original file line number Diff line number Diff line change
Expand Up @@ -1268,17 +1268,24 @@ static void on_build_menu_item(GtkWidget *w, gpointer user_data)
if (grp == GEANY_GBG_NON_FT && cmd == GBO_TO_CMD(GEANY_GBO_CUSTOM))
{
static GtkWidget *dialog = NULL; /* keep dialog for combo history */
gchar *str;

bc = get_build_cmd(doc, grp, cmd, NULL);
str = g_strdup_printf(_("Enter custom text to append to the command \"%s\":"),
bc->command);
if (! dialog)
{
dialog = dialogs_show_input_persistent(_("Custom Text"), GTK_WINDOW(main_widgets.window),
_("Enter custom text here, all entered text is appended to the command."),
build_info.custom_target, &on_make_custom_input_response, NULL);
dialog = dialogs_show_input_persistent(NULL, GTK_WINDOW(main_widgets.window),
str, build_info.custom_target, &on_make_custom_input_response, NULL);
}
else
{
gtk_label_set_label(GTK_LABEL(ui_lookup_widget(dialog, "label")), str);
gtk_widget_show(dialog);
}
SETPTR(str, utils_str_remove_chars(g_strdup(bc->label), "_"));
gtk_window_set_title(GTK_WINDOW(dialog), str);
g_free(str);
return;
}
else if (grp == GEANY_GBG_EXEC)
Expand Down
1 change: 1 addition & 0 deletions src/dialogs.c
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,7 @@ dialogs_show_input_full(const gchar *title, GtkWindow *parent,
GtkWidget *label = gtk_label_new(label_text);
gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
ui_hookup_widget(dialog, label, "label");
gtk_container_add(GTK_CONTAINER(vbox), label);
}

Expand Down
25 changes: 22 additions & 3 deletions src/tagmanager/tm_ctags.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,9 @@ void tm_ctags_parse(guchar *buffer, gsize buffer_size,
{
g_return_if_fail(buffer != NULL || file_name != NULL);

if (language == TM_PARSER_NONE)
return;

parseRawBuffer(file_name, buffer, buffer_size, language, source_file);

rename_anon_tags(source_file);
Expand All @@ -452,6 +455,9 @@ void tm_ctags_parse(guchar *buffer, gsize buffer_size,

const gchar *tm_ctags_get_lang_name(TMParserType lang)
{
if (lang == TM_PARSER_NONE)
return "unknown";

return getLanguageName(lang);
}

Expand All @@ -464,10 +470,15 @@ TMParserType tm_ctags_get_named_lang(const gchar *name)

const gchar *tm_ctags_get_lang_kinds(TMParserType lang)
{
guint kind_num = countLanguageKinds(lang);
static gchar kinds[257];
guint kind_num;
guint i;

if (lang == TM_PARSER_NONE)
return "";

kind_num = countLanguageKinds(lang);

for (i = 0; i < kind_num; i++)
kinds[i] = getLanguageKind(lang, i)->letter;
kinds[i] = '\0';
Expand All @@ -478,14 +489,22 @@ const gchar *tm_ctags_get_lang_kinds(TMParserType lang)

const gchar *tm_ctags_get_kind_name(gchar kind, TMParserType lang)
{
kindDefinition *def = getLanguageKindForLetter(lang, kind);
kindDefinition *def = NULL;

if (lang != TM_PARSER_NONE)
def = getLanguageKindForLetter(lang, kind);

return def ? def->name : "unknown";
}


gchar tm_ctags_get_kind_from_name(const gchar *name, TMParserType lang)
{
kindDefinition *def = getLanguageKindForName(lang, name);
kindDefinition *def = NULL;

if (lang != TM_PARSER_NONE)
def = getLanguageKindForName(lang, name);

return def ? def->letter : '-';
}

Expand Down

0 comments on commit e9f931e

Please sign in to comment.