lists.geany.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
List overview
Plugins-Commits
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
plugins-commits@lists.geany.org
1 participants
5473 discussions
Start a n
N
ew thread
[geany/geany-plugins] 9497d8: Make libgit2 version preprocessor conditionals compatible with libgit2-0.99
by Dominik Schmidt
23 Feb '20
23 Feb '20
Branch: refs/heads/master Author: Dominik Schmidt <dominik(a)schm1dt.ch> Committer: Dominik Schmidt <dominik(a)schm1dt.ch> Date: Sun, 23 Feb 2020 18:20:35 UTC Commit: 9497d829e1b207eb83575dc6f617feecfb89bc16
https://github.com/geany/geany-plugins/commit/9497d829e1b207eb83575dc6f617f…
Log Message: ----------- Make libgit2 version preprocessor conditionals compatible with libgit2-0.99 LIBGIT2_SOVERSION is defined as string literal, e.g. "0.99", from libgit2-0.99 and beyond. Arithmetic checks against this variable whill hence fail. This patch switches the checks to compare against the LIBGIT2_VER_* family, which should be more stable. Modified Paths: -------------- git-changebar/src/gcb-plugin.c workbench/src/plugin_main.c Modified: git-changebar/src/gcb-plugin.c 6 lines changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -32,11 +32,11 @@ #include <geany.h> #include <document.h> -#if ! defined (LIBGIT2_SOVERSION) || LIBGIT2_SOVERSION < 22 +#if ! defined (LIBGIT2_VER_MINOR) || ( (LIBGIT2_VER_MAJOR == 0) && (LIBGIT2_VER_MINOR < 22) ) # define git_libgit2_init git_threads_init # define git_libgit2_shutdown git_threads_shutdown #endif -#if ! defined (LIBGIT2_SOVERSION) || LIBGIT2_SOVERSION < 23 +#if ! defined (LIBGIT2_VER_MINOR) || ( (LIBGIT2_VER_MAJOR == 0) && (LIBGIT2_VER_MINOR < 23) ) /* 0.23 added @p binary_cb */ # define git_diff_buffers(old_buffer, old_len, old_as_path, \ new_buffer, new_len, new_as_path, options, \ @@ -45,7 +45,7 @@ new_buffer, new_len, new_as_path, options, \ file_cb, hunk_cb, line_cb, payload) #endif -#if ! defined (LIBGIT2_SOVERSION) || LIBGIT2_SOVERSION < 28 +#if ! defined (LIBGIT2_VER_MINOR) || ( (LIBGIT2_VER_MAJOR == 0) && (LIBGIT2_VER_MINOR < 28) ) # define git_buf_dispose git_buf_free # define git_error_last giterr_last #endif Modified: workbench/src/plugin_main.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -36,7 +36,7 @@ #include "tm_control.h" -#if ! defined (LIBGIT2_SOVERSION) || LIBGIT2_SOVERSION < 22 +#if ! defined (LIBGIT2_VER_MINOR) || ( (LIBGIT2_VER_MAJOR == 0) && (LIBGIT2_VER_MINOR < 22)) # define git_libgit2_init git_threads_init # define git_libgit2_shutdown git_threads_shutdown #endif -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] 1f8bb8: Merge pull request #947 from b4n/cppcheck-include
by Colomban Wendling
07 Feb '20
07 Feb '20
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Fri, 07 Feb 2020 18:54:50 UTC Commit: 1f8bb80fff647fb031211f3bf1f470304a3c2c14
https://github.com/geany/geany-plugins/commit/1f8bb80fff647fb031211f3bf1f47…
Log Message: ----------- Merge pull request #947 from b4n/cppcheck-include cppcheck: Set Geany include path for it to find header files Modified Paths: -------------- build/compat.m4 build/cppcheck.m4 build/cppcheck.mk Modified: build/compat.m4 18 lines changed, 18 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,18 @@ +dnl taken from Autoconf's m4sh.m4, GPLv3+ +m4_ifndef([AS_VAR_COPY], [ +m4_define([AS_VAR_COPY], +[AS_LITERAL_WORD_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])]) +]) + +dnl taken from pkg-config's pkg.m4, GPLv2+ +m4_ifndef([PKG_CHECK_VAR], [ +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])dnl PKG_CHECK_VAR +]) Modified: build/cppcheck.m4 4 lines changed, 4 insertions(+), 0 deletions(-) =================================================================== @@ -21,4 +21,8 @@ AC_DEFUN([GP_CHECK_CPPCHECK], AM_CONDITIONAL([HAVE_CPPCHECK], [test "x$gp_have_cppcheck" = xyes]) GP_STATUS_BUILD_FEATURE_ADD([Static code checking], [$gp_have_cppcheck]) + + GP_GEANY_PKG_CONFIG_PATH_PUSH + PKG_CHECK_VAR([GEANY_INCLUDEDIR], [geany], [includedir], [], []) + GP_GEANY_PKG_CONFIG_PATH_POP ]) Modified: build/cppcheck.mk 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -4,6 +4,7 @@ if HAVE_CPPCHECK check-cppcheck: $(srcdir) $(CPPCHECK) \ -q --template gcc --error-exitcode=2 \ + -I$(GEANY_INCLUDEDIR)/geany \ $(AM_CPPCHECKFLAGS) $(CPPCHECKFLAGS) \ $(srcdir) -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] e07cba: Define AS_VAR_COPY for old Autoconf
by Colomban Wendling
02 Feb '20
02 Feb '20
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sun, 02 Feb 2020 20:11:07 UTC Commit: e07cba1e1a8b13ab70afe69bd4b0d55a5aa3a60a
https://github.com/geany/geany-plugins/commit/e07cba1e1a8b13ab70afe69bd4b0d…
Log Message: ----------- Define AS_VAR_COPY for old Autoconf Implementation shamelessly copied over from Autoconf's m4sh.m4, GPLv3+. Modified Paths: -------------- build/compat.m4 Modified: build/compat.m4 6 lines changed, 6 insertions(+), 0 deletions(-) =================================================================== @@ -1,3 +1,9 @@ +dnl taken from Autoconf's m4sh.m4, GPLv3+ +m4_ifndef([AS_VAR_COPY], [ +m4_define([AS_VAR_COPY], +[AS_LITERAL_WORD_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])]) +]) + dnl taken from pkg-config's pkg.m4, GPLv2+ m4_ifndef([PKG_CHECK_VAR], [ AC_DEFUN([PKG_CHECK_VAR], -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] 10a261: Define PKG_CHECK_VAR for old pkg-config (<= 0.28)
by Colomban Wendling
02 Feb '20
02 Feb '20
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sun, 02 Feb 2020 20:09:28 UTC Commit: 10a26171e92c525f567fe0e8902f1e2779acdcb5
https://github.com/geany/geany-plugins/commit/10a26171e92c525f567fe0e8902f1…
Log Message: ----------- Define PKG_CHECK_VAR for old pkg-config (<= 0.28) Implementation shamelessly copied over from pkg-config's pkg.m4, GPLv2+. Modified Paths: -------------- build/compat.m4 Modified: build/compat.m4 12 lines changed, 12 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,12 @@ +dnl taken from pkg-config's pkg.m4, GPLv2+ +m4_ifndef([PKG_CHECK_VAR], [ +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])dnl PKG_CHECK_VAR +]) -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] 3d0c51: cppcheck: Set Geany include path for it to find header files
by Colomban Wendling
02 Feb '20
02 Feb '20
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sun, 02 Feb 2020 19:19:45 UTC Commit: 3d0c513d57f5de8bf568dd642e330a746439759f
https://github.com/geany/geany-plugins/commit/3d0c513d57f5de8bf568dd642e330…
Log Message: ----------- cppcheck: Set Geany include path for it to find header files This fixes build with recent versions of cppcheck with some plugins using PLUGIN_VERSION_CHECK() macro, like the latex plugin. Modified Paths: -------------- build/cppcheck.m4 build/cppcheck.mk Modified: build/cppcheck.m4 4 lines changed, 4 insertions(+), 0 deletions(-) =================================================================== @@ -21,4 +21,8 @@ AC_DEFUN([GP_CHECK_CPPCHECK], AM_CONDITIONAL([HAVE_CPPCHECK], [test "x$gp_have_cppcheck" = xyes]) GP_STATUS_BUILD_FEATURE_ADD([Static code checking], [$gp_have_cppcheck]) + + GP_GEANY_PKG_CONFIG_PATH_PUSH + PKG_CHECK_VAR([GEANY_INCLUDEDIR], [geany], [includedir], [], []) + GP_GEANY_PKG_CONFIG_PATH_POP ]) Modified: build/cppcheck.mk 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -4,6 +4,7 @@ if HAVE_CPPCHECK check-cppcheck: $(srcdir) $(CPPCHECK) \ -q --template gcc --error-exitcode=2 \ + -I$(GEANY_INCLUDEDIR)/geany \ $(AM_CPPCHECKFLAGS) $(CPPCHECKFLAGS) \ $(srcdir) -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] e3d7f3: jump on 0 line if not selecting
by Sagar Chalise
19 Jan '20
19 Jan '20
Branch: refs/heads/master Author: Sagar Chalise <chalisesagar(a)gmail.com> Committer: Sagar Chalise <chalisesagar(a)gmail.com> Date: Tue, 15 Oct 2019 14:10:56 UTC Commit: e3d7f37ecb5bf394f329b7f94ff86aabac45ba32
https://github.com/geany/geany-plugins/commit/e3d7f37ecb5bf394f329b7f94ff86…
Log Message: ----------- jump on 0 line if not selecting Modified Paths: -------------- pairtaghighlighter/src/pair_tag_highlighter.c Modified: pairtaghighlighter/src/pair_tag_highlighter.c 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -411,7 +411,7 @@ static void select_or_match_tag (gboolean select) { gint cur_line; - gint jump_line=0, select_start=0, select_end=0; + gint jump_line=-5, select_start=0, select_end=0; GeanyDocument *doc = document_get_current(); if(highlightedBrackets[0] != highlightedBrackets[2]){ cur_line = sci_get_current_position(doc->editor->sci); @@ -434,7 +434,7 @@ select_or_match_tag (gboolean select) sci_set_selection_start(doc->editor->sci, select_start); sci_set_selection_end(doc->editor->sci, select_end); } - if(!select && jump_line != 0){ + else if (jump_line >= 0){ sci_set_current_position(doc->editor->sci, jump_line, TRUE); } } -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] d2f2a0: jump to matching tag and select matching tag
by Sagar Chalise
19 Jan '20
19 Jan '20
Branch: refs/heads/master Author: Sagar Chalise <chalisesagar(a)gmail.com> Committer: Sagar Chalise <chalisesagar(a)gmail.com> Date: Fri, 11 Oct 2019 05:02:18 UTC Commit: d2f2a050b70d13ea2863b02ee95c5487bc2daf0b
https://github.com/geany/geany-plugins/commit/d2f2a050b70d13ea2863b02ee95c5…
Log Message: ----------- jump to matching tag and select matching tag Modified Paths: -------------- pairtaghighlighter/src/pair_tag_highlighter.c Modified: pairtaghighlighter/src/pair_tag_highlighter.c 90 lines changed, 77 insertions(+), 13 deletions(-) =================================================================== @@ -24,6 +24,7 @@ /* Keyboard Shortcut */ enum { KB_MATCH_TAG, + KB_SELECT_TAG, KB_COUNT }; @@ -34,6 +35,8 @@ GeanyData *geany_data; /* Is needed for clearing highlighting after moving cursor out * from the tag */ static gint highlightedBrackets[] = {0, 0, 0, 0}; +static GtkWidget *goto_matching_tag = NULL; +static GtkWidget *select_matching_tag = NULL; PLUGIN_VERSION_CHECK(224) @@ -404,40 +407,101 @@ static gboolean on_editor_notify(GObject *obj, GeanyEditor *editor, /* returning FALSE to allow Geany processing the event */ return FALSE; } - static void -on_kb_goto_matching_tag (guint key_id) +select_or_match_tag (gboolean select) { gint cur_line; - gint jump_line = 0; - if(highlightedBrackets[0] != highlightedBrackets[2] && highlightedBrackets[0] != 0){ - GeanyDocument *doc = document_get_current(); + gint jump_line=0, select_start=0, select_end=0; + GeanyDocument *doc = document_get_current(); + if(highlightedBrackets[0] != highlightedBrackets[2]){ cur_line = sci_get_current_position(doc->editor->sci); if(cur_line >= highlightedBrackets[0] && cur_line <= highlightedBrackets[1]){ - jump_line = highlightedBrackets[2]; + if (!select){ + jump_line = highlightedBrackets[2]; + } } else if(cur_line >= highlightedBrackets[2] && cur_line <= highlightedBrackets[3]){ - jump_line = highlightedBrackets[0]; + if(!select){ + jump_line = highlightedBrackets[0]; + } } - if(jump_line != 0){ - sci_set_current_position(doc->editor->sci, jump_line, TRUE); + if(select){ + select_end = (highlightedBrackets[0] < highlightedBrackets[2])?highlightedBrackets[3]+1:highlightedBrackets[1]+1; + select_start = (highlightedBrackets[0] < highlightedBrackets[2])?highlightedBrackets[0]:highlightedBrackets[2]; } } + if (select){ + sci_set_selection_start(doc->editor->sci, select_start); + sci_set_selection_end(doc->editor->sci, select_end); + } + if(!select && jump_line != 0){ + sci_set_current_position(doc->editor->sci, jump_line, TRUE); + } +} + + +static void +on_goto_matching_tag(GtkWidget *widget, gpointer user_data) +{ + select_or_match_tag(FALSE); + return; } +static void +on_select_matching_tag(GtkWidget *widget, gpointer user_data) +{ + select_or_match_tag(TRUE); + return; +} +static void +on_editor_menu_popup (GObject *object, + const gchar *word, + gint pos, + GeanyDocument *doc, + gpointer user_data) +{ + + if(DOC_VALID(doc) && (doc->file_type->id == GEANY_FILETYPES_HTML || doc->file_type->id == GEANY_FILETYPES_PHP || doc->file_type->id == GEANY_FILETYPES_XML)) + { + gtk_widget_set_sensitive (goto_matching_tag, TRUE); + gtk_widget_set_sensitive (select_matching_tag, TRUE); + gtk_widget_show(select_matching_tag); + gtk_widget_show(goto_matching_tag); + } + else{ + gtk_widget_set_sensitive (goto_matching_tag, FALSE); + gtk_widget_set_sensitive (select_matching_tag, FALSE); + gtk_widget_hide(select_matching_tag); + gtk_widget_hide(goto_matching_tag); + } +} + PluginCallback plugin_callbacks[] = { { "editor-notify", (GCallback) &on_editor_notify, FALSE, NULL }, + { "update-editor-menu", (GCallback) &on_editor_menu_popup, FALSE, NULL }, { NULL, NULL, FALSE, NULL } }; void plugin_init(GeanyData *data) { - GeanyKeyGroup *group; - group = plugin_set_key_group (geany_plugin, "Pair Tag Highlighter", KB_COUNT, NULL); - keybindings_set_item (group, KB_MATCH_TAG, on_kb_goto_matching_tag, - 0, 0, "goto_matching_tag", _("Go To Matching Tag"), NULL); + GeanyKeyGroup *kb_group; + goto_matching_tag = gtk_menu_item_new_with_label (_("Goto Matching XML Tag")); + select_matching_tag = gtk_menu_item_new_with_label (_("Select Matching XML Tag")); + g_signal_connect (goto_matching_tag, "activate", + G_CALLBACK (on_goto_matching_tag), NULL); + g_signal_connect (select_matching_tag, "activate", + G_CALLBACK (on_select_matching_tag), NULL); + gtk_container_add (GTK_CONTAINER (data->main_widgets->editor_menu), + goto_matching_tag); + gtk_container_add (GTK_CONTAINER (data->main_widgets->editor_menu), + select_matching_tag); + kb_group = plugin_set_key_group (geany_plugin, PLUGIN, KB_COUNT, NULL); + keybindings_set_item (kb_group, KB_MATCH_TAG, NULL, + 0, 0, "goto_matching_tag", _("Go To Matching Tag"), goto_matching_tag); + keybindings_set_item (kb_group, KB_SELECT_TAG, NULL, + 0, 0, "select_matching_tag", _("Select To Matching Tag"), select_matching_tag); } -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] 48342c: Merge pull request #926 from sagarchalise/pt-utils
by Frank Lanitz
19 Jan '20
19 Jan '20
Branch: refs/heads/master Author: Frank Lanitz <frank(a)frank.uvena.de> Committer: GitHub <noreply(a)github.com> Date: Sun, 19 Jan 2020 09:00:07 UTC Commit: 48342cf02875ceb6670d530f54bdd7cf2e96df0d
https://github.com/geany/geany-plugins/commit/48342cf02875ceb6670d530f54bdd…
Log Message: ----------- Merge pull request #926 from sagarchalise/pt-utils Utilities for Pair Tag Highlighter Modified Paths: -------------- pairtaghighlighter/src/pair_tag_highlighter.c Modified: pairtaghighlighter/src/pair_tag_highlighter.c 90 lines changed, 77 insertions(+), 13 deletions(-) =================================================================== @@ -24,6 +24,7 @@ /* Keyboard Shortcut */ enum { KB_MATCH_TAG, + KB_SELECT_TAG, KB_COUNT }; @@ -34,6 +35,8 @@ GeanyData *geany_data; /* Is needed for clearing highlighting after moving cursor out * from the tag */ static gint highlightedBrackets[] = {0, 0, 0, 0}; +static GtkWidget *goto_matching_tag = NULL; +static GtkWidget *select_matching_tag = NULL; PLUGIN_VERSION_CHECK(224) @@ -404,40 +407,101 @@ static gboolean on_editor_notify(GObject *obj, GeanyEditor *editor, /* returning FALSE to allow Geany processing the event */ return FALSE; } - static void -on_kb_goto_matching_tag (guint key_id) +select_or_match_tag (gboolean select) { gint cur_line; - gint jump_line = 0; - if(highlightedBrackets[0] != highlightedBrackets[2] && highlightedBrackets[0] != 0){ - GeanyDocument *doc = document_get_current(); + gint jump_line=-5, select_start=0, select_end=0; + GeanyDocument *doc = document_get_current(); + if(highlightedBrackets[0] != highlightedBrackets[2]){ cur_line = sci_get_current_position(doc->editor->sci); if(cur_line >= highlightedBrackets[0] && cur_line <= highlightedBrackets[1]){ - jump_line = highlightedBrackets[2]; + if (!select){ + jump_line = highlightedBrackets[2]; + } } else if(cur_line >= highlightedBrackets[2] && cur_line <= highlightedBrackets[3]){ - jump_line = highlightedBrackets[0]; + if(!select){ + jump_line = highlightedBrackets[0]; + } } - if(jump_line != 0){ - sci_set_current_position(doc->editor->sci, jump_line, TRUE); + if(select){ + select_end = (highlightedBrackets[0] < highlightedBrackets[2])?highlightedBrackets[3]+1:highlightedBrackets[1]+1; + select_start = (highlightedBrackets[0] < highlightedBrackets[2])?highlightedBrackets[0]:highlightedBrackets[2]; } } + if (select){ + sci_set_selection_start(doc->editor->sci, select_start); + sci_set_selection_end(doc->editor->sci, select_end); + } + else if (jump_line >= 0){ + sci_set_current_position(doc->editor->sci, jump_line, TRUE); + } +} + + +static void +on_goto_matching_tag(GtkWidget *widget, gpointer user_data) +{ + select_or_match_tag(FALSE); + return; } +static void +on_select_matching_tag(GtkWidget *widget, gpointer user_data) +{ + select_or_match_tag(TRUE); + return; +} +static void +on_editor_menu_popup (GObject *object, + const gchar *word, + gint pos, + GeanyDocument *doc, + gpointer user_data) +{ + + if(DOC_VALID(doc) && (doc->file_type->id == GEANY_FILETYPES_HTML || doc->file_type->id == GEANY_FILETYPES_PHP || doc->file_type->id == GEANY_FILETYPES_XML)) + { + gtk_widget_set_sensitive (goto_matching_tag, TRUE); + gtk_widget_set_sensitive (select_matching_tag, TRUE); + gtk_widget_show(select_matching_tag); + gtk_widget_show(goto_matching_tag); + } + else{ + gtk_widget_set_sensitive (goto_matching_tag, FALSE); + gtk_widget_set_sensitive (select_matching_tag, FALSE); + gtk_widget_hide(select_matching_tag); + gtk_widget_hide(goto_matching_tag); + } +} + PluginCallback plugin_callbacks[] = { { "editor-notify", (GCallback) &on_editor_notify, FALSE, NULL }, + { "update-editor-menu", (GCallback) &on_editor_menu_popup, FALSE, NULL }, { NULL, NULL, FALSE, NULL } }; void plugin_init(GeanyData *data) { - GeanyKeyGroup *group; - group = plugin_set_key_group (geany_plugin, "Pair Tag Highlighter", KB_COUNT, NULL); - keybindings_set_item (group, KB_MATCH_TAG, on_kb_goto_matching_tag, - 0, 0, "goto_matching_tag", _("Go To Matching Tag"), NULL); + GeanyKeyGroup *kb_group; + goto_matching_tag = gtk_menu_item_new_with_label (_("Goto Matching XML Tag")); + select_matching_tag = gtk_menu_item_new_with_label (_("Select Matching XML Tag")); + g_signal_connect (goto_matching_tag, "activate", + G_CALLBACK (on_goto_matching_tag), NULL); + g_signal_connect (select_matching_tag, "activate", + G_CALLBACK (on_select_matching_tag), NULL); + gtk_container_add (GTK_CONTAINER (data->main_widgets->editor_menu), + goto_matching_tag); + gtk_container_add (GTK_CONTAINER (data->main_widgets->editor_menu), + select_matching_tag); + kb_group = plugin_set_key_group (geany_plugin, PLUGIN, KB_COUNT, NULL); + keybindings_set_item (kb_group, KB_MATCH_TAG, NULL, + 0, 0, "goto_matching_tag", _("Go To Matching Tag"), goto_matching_tag); + keybindings_set_item (kb_group, KB_SELECT_TAG, NULL, + 0, 0, "select_matching_tag", _("Select To Matching Tag"), select_matching_tag); } -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] e2e854: projectorganizer: don't use stock icons
by Jiří Techet
19 Jan '20
19 Jan '20
Branch: refs/heads/master Author: Jiří Techet <techet(a)gmail.com> Committer: Jiří Techet <techet(a)gmail.com> Date: Tue, 29 Oct 2019 18:30:06 UTC Commit: e2e854b6e10b2008ba1166d954502ac23e327b98
https://github.com/geany/geany-plugins/commit/e2e854b6e10b2008ba1166d954502…
Log Message: ----------- projectorganizer: don't use stock icons There is more choice when using icons based on freedesktop icon name so we can use better icons. Modified Paths: -------------- projectorganizer/src/prjorg-menu.c projectorganizer/src/prjorg-sidebar.c projectorganizer/src/prjorg-utils.c projectorganizer/src/prjorg-utils.h Modified: projectorganizer/src/prjorg-menu.c 18 lines changed, 3 insertions(+), 15 deletions(-) =================================================================== @@ -380,31 +380,19 @@ void prjorg_menu_init(void) gtk_widget_show(s_sep_item); gtk_container_add(GTK_CONTAINER(geany->main_widgets->project_menu), s_sep_item); - image = gtk_image_new_from_stock(GTK_STOCK_FIND, GTK_ICON_SIZE_MENU); - gtk_widget_show(image); - s_fif_item = gtk_image_menu_item_new_with_mnemonic(_("Find in Project Files...")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(s_fif_item), image); - gtk_widget_show(s_fif_item); + s_fif_item = menu_item_new("edit-find", _("Find in Project Files...")); gtk_container_add(GTK_CONTAINER(geany->main_widgets->project_menu), s_fif_item); g_signal_connect((gpointer) s_fif_item, "activate", G_CALLBACK(on_find_in_project), NULL); keybindings_set_item(key_group, KB_FIND_IN_PROJECT, NULL, 0, 0, "find_in_project", _("Find in project files"), s_fif_item); - image = gtk_image_new_from_stock(GTK_STOCK_FIND, GTK_ICON_SIZE_MENU); - gtk_widget_show(image); - s_ff_item = gtk_image_menu_item_new_with_mnemonic(_("Find Project File...")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(s_ff_item), image); - gtk_widget_show(s_ff_item); + s_ff_item = menu_item_new("edit-find", _("Find Project File...")); gtk_container_add(GTK_CONTAINER(geany->main_widgets->project_menu), s_ff_item); g_signal_connect((gpointer) s_ff_item, "activate", G_CALLBACK(on_find_file), NULL); keybindings_set_item(key_group, KB_FIND_FILE, NULL, 0, 0, "find_file", _("Find project file"), s_ff_item); - image = gtk_image_new_from_stock(GTK_STOCK_FIND, GTK_ICON_SIZE_MENU); - gtk_widget_show(image); - s_ft_item = gtk_image_menu_item_new_with_mnemonic(_("Find Project Symbol...")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(s_ft_item), image); - gtk_widget_show(s_ft_item); + s_ft_item = menu_item_new("edit-find", _("Find Project Symbol...")); gtk_container_add(GTK_CONTAINER(geany->main_widgets->project_menu), s_ft_item); g_signal_connect((gpointer) s_ft_item, "activate", G_CALLBACK(on_find_tag), NULL); keybindings_set_item(key_group, KB_FIND_TAG, NULL, Modified: projectorganizer/src/prjorg-sidebar.c 59 lines changed, 10 insertions(+), 49 deletions(-) =================================================================== @@ -1610,38 +1610,22 @@ void prjorg_sidebar_init(void) s_popup_menu.widget = gtk_menu_new(); - image = gtk_image_new_from_icon_name("list-add", GTK_ICON_SIZE_MENU); - gtk_widget_show(image); - item = gtk_image_menu_item_new_with_mnemonic(_("Expand All")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); - gtk_widget_show(item); + item = menu_item_new("list-add", _("Expand All")); gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item); g_signal_connect((gpointer) item, "activate", G_CALLBACK(expand_all), NULL); s_popup_menu.expand = item; - image = gtk_image_new_from_stock(GTK_STOCK_FIND, GTK_ICON_SIZE_MENU); - gtk_widget_show(image); - item = gtk_image_menu_item_new_with_mnemonic(_("Find in Files...")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); - gtk_widget_show(item); + item = menu_item_new("edit-find", _("Find in Files...")); gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item); g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_find_in_files), NULL); s_popup_menu.find_in_directory = item; - image = gtk_image_new_from_stock(GTK_STOCK_FIND, GTK_ICON_SIZE_MENU); - gtk_widget_show(image); - item = gtk_image_menu_item_new_with_mnemonic(_("Find File...")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); - gtk_widget_show(item); + item = menu_item_new("edit-find", _("Find File...")); gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item); g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_find_file), NULL); s_popup_menu.find_file = item; - image = gtk_image_new_from_stock(GTK_STOCK_FIND, GTK_ICON_SIZE_MENU); - gtk_widget_show(image); - item = gtk_image_menu_item_new_with_mnemonic(_("Find Symbol...")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); - gtk_widget_show(item); + item = menu_item_new("edit-find", _("Find Symbol...")); gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item); g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_find_tag), NULL); s_popup_menu.find_tag = item; @@ -1650,11 +1634,7 @@ void prjorg_sidebar_init(void) gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item); - image = gtk_image_new_from_stock(GTK_STOCK_REMOVE, GTK_ICON_SIZE_MENU); - gtk_widget_show(image); - item = gtk_image_menu_item_new_with_mnemonic(_("Remove External Directory")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); - gtk_widget_show(item); + item = menu_item_new("list-remove", _("Remove External Directory")); gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item); g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_remove_external_dir), NULL); s_popup_menu.remove_external_dir = item; @@ -1663,38 +1643,22 @@ void prjorg_sidebar_init(void) gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item); - image = gtk_image_new_from_stock(GTK_STOCK_FILE, GTK_ICON_SIZE_MENU); - gtk_widget_show(image); - item = gtk_image_menu_item_new_with_mnemonic(_("New File...")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); - gtk_widget_show(item); + item = menu_item_new("document-new", _("New File...")); gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item); g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_create_file), NULL); s_popup_menu.create_file = item; - image = gtk_image_new_from_stock(GTK_STOCK_DIRECTORY, GTK_ICON_SIZE_MENU); - gtk_widget_show(image); - item = gtk_image_menu_item_new_with_mnemonic(_("New Directory...")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); - gtk_widget_show(item); + item = menu_item_new("folder-new", _("New Directory...")); gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item); g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_create_dir), NULL); s_popup_menu.create_dir = item; - image = gtk_image_new_from_stock(GTK_STOCK_EDIT, GTK_ICON_SIZE_MENU); - gtk_widget_show(image); - item = gtk_image_menu_item_new_with_mnemonic(_("Rename...")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); - gtk_widget_show(item); + item = menu_item_new(NULL, _("Rename...")); gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item); g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_rename), NULL); s_popup_menu.rename = item; - image = gtk_image_new_from_stock(GTK_STOCK_REMOVE, GTK_ICON_SIZE_MENU); - gtk_widget_show(image); - item = gtk_image_menu_item_new_with_mnemonic(_("Delete")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); - gtk_widget_show(item); + item = menu_item_new("list-remove", _("Delete")); gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item); g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_delete), NULL); s_popup_menu.delete = item; @@ -1703,10 +1667,7 @@ void prjorg_sidebar_init(void) gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item); - item = gtk_image_menu_item_new_with_mnemonic(_("H_ide Sidebar")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), - gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU)); - gtk_widget_show(item); + item = menu_item_new("window-close", _("H_ide Sidebar")); gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item); g_signal_connect_swapped((gpointer) item, "activate", G_CALLBACK(keybindings_send_command), Modified: projectorganizer/src/prjorg-utils.c 15 lines changed, 15 insertions(+), 0 deletions(-) =================================================================== @@ -226,3 +226,18 @@ gchar *get_project_base_path(void) } return NULL; } + + +GtkWidget *menu_item_new(const gchar *icon_name, const gchar *label) +{ + GtkWidget *item = gtk_image_menu_item_new_with_mnemonic(label); + + if (icon_name != NULL) + { + GtkWidget *image = gtk_image_new_from_icon_name(icon_name, GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); + gtk_widget_show(image); + } + gtk_widget_show(item); + return item; +} Modified: projectorganizer/src/prjorg-utils.h 2 lines changed, 2 insertions(+), 0 deletions(-) =================================================================== @@ -35,4 +35,6 @@ gboolean rename_file_or_dir(gchar *utf8_oldname, gchar *utf8_newname); gchar *get_selection(void); gchar *get_project_base_path(void); +GtkWidget *menu_item_new(const gchar *icon_name, const gchar *label); + #endif -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] f01e07: projectorganizer: use better icons
by Jiří Techet
19 Jan '20
19 Jan '20
Branch: refs/heads/master Author: Jiří Techet <techet(a)gmail.com> Committer: Jiří Techet <techet(a)gmail.com> Date: Tue, 29 Oct 2019 20:14:56 UTC Commit: f01e071c46b51c3805487191f4c2e9688a807626
https://github.com/geany/geany-plugins/commit/f01e071c46b51c3805487191f4c2e…
Log Message: ----------- projectorganizer: use better icons This makes the icons more consistent with the treebrowser plugin. For expanding/collapsing use go-down/go-up icons which should look similar to each other (using list-add/list-remove is usually shown as +/- but with some themes the remove action is shown as a red cross) Modified Paths: -------------- projectorganizer/src/prjorg-menu.c projectorganizer/src/prjorg-sidebar.c Modified: projectorganizer/src/prjorg-menu.c 1 lines changed, 0 insertions(+), 1 deletions(-) =================================================================== @@ -373,7 +373,6 @@ static void on_open_selected_file(GtkMenuItem *menuitem, gpointer user_data) void prjorg_menu_init(void) { - GtkWidget *image; GeanyKeyGroup *key_group = plugin_set_key_group(geany_plugin, "ProjectOrganizer", KB_COUNT, kb_callback); s_sep_item = gtk_separator_menu_item_new(); Modified: projectorganizer/src/prjorg-sidebar.c 10 lines changed, 5 insertions(+), 5 deletions(-) =================================================================== @@ -1537,14 +1537,14 @@ void prjorg_sidebar_init(void) item = GTK_WIDGET(gtk_separator_tool_item_new()); gtk_container_add(GTK_CONTAINER(s_toolbar), item); - image = gtk_image_new_from_icon_name("list-add", GTK_ICON_SIZE_SMALL_TOOLBAR); + image = gtk_image_new_from_icon_name("go-down", GTK_ICON_SIZE_SMALL_TOOLBAR); item = GTK_WIDGET(gtk_tool_button_new(image, NULL)); gtk_widget_set_tooltip_text(item, _("Expand all")); g_signal_connect(item, "clicked", G_CALLBACK(on_expand_all), NULL); gtk_container_add(GTK_CONTAINER(s_toolbar), item); s_project_toolbar.expand = item; - image = gtk_image_new_from_icon_name("list-remove", GTK_ICON_SIZE_SMALL_TOOLBAR); + image = gtk_image_new_from_icon_name("go-up", GTK_ICON_SIZE_SMALL_TOOLBAR); item = GTK_WIDGET(gtk_tool_button_new(image, NULL)); gtk_widget_set_tooltip_text(item, _("Collapse to project root")); g_signal_connect(item, "clicked", G_CALLBACK(on_collapse_all), NULL); @@ -1610,7 +1610,7 @@ void prjorg_sidebar_init(void) s_popup_menu.widget = gtk_menu_new(); - item = menu_item_new("list-add", _("Expand All")); + item = menu_item_new("go-down", _("Expand All")); gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item); g_signal_connect((gpointer) item, "activate", G_CALLBACK(expand_all), NULL); s_popup_menu.expand = item; @@ -1653,12 +1653,12 @@ void prjorg_sidebar_init(void) g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_create_dir), NULL); s_popup_menu.create_dir = item; - item = menu_item_new(NULL, _("Rename...")); + item = menu_item_new("document-save-as", _("Rename...")); gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item); g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_rename), NULL); s_popup_menu.rename = item; - item = menu_item_new("list-remove", _("Delete")); + item = menu_item_new("edit-delete", _("Delete")); gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item); g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_delete), NULL); s_popup_menu.delete = item; -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
← Newer
1
...
41
42
43
44
45
46
47
...
548
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
Results per page:
10
25
50
100
200