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
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
February 2016
----- 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
90 discussions
Start a n
N
ew thread
[geany/geany-plugins] 6f5b1f: Windows/Mingw support: set appropriate compile-time paths for Windows
by Enrico Tröger
27 Feb '16
27 Feb '16
Branch: refs/heads/master Author: Enrico Tröger <enrico.troeger(a)uvena.de> Committer: Enrico Tröger <enrico.troeger(a)uvena.de> Date: Sat, 27 Feb 2016 12:23:19 UTC Commit: 6f5b1fd27e373bf6ec49f6407f48fdd50ad6706b
https://github.com/geany/geany-plugins/commit/6f5b1fd27e373bf6ec49f6407f48f…
Log Message: ----------- Windows/Mingw support: set appropriate compile-time paths for Windows On Windows we cannot use generated absolute paths based on the installation prefix, so use relative paths instead. Modified Paths: -------------- build/vars.build.mk Modified: build/vars.build.mk 19 lines changed, 17 insertions(+), 2 deletions(-) =================================================================== @@ -1,13 +1,28 @@ -AM_CFLAGS = \ +if MINGW +LOCAL_AM_CFLAGS = \ + -DLOCALEDIR=\""share/locale"\" \ + -DPREFIX=\"\" \ + -DDOCDIR=\"\" \ + -DGEANYPLUGINS_DATADIR=\"share\" \ + -DPKGDATADIR=\""share/geany-plugins"\" \ + -DLIBDIR=\""lib"\" \ + -DPKGLIBDIR=\"\" +else +LOCAL_AM_CFLAGS = \ -DLOCALEDIR=\""$(LOCALEDIR)"\" \ -DPREFIX=\""$(prefix)"\" \ -DDOCDIR=\""$(docdir)"\" \ -DGEANYPLUGINS_DATADIR=\""$(datadir)"\" \ -DPKGDATADIR=\""$(pkgdatadir)"\" \ -DLIBDIR=\""$(libdir)"\" \ - -DPKGLIBDIR=\""$(pkglibdir)"\" \ + -DPKGLIBDIR=\""$(pkglibdir)"\" +endif + +AM_CFLAGS = \ + ${LOCAL_AM_CFLAGS} \ $(GEANY_CFLAGS) \ $(GP_CFLAGS) + AM_LDFLAGS = -module -avoid-version -no-undefined $(GP_LDFLAGS) -------------- 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] 5f4e4e: Windows/Mingw support: add check for MINGW environment
by Enrico Tröger
27 Feb '16
27 Feb '16
Branch: refs/heads/master Author: Enrico Tröger <enrico.troeger(a)uvena.de> Committer: Enrico Tröger <enrico.troeger(a)uvena.de> Date: Sat, 27 Feb 2016 12:21:59 UTC Commit: 5f4e4ef987678d32d3453aa3f66dab75c98e7efb
https://github.com/geany/geany-plugins/commit/5f4e4ef987678d32d3453aa3f66da…
Log Message: ----------- Windows/Mingw support: add check for MINGW environment Modified Paths: -------------- build/common.m4 configure.ac Modified: build/common.m4 17 lines changed, 17 insertions(+), 0 deletions(-) =================================================================== @@ -64,3 +64,20 @@ AC_DEFUN([GP_COMMIT_PLUGIN_STATUS], test "$m4_tolower(AS_TR_SH(enable_$1))" = yes) GP_STATUS_PLUGIN_ADD([$1], [$m4_tolower(AS_TR_SH(enable_$1))]) ]) + +dnl GEANY_CHECK_MINGW +dnl Checks whether we're building for MinGW, and defines appropriate stuff +dnl if it is the case. +dnl Most importantly, AM_CODITIONALs MINGW +AC_DEFUN([GP_CHECK_MINGW], +[ + case "${host}" in + *mingw*) + AC_DEFINE([WIN32], [1], [we are cross compiling for WIN32]) + AM_CONDITIONAL([MINGW], true) + ;; + *) + AM_CONDITIONAL([MINGW], false) + ;; + esac +]) Modified: configure.ac 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -26,6 +26,7 @@ GP_CHECK_GTK_VERSION GP_CHECK_CPPCHECK GP_CHECK_CFLAGS GP_CHECK_LDFLAGS +GP_CHECK_MINGW dnl plugin checks GP_CHECK_ADDONS -------------- 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] a687c3: Define G_LOG_DOMAIN for all plugins where it is missing
by Enrico Tröger
27 Feb '16
27 Feb '16
Branch: refs/heads/master Author: Enrico Tröger <enrico.troeger(a)uvena.de> Committer: Enrico Tröger <enrico.troeger(a)uvena.de> Date: Sat, 27 Feb 2016 10:55:45 UTC Commit: a687c31a4b18475fc72db8e696f8421b04bbe0be
https://github.com/geany/geany-plugins/commit/a687c31a4b18475fc72db8e696f84…
Log Message: ----------- Define G_LOG_DOMAIN for all plugins where it is missing This helps to get proper log messages prefixed with the plugin name in Geany's Help->Debug Messages view as well as on console logging. Modified Paths: -------------- autoclose/src/Makefile.am automark/src/Makefile.am codenav/src/Makefile.am debugger/src/Makefile.am defineformat/src/Makefile.am devhelp/src/Makefile.am geanydoc/src/Makefile.am geanyextrasel/src/Makefile.am geanyinsertnum/src/Makefile.am geanylatex/src/Makefile.am geanylipsum/src/Makefile.am geanylua/Makefile.am geanymacro/src/Makefile.am geanyminiscript/src/Makefile.am geanynumberedbookmarks/src/Makefile.am geanyprj/src/Makefile.am geanysendmail/src/Makefile.am geanyvc/src/Makefile.am lineoperations/src/Makefile.am markdown/src/Makefile.am multiterm/src/Makefile.am overview/overview/Makefile.am pairtaghighlighter/src/Makefile.am pretty-printer/src/Makefile.am scope/src/Makefile.am shiftcolumn/src/Makefile.am tableconvert/src/Makefile.am treebrowser/src/Makefile.am xmlsnippets/src/Makefile.am Modified: autoclose/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -3,6 +3,7 @@ include $(top_srcdir)/build/vars.build.mk geanyplugins_LTLIBRARIES = autoclose.la autoclose_la_SOURCES = autoclose.c +autoclose_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"AutoClose\" autoclose_la_LIBADD = $(COMMONLIBS) include $(top_srcdir)/build/cppcheck.mk Modified: automark/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -3,6 +3,7 @@ include $(top_srcdir)/build/vars.build.mk geanyplugins_LTLIBRARIES = automark.la automark_la_SOURCES = automark.c +automark_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"AutoMark\" automark_la_LIBADD = $(COMMONLIBS) include $(top_srcdir)/build/cppcheck.mk Modified: codenav/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -12,6 +12,7 @@ codenav_la_SOURCES = \ utils.c \ utils.h +codenav_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"CodeNavigation\" codenav_la_LIBADD = $(COMMONLIBS) Modified: debugger/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -73,6 +73,7 @@ debugger_la_SOURCES = \ debugger_la_LIBADD = $(COMMONLIBS) $(VTE_LIBS) -lutil debugger_la_CFLAGS = $(AM_CFLAGS) $(VTE_CFLAGS) -DDBGPLUG_DATA_DIR=\"$(plugindatadir)\" -DPLUGIN_NAME=\"$(plugin)\" +debugger_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"Debugger\" check_PROGRAMS = gdb_mi_test dist_check_SCRIPTS = tests/gdb_mi_test.sh Modified: defineformat/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -3,6 +3,7 @@ include $(top_srcdir)/build/vars.build.mk geanyplugins_LTLIBRARIES = defineformat.la defineformat_la_SOURCES = defineformat.c +defineformat_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"DefineFormat\" defineformat_la_LIBADD = $(COMMONLIBS) include $(top_srcdir)/build/cppcheck.mk Modified: devhelp/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -16,6 +16,7 @@ noinst_HEADERS = \ dhp.h \ dhp-plugin.h +devhelp_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"Devhelp\" devhelp_la_CFLAGS = \ $(AM_CFLAGS) \ -I$(top_srcdir)/devhelp \ Modified: geanydoc/src/Makefile.am 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -7,7 +7,7 @@ geanydoc_la_SOURCES = \ geanydoc.c \ geanydoc.h -geanydoc_la_CFLAGS = $(AM_CFLAGS) +geanydoc_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"GeanyDoc\" geanydoc_la_LIBADD = $(COMMONLIBS) include $(top_srcdir)/build/cppcheck.mk Modified: geanyextrasel/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -3,6 +3,7 @@ include $(top_srcdir)/build/vars.build.mk geanyplugins_LTLIBRARIES = geanyextrasel.la geanyextrasel_la_SOURCES = extrasel.c +geanyextrasel_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"ExtraSelection\" geanyextrasel_la_LIBADD = $(COMMONLIBS) include $(top_srcdir)/build/cppcheck.mk Modified: geanyinsertnum/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -3,6 +3,7 @@ include $(top_srcdir)/build/vars.build.mk geanyplugins_LTLIBRARIES = geanyinsertnum.la geanyinsertnum_la_SOURCES = insertnum.c +geanyinsertnum_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"InsertNum\" geanyinsertnum_la_LIBADD = $(COMMONLIBS) include $(top_srcdir)/build/cppcheck.mk Modified: geanylatex/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -29,6 +29,7 @@ geanylatex_la_SOURCES = \ latexkeybindings.c \ letters.h +geanylatex_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"GeanyLaTeX\" geanylatex_la_LIBADD = $(COMMONLIBS) include $(top_srcdir)/build/cppcheck.mk Modified: geanylipsum/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -3,6 +3,7 @@ include $(top_srcdir)/build/vars.build.mk geanyplugins_LTLIBRARIES = geanylipsum.la geanylipsum_la_SOURCES = geanylipsum.c +geanylipsum_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"GeanyLipsum\" geanylipsum_la_LIBADD = $(COMMONLIBS) include $(top_srcdir)/build/cppcheck.mk Modified: geanylua/Makefile.am 2 lines changed, 2 insertions(+), 0 deletions(-) =================================================================== @@ -31,12 +31,14 @@ geanylua_la_CFLAGS = \ $(GMODULE_CFLAGS) \ $(LUA_CFLAGS) +geanylua_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"GeanyLua\" geanylua_la_LIBADD = \ $(COMMONLIBS) \ $(GMODULE_LIBS) \ $(LUA_LIBS) libgeanylua_la_CFLAGS = $(geanylua_la_CFLAGS) +libgeanylua_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"GeanyLua\" libgeanylua_la_LIBADD = $(geanylua_la_LIBADD) SUBDIRS = docs examples Modified: geanymacro/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -3,6 +3,7 @@ include $(top_srcdir)/build/vars.build.mk geanyplugins_LTLIBRARIES = geanymacro.la geanymacro_la_SOURCES = geanymacro.c +geanymacro_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"GeanyMacro\" geanymacro_la_LIBADD = $(COMMONLIBS) include $(top_srcdir)/build/cppcheck.mk Modified: geanyminiscript/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -3,6 +3,7 @@ include $(top_srcdir)/build/vars.build.mk geanyplugins_LTLIBRARIES = geanyminiscript.la geanyminiscript_la_SOURCES = gms.c gms.h gms_gui.c gms_gui.h gms_debug.h +geanyminiscript_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"GeanyMiniScript\" geanyminiscript_la_LIBADD = $(COMMONLIBS) include $(top_srcdir)/build/cppcheck.mk Modified: geanynumberedbookmarks/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -3,4 +3,5 @@ include $(top_srcdir)/build/vars.build.mk geanyplugins_LTLIBRARIES = geanynumberedbookmarks.la geanynumberedbookmarks_la_SOURCES = geanynumberedbookmarks.c +geanynumberedbookmarks_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"GeanyNumberedBookmarks\" geanynumberedbookmarks_la_LIBADD = $(COMMONLIBS) Modified: geanyprj/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -11,6 +11,7 @@ geanyprj_la_SOURCES = geanyprj.c \ xproject.c geanyprj_la_CFLAGS = $(AM_CFLAGS) +geanyprj_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"GeanyPrj\" geanyprj_la_LIBADD = $(COMMONLIBS) if UNITTESTS Modified: geanysendmail/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -3,6 +3,7 @@ include $(top_srcdir)/build/vars.build.mk geanyplugins_LTLIBRARIES = geanysendmail.la geanysendmail_la_SOURCES = geanysendmail.c mail-icon.xpm +geanysendmail_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"GeanySendMail\" geanysendmail_la_LIBADD = $(COMMONLIBS) include $(top_srcdir)/build/cppcheck.mk Modified: geanyvc/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -18,6 +18,7 @@ geanyvc_la_CFLAGS = \ $(AM_CFLAGS) \ $(GTKSPELL_CFLAGS) +geanyvc_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"GeanyVC\" geanyvc_la_LIBADD = \ $(GTKSPELL_LIBS) \ $(COMMONLIBS) Modified: lineoperations/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -7,6 +7,7 @@ lineoperations_la_SOURCES = \ linefunctions.c \ lineoperations.c +lineoperations_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"LineOperations\" lineoperations_la_LIBADD = $(COMMONLIBS) include $(top_srcdir)/build/cppcheck.mk Modified: markdown/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -22,6 +22,7 @@ markdown_la_CFLAGS = \ -DMARKDOWN_DOC_DIR=\"$(docdir)/markdown\" \ -DMARKDOWN_HELP_FILE=\"$(docdir)/markdown/html/help.html\" +markdown_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"Markdown\" markdown_la_LIBADD = \ $(COMMONLIBS) \ $(MARKDOWN_LIBS) Modified: multiterm/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -23,6 +23,7 @@ multiterm_la_SOURCES = \ tab-label.vala \ terminal.vala +multiterm_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"MultiTerm\" multiterm_la_CFLAGS = \ -DGETTEXT_PACKAGE='"$(GETTEXT_PACKAGE)"' \ $(AM_CFLAGS) \ Modified: overview/overview/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -18,6 +18,7 @@ overview_la_SOURCES = \ overviewui.c \ overviewui.h +overview_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"Overview\" overview_la_CFLAGS = \ $(AM_CFLAGS) \ -I$(srcdir)/.. \ Modified: pairtaghighlighter/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -4,6 +4,7 @@ geanyplugins_LTLIBRARIES = pairtaghighlighter.la pairtaghighlighter_la_SOURCES = pair_tag_highlighter.c +pairtaghighlighter_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"PairTagHighlighter\" pairtaghighlighter_la_LIBADD = $(COMMONLIBS) include $(top_srcdir)/build/cppcheck.mk Modified: pretty-printer/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -10,6 +10,7 @@ pretty_printer_la_SOURCES = \ ConfigUI.h \ ConfigUI.c +pretty_printer_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"PrettyPrinter\" pretty_printer_la_CFLAGS = $(AM_CFLAGS) $(LIBXML_CFLAGS) -DHAVE_GLIB -DHAVE_LIBXML pretty_printer_la_LIBADD = $(COMMONLIBS) $(LIBXML_LIBS) Modified: scope/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -53,6 +53,7 @@ scope_la_SOURCES = \ scope_la_LIBADD = $(COMMONLIBS) $(VTE_LIBS) $(PTY_LIBS) +scope_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"Scope\" scope_la_CFLAGS = $(AM_CFLAGS) $(VTE_CFLAGS) \ -DPLUGINDATADIR=\"$(plugindatadir)\" \ -DPLUGINHTMLDOCDIR=\"$(plugindocdir)/html\" \ Modified: shiftcolumn/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -3,6 +3,7 @@ include $(top_srcdir)/build/vars.build.mk geanyplugins_LTLIBRARIES = shiftcolumn.la shiftcolumn_la_SOURCES = shiftcolumn.c +shiftcolumn_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"ShiftColumn\" shiftcolumn_la_LIBADD = $(COMMONLIBS) include $(top_srcdir)/build/cppcheck.mk Modified: tableconvert/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -7,6 +7,7 @@ tableconvert_la_SOURCES = \ tableconvert.h \ tableconvert_ui.c \ tableconvert_ui.h +tableconvert_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"TableConvert\" tableconvert_la_LIBADD = $(COMMONLIBS) include $(top_srcdir)/build/cppcheck.mk Modified: treebrowser/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -3,6 +3,7 @@ include $(top_srcdir)/build/vars.build.mk geanyplugins_LTLIBRARIES = treebrowser.la treebrowser_la_SOURCES = treebrowser.c +treebrowser_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"TreeBrowser\" treebrowser_la_CFLAGS = $(AM_CFLAGS) $(GIO_CFLAGS) treebrowser_la_LIBADD = $(COMMONLIBS) $(GIO_LIBS) Modified: xmlsnippets/src/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -10,6 +10,7 @@ xmlsnippets_la_SOURCES = \ plugin.c plugin.h \ $(common_sources) +xmlsnippets_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"XMLSnippets\" xmlsnippets_la_LIBADD = $(COMMONLIBS) xmlsnippets_check_SOURCES = \ -------------- 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] 9f5040: Use GLib error reporting/logging instead of fprintf()
by Enrico Tröger
25 Feb '16
25 Feb '16
Branch: refs/heads/master Author: Enrico Tröger <enrico.troeger(a)uvena.de> Committer: Enrico Tröger <enrico.troeger(a)uvena.de> Date: Thu, 25 Feb 2016 21:48:01 UTC Commit: 9f504011bcf162dd2ee2c31603e701e8629267a4
https://github.com/geany/geany-plugins/commit/9f504011bcf162dd2ee2c31603e70…
Log Message: ----------- Use GLib error reporting/logging instead of fprintf() This makes logging and error reporting in the plugin more consistent with other plugins and Geany. Also set the G_LOG_DOMAIN for the plugin in order to have proper log messages. Modified Paths: -------------- geanypg/src/Makefile.am geanypg/src/decrypt_cb.c geanypg/src/encrypt_cb.c geanypg/src/geanypg.c geanypg/src/pinentry.c geanypg/src/sign_cb.c geanypg/src/verify_aux.c Modified: geanypg/src/Makefile.am 2 lines changed, 2 insertions(+), 0 deletions(-) =================================================================== @@ -21,5 +21,7 @@ geanypg_la_LIBADD = \ geanypg_la_CFLAGS = \ $(AM_CFLAGS) \ $(GPGME_CFLAGS) +geanypg_la_CPPFLAGS = $(AM_CPPFLAGS) \ + -DG_LOG_DOMAIN=\"GeanyPG\" include $(top_srcdir)/build/cppcheck.mk Modified: geanypg/src/decrypt_cb.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -30,7 +30,7 @@ static void geanypg_decrypt_verify(encrypt_data * ed) tempfile = tmpfile(); if (!(tempfile)) { - fprintf(stderr, "GeanyPG: %s: %s.\n", _("couldn't create tempfile"), strerror(errno)); + g_warning("%s: %s.", _("couldn't create tempfile"), strerror(errno)); return ; } gpgme_data_new_from_stream(&plain, tempfile); Modified: geanypg/src/encrypt_cb.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -29,7 +29,7 @@ static void geanypg_encrypt(encrypt_data * ed, gpgme_key_t * recp, int sign, int tempfile = tmpfile(); if (!(tempfile)) { - fprintf(stderr, "GeanyPG: %s: %s.\n", _("couldn't create tempfile"), strerror(errno)); + g_warning("%s: %s.", _("couldn't create tempfile"), strerror(errno)); return ; } gpgme_data_new_from_stream(&cipher, tempfile); Modified: geanypg/src/geanypg.c 5 lines changed, 2 insertions(+), 3 deletions(-) =================================================================== @@ -44,8 +44,7 @@ static gpgme_error_t geanypg_init_gpgme(void) { /* Initialize the locale environment. */ setlocale(LC_ALL, ""); - fprintf(stderr, "GeanyPG: %s %s\n", _("Using libgpgme version:"), - gpgme_check_version("1.1.0")); + g_message("%s %s", _("Using libgpgme version:"), gpgme_check_version("1.1.0")); gpgme_set_locale(NULL, LC_CTYPE, setlocale(LC_CTYPE, NULL)); #ifdef LC_MESSAGES /* only necessary for portability to W32 systems */ gpgme_set_locale(NULL, LC_MESSAGES, setlocale(LC_MESSAGES, NULL)); @@ -58,7 +57,7 @@ gpgme_error_t geanypg_show_err_msg(gpgme_error_t err) gchar const * msg = (gchar const *)gpgme_strerror(err); gchar const * src = (gchar const *)gpgme_strsource(err); dialogs_show_msgbox(GTK_MESSAGE_ERROR, "%s %s: %s\n", _("Error from"), src, msg); - fprintf(stderr, "GeanyPG: %s %s: %s\n", _("Error from"), msg, src); + g_warning("%s %s: %s", _("Error from"), msg, src); return err; } Modified: geanypg/src/pinentry.c 12 lines changed, 6 insertions(+), 6 deletions(-) =================================================================== @@ -83,12 +83,12 @@ gpgme_error_t geanypg_passphrase_cb(void * hook, if (pipe(outpipe)) { - fprintf(stderr, "GeanyPG: %s\n", strerror(errno)); + g_warning("%s", strerror(errno)); return gpgme_error_from_errno(errno); } if (pipe(inpipe)) { - fprintf(stderr, "GeanyPG: %s\n", strerror(errno)); + g_warning("%s", strerror(errno)); return gpgme_error_from_errno(errno); } @@ -108,7 +108,7 @@ gpgme_error_t geanypg_passphrase_cb(void * hook, execvp(*argv, argv); /* shouldn't get here */ - fprintf(stderr, "GeanyPG: %s\n%s\n", _("Could not use pinentry."), strerror(errno)); + g_warning("%s: %s", _("Could not use pinentry."), strerror(errno)); exit(1); /* kill the child */ } /* GeanpyPG */ @@ -120,7 +120,7 @@ gpgme_error_t geanypg_passphrase_cb(void * hook, geanypg_read(outpipe[READ], ' ', 2049, readbuffer); if (strncmp(readbuffer, "OK", 3)) { - fprintf(stderr, "GeanyPG: %s\n", _("Unexpected output from pinentry.")); + g_warning(_("Unexpected output from pinentry.")); fclose(childin); waitpid(childpid, &status, 0); close(outpipe[READ]); @@ -168,10 +168,10 @@ gpgme_error_t geanypg_passphrase_cb(void * hook, geanypg_read(outpipe[READ], ' ', 2049, readbuffer); sscanf(readbuffer, "%lu", &errval); geanypg_read(outpipe[READ], '\n', 2049, readbuffer); - fprintf(stderr, "GeanyPG: %s %lu %s\n", _("pinentry gave error"), errval, readbuffer); + g_warning("%s %lu %s", _("pinentry gave error"), errval, readbuffer); } else - fprintf(stderr, "GeanyPG: %s\n", _("Unexpected error from pinentry.")); + g_warning(_("Unexpected error from pinentry.")); fclose(childin); waitpid(childpid, &status, 0); close(outpipe[READ]); Modified: geanypg/src/sign_cb.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -30,7 +30,7 @@ static void geanypg_sign(encrypt_data * ed) tempfile = tmpfile(); if (!(tempfile)) { - fprintf(stderr, "GeanyPG: %s: %s\n", _("couldn't create tempfile"), strerror(errno)); + g_warning("%s: %s", _("couldn't create tempfile"), strerror(errno)); return ; } gpgme_data_new_from_stream(&cipher, tempfile); Modified: geanypg/src/verify_aux.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -176,7 +176,7 @@ void geanypg_handle_signatures(encrypt_data * ed, int need_error) } if (!verified && need_error) { - fprintf(stderr, "GeanyPG: %s\n", _("Could not find verification results")); + g_warning(_("Could not find verification results")); dialogs_show_msgbox(GTK_MESSAGE_ERROR, _("Error, could not find verification results")); } } -------------- 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] a335a8: geniuspaste: Lower GLib dependency to 2.28
by Colomban Wendling
22 Feb '16
22 Feb '16
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Mon, 22 Feb 2016 13:46:29 UTC Commit: a335a8c925e273088f3d3e327bd22c99246a264a
https://github.com/geany/geany-plugins/commit/a335a8c925e273088f3d3e327bd22…
Log Message: ----------- geniuspaste: Lower GLib dependency to 2.28 This is the same version as Geany since v1.25. Modified Paths: -------------- geniuspaste/src/geniuspaste.c Modified: geniuspaste/src/geniuspaste.c 8 lines changed, 4 insertions(+), 4 deletions(-) =================================================================== @@ -97,7 +97,7 @@ PLUGIN_SET_TRANSLATABLE_INFO(LOCALEDIR, GETTEXT_PACKAGE, PLUGIN_NAME, static void pastebin_free(Pastebin *pastebin) { - g_key_file_unref(pastebin->config); + g_key_file_free(pastebin->config); g_free(pastebin->name); g_free(pastebin); } @@ -153,10 +153,10 @@ static Pastebin *pastebin_new(const gchar *path, pastebin->name = g_key_file_get_string(kf, PASTEBIN_GROUP_PASTEBIN, PASTEBIN_GROUP_PASTEBIN_KEY_NAME, NULL); - pastebin->config = g_key_file_ref(kf); + pastebin->config = kf; } - - g_key_file_unref(kf); + else + g_key_file_free(kf); return pastebin; } -------------- 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] c60667: Use new spawn API to fix broken Win32 ctags.exe command execution
by Enrico Tröger
22 Feb '16
22 Feb '16
Branch: refs/heads/master Author: Enrico Tröger <enrico.troeger(a)uvena.de> Committer: Enrico Tröger <enrico.troeger(a)uvena.de> Date: Sun, 21 Feb 2016 23:40:55 UTC Commit: c60667deb7348cea8bd69aace1a8b2e39adb0d4b
https://github.com/geany/geany-plugins/commit/c60667deb7348cea8bd69aace1a8b…
Log Message: ----------- Use new spawn API to fix broken Win32 ctags.exe command execution Since the new spawn API, which is used by utils_spawn_sync() as well, passing a whole command line in argv[0] doesn't work any longer. So use the new spawn API directly which conveniently offers to pass the command either as command line or as argv. Modified Paths: -------------- geanyctags/src/geanyctags.c Modified: geanyctags/src/geanyctags.c 24 lines changed, 11 insertions(+), 13 deletions(-) =================================================================== @@ -46,7 +46,7 @@ #endif -PLUGIN_VERSION_CHECK(211) +PLUGIN_VERSION_CHECK(226) PLUGIN_SET_INFO("GeanyCtags", _("Ctags generation and search plugin for geany projects"), VERSION, @@ -118,13 +118,14 @@ void plugin_help (void) static void spawn_cmd(const gchar *cmd, const gchar *dir) { GError *error = NULL; - gchar **argv; + gchar **argv = NULL; gchar *working_dir; gchar *utf8_working_dir; gchar *utf8_cmd_string; gchar *out; gint exitcode; gboolean success; + GString *output; #ifndef G_OS_WIN32 /* run within shell so we can use pipes */ @@ -133,13 +134,8 @@ static void spawn_cmd(const gchar *cmd, const gchar *dir) argv[1] = g_strdup("-c"); argv[2] = g_strdup(cmd); argv[3] = NULL; -#else - /* no shell on windows */ - argv = g_new0(gchar *, 2); - argv[0] = g_strdup(cmd); - argv[1] = NULL; #endif - + utf8_cmd_string = utils_get_utf8_from_locale(cmd); utf8_working_dir = g_strdup(dir); working_dir = utils_get_locale_from_utf8(utf8_working_dir); @@ -149,14 +145,16 @@ static void spawn_cmd(const gchar *cmd, const gchar *dir) msgwin_msg_add(COLOR_BLUE, -1, NULL, _("%s (in directory: %s)"), utf8_cmd_string, utf8_working_dir); g_free(utf8_working_dir); g_free(utf8_cmd_string); - + + output = g_string_new(NULL); #ifndef G_OS_WIN32 - success = utils_spawn_sync(working_dir, argv, NULL, G_SPAWN_SEARCH_PATH, - NULL, NULL, NULL, &out, &exitcode, &error); + success = spawn_sync(working_dir, NULL, argv, NULL, + NULL, NULL, output, &exitcode, &error); #else - success = utils_spawn_sync(working_dir, argv, NULL, G_SPAWN_SEARCH_PATH, - NULL, NULL, &out, NULL, &exitcode, &error); + success = spawn_sync(working_dir, cmd, NULL, NULL, + NULL, output, NULL, &exitcode, &error); #endif + out = g_string_free(output, FALSE); if (!success || exitcode != 0) { if (error != NULL) -------------- 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] e639bc: Set G_LOG_DOMAIN for proper GLib error reporting/logging
by Enrico Tröger
21 Feb '16
21 Feb '16
Branch: refs/heads/master Author: Enrico Tröger <enrico.troeger(a)uvena.de> Committer: Enrico Tröger <enrico.troeger(a)uvena.de> Date: Sun, 21 Feb 2016 22:53:11 UTC Commit: e639bc6f2b24f8cbd9b24754422f28e76ccd82af
https://github.com/geany/geany-plugins/commit/e639bc6f2b24f8cbd9b24754422f2…
Log Message: ----------- Set G_LOG_DOMAIN for proper GLib error reporting/logging Modified Paths: -------------- geanypy/src/Makefile.am Modified: geanypy/src/Makefile.am 3 lines changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -6,7 +6,8 @@ geanyplugindir = $(libdir)/geany geanypy_la_LDFLAGS = -module -avoid-version -Wl,--export-dynamic geanypy_la_CPPFLAGS = @GEANY_CFLAGS@ @PYGTK_CFLAGS@ @PYTHON_CPPFLAGS@ \ -DGEANYPY_PYTHON_DIR="\"$(libdir)/geany/geanypy\"" \ - -DGEANYPY_PLUGIN_DIR="\"$(datadir)/geany/geanypy/plugins\"" + -DGEANYPY_PLUGIN_DIR="\"$(datadir)/geany/geanypy/plugins\"" \ + -DG_LOG_DOMAIN=\"GeanyPy\" geanypy_la_CFLAGS = @GEANYPY_CFLAGS@ @GMODULE_CFLAGS@ geanypy_la_LIBADD = @GEANY_LIBS@ @PYGTK_LIBS@ \ $(PYTHON_LDFLAGS) $(PYTHON_LIBS) \ -------------- 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] 55cc30: Set G_LOG_DOMAIN for proper GLib error reporting
by Enrico Tröger
21 Feb '16
21 Feb '16
Branch: refs/heads/master Author: Enrico Tröger <enrico.troeger(a)uvena.de> Committer: Enrico Tröger <enrico.troeger(a)uvena.de> Date: Sun, 21 Feb 2016 22:42:21 UTC Commit: 55cc309d0542ec3a239dc4d83fde30f0f731f892
https://github.com/geany/geany-plugins/commit/55cc309d0542ec3a239dc4d83fde3…
Log Message: ----------- Set G_LOG_DOMAIN for proper GLib error reporting Modified Paths: -------------- addons/src/Makefile.am spellcheck/src/Makefile.am Modified: addons/src/Makefile.am 3 lines changed, 3 insertions(+), 0 deletions(-) =================================================================== @@ -26,6 +26,9 @@ addons_la_SOURCES = \ ao_wrapwords.c \ ao_copyfilepath.c +addons_la_CPPFLAGS = $(AM_CPPFLAGS) \ + -DG_LOG_DOMAIN=\"Addons\" + addons_la_LIBADD = $(COMMONLIBS) include $(top_srcdir)/build/cppcheck.mk Modified: spellcheck/src/Makefile.am 3 lines changed, 3 insertions(+), 0 deletions(-) =================================================================== @@ -10,6 +10,9 @@ spellcheck_la_SOURCES = \ speller.c \ scplugin.c +spellcheck_la_CPPFLAGS = $(AM_CPPFLAGS) \ + -DG_LOG_DOMAIN=\"SpellCheck\" + spellcheck_la_CFLAGS = \ $(AM_CFLAGS) \ $(ENCHANT_CFLAGS) -------------- 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] 7b4ea0: Merge pull request #365 from b4n/projectorganizer/less-deprecated
by Jiří Techet
21 Feb '16
21 Feb '16
Branch: refs/heads/master Author: Jiří Techet <techet(a)gmail.com> Committer: Jiří Techet <techet(a)gmail.com> Date: Sun, 21 Feb 2016 16:24:57 UTC Commit: 7b4ea0a373a7140fbbb9b742d2e6a67e118b3f38
https://github.com/geany/geany-plugins/commit/7b4ea0a373a7140fbbb9b742d2e6a…
Log Message: ----------- Merge pull request #365 from b4n/projectorganizer/less-deprecated projectorganizer: Drop use of the most obvious deprecated Geany API Modified Paths: -------------- projectorganizer/src/prjorg-project.c projectorganizer/src/prjorg-sidebar.c Modified: projectorganizer/src/prjorg-project.c 10 lines changed, 5 insertions(+), 5 deletions(-) =================================================================== @@ -577,7 +577,7 @@ gint prjorg_project_add_properties_tab(GtkWidget *notebook) e->source_patterns = gtk_entry_new(); ui_table_add_row(GTK_TABLE(table), 0, label, e->source_patterns, NULL); ui_entry_add_clear_icon(GTK_ENTRY(e->source_patterns)); - ui_widget_set_tooltip_text(e->source_patterns, + gtk_widget_set_tooltip_text(e->source_patterns, _("Space separated list of patterns that are used to identify source files. " "Used for header/source swapping.")); str = g_strjoinv(" ", prj_org->source_patterns); @@ -589,7 +589,7 @@ gint prjorg_project_add_properties_tab(GtkWidget *notebook) e->header_patterns = gtk_entry_new(); ui_entry_add_clear_icon(GTK_ENTRY(e->header_patterns)); ui_table_add_row(GTK_TABLE(table), 1, label, e->header_patterns, NULL); - ui_widget_set_tooltip_text(e->header_patterns, + gtk_widget_set_tooltip_text(e->header_patterns, _("Space separated list of patterns that are used to identify headers. " "Used for header/source swapping.")); str = g_strjoinv(" ", prj_org->header_patterns); @@ -601,7 +601,7 @@ gint prjorg_project_add_properties_tab(GtkWidget *notebook) e->ignored_file_patterns = gtk_entry_new(); ui_entry_add_clear_icon(GTK_ENTRY(e->ignored_file_patterns)); ui_table_add_row(GTK_TABLE(table), 2, label, e->ignored_file_patterns, NULL); - ui_widget_set_tooltip_text(e->ignored_file_patterns, + gtk_widget_set_tooltip_text(e->ignored_file_patterns, _("Space separated list of patterns that are used to identify files " "that are not displayed in the project tree.")); str = g_strjoinv(" ", prj_org->ignored_file_patterns); @@ -613,7 +613,7 @@ gint prjorg_project_add_properties_tab(GtkWidget *notebook) e->ignored_dirs_patterns = gtk_entry_new(); ui_entry_add_clear_icon(GTK_ENTRY(e->ignored_dirs_patterns)); ui_table_add_row(GTK_TABLE(table), 3, label, e->ignored_dirs_patterns, NULL); - ui_widget_set_tooltip_text(e->ignored_dirs_patterns, + gtk_widget_set_tooltip_text(e->ignored_dirs_patterns, _("Space separated list of patterns that are used to identify directories " "that are not scanned for source files.")); str = g_strjoinv(" ", prj_org->ignored_dirs_patterns); @@ -628,7 +628,7 @@ gint prjorg_project_add_properties_tab(GtkWidget *notebook) gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(e->generate_tag_prefs), _("No")); gtk_combo_box_set_active(GTK_COMBO_BOX(e->generate_tag_prefs), prj_org->generate_tag_prefs); ui_table_add_row(GTK_TABLE(table), 4, label, e->generate_tag_prefs, NULL); - ui_widget_set_tooltip_text(e->generate_tag_prefs, + gtk_widget_set_tooltip_text(e->generate_tag_prefs, _("Generate symbol list for all project files instead of only for the currently opened files. " "Might be slow for big projects.")); Modified: projectorganizer/src/prjorg-sidebar.c 10 lines changed, 5 insertions(+), 5 deletions(-) =================================================================== @@ -1270,7 +1270,7 @@ void prjorg_sidebar_init(void) item = GTK_WIDGET(gtk_tool_button_new(NULL, NULL)); gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON(item), "prjorg-refresh"); - ui_widget_set_tooltip_text(item, _("Reload all")); + gtk_widget_set_tooltip_text(item, _("Reload all")); g_signal_connect(item, "clicked", G_CALLBACK(on_reload_project), NULL); gtk_container_add(GTK_CONTAINER(s_toolbar), item); @@ -1279,7 +1279,7 @@ void prjorg_sidebar_init(void) item = GTK_WIDGET(gtk_tool_button_new(NULL, NULL)); gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON(item), "prjorg-add-external"); - ui_widget_set_tooltip_text(item, _("Add external directory")); + gtk_widget_set_tooltip_text(item, _("Add external directory")); g_signal_connect(item, "clicked", G_CALLBACK(on_add_external), NULL); gtk_container_add(GTK_CONTAINER(s_toolbar), item); s_project_toolbar.add = item; @@ -1289,14 +1289,14 @@ void prjorg_sidebar_init(void) item = GTK_WIDGET(gtk_tool_button_new(NULL, NULL)); gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON(item), "prjorg-expand"); - ui_widget_set_tooltip_text(item, _("Expand all")); + 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; item = GTK_WIDGET(gtk_tool_button_new(NULL, NULL)); gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON(item), "prjorg-collapse"); - ui_widget_set_tooltip_text(item, _("Collapse to project root")); + gtk_widget_set_tooltip_text(item, _("Collapse to project root")); g_signal_connect(item, "clicked", G_CALLBACK(on_collapse_all), NULL); gtk_container_add(GTK_CONTAINER(s_toolbar), item); s_project_toolbar.collapse = item; @@ -1307,7 +1307,7 @@ void prjorg_sidebar_init(void) item = GTK_WIDGET(gtk_toggle_tool_button_new()); gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(item), TRUE); gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON(item), "prjorg-follow"); - ui_widget_set_tooltip_text(item, _("Follow active editor")); + gtk_widget_set_tooltip_text(item, _("Follow active editor")); g_signal_connect(item, "clicked", G_CALLBACK(on_follow_active), NULL); gtk_container_add(GTK_CONTAINER(s_toolbar), item); s_project_toolbar.follow = item; -------------- 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] 1ea550: Merge pull request #353 from b4n/spellcheck/less-deprecated
by Enrico Tröger
21 Feb '16
21 Feb '16
Branch: refs/heads/master Author: Enrico Tröger <enrico.troeger(a)uvena.de> Committer: Enrico Tröger <enrico.troeger(a)uvena.de> Date: Sun, 21 Feb 2016 13:59:45 UTC Commit: 1ea550bc9d12884b3f90d7b49da9b943c6633672
https://github.com/geany/geany-plugins/commit/1ea550bc9d12884b3f90d7b49da9b…
Log Message: ----------- Merge pull request #353 from b4n/spellcheck/less-deprecated Spellcheck: Less deprecated stuff and various improvements on the way Modified Paths: -------------- spellcheck/src/gui.c spellcheck/src/scplugin.c spellcheck/src/speller.c spellcheck/src/speller.h Modified: spellcheck/src/gui.c 31 lines changed, 12 insertions(+), 19 deletions(-) =================================================================== @@ -156,8 +156,7 @@ static void menu_suggestion_item_activate_cb(GtkMenuItem *menuitem, gpointer gda sci_set_selection_end(sci, endword); /* retrieve the old text */ - word = g_malloc(sci_get_selected_text_length(sci) + 1); - sci_get_selected_text(sci, word); + word = sci_get_selection_contents(sci); /* retrieve the new text */ sugg = gtk_label_get_text(GTK_LABEL(gtk_bin_get_child(GTK_BIN(menuitem)))); @@ -180,8 +179,8 @@ static void menu_addword_item_activate_cb(GtkMenuItem *menuitem, gpointer gdata) { gint startword, endword, i, doc_len; ScintillaObject *sci; - GString *str; gboolean ignore = GPOINTER_TO_INT(gdata); + gint click_word_len; if (clickinfo.doc == NULL || clickinfo.word == NULL || clickinfo.pos == -1) return; @@ -196,7 +195,7 @@ static void menu_addword_item_activate_cb(GtkMenuItem *menuitem, gpointer gdata) /* Remove all indicators on the added/ignored word */ sci = clickinfo.doc->editor->sci; - str = g_string_sized_new(256); + click_word_len = (gint) strlen(clickinfo.word); doc_len = sci_get_length(sci); for (i = 0; i < doc_len; i++) { @@ -207,17 +206,18 @@ static void menu_addword_item_activate_cb(GtkMenuItem *menuitem, gpointer gdata) if (startword == endword) continue; - if (str->len < (guint)(endword - startword + 1)) - str = g_string_set_size(str, endword - startword + 1); - sci_get_text_range(sci, startword, endword, str->str); + if (click_word_len == endword - startword) + { + const gchar *ptr = (const gchar *) scintilla_send_message(sci, + SCI_GETRANGEPOINTER, startword, endword - startword); - if (strcmp(str->str, clickinfo.word) == 0) - sci_indicator_clear(sci, startword, endword - startword); + if (strncmp(ptr, clickinfo.word, click_word_len) == 0) + sci_indicator_clear(sci, startword, endword - startword); + } i = endword; } } - g_string_free(str, TRUE); } @@ -420,11 +420,7 @@ void sc_gui_update_editor_menu_cb(GObject *obj, const gchar *word, gint pos, /* if we have a selection, prefer it over the current word */ if (sci_has_selection(doc->editor->sci)) - { - gint len = sci_get_selected_text_length(doc->editor->sci); - search_word = g_malloc(len + 1); - sci_get_selected_text(doc->editor->sci, search_word); - } + search_word = sci_get_selection_contents(doc->editor->sci); else search_word = g_strdup(word); @@ -502,21 +498,18 @@ static gboolean check_lines(gpointer data) /* since we're in an timeout callback, the document may have been closed */ if (DOC_VALID (doc)) { - gchar *line; gint line_number = check_line_data.line_number; gint line_count = check_line_data.line_count; gint i; for (i = 0; i < line_count; i++) { - line = sci_get_line(doc->editor->sci, line_number); indicator_clear_on_line(doc, line_number); - if (sc_speller_process_line(doc, line_number, line) != 0) + if (sc_speller_process_line(doc, line_number) != 0) { if (sc_info->use_msgwin) msgwin_switch_tab(MSG_MESSAGE, FALSE); } - g_free(line); line_number++; } } Modified: spellcheck/src/scplugin.c 11 lines changed, 6 insertions(+), 5 deletions(-) =================================================================== @@ -61,7 +61,6 @@ enum KB_SPELL_TOOGLE_TYPING, KB_COUNT }; -PLUGIN_KEY_GROUP(spellcheck, KB_COUNT) @@ -173,6 +172,7 @@ static void configure_response_cb(GtkDialog *dialog, gint response, gpointer use void plugin_init(GeanyData *data) { + GeanyKeyGroup *key_group; GKeyFile *config = g_key_file_new(); gchar *default_lang; @@ -214,9 +214,10 @@ void plugin_init(GeanyData *data) gtk_widget_show_all(sc_info->menu_item); /* setup keybindings */ - keybindings_set_item(plugin_key_group, KB_SPELL_CHECK, sc_gui_kb_run_activate_cb, + key_group = plugin_set_key_group(geany_plugin, "spellcheck", KB_COUNT, NULL); + keybindings_set_item(key_group, KB_SPELL_CHECK, sc_gui_kb_run_activate_cb, 0, 0, "spell_check", _("Run Spell Check"), sc_info->submenu_item_default); - keybindings_set_item(plugin_key_group, KB_SPELL_TOOGLE_TYPING, + keybindings_set_item(key_group, KB_SPELL_TOOGLE_TYPING, sc_gui_kb_toggle_typing_activate_cb, 0, 0, "spell_toggle_typing", _("Toggle Check While Typing"), NULL); } @@ -327,7 +328,7 @@ GtkWidget *plugin_configure(GtkDialog *dialog) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_type), sc_info->check_while_typing); check_on_open = gtk_check_button_new_with_label(_("Check spelling when opening a document")); - ui_widget_set_tooltip_text(check_on_open, + gtk_widget_set_tooltip_text(check_on_open, _("Enabling this option will check every document after it is opened in Geany. " "Reloading a document will also trigger a re-check.")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_on_open), sc_info->check_on_document_open); @@ -350,7 +351,7 @@ GtkWidget *plugin_configure(GtkDialog *dialog) entry_dir = gtk_entry_new(); ui_entry_add_clear_icon(GTK_ENTRY(entry_dir)); gtk_label_set_mnemonic_widget(GTK_LABEL(label_dir), entry_dir); - ui_widget_set_tooltip_text(entry_dir, + gtk_widget_set_tooltip_text(entry_dir, _("Read additional dictionary files from this directory. " "For now, this only works with myspell dictionaries.")); if (! EMPTY(sc_info->dictionary_dir)) Modified: spellcheck/src/speller.c 34 lines changed, 11 insertions(+), 23 deletions(-) =================================================================== @@ -95,7 +95,7 @@ static gchar *strip_word(const gchar *word_to_check, gint *result_offset) g_memmove(word_start, word, new_word_len); word = word_start; word[new_word_len] = '\0'; - if (! NZV(word)) + if (EMPTY(word)) { g_free(word); return NULL; @@ -146,7 +146,7 @@ static gint sc_speller_check_word(GeanyDocument *doc, gint line_number, const gc /* strip punctuation and white space */ word_to_check = strip_word(word, &offset); - if (! NZV(word_to_check)) + if (EMPTY(word_to_check)) { g_free(word_to_check); return 0; @@ -199,18 +199,16 @@ static gint sc_speller_check_word(GeanyDocument *doc, gint line_number, const gc } -gint sc_speller_process_line(GeanyDocument *doc, gint line_number, const gchar *line) +gint sc_speller_process_line(GeanyDocument *doc, gint line_number) { gint pos_start, pos_end; gint wstart, wend; gint suggestions_found = 0; gint wordchars_len; gchar *wordchars; - GString *str; g_return_val_if_fail(sc_speller_dict != NULL, 0); g_return_val_if_fail(doc != NULL, 0); - g_return_val_if_fail(line != NULL, 0); /* add ' (single quote) temporarily to wordchars * to be able to check for "doesn't", "isn't" and similar */ @@ -224,27 +222,25 @@ gint sc_speller_process_line(GeanyDocument *doc, gint line_number, const gchar * scintilla_send_message(doc->editor->sci, SCI_SETWORDCHARS, 0, (sptr_t)wordchars); } - str = g_string_sized_new(256); - pos_start = sci_get_position_from_line(doc->editor->sci, line_number); pos_end = sci_get_position_from_line(doc->editor->sci, line_number + 1); while (pos_start < pos_end) { + gchar *word; + wstart = scintilla_send_message(doc->editor->sci, SCI_WORDSTARTPOSITION, pos_start, TRUE); wend = scintilla_send_message(doc->editor->sci, SCI_WORDENDPOSITION, wstart, FALSE); if (wstart == wend) break; - /* ensure the string has enough allocated memory */ - if (str->len < (guint)(wend - wstart)) - g_string_set_size(str, wend - wstart); - - sci_get_text_range(doc->editor->sci, wstart, wend, str->str); + word = sci_get_contents_range(doc->editor->sci, wstart, wend); - suggestions_found += sc_speller_check_word(doc, line_number, str->str, wstart, wend); + suggestions_found += sc_speller_check_word(doc, line_number, word, wstart, wend); pos_start = wend + 1; + + g_free(word); } /* reset wordchars for the current document */ @@ -252,14 +248,12 @@ gint sc_speller_process_line(GeanyDocument *doc, gint line_number, const gchar * scintilla_send_message(doc->editor->sci, SCI_SETWORDCHARS, 0, (sptr_t)wordchars); g_free(wordchars); - g_string_free(str, TRUE); return suggestions_found; } void sc_speller_check_document(GeanyDocument *doc) { - gchar *line; gint i; gint first_line, last_line; gchar *dict_string = NULL; @@ -299,22 +293,16 @@ void sc_speller_check_document(GeanyDocument *doc) if (first_line == last_line) { - line = sci_get_selection_contents(doc->editor->sci); - suggestions_found += sc_speller_process_line(doc, first_line, line); - g_free(line); + suggestions_found += sc_speller_process_line(doc, first_line); } else { for (i = first_line; i < last_line; i++) { - line = sci_get_line(doc->editor->sci, i); - - suggestions_found += sc_speller_process_line(doc, i, line); + suggestions_found += sc_speller_process_line(doc, i); /* process other GTK events to keep the GUI being responsive */ while (g_main_context_iteration(NULL, FALSE)); - - g_free(line); } } if (suggestions_found == 0 && sc_info->use_msgwin) Modified: spellcheck/src/speller.h 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -27,7 +27,7 @@ #define SC_SPELLER_H 1 -gint sc_speller_process_line(GeanyDocument *doc, gint line_number, const gchar *line); +gint sc_speller_process_line(GeanyDocument *doc, gint line_number); void sc_speller_check_document(GeanyDocument *doc); -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
Results per page:
10
25
50
100
200