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
April 2013
----- 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
35 discussions
Start a n
N
ew thread
[geany/geany-plugins] f81769: New plugin: Pair Tag Highlighter
by Volodymyr Kononenko
05 Apr '13
05 Apr '13
Branch: refs/heads/master Author: Volodymyr Kononenko <vm(a)kononenko.ws> Committer: Volodymyr Kononenko <volodymyr.kononenko(a)globallogic.com> Date: Fri, 05 Apr 2013 15:46:20 UTC Commit: f81769ef36281b2f4d2e09c5757a2605aae5b5cd
https://github.com/geany/geany-plugins/commit/f81769ef36281b2f4d2e09c5757a2…
Log Message: ----------- New plugin: Pair Tag Highlighter The plugin finds and highlights matching opening/closing HTML tag by clicking or moving cursor inside a tag. Modified Paths: -------------- Makefile.am build/pairtaghighlighter.m4 configure.ac pairtaghighlighter/AUTHORS pairtaghighlighter/COPYING pairtaghighlighter/ChangeLog pairtaghighlighter/Makefile.am pairtaghighlighter/NEWS pairtaghighlighter/README pairtaghighlighter/src/Makefile.am pairtaghighlighter/src/pair_tag_highlighter.c Modified: Makefile.am 4 files changed, 4 insertions(+), 0 deletions(-) =================================================================== @@ -94,6 +94,10 @@ if ENABLE_MULTITERM SUBDIRS += multiterm endif +if ENABLE_PAIRTAGHIGHLIGHTER +SUBDIRS += pairtaghighlighter +endif + if ENABLE_POHELPER SUBDIRS += pohelper endif Modified: build/pairtaghighlighter.m4 9 files changed, 9 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,9 @@ +AC_DEFUN([GP_CHECK_PAIRTAGHIGHLIGHTER], +[ + GP_ARG_DISABLE([PairTagHighlighter], [auto]) + GP_COMMIT_PLUGIN_STATUS([PairTagHighlighter]) + AC_CONFIG_FILES([ + pairtaghighlighter/Makefile + pairtaghighlighter/src/Makefile + ]) +]) Modified: configure.ac 1 files changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -48,6 +48,7 @@ GP_CHECK_GENIUSPASTE GP_CHECK_GPROJECT GP_CHECK_MARKDOWN GP_CHECK_MULTITERM +GP_CHECK_PAIRTAGHIGHLIGHTER GP_CHECK_POHELPER GP_CHECK_PRETTYPRINTER GP_CHECK_SCOPE Modified: pairtaghighlighter/AUTHORS 1 files changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1 @@ +Volodymyr Kononenko <vm(a)kononenko.ws> Modified: pairtaghighlighter/COPYING 25 files changed, 25 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,25 @@ +Copyright (c) 2013, Volodymyr Kononenko +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Modified: pairtaghighlighter/ChangeLog 3 files changed, 3 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,3 @@ +Changes in v1.0 Apr 5, 2013 + + * The first public version. Modified: pairtaghighlighter/Makefile.am 4 files changed, 4 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,4 @@ +include $(top_srcdir)/build/vars.auxfiles.mk + +SUBDIRS = src +plugin = pairtaghighlighter Modified: pairtaghighlighter/NEWS 0 files changed, 0 insertions(+), 0 deletions(-) =================================================================== No diff available, check online Modified: pairtaghighlighter/README 28 files changed, 28 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,28 @@ +Pair Tag Highlighter +==================== + +About +----- + +Finds and highlights matching opening/closing HTML tag by clicking or +moving cursor inside a tag. + +Usage +----- + +Just enable plugin through Geany's plugin manager. + +Licence +------- + +This plugin is distributed under the terms of the BSD 2-Clause License. +You should have received a copy of the the BSD 2-Clause License in the +file COPYING included with the source code of this plugin. If not, find +it at <
http://opensource.org/licenses/BSD-2-Clause
>. + +Contact developer +----------------- + +You may contact developer (Volodymyr Kononenko) via e-mail: +<vm(at)kononenko(dot)ws>. The complete up to date list of contacts +can be found at <
http://kononenko.ws/en/contacts
>. Modified: pairtaghighlighter/src/Makefile.am 9 files changed, 9 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,9 @@ +include $(top_srcdir)/build/vars.build.mk + +geanyplugins_LTLIBRARIES = pairtaghighlighter.la + +pairtaghighlighter_la_SOURCES = pair_tag_highlighter.c + +pairtaghighlighter_la_LIBADD = $(COMMONLIBS) + +include $(top_srcdir)/build/cppcheck.mk Modified: pairtaghighlighter/src/pair_tag_highlighter.c 349 files changed, 349 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,349 @@ +/* + * Pair Tag Highlighter + * + * highlights matching opening/closing HTML tags + * + * Author: Volodymyr Kononenko aka kvm + * Email: vm(a)kononenko.ws + * + */ + +#include "config.h" +#include <geanyplugin.h> +#include <string.h> +#include "Scintilla.h" /* for the SCNotification struct */ +#include "SciLexer.h" + +/* If to set indicator >8, highlighting will be of grey color. + * Light grey line highlighter covers higher values of indicator. */ +#define INDICATOR_TAGMATCH 0 +#define MAX_TAG_NAME 64 + +/* These items are set by Geany before plugin_init() is called. */ +GeanyPlugin *geany_plugin; +GeanyData *geany_data; +GeanyFunctions *geany_functions; + +static ScintillaObject *sci; + +/* Is needed for clearing highlighting after moving cursor out + * from the tag */ +static gint highlightedBrackets[] = {0, 0, 0, 0}; + +PLUGIN_VERSION_CHECK(211) + +PLUGIN_SET_TRANSLATABLE_INFO(LOCALEDIR, GETTEXT_PACKAGE, _("Pair Tag Highlighter"), + _("Finds and highlights matching opening/closing HTML tag"), + "1.0", "Volodymyr Kononenko <vm(a)kononenko.ws>") + + +/* Searches tag brackets. + * direction variable shows sets search direction: + * TRUE - to the right + * FALSE - to the left + * from the current cursor position to the start of the line. + */ +static gint findBracket(gint position, gint endOfSearchPos, + gchar searchedBracket, gchar breakBracket, gboolean direction) +{ + gint foundBracket = -1; + gint pos; + + if(TRUE == direction) + { + /* search to the right */ + for(pos=position; pos<=endOfSearchPos; pos++) + { + gchar charAtCurPosition = sci_get_char_at(sci, pos); + if(charAtCurPosition == searchedBracket) + { + foundBracket = pos; + break; + } + if(charAtCurPosition == breakBracket) + break; + } + } + else + { + /* search to the left */ + for(pos=position-1; pos>=endOfSearchPos; pos--) + { + gchar charAtCurPosition = sci_get_char_at(sci, pos); + if(charAtCurPosition == searchedBracket) + { + foundBracket = pos; + break; + } + if(charAtCurPosition == breakBracket) + break; + } + } + + return foundBracket; +} + + +static void highlight_tag(gint openingBracket, gint closingBracket) +{ + scintilla_send_message(sci, SCI_SETINDICATORCURRENT, INDICATOR_TAGMATCH, 0); + scintilla_send_message(sci, SCI_INDICSETSTYLE, + INDICATOR_TAGMATCH, INDIC_ROUNDBOX); + scintilla_send_message(sci, SCI_INDICSETFORE, 0, 0x00d000); // green + scintilla_send_message(sci, SCI_INDICSETALPHA, INDICATOR_TAGMATCH, 60); + scintilla_send_message(sci, SCI_INDICATORFILLRANGE, + openingBracket, closingBracket-openingBracket+1); +} + + +static void clear_previous_highlighting(gint rangeStart, gint rangeEnd) +{ + scintilla_send_message(sci, SCI_SETINDICATORCURRENT, INDICATOR_TAGMATCH, 0); + scintilla_send_message(sci, SCI_INDICATORCLEARRANGE, rangeStart, rangeEnd+1); +} + + +static gboolean is_tag_self_closing(gint closingBracket) +{ + gboolean isTagSelfClosing = FALSE; + gchar charBeforeBracket = sci_get_char_at(sci, closingBracket-1); + + if('/' == charBeforeBracket) + isTagSelfClosing = TRUE; + return isTagSelfClosing; +} + + +static gboolean is_tag_opening(gint openingBracket) +{ + gboolean isTagOpening = TRUE; + gchar charAfterBracket = sci_get_char_at(sci, openingBracket+1); + + if('/' == charAfterBracket) + isTagOpening = FALSE; + return isTagOpening; +} + + +static void get_tag_name(gint openingBracket, gint closingBracket, + gchar tagName[], gboolean isTagOpening) +{ + gint nameStart = openingBracket + (TRUE == isTagOpening ? 1 : 2); + gint nameEnd = nameStart; + gchar charAtCurPosition = sci_get_char_at(sci, nameStart); + + while(' ' != charAtCurPosition && '>' != charAtCurPosition && + '\t' != charAtCurPosition && '\r' != charAtCurPosition && '\n' != charAtCurPosition) + { + charAtCurPosition = sci_get_char_at(sci, nameEnd); + nameEnd++; + if(nameEnd-nameStart > MAX_TAG_NAME) + break; + } + sci_get_text_range(sci, nameStart, nameEnd-1, tagName); +} + + +static void findMatchingOpeningTag(gchar *tagName, gint openingBracket) +{ + gint pos; + gint openingTagsCount = 0; + gint closingTagsCount = 1; + + for(pos=openingBracket; pos>0; pos--) + { + /* are we inside tag? */ + gint lineNumber = sci_get_line_from_position(sci, pos); + gint lineStart = sci_get_position_from_line(sci, lineNumber); + gint matchingOpeningBracket = findBracket(pos, lineStart, '<', '\0', FALSE); + gint matchingClosingBracket = findBracket(pos, lineStart, '>', '\0', FALSE); + + if(-1 != matchingOpeningBracket && -1 != matchingClosingBracket + && (matchingClosingBracket > matchingOpeningBracket)) + { + /* we are inside of some tag. Let us check what tag*/ + gchar matchingTagName[MAX_TAG_NAME]; + gboolean isMatchingTagOpening = is_tag_opening(matchingOpeningBracket); + get_tag_name(matchingOpeningBracket, matchingClosingBracket, + matchingTagName, isMatchingTagOpening); + if(strcmp(tagName, matchingTagName) == 0) + { + if(TRUE == isMatchingTagOpening) + openingTagsCount++; + else + closingTagsCount++; + } + pos = matchingOpeningBracket+1; + } + /* Speed up search: if findBracket returns -1, that means start of line + * is reached. There is no need to go through the same positions again. + * Jump to the start of line */ + else if(-1 == matchingOpeningBracket || -1 == matchingClosingBracket) + { + pos = lineStart; + continue; + } + if(openingTagsCount == closingTagsCount) + { + /* matching tag is found */ + highlight_tag(matchingOpeningBracket, matchingClosingBracket); + highlightedBrackets[2] = matchingOpeningBracket; + highlightedBrackets[3] = matchingClosingBracket; + break; + } + } +} + + +static void findMatchingClosingTag(gchar *tagName, gint closingBracket) +{ + gint pos; + gint linesInDocument = sci_get_line_count(sci); + gint endOfDocument = sci_get_position_from_line(sci, linesInDocument); + gint openingTagsCount = 1; + gint closingTagsCount = 0; + + for(pos=closingBracket; pos<endOfDocument; pos++) + { + /* are we inside tag? */ + gint lineNumber = sci_get_line_from_position(sci, pos); + gint lineEnd = sci_get_line_end_position(sci, lineNumber); + gint matchingOpeningBracket = findBracket(pos, endOfDocument, '<', '\0', TRUE); + gint matchingClosingBracket = findBracket(pos, endOfDocument, '>', '\0', TRUE); + + if(-1 != matchingOpeningBracket && -1 != matchingClosingBracket + && (matchingClosingBracket > matchingOpeningBracket)) + { + /* we are inside of some tag. Let us check what tag*/ + gchar matchingTagName[64]; + gboolean isMatchingTagOpening = is_tag_opening(matchingOpeningBracket); + get_tag_name(matchingOpeningBracket, matchingClosingBracket, + matchingTagName, isMatchingTagOpening); + if(strcmp(tagName, matchingTagName) == 0) + { + if(TRUE == isMatchingTagOpening) + openingTagsCount++; + else + closingTagsCount++; + } + pos = matchingClosingBracket; + } + /* Speed up search: if findBracket returns -1, that means end of line + * is reached. There is no need to go through the same positions again. + * Jump to the end of line */ + else if(-1 == matchingOpeningBracket || -1 == matchingClosingBracket) + { + pos = lineEnd; + continue; + } + if(openingTagsCount == closingTagsCount) + { + /* matching tag is found */ + highlight_tag(matchingOpeningBracket, matchingClosingBracket); + highlightedBrackets[2] = matchingOpeningBracket; + highlightedBrackets[3] = matchingClosingBracket; + break; + } + } +} + + +static void findMatchingTag(gint openingBracket, gint closingBracket) +{ + gchar tagName[MAX_TAG_NAME]; + gboolean isTagOpening = is_tag_opening(openingBracket); + get_tag_name(openingBracket, closingBracket, tagName, isTagOpening); + + if(TRUE == isTagOpening) + findMatchingClosingTag(tagName, closingBracket); + else + findMatchingOpeningTag(tagName, openingBracket); +} + + +static void run_tag_highlighter(void) +{ + gint position = sci_get_current_position(sci); + gint lineNumber = sci_get_current_line(sci); + gint lineStart = sci_get_position_from_line(sci, lineNumber); + gint lineEnd = sci_get_line_end_position(sci, lineNumber); + gint openingBracket = findBracket(position, lineStart, '<', '>', FALSE); + gint closingBracket = findBracket(position, lineEnd, '>', '<', TRUE); + int i; + + if(-1 == openingBracket || -1 == closingBracket) + { + clear_previous_highlighting(highlightedBrackets[0], highlightedBrackets[1]); + clear_previous_highlighting(highlightedBrackets[2], highlightedBrackets[3]); + for(i=0; i<3; i++) + highlightedBrackets[i] = 0; + return; + } + + /* If the cursor jumps from one tag into another, clear + * previous highlighted tags*/ + if(openingBracket != highlightedBrackets[0] || + closingBracket != highlightedBrackets[1]) + { + clear_previous_highlighting(highlightedBrackets[0], highlightedBrackets[1]); + clear_previous_highlighting(highlightedBrackets[2], highlightedBrackets[3]); + } + + highlightedBrackets[0] = openingBracket; + highlightedBrackets[1] = closingBracket; + + /* Highlight current tag. Matching tag will be highlighted from + * findMatchingTag() functiong */ + highlight_tag(openingBracket, closingBracket); + + /* Find matching tag only if a tag is not self-closing */ + if(FALSE == is_tag_self_closing(closingBracket)) + findMatchingTag(openingBracket, closingBracket); +} + + +/* Notification handler for editor-notify */ +static gboolean on_editor_notify(GObject *obj, GeanyEditor *editor, + SCNotification *nt, gpointer user_data) +{ + gint lexer; + + /* setting global sci variable to be available in other functions */ + sci = editor->sci; + + lexer = sci_get_lexer(sci); + if(lexer != SCLEX_HTML) + { + return FALSE; + } + + /* nmhdr is a structure containing information about the event */ + switch (nt->nmhdr.code) + { + case SCN_UPDATEUI: + run_tag_highlighter(); + break; + } + + /* returning FALSE to allow Geany processing the event */ + return FALSE; +} + + +PluginCallback plugin_callbacks[] = +{ + { "editor-notify", (GCallback) &on_editor_notify, FALSE, NULL }, + { NULL, NULL, FALSE, NULL } +}; + + +void plugin_init(GeanyData *data) +{ +} + + +void plugin_cleanup(void) +{ + clear_previous_highlighting(highlightedBrackets[0], highlightedBrackets[1]); + clear_previous_highlighting(highlightedBrackets[2], highlightedBrackets[3]); +} -------------- 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] 28976b: Fix box inclusion order
by Jiří Techet
05 Apr '13
05 Apr '13
Branch: refs/heads/master Author: Jiří Techet <techet(a)gmail.com> Committer: Jiří Techet <techet(a)gmail.com> Date: Thu, 04 Apr 2013 22:50:01 UTC Commit: 28976b54b3cc1329c27c0c740806868c95356053
https://github.com/geany/geany-plugins/commit/28976b54b3cc1329c27c0c7408068…
Log Message: ----------- Fix box inclusion order Modified Paths: -------------- gproject/src/gproject-sidebar.c Modified: gproject/src/gproject-sidebar.c 3 files changed, 1 insertions(+), 2 deletions(-) =================================================================== @@ -767,8 +767,6 @@ void gprj_sidebar_init(void) g_signal_connect(G_OBJECT(s_file_view), "key-press-event", G_CALLBACK(on_key_press), NULL); - gtk_box_pack_start(GTK_BOX(s_file_view_vbox), s_file_view, TRUE, TRUE, 0); - /**** popup menu ****/ s_popup_menu.widget = gtk_menu_new(); @@ -821,6 +819,7 @@ void gprj_sidebar_init(void) gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(scrollwin), s_file_view); + gtk_box_pack_start(GTK_BOX(s_file_view_vbox), scrollwin, TRUE, TRUE, 0); gtk_widget_show_all(s_file_view_vbox); gtk_notebook_append_page(GTK_NOTEBOOK(geany->main_widgets->sidebar_notebook), -------------- 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] e721ed: Remove unnecessary assert
by Jiří Techet
05 Apr '13
05 Apr '13
Branch: refs/heads/master Author: Jiří Techet <techet(a)gmail.com> Committer: Jiří Techet <techet(a)gmail.com> Date: Thu, 04 Apr 2013 22:16:39 UTC Commit: e721ed103dd1ba4a91de45c0378786359c67a55d
https://github.com/geany/geany-plugins/commit/e721ed103dd1ba4a91de45c037878…
Log Message: ----------- Remove unnecessary assert Modified Paths: -------------- gproject/src/gproject-main.c Modified: gproject/src/gproject-main.c 2 files changed, 0 insertions(+), 2 deletions(-) =================================================================== @@ -66,8 +66,6 @@ static void on_doc_open(G_GNUC_UNUSED GObject * obj, G_GNUC_UNUSED GeanyDocument static void on_doc_activate(G_GNUC_UNUSED GObject * obj, G_GNUC_UNUSED GeanyDocument * doc, G_GNUC_UNUSED gpointer user_data) { - g_return_if_fail(doc != NULL && doc->file_name != NULL); - gprj_sidebar_update(FALSE); } -------------- 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] a3c89b: Focus the file view when switching to sidebar using the keyboard
by Jiří Techet
04 Apr '13
04 Apr '13
Branch: refs/heads/master Author: Jiří Techet <techet(a)gmail.com> Committer: Jiří Techet <techet(a)gmail.com> Date: Thu, 04 Apr 2013 21:33:47 UTC Commit: a3c89b94a75378f74295317771bfe5d172cfdac8
https://github.com/geany/geany-plugins/commit/a3c89b94a75378f74295317771bfe…
Log Message: ----------- Focus the file view when switching to sidebar using the keyboard Thanks to Giuseppe Corbelli. Modified Paths: -------------- gproject/src/gproject-sidebar.c Modified: gproject/src/gproject-sidebar.c 3 files changed, 3 insertions(+), 0 deletions(-) =================================================================== @@ -689,6 +689,7 @@ void gprj_sidebar_init(void) GtkTreeViewColumn *column; GtkTreeSelection *sel; PangoFontDescription *pfd; + GList *focus_chain = NULL; s_file_view_vbox = gtk_vbox_new(FALSE, 0); @@ -814,6 +815,8 @@ void gprj_sidebar_init(void) /**** the rest ****/ + focus_chain = g_list_prepend(focus_chain, s_file_view); + gtk_container_set_focus_chain(GTK_CONTAINER(s_file_view_vbox), focus_chain); scrollwin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); -------------- 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] 6da7fc: GProject: Fix GTK+3 support
by Quentin Glidic
04 Apr '13
04 Apr '13
Branch: refs/heads/master Author: Quentin Glidic <sardemff7+git(a)sardemff7.net> Committer: Jiří Techet <techet(a)gmail.com> Date: Thu, 04 Apr 2013 21:04:57 UTC Commit: 6da7fc768344e17ce6aabdd0a325cf2f6f93825b
https://github.com/geany/geany-plugins/commit/6da7fc768344e17ce6aabdd0a325c…
Log Message: ----------- GProject: Fix GTK+3 support Signed-off-by: Quentin Glidic <sardemff7+git(a)sardemff7.net> Modified Paths: -------------- build/gproject.m4 gproject/src/gproject-sidebar.c Modified: build/gproject.m4 1 files changed, 0 insertions(+), 1 deletions(-) =================================================================== @@ -1,7 +1,6 @@ AC_DEFUN([GP_CHECK_GPROJECT], [ GP_ARG_DISABLE([GProject], [auto]) - GP_CHECK_PLUGIN_GTK2_ONLY([GProject]) GP_COMMIT_PLUGIN_STATUS([GProject]) AC_CONFIG_FILES([ gproject/Makefile Modified: gproject/src/gproject-sidebar.c 10 files changed, 6 insertions(+), 4 deletions(-) =================================================================== @@ -24,6 +24,7 @@ #include "config.h" #endif #include <geanyplugin.h> +#include <gtkcompat.h> #include "gproject-utils.h" #include "gproject-project.h" @@ -92,7 +93,7 @@ static gint show_dialog_find_file(gchar *path, gchar **pattern, gboolean *case_s label = gtk_label_new(_("Search for:")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_size_group_add_widget(size_group, label); - s_fif_dialog.combo = gtk_combo_box_entry_new_text(); + s_fif_dialog.combo = gtk_combo_box_text_new_with_entry(); entry = gtk_bin_get_child(GTK_BIN(s_fif_dialog.combo)); gtk_entry_set_width_chars(GTK_ENTRY(entry), 40); gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry); @@ -146,7 +147,7 @@ static gint show_dialog_find_file(gchar *path, gchar **pattern, gboolean *case_s *pattern = g_strconcat("*", str, "*", NULL); *case_sensitive = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(s_fif_dialog.case_sensitive)); *full_path = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(s_fif_dialog.full_path)); - ui_combo_box_add_to_history(GTK_COMBO_BOX_ENTRY(s_fif_dialog.combo), str, 0); + ui_combo_box_add_to_history(GTK_COMBO_BOX_TEXT(s_fif_dialog.combo), str, 0); } gtk_widget_hide(s_fif_dialog.widget); @@ -348,7 +349,7 @@ static void on_open_clicked(void) gchar *icon; gtk_tree_model_get(model, &iter, FILEVIEW_COLUMN_ICON, &icon, -1); - + if (!icon) { /* help string doesn't have icon */ @@ -765,6 +766,8 @@ void gprj_sidebar_init(void) g_signal_connect(G_OBJECT(s_file_view), "key-press-event", G_CALLBACK(on_key_press), NULL); + gtk_box_pack_start(GTK_BOX(s_file_view_vbox), s_file_view, TRUE, TRUE, 0); + /**** popup menu ****/ s_popup_menu.widget = gtk_menu_new(); @@ -815,7 +818,6 @@ void gprj_sidebar_init(void) gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(scrollwin), s_file_view); - gtk_container_add(GTK_CONTAINER(s_file_view_vbox), scrollwin); gtk_widget_show_all(s_file_view_vbox); gtk_notebook_append_page(GTK_NOTEBOOK(geany->main_widgets->sidebar_notebook), -------------- 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
Older →
Jump to page:
1
2
3
4
Results per page:
10
25
50
100
200