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
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
List overview
Commits
September 2014
----- 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
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
commits@lists.geany.org
1 participants
47 discussions
Start a n
N
ew thread
[geany/geany] d7aa4b: Update for new Scintilla styles
by Colomban Wendling
26 Sep '14
26 Sep '14
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Thu, 25 Sep 2014 22:23:37 UTC Commit: d7aa4b591622a09e0c7c1c16a548ba99f05f01ab
https://github.com/geany/geany/commit/d7aa4b591622a09e0c7c1c16a548ba99f05f0…
Log Message: ----------- Update for new Scintilla styles Modified Paths: -------------- data/filetypes.sql data/filetypes.vhdl src/highlightingmappings.h Modified: data/filetypes.sql 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -19,6 +19,7 @@ sqlplus=default sqlplus_prompt=default sqlplus_comment=comment quotedidentifier=identifier_2 +qoperator=operator [keywords] # all items must be in one line Modified: data/filetypes.vhdl 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -4,6 +4,7 @@ default=default comment=comment comment_line_bang=comment_line +block_comment=comment number=number_1 string=string_1 operator=operator Modified: src/highlightingmappings.h 4 lines changed, 3 insertions(+), 1 deletions(-) =================================================================== @@ -1388,7 +1388,8 @@ static const HLStyle highlighting_styles_SQL[] = { SCE_SQL_SQLPLUS, "sqlplus", FALSE }, { SCE_SQL_SQLPLUS_PROMPT, "sqlplus_prompt", FALSE }, { SCE_SQL_SQLPLUS_COMMENT, "sqlplus_comment", FALSE }, - { SCE_SQL_QUOTEDIDENTIFIER, "quotedidentifier", FALSE } + { SCE_SQL_QUOTEDIDENTIFIER, "quotedidentifier", FALSE }, + { SCE_SQL_QOPERATOR, "qoperator", FALSE } /* these are for user-defined keywords we don't set yet */ /*{ SCE_SQL_USER1, "user1", FALSE }, { SCE_SQL_USER2, "user2", FALSE }, @@ -1483,6 +1484,7 @@ static const HLStyle highlighting_styles_VHDL[] = { SCE_VHDL_DEFAULT, "default", FALSE }, { SCE_VHDL_COMMENT, "comment", FALSE }, { SCE_VHDL_COMMENTLINEBANG, "comment_line_bang", FALSE }, + { SCE_VHDL_BLOCK_COMMENT, "block_comment", FALSE }, { SCE_VHDL_NUMBER, "number", FALSE }, { SCE_VHDL_STRING, "string", FALSE }, { SCE_VHDL_OPERATOR, "operator", 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] 1e59b1: Update Scintilla to 3.5.1 pre-release
by Colomban Wendling
26 Sep '14
26 Sep '14
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Thu, 25 Sep 2014 22:23:29 UTC Commit: 1e59b15c618720bad5036c39b203a41114d41002
https://github.com/geany/geany/commit/1e59b15c618720bad5036c39b203a41114d41…
Log Message: ----------- Update Scintilla to 3.5.1 pre-release Modified Paths: -------------- scintilla/gtk/PlatGTK.cxx scintilla/gtk/ScintillaGTK.cxx scintilla/include/SciLexer.h scintilla/include/Scintilla.h scintilla/include/Scintilla.iface scintilla/lexers/LexSQL.cxx scintilla/lexers/LexVHDL.cxx scintilla/scintilla_changes.patch scintilla/src/Document.cxx scintilla/src/EditModel.cxx scintilla/src/EditModel.h scintilla/src/EditView.cxx scintilla/src/EditView.h scintilla/src/Editor.cxx scintilla/src/Editor.h scintilla/src/Indicator.h scintilla/src/RESearch.cxx scintilla/src/ViewStyle.cxx scintilla/version.txt Modified: scintilla/gtk/PlatGTK.cxx 29 lines changed, 19 insertions(+), 10 deletions(-) =================================================================== @@ -811,9 +811,9 @@ void SurfaceImpl::DrawRGBAImage(PRectangle rc, int width, int height, const unsi #endif int ucs = stride * height; std::vector<unsigned char> image(ucs); - for (int y=0; y<height; y++) { - for (int x=0; x<width; x++) { - unsigned char *pixel = &image[0] + y*stride + x * 4; + for (int iy=0; iy<height; iy++) { + for (int ix=0; ix<width; ix++) { + unsigned char *pixel = &image[0] + iy*stride + ix * 4; unsigned char alpha = pixelsImage[3]; pixel[2] = (*pixelsImage++) * alpha / 255; pixel[1] = (*pixelsImage++) * alpha / 255; @@ -822,12 +822,12 @@ void SurfaceImpl::DrawRGBAImage(PRectangle rc, int width, int height, const unsi } } - cairo_surface_t *psurf = cairo_image_surface_create_for_data(&image[0], CAIRO_FORMAT_ARGB32, width, height, stride); - cairo_set_source_surface(context, psurf, rc.left, rc.top); + cairo_surface_t *psurfImage = cairo_image_surface_create_for_data(&image[0], CAIRO_FORMAT_ARGB32, width, height, stride); + cairo_set_source_surface(context, psurfImage, rc.left, rc.top); cairo_rectangle(context, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top); cairo_fill(context); - cairo_surface_destroy(psurf); + cairo_surface_destroy(psurfImage); } void SurfaceImpl::Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back) { @@ -1625,10 +1625,10 @@ void ListBoxX::Create(Window &, int, Point, int, bool, int) { if (g_object_class_find_property(G_OBJECT_GET_CLASS(list), "fixed-height-mode")) g_object_set(G_OBJECT(list), "fixed-height-mode", TRUE, NULL); - GtkWidget *wid = PWidget(list); // No code inside the G_OBJECT macro - gtk_container_add(GTK_CONTAINER(PWidget(scroller)), wid); - gtk_widget_show(wid); - g_signal_connect(G_OBJECT(wid), "button_press_event", + GtkWidget *widget = PWidget(list); // No code inside the G_OBJECT macro + gtk_container_add(GTK_CONTAINER(PWidget(scroller)), widget); + gtk_widget_show(widget); + g_signal_connect(G_OBJECT(widget), "button_press_event", G_CALLBACK(ButtonPress), this); } @@ -1658,6 +1658,14 @@ int ListBoxX::GetVisibleRows() const { int ListBoxX::GetRowHeight() { +#if GTK_CHECK_VERSION(3,0,0) + // This version sometimes reports erroneous results on GTK2, but the GTK2 + // version is inaccurate for GTK 3.14. + GdkRectangle rect; + GtkTreePath *path = gtk_tree_path_new_first(); + gtk_tree_view_get_background_area(GTK_TREE_VIEW(list), path, NULL, &rect); + return rect.height; +#else int row_height=0; int vertical_separator=0; int expander_size=0; @@ -1669,6 +1677,7 @@ int ListBoxX::GetRowHeight() row_height += vertical_separator; row_height = Platform::Maximum(row_height, expander_size); return row_height; +#endif } PRectangle ListBoxX::GetDesiredRect() { Modified: scintilla/gtk/ScintillaGTK.cxx 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -55,6 +55,7 @@ #include "Document.h" #include "CaseConvert.h" #include "UniConversion.h" +#include "UnicodeFromUTF8.h" #include "Selection.h" #include "PositionCache.h" #include "EditModel.h" @@ -63,7 +64,6 @@ #include "Editor.h" #include "AutoComplete.h" #include "ScintillaBase.h" -#include "UnicodeFromUTF8.h" #ifdef SCI_LEXER #include "ExternalLexer.h" Modified: scintilla/include/SciLexer.h 10 lines changed, 10 insertions(+), 0 deletions(-) =================================================================== @@ -128,6 +128,7 @@ #define SCLEX_AS 113 #define SCLEX_DMIS 114 #define SCLEX_REGISTRY 115 +#define SCLEX_BIBTEX 116 #define SCLEX_AUTOMATIC 1000 #define SCE_P_DEFAULT 0 #define SCE_P_COMMENTLINE 1 @@ -1004,6 +1005,7 @@ #define SCE_VHDL_STDPACKAGE 12 #define SCE_VHDL_STDTYPE 13 #define SCE_VHDL_USERWORD 14 +#define SCE_VHDL_BLOCK_COMMENT 15 #define SCE_CAML_DEFAULT 0 #define SCE_CAML_IDENTIFIER 1 #define SCE_CAML_TAGNAME 2 @@ -1115,6 +1117,7 @@ #define SCE_SQL_USER3 21 #define SCE_SQL_USER4 22 #define SCE_SQL_QUOTEDIDENTIFIER 23 +#define SCE_SQL_QOPERATOR 24 #define SCE_ST_DEFAULT 0 #define SCE_ST_STRING 1 #define SCE_ST_NUMBER 2 @@ -1731,6 +1734,13 @@ #define SCE_REG_STRING_GUID 10 #define SCE_REG_PARAMETER 11 #define SCE_REG_OPERATOR 12 +#define SCE_BIBTEX_DEFAULT 0 +#define SCE_BIBTEX_ENTRY 1 +#define SCE_BIBTEX_UNKNOWN_ENTRY 2 +#define SCE_BIBTEX_KEY 3 +#define SCE_BIBTEX_PARAMETER 4 +#define SCE_BIBTEX_VALUE 5 +#define SCE_BIBTEX_COMMENT 6 /* --Autogenerated -- end of section automatically generated from Scintilla.iface */ #endif Modified: scintilla/include/Scintilla.h 5 lines changed, 5 insertions(+), 0 deletions(-) =================================================================== @@ -97,6 +97,10 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_GETNEXTTABSTOP 2677 #define SC_CP_UTF8 65001 #define SCI_SETCODEPAGE 2037 +#define SC_IME_WINDOWED 0 +#define SC_IME_INLINE 1 +#define SCI_GETIMEINTERACTION 2678 +#define SCI_SETIMEINTERACTION 2679 #define MARKER_MAX 31 #define SC_MARK_CIRCLE 0 #define SC_MARK_ROUNDRECT 1 @@ -888,6 +892,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_SCROLLTOEND 2629 #define SC_TECHNOLOGY_DEFAULT 0 #define SC_TECHNOLOGY_DIRECTWRITE 1 +#define SC_TECHNOLOGY_DIRECTWRITERETAIN 2 #define SCI_SETTECHNOLOGY 2630 #define SCI_GETTECHNOLOGY 2631 #define SCI_CREATELOADER 2632 Modified: scintilla/include/Scintilla.iface 23 lines changed, 23 insertions(+), 0 deletions(-) =================================================================== @@ -243,6 +243,16 @@ val SC_CP_UTF8=65001 # The SC_CP_UTF8 value can be used to enter Unicode mode. set void SetCodePage=2037(int codePage,) +enu IMEInteraction=SC_IME_ +val SC_IME_WINDOWED=0 +val SC_IME_INLINE=1 + +# Is the IME displayed in a winow or inline? +get int GetIMEInteraction=2678(,) + +# Choose to display the the IME in a winow or inline. +set void SetIMEInteraction=2679(int imeInteraction,) + enu MarkerSymbol=SC_MARK_ val MARKER_MAX=31 val SC_MARK_CIRCLE=0 @@ -2349,6 +2359,7 @@ fun void ScrollToEnd=2629(,) val SC_TECHNOLOGY_DEFAULT=0 val SC_TECHNOLOGY_DIRECTWRITE=1 +val SC_TECHNOLOGY_DIRECTWRITERETAIN=2 # Set the technology used. set void SetTechnology=2630(int technology,) @@ -2700,6 +2711,7 @@ val SCLEX_DMAP=112 val SCLEX_AS=113 val SCLEX_DMIS=114 val SCLEX_REGISTRY=115 +val SCLEX_BIBTEX=116 # When a lexer specifies its language as SCLEX_AUTOMATIC it receives a # value assigned in sequence from SCLEX_AUTOMATIC+1. @@ -3703,6 +3715,7 @@ val SCE_VHDL_STDFUNCTION=11 val SCE_VHDL_STDPACKAGE=12 val SCE_VHDL_STDTYPE=13 val SCE_VHDL_USERWORD=14 +val SCE_VHDL_BLOCK_COMMENT=15 # Lexical states for SCLEX_CAML lex Caml=SCLEX_CAML SCE_CAML_ val SCE_CAML_DEFAULT=0 @@ -3824,6 +3837,7 @@ val SCE_SQL_USER2=20 val SCE_SQL_USER3=21 val SCE_SQL_USER4=22 val SCE_SQL_QUOTEDIDENTIFIER=23 +val SCE_SQL_QOPERATOR=24 # Lexical states for SCLEX_SMALLTALK lex Smalltalk=SCLEX_SMALLTALK SCE_ST_ val SCE_ST_DEFAULT=0 @@ -4512,6 +4526,15 @@ val SCE_REG_KEYPATH_GUID=9 val SCE_REG_STRING_GUID=10 val SCE_REG_PARAMETER=11 val SCE_REG_OPERATOR=12 +# Lexical state for SCLEX_BIBTEX +lex BibTeX=SCLEX_BIBTEX SCE_BIBTEX_ +val SCE_BIBTEX_DEFAULT=0 +val SCE_BIBTEX_ENTRY=1 +val SCE_BIBTEX_UNKNOWN_ENTRY=2 +val SCE_BIBTEX_KEY=3 +val SCE_BIBTEX_PARAMETER=4 +val SCE_BIBTEX_VALUE=5 +val SCE_BIBTEX_COMMENT=6 # Events Modified: scintilla/lexers/LexSQL.cxx 32 lines changed, 31 insertions(+), 1 deletions(-) =================================================================== @@ -444,6 +444,8 @@ void SCI_METHOD LexerSQL::Lex(unsigned int startPos, int length, int initStyle, StyleContext sc(startPos, length, initStyle, styler); int styleBeforeDCKeyword = SCE_SQL_DEFAULT; int offset = 0; + char qOperator = 0x00; + for (; sc.More(); sc.Forward(), offset++) { // Determine if the current state should terminate. switch (sc.state) { @@ -556,11 +558,39 @@ void SCI_METHOD LexerSQL::Lex(unsigned int startPos, int length, int initStyle, } } break; + case SCE_SQL_QOPERATOR: + if (qOperator == 0x00) { + qOperator = sc.ch; + } else { + char qComplement = 0x00; + + if (qOperator == '<') { + qComplement = '>'; + } else if (qOperator == '(') { + qComplement = ')'; + } else if (qOperator == '{') { + qComplement = '}'; + } else if (qOperator == '[') { + qComplement = ']'; + } else { + qComplement = qOperator; + } + + if (sc.Match(qComplement, '\'')) { + sc.Forward(); + sc.ForwardSetState(SCE_SQL_DEFAULT); + qOperator = 0x00; + } + } + break; } // Determine if a new state should be entered. if (sc.state == SCE_SQL_DEFAULT) { - if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + if (sc.Match('q', '\'') || sc.Match('Q', '\'')) { + sc.SetState(SCE_SQL_QOPERATOR); + sc.Forward(); + } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { sc.SetState(SCE_SQL_NUMBER); } else if (IsAWordStart(sc.ch)) { sc.SetState(SCE_SQL_IDENTIFIER); Modified: scintilla/lexers/LexVHDL.cxx 124 lines changed, 101 insertions(+), 23 deletions(-) =================================================================== @@ -119,6 +119,11 @@ static void ColouriseVHDLDoc( sc.ChangeState(SCE_VHDL_STRINGEOL); sc.ForwardSetState(SCE_VHDL_DEFAULT); } + } else if (sc.state == SCE_VHDL_BLOCK_COMMENT){ + if(sc.ch == '*' && sc.chNext == '/'){ + sc.Forward(); + sc.ForwardSetState(SCE_VHDL_DEFAULT); + } } // Determine if a new state should be entered. @@ -132,6 +137,8 @@ static void ColouriseVHDLDoc( sc.SetState(SCE_VHDL_COMMENTLINEBANG); else sc.SetState(SCE_VHDL_COMMENT); + } else if (sc.Match('/', '*')){ + sc.SetState(SCE_VHDL_BLOCK_COMMENT); } else if (sc.ch == '\"') { sc.SetState(SCE_VHDL_STRING); } else if (isoperator(static_cast<char>(sc.ch))) { @@ -155,6 +162,39 @@ static bool IsCommentLine(int line, Accessor &styler) { } return false; } +static bool IsCommentBlockStart(int line, Accessor &styler) +{ + int pos = styler.LineStart(line); + int eol_pos = styler.LineStart(line + 1) - 1; + for (int i = pos; i < eol_pos; i++) { + char ch = styler[i]; + char chNext = styler[i+1]; + char style = styler.StyleAt(i); + if ((style == SCE_VHDL_BLOCK_COMMENT) && (ch == '/') && (chNext == '*')) + return true; + } + return false; +} + +static bool IsCommentBlockEnd(int line, Accessor &styler) +{ + int pos = styler.LineStart(line); + int eol_pos = styler.LineStart(line + 1) - 1; + + for (int i = pos; i < eol_pos; i++) { + char ch = styler[i]; + char chNext = styler[i+1]; + char style = styler.StyleAt(i); + if ((style == SCE_VHDL_BLOCK_COMMENT) && (ch == '*') && (chNext == '/')) + return true; + } + return false; +} + +static bool IsCommentStyle(char style) +{ + return style == SCE_VHDL_BLOCK_COMMENT || style == SCE_VHDL_COMMENT || style == SCE_VHDL_COMMENTLINEBANG; +} //============================================================================= // Folding the code @@ -207,14 +247,14 @@ static void FoldNoBoxVHDLDoc( char chPrev = styler.SafeGetCharAt(j-1); int style = styler.StyleAt(j); int stylePrev = styler.StyleAt(j-1); - if ((stylePrev != SCE_VHDL_COMMENT) && (stylePrev != SCE_VHDL_STRING)) + if ((!IsCommentStyle(style)) && (stylePrev != SCE_VHDL_STRING)) { if(IsAWordChar(chPrev) && !IsAWordChar(ch)) { end = j-1; } } - if ((style != SCE_VHDL_COMMENT) && (style != SCE_VHDL_STRING)) + if ((!IsCommentStyle(style)) && (style != SCE_VHDL_STRING)) { if(!IsAWordChar(chPrev) && IsAWordStart(ch) && (end != 0)) { @@ -236,7 +276,7 @@ static void FoldNoBoxVHDLDoc( { char ch = styler.SafeGetCharAt(j); int style = styler.StyleAt(j); - if ((style != SCE_VHDL_COMMENT) && (style != SCE_VHDL_STRING)) + if ((!IsCommentStyle(style)) && (style != SCE_VHDL_STRING)) { if((ch == ';') && (strcmp(prevWord, "end") == 0)) { @@ -268,15 +308,29 @@ static void FoldNoBoxVHDLDoc( styleNext = styler.StyleAt(i + 1); bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); - if (foldComment && atEOL && IsCommentLine(lineCurrent, styler)) + if (foldComment && atEOL) { - if(!IsCommentLine(lineCurrent-1, styler) && IsCommentLine(lineCurrent+1, styler)) + if(IsCommentLine(lineCurrent, styler)) { - levelNext++; + if(!IsCommentLine(lineCurrent-1, styler) && IsCommentLine(lineCurrent+1, styler)) + { + levelNext++; + } + else if(IsCommentLine(lineCurrent-1, styler) && !IsCommentLine(lineCurrent+1, styler)) + { + levelNext--; + } } - else if(IsCommentLine(lineCurrent-1, styler) && !IsCommentLine(lineCurrent+1, styler)) + else { - levelNext--; + if (IsCommentBlockStart(lineCurrent, styler) && !IsCommentBlockEnd(lineCurrent, styler)) + { + levelNext++; + } + else if (IsCommentBlockEnd(lineCurrent, styler) && !IsCommentBlockStart(lineCurrent, styler)) + { + levelNext--; + } } } @@ -289,7 +343,7 @@ static void FoldNoBoxVHDLDoc( } } - if ((style != SCE_VHDL_COMMENT) && (style != SCE_VHDL_STRING)) + if ((!IsCommentStyle(style)) && (style != SCE_VHDL_STRING)) { if((ch == ';') && (strcmp(prevWord, "end") == 0)) { @@ -301,7 +355,7 @@ static void FoldNoBoxVHDLDoc( lastStart = i; } - if(iswordchar(ch) && !iswordchar(chNext)) { + if(IsAWordChar(ch) && !IsAWordChar(chNext)) { char s[32]; unsigned int k; for(k=0; (k<31 ) && (k<i-lastStart+1 ); k++) { @@ -314,8 +368,6 @@ static void FoldNoBoxVHDLDoc( if ( strcmp(s, "architecture") == 0 || strcmp(s, "case") == 0 || - strcmp(s, "component") == 0 || - strcmp(s, "entity") == 0 || strcmp(s, "generate") == 0 || strcmp(s, "loop") == 0 || strcmp(s, "package") ==0 || @@ -331,6 +383,32 @@ static void FoldNoBoxVHDLDoc( levelNext++; } } else if ( + strcmp(s, "component") == 0 || + strcmp(s, "entity") == 0 || + strcmp(s, "configuration") == 0 ) + { + if (strcmp(prevWord, "end") != 0) + { // check for instantiated unit by backward searching for the colon. + unsigned pos = lastStart-1; + char chAtPos, styleAtPos; + do{// skip white spaces + styleAtPos = styler.StyleAt(pos); + chAtPos = styler.SafeGetCharAt(pos--); + }while(pos>0 && + (chAtPos == ' ' || chAtPos == '\t' || + chAtPos == '\n' || chAtPos == '\r' || + IsCommentStyle(styleAtPos))); + + // check for a colon (':') before the instantiated units "entity", "component" or "configuration". Don't fold thereafter. + if (chAtPos != ':') + { + if (levelMinCurrentElse > levelNext) { + levelMinCurrentElse = levelNext; + } + levelNext++; + } + } + } else if ( strcmp(s, "procedure") == 0 || strcmp(s, "function") == 0) { @@ -338,19 +416,19 @@ static void FoldNoBoxVHDLDoc( { // This code checks to see if the procedure / function is a definition within a "package" // rather than the actual code in the body. int BracketLevel = 0; - for(int j=i+1; j<styler.Length(); j++) + for(int pos=i+1; pos<styler.Length(); pos++) { - int LocalStyle = styler.StyleAt(j); - char LocalCh = styler.SafeGetCharAt(j); - if(LocalCh == '(') BracketLevel++; - if(LocalCh == ')') BracketLevel--; + int styleAtPos = styler.StyleAt(pos); + char chAtPos = styler.SafeGetCharAt(pos); + if(chAtPos == '(') BracketLevel++; + if(chAtPos == ')') BracketLevel--; if( (BracketLevel == 0) && - (LocalStyle != SCE_VHDL_COMMENT) && - (LocalStyle != SCE_VHDL_STRING) && - !iswordchar(styler.SafeGetCharAt(j-1)) && - styler.Match(j, "is") && - !iswordchar(styler.SafeGetCharAt(j+2))) + (!IsCommentStyle(styleAtPos)) && + (styleAtPos != SCE_VHDL_STRING) && + !iswordchar(styler.SafeGetCharAt(pos-1)) && + styler.Match(pos, "is") && + !iswordchar(styler.SafeGetCharAt(pos+2))) { if (levelMinCurrentElse > levelNext) { levelMinCurrentElse = levelNext; @@ -358,7 +436,7 @@ static void FoldNoBoxVHDLDoc( levelNext++; break; } - if((BracketLevel == 0) && (LocalCh == ';')) + if((BracketLevel == 0) && (chAtPos == ';')) { break; } Modified: scintilla/scintilla_changes.patch 3 lines changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -31,7 +31,7 @@ diff --git b/scintilla/src/Catalogue.cxx a/scintilla/src/Catalogue.cxx index 41d5d54..70ce3bc 100644 --- scintilla/src/Catalogue.cxx +++ scintilla/src/Catalogue.cxx -@@ -76,116 +76,48 @@ int Scintilla_LinkLexers() { +@@ -76,117 +76,48 @@ int Scintilla_LinkLexers() { //++Autogenerated -- run scripts/LexGen.py to regenerate //**\(\tLINK_LEXER(\*);\n\) @@ -49,6 +49,7 @@ index 41d5d54..70ce3bc 100644 - LINK_LEXER(lmBaan); LINK_LEXER(lmBash); LINK_LEXER(lmBatch); +- LINK_LEXER(lmBibTeX); - LINK_LEXER(lmBlitzBasic); - LINK_LEXER(lmBullant); LINK_LEXER(lmCaml); Modified: scintilla/src/Document.cxx 14 lines changed, 8 insertions(+), 6 deletions(-) =================================================================== @@ -937,6 +937,8 @@ void Document::CheckReadOnly() { // SetStyleAt does not change the persistent state of a document bool Document::DeleteChars(int pos, int len) { + if (pos < 0) + return false; if (len <= 0) return false; if ((pos + len) > Length()) @@ -2198,8 +2200,8 @@ class DocumentIndexer : public CharacterIndexer { long BuiltinRegex::FindText(Document *doc, int minPos, int maxPos, const char *s, bool caseSensitive, bool, bool, int flags, int *length) { - bool posix = (flags & SCFIND_POSIX) != 0; - int increment = (minPos <= maxPos) ? 1 : -1; + const bool posix = (flags & SCFIND_POSIX) != 0; + const int increment = (minPos <= maxPos) ? 1 : -1; int startPos = minPos; int endPos = maxPos; @@ -2217,7 +2219,7 @@ long BuiltinRegex::FindText(Document *doc, int minPos, int maxPos, const char *s // Search: \$(\([A-Za-z0-9_-]+\)\.\([A-Za-z0-9_.]+\)) // Replace: $(\1-\2) int lineRangeStart = doc->LineFromPosition(startPos); - int lineRangeEnd = doc->LineFromPosition(endPos); + const int lineRangeEnd = doc->LineFromPosition(endPos); if ((increment == 1) && (startPos >= doc->LineEnd(lineRangeStart)) && (lineRangeStart < lineRangeEnd)) { @@ -2233,9 +2235,9 @@ long BuiltinRegex::FindText(Document *doc, int minPos, int maxPos, const char *s } int pos = -1; int lenRet = 0; - char searchEnd = s[*length - 1]; - char searchEndPrev = (*length > 1) ? s[*length - 2] : '\0'; - int lineRangeBreak = lineRangeEnd + increment; + const char searchEnd = s[*length - 1]; + const char searchEndPrev = (*length > 1) ? s[*length - 2] : '\0'; + const int lineRangeBreak = lineRangeEnd + increment; for (int line = lineRangeStart; line != lineRangeBreak; line += increment) { int startOfLine = doc->LineStart(line); int endOfLine = doc->LineEnd(line); Modified: scintilla/src/EditModel.cxx 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -61,6 +61,7 @@ EditModel::EditModel() { bracesMatchStyle = STYLE_BRACEBAD; highlightGuideColumn = 0; primarySelection = true; + imeInteraction = imeWindowed; foldFlags = 0; hotspot = Range(invalidPosition); wrapWidth = LineLayout::wrapWidthInfinite; Modified: scintilla/src/EditModel.h 2 lines changed, 2 insertions(+), 0 deletions(-) =================================================================== @@ -42,6 +42,8 @@ class EditModel { Selection sel; bool primarySelection; + enum IMEInteraction { imeWindowed, imeInline } imeInteraction; + int foldFlags; ContractionState cs; // Hotspot support Modified: scintilla/src/EditView.cxx 13 lines changed, 6 insertions(+), 7 deletions(-) =================================================================== @@ -215,11 +215,11 @@ void EditView::ClearAllTabstops() { ldTabstops = 0; } -int EditView::NextTabstopPos(int line, int x, int tabWidth) const { - int next = GetNextTabstop(line, x); +XYPOSITION EditView::NextTabstopPos(int line, XYPOSITION x, XYPOSITION tabWidth) const { + int next = GetNextTabstop(line, static_cast<int>(x + 2)); if (next > 0) - return next; - return ((((x + 2) / tabWidth) + 1) * tabWidth); + return static_cast<XYPOSITION>(next); + return (static_cast<int>((x + 2) / tabWidth) + 1) * tabWidth; } bool EditView::ClearTabstops(int line) { @@ -452,9 +452,8 @@ void EditView::LayoutLine(const EditModel &model, int line, Surface *surface, co XYPOSITION representationWidth = vstyle.controlCharWidth; if (ll->chars[ts.start] == '\t') { // Tab is a special case of representation, taking a variable amount of space - const int x = static_cast<int>(ll->positions[ts.start]); - const int tabWidth = static_cast<int>(vstyle.tabWidth); - representationWidth = static_cast<XYPOSITION>(NextTabstopPos(line, x, tabWidth) - ll->positions[ts.start]); + const XYPOSITION x = ll->positions[ts.start]; + representationWidth = NextTabstopPos(line, x, vstyle.tabWidth) - ll->positions[ts.start]; } else { if (representationWidth <= 0.0) { XYPOSITION positionsRepr[256]; // Should expand when needed Modified: scintilla/src/EditView.h 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -32,7 +32,7 @@ enum DrawPhase { drawLineTranslucent = 0x40, drawFoldLines = 0x80, drawCarets = 0x100, - drawAll = 0x1FF, + drawAll = 0x1FF }; bool ValidStyledText(const ViewStyle &vs, size_t styleOffset, const StyledText &st); @@ -86,7 +86,7 @@ class EditView { bool LinesOverlap() const; void ClearAllTabstops(); - int NextTabstopPos(int line, int x, int tabWidth) const; + XYPOSITION NextTabstopPos(int line, XYPOSITION x, XYPOSITION tabWidth) const; bool ClearTabstops(int line); bool AddTabstop(int line, int x); int GetNextTabstop(int line, int x) const; Modified: scintilla/src/Editor.cxx 17 lines changed, 8 insertions(+), 9 deletions(-) =================================================================== @@ -2132,14 +2132,6 @@ void Editor::Redo() { } } -void Editor::DelChar() { - if (!RangeContainsProtected(sel.MainCaret(), sel.MainCaret() + 1)) { - pdoc->DelChar(sel.MainCaret()); - } - // Avoid blinking during rapid typing: - ShowCaretAtCurrentPosition(); -} - void Editor::DelCharBack(bool allowLineStartDeletion) { RefreshStyleData(); if (!sel.IsRectangular()) @@ -4284,7 +4276,7 @@ void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, b } bool Editor::PositionIsHotspot(int position) const { - return vs.styles[pdoc->StyleAt(position)].hotspot; + return vs.styles[static_cast<unsigned char>(pdoc->StyleAt(position))].hotspot; } bool Editor::PointIsHotspot(Point pt) { @@ -6259,6 +6251,13 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_GETCODEPAGE: return pdoc->dbcsCodePage; + case SCI_SETIMEINTERACTION: + imeInteraction = static_cast<EditModel::IMEInteraction>(wParam); + break; + + case SCI_GETIMEINTERACTION: + return imeInteraction; + #ifdef INCLUDE_DEPRECATED_FEATURES case SCI_SETUSEPALETTE: InvalidateStyleRedraw(); Modified: scintilla/src/Editor.h 1 lines changed, 0 insertions(+), 1 deletions(-) =================================================================== @@ -403,7 +403,6 @@ class Editor : public EditModel, public DocWatcher { void SelectAll(); void Undo(); void Redo(); - void DelChar(); void DelCharBack(bool allowLineStartDeletion); virtual void ClaimSelection() = 0; Modified: scintilla/src/Indicator.h 7 lines changed, 5 insertions(+), 2 deletions(-) =================================================================== @@ -17,11 +17,14 @@ namespace Scintilla { class Indicator { public: int style; - bool under; ColourDesired fore; + bool under; int fillAlpha; int outlineAlpha; - Indicator() : style(INDIC_PLAIN), under(false), fore(ColourDesired(0,0,0)), fillAlpha(30), outlineAlpha(50) { + Indicator() : style(INDIC_PLAIN), fore(ColourDesired(0,0,0)), under(false), fillAlpha(30), outlineAlpha(50) { + } + Indicator(int style_, ColourDesired fore_=ColourDesired(0,0,0), bool under_=false, int fillAlpha_=30, int outlineAlpha_=50) : + style(style_), fore(fore_), under(under_), fillAlpha(fillAlpha_), outlineAlpha(outlineAlpha_) { } void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine) const; }; Modified: scintilla/src/RESearch.cxx 3 lines changed, 1 insertions(+), 2 deletions(-) =================================================================== @@ -276,10 +276,9 @@ void RESearch::GrabMatches(CharacterIndexer &ci) { for (unsigned int i = 0; i < MAXTAG; i++) { if ((bopat[i] != NOTFOUND) && (eopat[i] != NOTFOUND)) { unsigned int len = eopat[i] - bopat[i]; - pat[i] = std::string(len+1, '\0'); + pat[i].resize(len); for (unsigned int j = 0; j < len; j++) pat[i][j] = ci.CharAt(bopat[i] + j); - pat[i][len] = '\0'; } } } Modified: scintilla/src/ViewStyle.cxx 12 lines changed, 3 insertions(+), 9 deletions(-) =================================================================== @@ -192,15 +192,9 @@ void ViewStyle::Init(size_t stylesSize_) { // There are no image markers by default, so no need for calling CalcLargestMarkerHeight() largestMarkerHeight = 0; - indicators[0].style = INDIC_SQUIGGLE; - indicators[0].under = false; - indicators[0].fore = ColourDesired(0, 0x7f, 0); - indicators[1].style = INDIC_TT; - indicators[1].under = false; - indicators[1].fore = ColourDesired(0, 0, 0xff); - indicators[2].style = INDIC_PLAIN; - indicators[2].under = false; - indicators[2].fore = ColourDesired(0xff, 0, 0); + indicators[0] = Indicator(INDIC_SQUIGGLE, ColourDesired(0, 0x7f, 0)); + indicators[1] = Indicator(INDIC_TT, ColourDesired(0, 0, 0xff)); + indicators[2] = Indicator(INDIC_PLAIN, ColourDesired(0xff, 0, 0)); technology = SC_TECHNOLOGY_DEFAULT; lineHeight = 1; Modified: scintilla/version.txt 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -1 +1 @@ -350 +351 -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 187dca: Use named constants everywhere for msgwin/compiler internal columns
by Colomban Wendling
25 Sep '14
25 Sep '14
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Thu, 25 Sep 2014 15:05:55 UTC Commit: 187dca29573f9247dab607738274341b08e105a1
https://github.com/geany/geany/commit/187dca29573f9247dab607738274341b08e10…
Log Message: ----------- Use named constants everywhere for msgwin/compiler internal columns Modified Paths: -------------- src/msgwindow.c Modified: src/msgwindow.c 31 lines changed, 20 insertions(+), 11 deletions(-) =================================================================== @@ -75,6 +75,13 @@ enum MSG_COL_COUNT }; +enum +{ + COMPILER_COL_COLOR = 0, + COMPILER_COL_STRING, + COMPILER_COL_COUNT +}; + static void prepare_msg_tree_view(void); static void prepare_status_tree_view(void); @@ -194,7 +201,7 @@ static void prepare_msg_tree_view(void) renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(NULL, renderer, - "foreground-gdk", 2, "text", 3, NULL); + "foreground-gdk", MSG_COL_COLOR, "text", MSG_COL_STRING, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(msgwindow.tree_msg), column); gtk_tree_view_set_enable_search(GTK_TREE_VIEW(msgwindow.tree_msg), FALSE); @@ -225,12 +232,13 @@ static void prepare_compiler_tree_view(void) GtkTreeViewColumn *column; GtkTreeSelection *selection; - msgwindow.store_compiler = gtk_list_store_new(2, GDK_TYPE_COLOR, G_TYPE_STRING); + msgwindow.store_compiler = gtk_list_store_new(COMPILER_COL_COUNT, GDK_TYPE_COLOR, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(msgwindow.tree_compiler), GTK_TREE_MODEL(msgwindow.store_compiler)); g_object_unref(msgwindow.store_compiler); renderer = gtk_cell_renderer_text_new(); - column = gtk_tree_view_column_new_with_attributes(NULL, renderer, "foreground-gdk", 0, "text", 1, NULL); + column = gtk_tree_view_column_new_with_attributes(NULL, renderer, + "foreground-gdk", COMPILER_COL_COLOR, "text", COMPILER_COL_STRING, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(msgwindow.tree_compiler), column); gtk_tree_view_set_enable_search(GTK_TREE_VIEW(msgwindow.tree_compiler), FALSE); @@ -304,7 +312,8 @@ void msgwin_compiler_add_string(gint msg_color, const gchar *msg) utf8_msg = (gchar *) msg; gtk_list_store_append(msgwindow.store_compiler, &iter); - gtk_list_store_set(msgwindow.store_compiler, &iter, 0, color, 1, utf8_msg, -1); + gtk_list_store_set(msgwindow.store_compiler, &iter, + COMPILER_COL_COLOR, color, COMPILER_COL_STRING, utf8_msg, -1); if (ui_prefs.msgwindow_visible && interface_prefs.compiler_tab_autoscroll) { @@ -458,7 +467,7 @@ on_compiler_treeview_copy_activate(GtkMenuItem *menuitem, gpointer user_data) GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; - gint str_idx = 1; + gint str_idx = COMPILER_COL_STRING; switch (GPOINTER_TO_INT(user_data)) { @@ -473,7 +482,7 @@ on_compiler_treeview_copy_activate(GtkMenuItem *menuitem, gpointer user_data) case MSG_MESSAGE: tv = msgwindow.tree_msg; - str_idx = 3; + str_idx = MSG_COL_STRING; break; } selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv)); @@ -498,7 +507,7 @@ static void on_compiler_treeview_copy_all_activate(GtkMenuItem *menuitem, gpoint GtkListStore *store = msgwindow.store_compiler; GtkTreeIter iter; GString *str = g_string_new(""); - gint str_idx = 1; + gint str_idx = COMPILER_COL_STRING; gboolean valid; switch (GPOINTER_TO_INT(user_data)) @@ -514,7 +523,7 @@ static void on_compiler_treeview_copy_all_activate(GtkMenuItem *menuitem, gpoint case MSG_MESSAGE: store = msgwindow.store_msg; - str_idx = 3; + str_idx = MSG_COL_STRING; break; } @@ -624,7 +633,7 @@ find_prev_build_dir(GtkTreePath *cur, GtkTreeModel *model, gchar **prefix) if (gtk_tree_model_get_iter(model, &iter, cur)) { gchar *string; - gtk_tree_model_get(model, &iter, 1, &string, -1); + gtk_tree_model_get(model, &iter, COMPILER_COL_STRING, &string, -1); if (string != NULL && build_parse_make_dir(string, prefix)) { g_free(string); @@ -710,7 +719,7 @@ gboolean msgwin_goto_compiler_file_line(gboolean focus_editor) if (gtk_tree_selection_get_selected(selection, &model, &iter)) { /* if the item is not coloured red, it's not an error line */ - gtk_tree_model_get(model, &iter, 0, &color, -1); + gtk_tree_model_get(model, &iter, COMPILER_COL_COLOR, &color, -1); if (color == NULL || ! gdk_color_equal(color, &color_error)) { if (color != NULL) @@ -719,7 +728,7 @@ gboolean msgwin_goto_compiler_file_line(gboolean focus_editor) } gdk_color_free(color); - gtk_tree_model_get(model, &iter, 1, &string, -1); + gtk_tree_model_get(model, &iter, COMPILER_COL_STRING, &string, -1); if (string != NULL) { gint line; -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 88a362: Merge pull request #334 from ntrel/confirm-infobar-reload
by Nick Treleaven
25 Sep '14
25 Sep '14
Branch: refs/heads/master Author: Nick Treleaven <nick.treleaven(a)btinternet.com> Committer: Nick Treleaven <nick.treleaven(a)btinternet.com> Date: Thu, 25 Sep 2014 10:53:16 UTC Commit: 88a36268efd91b91f188024019c01ed68896667d
https://github.com/geany/geany/commit/88a36268efd91b91f188024019c01ed688966…
Log Message: ----------- Merge pull request #334 from ntrel/confirm-infobar-reload Confirm infobar reload when document has modifications Modified Paths: -------------- plugins/geanyfunctions.h src/document.c src/document.h src/plugindata.h src/plugins.c Modified: plugins/geanyfunctions.h 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -52,8 +52,8 @@ geany_functions->p_document->document_open_files #define document_remove_page \ geany_functions->p_document->document_remove_page -#define document_reload_file \ - geany_functions->p_document->document_reload_file +#define document_reload_force \ + geany_functions->p_document->document_reload_force #define document_set_encoding \ geany_functions->p_document->document_set_encoding #define document_set_text_changed \ Modified: src/document.c 24 lines changed, 18 insertions(+), 6 deletions(-) =================================================================== @@ -1409,7 +1409,7 @@ void document_open_files(const GSList *filenames, gboolean readonly, GeanyFilety /** - * Reloads the document with the specified file encoding + * Reloads the document with the specified file encoding. * @a forced_enc or @c NULL to auto-detect the file encoding. * * @param doc The document to reload. @@ -1417,7 +1417,7 @@ void document_open_files(const GSList *filenames, gboolean readonly, GeanyFilety * * @return @c TRUE if the document was actually reloaded or @c FALSE otherwise. **/ -gboolean document_reload_file(GeanyDocument *doc, const gchar *forced_enc) +gboolean document_reload_force(GeanyDocument *doc, const gchar *forced_enc) { gint pos = 0; GeanyDocument *new_doc; @@ -1458,7 +1458,7 @@ gboolean document_reload_prompt(GeanyDocument *doc, const gchar *forced_enc) _("Any unsaved changes will be lost."), _("Are you sure you want to reload '%s'?"), base_name)) { - result = document_reload_file(doc, forced_enc); + result = document_reload_force(doc, forced_enc); if (forced_enc != NULL) ui_update_statusbar(doc, -1); } @@ -3218,7 +3218,6 @@ static GtkWidget* document_show_message(GeanyDocument *doc, GtkMessageType msgty g_free(markup); g_signal_connect(info_widget, "response", G_CALLBACK(response_cb), doc); - g_signal_connect_after(info_widget, "response", G_CALLBACK(gtk_widget_destroy), NULL); hbox = gtk_hbox_new(FALSE, 12); gtk_box_pack_start(GTK_BOX(content_area), hbox, TRUE, TRUE, 0); @@ -3266,15 +3265,28 @@ static GtkWidget* document_show_message(GeanyDocument *doc, GtkMessageType msgty static void on_monitor_reload_file_response(GtkWidget *bar, gint response_id, GeanyDocument *doc) { + gboolean close = FALSE; + + // disable info bar so actions complete normally unprotect_document(doc); doc->priv->info_bars[MSG_TYPE_RELOAD] = NULL; if (response_id == RESPONSE_DOCUMENT_RELOAD) - document_reload_file(doc, doc->encoding); + close = document_reload_prompt(doc, doc->encoding); else if (response_id == RESPONSE_DOCUMENT_SAVE) - document_save_file(doc, TRUE); + close = document_save_file(doc, TRUE); // force overwrite else if (response_id == GTK_RESPONSE_CANCEL) + { document_set_text_changed(doc, TRUE); + close = TRUE; + } + if (!close) + { + doc->priv->info_bars[MSG_TYPE_RELOAD] = bar; + protect_document(doc); + return; + } + gtk_widget_destroy(bar); } Modified: src/document.h 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -196,7 +196,7 @@ gboolean document_save_file_as(GeanyDocument *doc, const gchar *utf8_fname); GeanyDocument* document_open_file(const gchar *locale_filename, gboolean readonly, GeanyFiletype *ft, const gchar *forced_enc); -gboolean document_reload_file(GeanyDocument *doc, const gchar *forced_enc); +gboolean document_reload_force(GeanyDocument *doc, const gchar *forced_enc); gboolean document_reload_prompt(GeanyDocument *doc, const gchar *forced_enc); Modified: src/plugindata.h 6 lines changed, 4 insertions(+), 2 deletions(-) =================================================================== @@ -58,7 +58,7 @@ G_BEGIN_DECLS * @warning You should not test for values below 200 as previously * @c GEANY_API_VERSION was defined as an enum value, not a macro. */ -#define GEANY_API_VERSION 219 +#define GEANY_API_VERSION 220 /* hack to have a different ABI when built with GTK3 because loading GTK2-linked plugins * with GTK3-linked Geany leads to crash */ @@ -310,7 +310,7 @@ typedef struct DocumentFuncs void (*document_open_files) (const GSList *filenames, gboolean readonly, struct GeanyFiletype *ft, const gchar *forced_enc); gboolean (*document_remove_page) (guint page_num); - gboolean (*document_reload_file) (struct GeanyDocument *doc, const gchar *forced_enc); + gboolean (*document_reload_force) (struct GeanyDocument *doc, const gchar *forced_enc); void (*document_set_encoding) (struct GeanyDocument *doc, const gchar *new_encoding); void (*document_set_text_changed) (struct GeanyDocument *doc, gboolean changed); void (*document_set_filetype) (struct GeanyDocument *doc, struct GeanyFiletype *type); @@ -741,6 +741,8 @@ BuildFuncs; /* Deprecated aliases */ #ifndef GEANY_DISABLE_DEPRECATED +#define document_reload_file document_reload_force + /** @deprecated - copy into your plugin code if needed. * @c NULL-safe way to get the index of @a doc_ptr in the documents array. */ #define DOC_IDX(doc_ptr) \ Modified: src/plugins.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -98,7 +98,7 @@ static DocumentFuncs doc_funcs = { &document_open_file, &document_open_files, &document_remove_page, - &document_reload_file, + &document_reload_force, &document_set_encoding, &document_set_text_changed, &document_set_filetype, -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 9d669a: API: Rename document_reload_file -> document_reload_force
by Nick Treleaven
25 Sep '14
25 Sep '14
Branch: refs/heads/master Author: Nick Treleaven <nick.treleaven(a)btinternet.com> Committer: Nick Treleaven <nick.treleaven(a)btinternet.com> Date: Thu, 25 Sep 2014 10:45:49 UTC Commit: 9d669a72f74b9433b9ad8f40f1a1424c77f3172d
https://github.com/geany/geany/commit/9d669a72f74b9433b9ad8f40f1a1424c77f31…
Log Message: ----------- API: Rename document_reload_file -> document_reload_force New name is clearer against document_reload_prompt. Add deprecated alias. Modified Paths: -------------- plugins/geanyfunctions.h src/document.c src/document.h src/plugindata.h src/plugins.c Modified: plugins/geanyfunctions.h 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -52,8 +52,8 @@ geany_functions->p_document->document_open_files #define document_remove_page \ geany_functions->p_document->document_remove_page -#define document_reload_file \ - geany_functions->p_document->document_reload_file +#define document_reload_force \ + geany_functions->p_document->document_reload_force #define document_set_encoding \ geany_functions->p_document->document_set_encoding #define document_set_text_changed \ Modified: src/document.c 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -1417,7 +1417,7 @@ void document_open_files(const GSList *filenames, gboolean readonly, GeanyFilety * * @return @c TRUE if the document was actually reloaded or @c FALSE otherwise. **/ -gboolean document_reload_file(GeanyDocument *doc, const gchar *forced_enc) +gboolean document_reload_force(GeanyDocument *doc, const gchar *forced_enc) { gint pos = 0; GeanyDocument *new_doc; @@ -1458,7 +1458,7 @@ gboolean document_reload_prompt(GeanyDocument *doc, const gchar *forced_enc) _("Any unsaved changes will be lost."), _("Are you sure you want to reload '%s'?"), base_name)) { - result = document_reload_file(doc, forced_enc); + result = document_reload_force(doc, forced_enc); if (forced_enc != NULL) ui_update_statusbar(doc, -1); } Modified: src/document.h 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -196,7 +196,7 @@ gboolean document_save_file_as(GeanyDocument *doc, const gchar *utf8_fname); GeanyDocument* document_open_file(const gchar *locale_filename, gboolean readonly, GeanyFiletype *ft, const gchar *forced_enc); -gboolean document_reload_file(GeanyDocument *doc, const gchar *forced_enc); +gboolean document_reload_force(GeanyDocument *doc, const gchar *forced_enc); gboolean document_reload_prompt(GeanyDocument *doc, const gchar *forced_enc); Modified: src/plugindata.h 6 lines changed, 4 insertions(+), 2 deletions(-) =================================================================== @@ -58,7 +58,7 @@ G_BEGIN_DECLS * @warning You should not test for values below 200 as previously * @c GEANY_API_VERSION was defined as an enum value, not a macro. */ -#define GEANY_API_VERSION 219 +#define GEANY_API_VERSION 220 /* hack to have a different ABI when built with GTK3 because loading GTK2-linked plugins * with GTK3-linked Geany leads to crash */ @@ -310,7 +310,7 @@ typedef struct DocumentFuncs void (*document_open_files) (const GSList *filenames, gboolean readonly, struct GeanyFiletype *ft, const gchar *forced_enc); gboolean (*document_remove_page) (guint page_num); - gboolean (*document_reload_file) (struct GeanyDocument *doc, const gchar *forced_enc); + gboolean (*document_reload_force) (struct GeanyDocument *doc, const gchar *forced_enc); void (*document_set_encoding) (struct GeanyDocument *doc, const gchar *new_encoding); void (*document_set_text_changed) (struct GeanyDocument *doc, gboolean changed); void (*document_set_filetype) (struct GeanyDocument *doc, struct GeanyFiletype *type); @@ -741,6 +741,8 @@ BuildFuncs; /* Deprecated aliases */ #ifndef GEANY_DISABLE_DEPRECATED +#define document_reload_file document_reload_force + /** @deprecated - copy into your plugin code if needed. * @c NULL-safe way to get the index of @a doc_ptr in the documents array. */ #define DOC_IDX(doc_ptr) \ Modified: src/plugins.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -98,7 +98,7 @@ static DocumentFuncs doc_funcs = { &document_open_file, &document_open_files, &document_remove_page, - &document_reload_file, + &document_reload_force, &document_set_encoding, &document_set_text_changed, &document_set_filetype, -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] ed0fa4: Update of German translation
by Frank Lanitz
24 Sep '14
24 Sep '14
Branch: refs/heads/master Author: Frank Lanitz <frank(a)frank.uvena.de> Committer: Frank Lanitz <frank(a)frank.uvena.de> Date: Wed, 24 Sep 2014 18:09:15 UTC Commit: ed0fa4538f3b3b296e38203591a07d7c33b4c6cb
https://github.com/geany/geany/commit/ed0fa4538f3b3b296e38203591a07d7c33b4c…
Log Message: ----------- Update of German translation Modified Paths: -------------- po/de.po Modified: po/de.po 381 lines changed, 194 insertions(+), 187 deletions(-) =================================================================== @@ -11,8 +11,8 @@ msgid "" msgstr "" "Project-Id-Version: Geany 1.24\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-07 19:04+0200\n" -"PO-Revision-Date: 2014-09-07 19:12+0200\n" +"POT-Creation-Date: 2014-09-24 20:06+0200\n" +"PO-Revision-Date: 2014-09-24 20:09+0200\n" "Last-Translator: Frank Lanitz <frlan@trabant>\n" "Language-Team: German <geany-i18n(a)uvena.de>\n" "Language: de\n" @@ -108,11 +108,11 @@ msgstr "_Suchen" msgid "Open Selected F_ile" msgstr "_Markierte Datei öffnen" -#: ../data/geany.glade.h:19 ../src/symbols.c:2381 +#: ../data/geany.glade.h:19 ../src/symbols.c:2383 msgid "Find _Usage" msgstr "_Auftreten finden" -#: ../data/geany.glade.h:20 ../src/symbols.c:2386 +#: ../data/geany.glade.h:20 ../src/symbols.c:2388 msgid "Find _Document Usage" msgstr "_Auftreten im Dokument finden" @@ -1261,7 +1261,7 @@ msgstr "" "Wie oft soll auf Veränderungen geprüft werden? Angabe in Sekunden. 0 " "deaktiviert die Funktion." -#: ../data/geany.glade.h:253 ../src/prefs.c:1607 ../src/symbols.c:661 +#: ../data/geany.glade.h:253 ../src/prefs.c:1607 ../src/symbols.c:663 #: ../plugins/filebrowser.c:1119 msgid "Files" msgstr "Dateien" @@ -1683,7 +1683,7 @@ msgstr "Speichern _unter" msgid "Sa_ve All" msgstr "A_lle speichern" -#: ../data/geany.glade.h:345 ../src/document.c:1450 ../src/document.c:3274 +#: ../data/geany.glade.h:345 ../src/document.c:1457 ../src/document.c:3328 #: ../src/sidebar.c:709 msgid "_Reload" msgstr "Neu _laden" @@ -1808,7 +1808,7 @@ msgstr "_Nächstes" msgid "Find _Previous" msgstr "_Vorheriges" -#: ../data/geany.glade.h:376 ../src/symbols.c:2391 +#: ../data/geany.glade.h:376 ../src/symbols.c:2393 msgid "Find in F_iles..." msgstr "In _Dateien suchen..." @@ -2275,53 +2275,53 @@ msgstr "" "Frank Lanitz\n" "Alle Rechte vorbehalten." -#: ../src/about.c:166 +#: ../src/about.c:168 msgid "About Geany" msgstr "Über Geany" -#: ../src/about.c:209 +#: ../src/about.c:213 msgid "A fast and lightweight IDE" msgstr "Eine kleine und schnelle Entwicklungsumgebung" -#: ../src/about.c:231 +#: ../src/about.c:235 #, c-format msgid "(built on or after %s)" msgstr "(kompiliert am %s oder später)" #. gtk_container_add(GTK_CONTAINER(info_box), cop_label); -#: ../src/about.c:263 +#: ../src/about.c:267 msgid "Info" msgstr "Info" -#: ../src/about.c:279 +#: ../src/about.c:283 msgid "Developers" msgstr "Entwickler" -#: ../src/about.c:286 +#: ../src/about.c:290 msgid "maintainer" msgstr "Hauptentwickler" -#: ../src/about.c:294 ../src/about.c:302 ../src/about.c:310 +#: ../src/about.c:298 ../src/about.c:306 ../src/about.c:314 msgid "developer" msgstr "Entwickler" -#: ../src/about.c:318 +#: ../src/about.c:322 msgid "translation maintainer" msgstr "Übersetzungskoordinator" -#: ../src/about.c:327 +#: ../src/about.c:331 msgid "Translators" msgstr "Übersetzer" -#: ../src/about.c:347 +#: ../src/about.c:351 msgid "Previous Translators" msgstr "Ehemalige Übersetzer" -#: ../src/about.c:368 +#: ../src/about.c:372 msgid "Contributors" msgstr "Mitwirkende" -#: ../src/about.c:378 +#: ../src/about.c:382 #, c-format msgid "" "Some of the many contributors (for a more detailed list, see the file %s):" @@ -2329,15 +2329,15 @@ msgstr "" "Einige der vielen Leute, die an Geany mitgearbeitet haben (eine " "detailliertere Liste findet sich in der Datei %s):" -#: ../src/about.c:404 +#: ../src/about.c:408 msgid "Credits" msgstr "Credits" -#: ../src/about.c:421 +#: ../src/about.c:425 msgid "License" msgstr "Lizenz" -#: ../src/about.c:430 +#: ../src/about.c:434 msgid "" "License text could not be found, please visit
http://www.gnu.org/licenses/
" "gpl-2.0.txt to view it online." @@ -2461,12 +2461,12 @@ msgstr "Keine weiteren Fehlermeldungen." msgid "Set menu item label" msgstr "Bezeichnung für den Menüeintrag definieren" -#: ../src/build.c:1965 ../src/symbols.c:716 ../src/tools.c:589 +#: ../src/build.c:1965 ../src/symbols.c:718 ../src/tools.c:589 msgid "Label" msgstr "Label" #. command column, holding status and command display -#: ../src/build.c:1966 ../src/symbols.c:711 ../src/tools.c:574 +#: ../src/build.c:1966 ../src/symbols.c:713 ../src/tools.c:574 msgid "Command" msgstr "Kommando" @@ -2578,8 +2578,8 @@ msgstr "Keine weiteren Nachrichten." msgid "Could not open file %s (File not found)" msgstr "Konnte Datei »%s« nicht öffnen (Datei nicht gefunden)." -#: ../src/dialogs.c:160 ../src/document.c:2059 ../src/document.c:2124 -#: ../src/document.c:2132 +#: ../src/dialogs.c:160 ../src/document.c:2110 ../src/document.c:2175 +#: ../src/document.c:2183 #, c-format msgid "\"%s\" was not found." msgstr "»%s« wurde nicht gefunden." @@ -2660,7 +2660,7 @@ msgstr "" "Öffnet die Datei schreibgeschützt. Bei Auswahl mehrerer Dateien, werden alle " "schreibgeschützt geöffnet." -#: ../src/dialogs.c:532 +#: ../src/dialogs.c:532 ../src/document.c:1864 msgid "Overwrite?" msgstr "Überschreiben?" @@ -2724,7 +2724,7 @@ msgstr "" #: ../src/dialogs.c:1201 ../src/dialogs.c:1202 ../src/dialogs.c:1203 #: ../src/dialogs.c:1209 ../src/dialogs.c:1210 ../src/dialogs.c:1211 -#: ../src/symbols.c:2195 ../src/symbols.c:2211 ../src/ui_utils.c:282 +#: ../src/symbols.c:2197 ../src/symbols.c:2213 ../src/ui_utils.c:282 msgid "unknown" msgstr "unbekannt" @@ -2741,27 +2741,27 @@ msgstr "(mit BOM)" msgid "(without BOM)" msgstr "(ohne BOM)" -#: ../src/document.c:704 +#: ../src/document.c:711 #, c-format msgid "File %s closed." msgstr "Datei »%s« wurde geschlossen." -#: ../src/document.c:851 +#: ../src/document.c:858 #, c-format msgid "New file \"%s\" opened." msgstr "Neue Datei »%s« geöffnet." -#: ../src/document.c:902 ../src/document.c:1475 +#: ../src/document.c:909 ../src/document.c:1482 #, c-format msgid "Could not open file %s (%s)" msgstr "Konnte Datei »%s« nicht öffnen (%s)." -#: ../src/document.c:922 +#: ../src/document.c:929 #, c-format msgid "The file \"%s\" is not valid %s." msgstr "Die Datei »%s« ist kein gültiges %s." -#: ../src/document.c:928 +#: ../src/document.c:935 #, c-format msgid "" "The file \"%s\" does not look like a text file or the file encoding is not " @@ -2770,7 +2770,7 @@ msgstr "" "Die Datei »%s« scheint keine Textdatei zu sein, oder die Zeichenkodierung " "wird nicht unterstützt." -#: ../src/document.c:938 +#: ../src/document.c:945 #, c-format msgid "" "The file \"%s\" could not be opened properly and has been truncated. This " @@ -2783,31 +2783,31 @@ msgstr "" "enthält und kann zu Datenverlust beim Speichern führen!\n" "Die Datei wird schreibgeschützt geöffnet." -#: ../src/document.c:1150 +#: ../src/document.c:1157 msgid "Spaces" msgstr "Leerzeichen" -#: ../src/document.c:1153 +#: ../src/document.c:1160 msgid "Tabs" msgstr "Tabulatoren" -#: ../src/document.c:1156 +#: ../src/document.c:1163 msgid "Tabs and Spaces" msgstr "Tabulatoren und Leerzeichen" #. For translators: first wildcard is the indentation mode (Spaces, Tabs, Tabs #. * and Spaces), the second one is the filename -#: ../src/document.c:1161 +#: ../src/document.c:1168 #, c-format msgid "Setting %s indentation mode for %s." msgstr "Setze Einrückungsmodus %s für »%s«." -#: ../src/document.c:1172 +#: ../src/document.c:1179 #, c-format msgid "Setting indentation width to %d for %s." msgstr "Setze Einrückungsbreite auf %d für »%s«." -#: ../src/document.c:1327 +#: ../src/document.c:1334 #, c-format msgid "File %s reloaded." msgstr "Datei »%s« neu geladen." @@ -2815,29 +2815,29 @@ msgstr "Datei »%s« neu geladen." #. For translators: this is the status window message for opening a file. %d is the number #. * of the newly opened file, %s indicates whether the file is opened read-only #. * (it is replaced with the string ", read-only"). -#: ../src/document.c:1335 +#: ../src/document.c:1342 #, c-format msgid "File %s opened(%d%s)." msgstr "Datei »%s« geöffnet (%d%s)." -#: ../src/document.c:1337 +#: ../src/document.c:1344 msgid ", read-only" msgstr ", schreibgeschützt" -#: ../src/document.c:1451 +#: ../src/document.c:1458 msgid "Any unsaved changes will be lost." msgstr "Alle ungesicherten Änderungen werden verloren gehen." -#: ../src/document.c:1452 +#: ../src/document.c:1459 #, c-format msgid "Are you sure you want to reload '%s'?" msgstr "Möchten Sie »%s« wirklich neu laden?" -#: ../src/document.c:1570 +#: ../src/document.c:1577 msgid "Error renaming file." msgstr "Fehler beim Umbenennen der Datei." -#: ../src/document.c:1684 +#: ../src/document.c:1696 #, c-format msgid "" "An error occurred while converting the file from UTF-8 in \"%s\". The file " @@ -2846,7 +2846,7 @@ msgstr "" "Beim Konvertieren der Datei von UTF-8 nach »%s« ist ein Fehler aufgetreten. " "Die Datei wird <i>nicht</i> gespeichert." -#: ../src/document.c:1705 +#: ../src/document.c:1717 #, c-format msgid "" "Error message: %s\n" @@ -2855,35 +2855,55 @@ msgstr "" "Fehlermeldung: %s\n" "Der Fehler trat bei »%s« (Zeile: %d, Spalte: %d) auf." -#: ../src/document.c:1709 +#: ../src/document.c:1721 #, c-format msgid "Error message: %s." msgstr "Fehlermeldung: %s." -#: ../src/document.c:1769 +#: ../src/document.c:1781 #, c-format msgid "Failed to open file '%s' for writing: fopen() failed: %s" msgstr "" "Konnte Datei »%s« nicht zum Schreiben öffnen: fopen() fehlgeschlagen: %s" -#: ../src/document.c:1787 +#: ../src/document.c:1799 #, c-format msgid "Failed to write file '%s': fwrite() failed: %s" msgstr "" "Konnte Datei »%s« nicht zum Schreiben öffnen: fwrite() fehlgeschlagen: %s" -#: ../src/document.c:1801 +#: ../src/document.c:1813 #, c-format msgid "Failed to close file '%s': fclose() failed: %s" msgstr "" "Konnte Datei »%s« nicht zum Schreiben öffnen: fclose() fehlgeschlagen: %s" -#: ../src/document.c:1951 +#: ../src/document.c:1863 ../src/document.c:3329 +msgid "_Overwrite" +msgstr "Ü_berschreiben?" + +#: ../src/document.c:1865 ../src/document.c:3332 +#, c-format +msgid "The file '%s' on the disk is more recent than the current buffer." +msgstr "" +"Die Datei »%s« auf dem Datenträger ist aktueller als die momentan geöffnete " +"Version." + +#: ../src/document.c:1873 ../src/document.c:3370 +msgid "Try to resave the file?" +msgstr "Versuchen die Datei erneut zu speichern?" + +#: ../src/document.c:1874 ../src/document.c:3371 +#, c-format +msgid "File \"%s\" was not found on disk!" +msgstr "»%s« wurde nicht auf dem Datenträger gefunden." + +#: ../src/document.c:2002 #, c-format msgid "Error saving file (%s)." msgstr "Fehler beim Speichern der Datei (%s)." -#: ../src/document.c:1956 +#: ../src/document.c:2007 #, c-format msgid "" "%s\n" @@ -2894,51 +2914,36 @@ msgstr "" "\n" "Die Datei ist möglicherweise nicht vollständig auf der Festplatte gespeichert" -#: ../src/document.c:1958 +#: ../src/document.c:2009 msgid "Error saving file." msgstr "Fehler beim Speichern der Datei." -#: ../src/document.c:1982 +#: ../src/document.c:2033 #, c-format msgid "File %s saved." msgstr "Datei »%s« wurde gespeichert." -#: ../src/document.c:2132 +#: ../src/document.c:2183 msgid "Wrap search and find again?" msgstr "Suche vom Dokumentanfang bzw. -ende neu beginnen?" -#: ../src/document.c:2221 ../src/search.c:1368 ../src/search.c:1419 -#: ../src/search.c:2258 ../src/search.c:2259 +#: ../src/document.c:2272 ../src/search.c:1368 ../src/search.c:1419 +#: ../src/search.c:2263 ../src/search.c:2264 #, c-format msgid "No matches found for \"%s\"." msgstr "Keine Treffer für »%s« gefunden." -#: ../src/document.c:2227 +#: ../src/document.c:2278 #, c-format msgid "%s: replaced %d occurrence of \"%s\" with \"%s\"." msgid_plural "%s: replaced %d occurrences of \"%s\" with \"%s\"." msgstr[0] "%s: %d mal wurde »%s« mit »%s« ersetzt." msgstr[1] "%s: %d mal wurde »%s« mit »%s« ersetzt." -#: ../src/document.c:3277 +#: ../src/document.c:3331 msgid "Do you want to reload it?" msgstr "Möchten Sie die Datei neu laden?" -#: ../src/document.c:3278 -msgid "The file '%s' on the disk is more recent than the current buffer." -msgstr "" -"Die Datei »%s« auf dem Datenträger ist aktueller als die momentan geöffnete " -"Version." - -#: ../src/document.c:3317 -msgid "Try to resave the file?" -msgstr "Versuchen die Datei erneut zu speichern?" - -#: ../src/document.c:3318 -#, c-format -msgid "File \"%s\" was not found on disk!" -msgstr "»%s« wurde nicht auf dem Datenträger gefunden." - #: ../src/editor.c:4367 msgid "Enter Tab Width" msgstr "Tabulatorbreite:" @@ -3210,7 +3215,7 @@ msgid "Color Schemes" msgstr "Farbschemata" #. visual group order -#: ../src/keybindings.c:225 ../src/symbols.c:688 +#: ../src/keybindings.c:225 ../src/symbols.c:690 msgid "File" msgstr "Datei" @@ -3246,7 +3251,7 @@ msgstr "Gehe zu" msgid "View" msgstr "Ansicht" -#: ../src/keybindings.c:235 ../src/symbols.c:821 +#: ../src/keybindings.c:235 ../src/symbols.c:823 msgid "Document" msgstr "Dokument" @@ -3994,11 +3999,11 @@ msgstr "Tasten festlegen" msgid "Press the combination of the keys you want to use for \"%s\"." msgstr "Welche Tastenkombination soll für »%s« genutzt werden?" -#: ../src/prefs.c:225 ../src/symbols.c:2349 ../src/sidebar.c:743 +#: ../src/prefs.c:225 ../src/symbols.c:2351 ../src/sidebar.c:743 msgid "_Expand All" msgstr "Alle a_usklappen" -#: ../src/prefs.c:230 ../src/symbols.c:2354 ../src/sidebar.c:749 +#: ../src/prefs.c:230 ../src/symbols.c:2356 ../src/sidebar.c:749 msgid "_Collapse All" msgstr "Alle _einklappen" @@ -4160,6 +4165,8 @@ msgid "" "Path of the file representing the project and storing its settings. It " "should normally have the \"%s\" extension." msgstr "" +"Der Pfad der Datei repräsentiert das Projekt und beinhaltet dessen " +"Einstellungen. Gewöhnlich sollte sie die »%s« Dateiendung besitzen." #: ../src/project.c:212 ../src/project.c:483 msgid "Choose Project Base Path" @@ -4292,10 +4299,10 @@ msgid "" "newline characters are part of the input and can be captured as normal " "characters by the pattern." msgstr "" -"Führt die Erkennung des Suchmusters auf das komplette Dokument, " -"anstatt Zeile für Zeile, aus. dies erlaubt es, auch Muster zu finden, " -"die über mehrer Zeilen gehen. In diesem Modus sind Zeilenumbrüche " -"»normale« Zeichen und können in das Suchmuster integriert werden." +"Führt die Erkennung des Suchmusters auf das komplette Dokument, anstatt " +"Zeile für Zeile, aus. dies erlaubt es, auch Muster zu finden, die über " +"mehrer Zeilen gehen. In diesem Modus sind Zeilenumbrüche »normale« Zeichen " +"und können in das Suchmuster integriert werden." #: ../src/search.c:344 msgid "Search _backwards" @@ -4440,7 +4447,7 @@ msgstr "_Zus. Optionen:" msgid "Other options to pass to Grep" msgstr "Andere Argumente, die an grep übergeben werden sollen" -#: ../src/search.c:1371 ../src/search.c:2264 ../src/search.c:2267 +#: ../src/search.c:1371 ../src/search.c:2269 ../src/search.c:2272 #, c-format msgid "Found %d match for \"%s\"." msgid_plural "Found %d matches for \"%s\"." @@ -4526,326 +4533,326 @@ msgstr "Name" msgid "Value" msgstr "Wert" -#: ../src/symbols.c:667 ../src/symbols.c:717 ../src/symbols.c:811 +#: ../src/symbols.c:669 ../src/symbols.c:719 ../src/symbols.c:813 msgid "Chapter" msgstr "Kapitel" -#: ../src/symbols.c:668 ../src/symbols.c:713 ../src/symbols.c:812 +#: ../src/symbols.c:670 ../src/symbols.c:715 ../src/symbols.c:814 msgid "Section" msgstr "Abschnitt" -#: ../src/symbols.c:669 +#: ../src/symbols.c:671 msgid "Sect1" msgstr "Sect1" -#: ../src/symbols.c:670 +#: ../src/symbols.c:672 msgid "Sect2" msgstr "Sect2" -#: ../src/symbols.c:671 +#: ../src/symbols.c:673 msgid "Sect3" msgstr "Sect3" -#: ../src/symbols.c:672 +#: ../src/symbols.c:674 msgid "Appendix" msgstr "Anhang" -#: ../src/symbols.c:673 ../src/symbols.c:718 ../src/symbols.c:743 -#: ../src/symbols.c:759 ../src/symbols.c:770 ../src/symbols.c:870 -#: ../src/symbols.c:881 ../src/symbols.c:894 ../src/symbols.c:908 -#: ../src/symbols.c:920 ../src/symbols.c:932 ../src/symbols.c:949 -#: ../src/symbols.c:978 ../src/symbols.c:1010 +#: ../src/symbols.c:675 ../src/symbols.c:720 ../src/symbols.c:745 +#: ../src/symbols.c:761 ../src/symbols.c:772 ../src/symbols.c:872 +#: ../src/symbols.c:883 ../src/symbols.c:896 ../src/symbols.c:910 +#: ../src/symbols.c:922 ../src/symbols.c:934 ../src/symbols.c:951 +#: ../src/symbols.c:980 ../src/symbols.c:1012 msgid "Other" msgstr "Sonstiges" -#: ../src/symbols.c:679 ../src/symbols.c:940 ../src/symbols.c:988 +#: ../src/symbols.c:681 ../src/symbols.c:942 ../src/symbols.c:990 msgid "Module" msgstr "Modul" -#: ../src/symbols.c:680 ../src/symbols.c:866 ../src/symbols.c:918 -#: ../src/symbols.c:930 ../src/symbols.c:945 ../src/symbols.c:959 +#: ../src/symbols.c:682 ../src/symbols.c:868 ../src/symbols.c:920 +#: ../src/symbols.c:932 ../src/symbols.c:947 ../src/symbols.c:961 msgid "Types" msgstr "Typen" -#: ../src/symbols.c:681 +#: ../src/symbols.c:683 msgid "Type constructors" msgstr "Typkonstruktoren" -#: ../src/symbols.c:682 ../src/symbols.c:704 ../src/symbols.c:725 -#: ../src/symbols.c:742 ../src/symbols.c:754 ../src/symbols.c:767 -#: ../src/symbols.c:780 ../src/symbols.c:790 ../src/symbols.c:854 -#: ../src/symbols.c:904 ../src/symbols.c:927 ../src/symbols.c:972 -#: ../src/symbols.c:996 +#: ../src/symbols.c:684 ../src/symbols.c:706 ../src/symbols.c:727 +#: ../src/symbols.c:744 ../src/symbols.c:756 ../src/symbols.c:769 +#: ../src/symbols.c:782 ../src/symbols.c:792 ../src/symbols.c:856 +#: ../src/symbols.c:906 ../src/symbols.c:929 ../src/symbols.c:974 +#: ../src/symbols.c:998 msgid "Functions" msgstr "Funktionen" -#: ../src/symbols.c:687 +#: ../src/symbols.c:689 msgid "Program" msgstr "Programm" -#: ../src/symbols.c:689 ../src/symbols.c:697 ../src/symbols.c:703 +#: ../src/symbols.c:691 ../src/symbols.c:699 ../src/symbols.c:705 msgid "Sections" msgstr "Abschnitte" -#: ../src/symbols.c:690 +#: ../src/symbols.c:692 msgid "Paragraph" msgstr "Absatz" -#: ../src/symbols.c:691 +#: ../src/symbols.c:693 msgid "Group" msgstr "Gruppe" -#: ../src/symbols.c:692 +#: ../src/symbols.c:694 msgid "Data" msgstr "Daten" -#: ../src/symbols.c:698 +#: ../src/symbols.c:700 msgid "Keys" msgstr "Indizes" -#: ../src/symbols.c:705 ../src/symbols.c:756 ../src/symbols.c:782 -#: ../src/symbols.c:855 ../src/symbols.c:880 ../src/symbols.c:906 -#: ../src/symbols.c:919 ../src/symbols.c:928 ../src/symbols.c:944 -#: ../src/symbols.c:979 ../src/symbols.c:1008 +#: ../src/symbols.c:707 ../src/symbols.c:758 ../src/symbols.c:784 +#: ../src/symbols.c:857 ../src/symbols.c:882 ../src/symbols.c:908 +#: ../src/symbols.c:921 ../src/symbols.c:930 ../src/symbols.c:946 +#: ../src/symbols.c:981 ../src/symbols.c:1010 msgid "Variables" msgstr "Variablen" -#: ../src/symbols.c:712 +#: ../src/symbols.c:714 msgid "Environment" msgstr "Umgebung" -#: ../src/symbols.c:714 ../src/symbols.c:813 +#: ../src/symbols.c:716 ../src/symbols.c:815 msgid "Subsection" msgstr "Unterabschnitt" -#: ../src/symbols.c:715 ../src/symbols.c:814 +#: ../src/symbols.c:717 ../src/symbols.c:816 msgid "Subsubsection" msgstr "Unterunterabschnitt" -#: ../src/symbols.c:726 ../src/symbols.c:751 +#: ../src/symbols.c:728 ../src/symbols.c:753 msgid "Structures" msgstr "Strukturen" -#: ../src/symbols.c:733 +#: ../src/symbols.c:735 msgid "Parts" msgstr "Parts" -#: ../src/symbols.c:734 +#: ../src/symbols.c:736 msgid "Assembly" msgstr "Assembly" -#: ../src/symbols.c:735 +#: ../src/symbols.c:737 msgid "Steps" msgstr "Steps" -#: ../src/symbols.c:750 ../src/symbols.c:832 ../src/symbols.c:878 +#: ../src/symbols.c:752 ../src/symbols.c:834 ../src/symbols.c:880 msgid "Modules" msgstr "Module" -#: ../src/symbols.c:752 ../src/symbols.c:783 +#: ../src/symbols.c:754 ../src/symbols.c:785 msgid "Traits" msgstr "Characteristika" -#: ../src/symbols.c:753 +#: ../src/symbols.c:755 msgid "Implementations" msgstr "Implementierungen" -#: ../src/symbols.c:755 ../src/symbols.c:999 +#: ../src/symbols.c:757 ../src/symbols.c:1001 msgid "Typedefs / Enums" msgstr "Typendefinition und Enumerates" -#: ../src/symbols.c:757 ../src/symbols.c:957 ../src/symbols.c:966 -#: ../src/symbols.c:1005 +#: ../src/symbols.c:759 ../src/symbols.c:959 ../src/symbols.c:968 +#: ../src/symbols.c:1007 msgid "Macros" msgstr "Makros" -#: ../src/symbols.c:758 ../src/symbols.c:835 ../src/symbols.c:844 -#: ../src/symbols.c:853 ../src/symbols.c:891 ../src/symbols.c:917 +#: ../src/symbols.c:760 ../src/symbols.c:837 ../src/symbols.c:846 +#: ../src/symbols.c:855 ../src/symbols.c:893 ../src/symbols.c:919 msgid "Methods" msgstr "Methoden" -#: ../src/symbols.c:766 ../src/symbols.c:863 ../src/symbols.c:888 -#: ../src/symbols.c:901 +#: ../src/symbols.c:768 ../src/symbols.c:865 ../src/symbols.c:890 +#: ../src/symbols.c:903 msgid "Package" msgstr "Package" -#: ../src/symbols.c:768 ../src/symbols.c:931 ../src/symbols.c:956 +#: ../src/symbols.c:770 ../src/symbols.c:933 ../src/symbols.c:958 msgid "Labels" msgstr "Label" -#: ../src/symbols.c:769 ../src/symbols.c:781 ../src/symbols.c:907 -#: ../src/symbols.c:929 +#: ../src/symbols.c:771 ../src/symbols.c:783 ../src/symbols.c:909 +#: ../src/symbols.c:931 msgid "Constants" msgstr "Konstanten" -#: ../src/symbols.c:777 ../src/symbols.c:842 ../src/symbols.c:991 +#: ../src/symbols.c:779 ../src/symbols.c:844 ../src/symbols.c:993 msgid "Namespaces" msgstr "Namensräume" -#: ../src/symbols.c:778 ../src/symbols.c:889 ../src/symbols.c:902 -#: ../src/symbols.c:915 ../src/symbols.c:942 ../src/symbols.c:995 +#: ../src/symbols.c:780 ../src/symbols.c:891 ../src/symbols.c:904 +#: ../src/symbols.c:917 ../src/symbols.c:944 ../src/symbols.c:997 msgid "Interfaces" msgstr "Interfaces" -#: ../src/symbols.c:779 ../src/symbols.c:801 ../src/symbols.c:833 -#: ../src/symbols.c:843 ../src/symbols.c:852 ../src/symbols.c:890 -#: ../src/symbols.c:903 ../src/symbols.c:916 ../src/symbols.c:994 +#: ../src/symbols.c:781 ../src/symbols.c:803 ../src/symbols.c:835 +#: ../src/symbols.c:845 ../src/symbols.c:854 ../src/symbols.c:892 +#: ../src/symbols.c:905 ../src/symbols.c:918 ../src/symbols.c:996 msgid "Classes" msgstr "Klassen" -#: ../src/symbols.c:791 +#: ../src/symbols.c:793 msgid "Anchors" msgstr "Anker" -#: ../src/symbols.c:792 +#: ../src/symbols.c:794 msgid "H1 Headings" msgstr "Überschrift (H1)" -#: ../src/symbols.c:793 +#: ../src/symbols.c:795 msgid "H2 Headings" msgstr "Überschrift (H2)" -#: ../src/symbols.c:794 +#: ../src/symbols.c:796 msgid "H3 Headings" msgstr "Überschrift (H3)" -#: ../src/symbols.c:802 +#: ../src/symbols.c:804 msgid "ID Selectors" msgstr "ID" -#: ../src/symbols.c:803 +#: ../src/symbols.c:805 msgid "Type Selectors" msgstr "Typ" -#: ../src/symbols.c:822 +#: ../src/symbols.c:824 msgid "Section Level 1" msgstr "Überschrift Ebene 1" -#: ../src/symbols.c:823 +#: ../src/symbols.c:825 msgid "Section Level 2" msgstr "Überschrift Ebene 2" -#: ../src/symbols.c:824 +#: ../src/symbols.c:826 msgid "Section Level 3" msgstr "Überschrift Ebene 3" -#: ../src/symbols.c:825 +#: ../src/symbols.c:827 msgid "Section Level 4" msgstr "Überschrift Ebene 4" -#: ../src/symbols.c:834 +#: ../src/symbols.c:836 msgid "Singletons" msgstr "Singletons" -#: ../src/symbols.c:845 ../src/symbols.c:973 +#: ../src/symbols.c:847 ../src/symbols.c:975 msgid "Procedures" msgstr "Prozeduren" -#: ../src/symbols.c:856 +#: ../src/symbols.c:858 msgid "Imports" msgstr "Importe" -#: ../src/symbols.c:864 +#: ../src/symbols.c:866 msgid "Entities" msgstr "Entitäten" -#: ../src/symbols.c:865 +#: ../src/symbols.c:867 msgid "Architectures" msgstr "Architekturen" -#: ../src/symbols.c:867 +#: ../src/symbols.c:869 msgid "Functions / Procedures" msgstr "Funktionen/Prozeduren" -#: ../src/symbols.c:868 +#: ../src/symbols.c:870 msgid "Variables / Signals" msgstr "Variablen/Signale" -#: ../src/symbols.c:869 +#: ../src/symbols.c:871 msgid "Processes / Blocks / Components" msgstr "Prozesse/Blöcke/Komponenten" -#: ../src/symbols.c:877 +#: ../src/symbols.c:879 msgid "Events" msgstr "Ereignisse" -#: ../src/symbols.c:879 +#: ../src/symbols.c:881 msgid "Functions / Tasks" msgstr "Funktionen" -#: ../src/symbols.c:892 ../src/symbols.c:997 +#: ../src/symbols.c:894 ../src/symbols.c:999 msgid "Members" msgstr "Instanzvariablen" -#: ../src/symbols.c:893 ../src/symbols.c:948 +#: ../src/symbols.c:895 ../src/symbols.c:950 msgid "Enums" msgstr "Enums" -#: ../src/symbols.c:905 +#: ../src/symbols.c:907 msgid "Properties" msgstr "Eigenschaften" -#: ../src/symbols.c:941 +#: ../src/symbols.c:943 msgid "Programs" msgstr "Programme" -#: ../src/symbols.c:943 +#: ../src/symbols.c:945 msgid "Functions / Subroutines" msgstr "Funktionen/Prozeduren" -#: ../src/symbols.c:946 +#: ../src/symbols.c:948 msgid "Components" msgstr "Komponenten" -#: ../src/symbols.c:947 +#: ../src/symbols.c:949 msgid "Blocks" msgstr "Blöcke" -#: ../src/symbols.c:958 +#: ../src/symbols.c:960 msgid "Defines" msgstr "Definitionen" -#: ../src/symbols.c:965 +#: ../src/symbols.c:967 msgid "Targets" msgstr "Targets" -#: ../src/symbols.c:974 +#: ../src/symbols.c:976 msgid "Indexes" msgstr "Indizies" -#: ../src/symbols.c:975 +#: ../src/symbols.c:977 msgid "Tables" msgstr "Tabellen" -#: ../src/symbols.c:976 +#: ../src/symbols.c:978 msgid "Triggers" msgstr "Trigger" -#: ../src/symbols.c:977 +#: ../src/symbols.c:979 msgid "Views" msgstr "Ansichten" -#: ../src/symbols.c:998 +#: ../src/symbols.c:1000 msgid "Structs" msgstr "Strukturen" -#: ../src/symbols.c:1009 +#: ../src/symbols.c:1011 msgid "Extern Variables" msgstr "Externe Variablen" -#: ../src/symbols.c:1769 +#: ../src/symbols.c:1771 #, c-format msgid "Unknown filetype extension for \"%s\".\n" msgstr "Unbekannte Dateierweiterung für »%s«.\n" -#: ../src/symbols.c:1795 +#: ../src/symbols.c:1797 #, c-format msgid "Failed to create tags file, perhaps because no tags were found.\n" msgstr "" "Die Tag-Datei konnte nicht erstellt werden, möglicherweise konnten keine " "Tags gefunden werden.\n" -#: ../src/symbols.c:1802 +#: ../src/symbols.c:1804 #, c-format msgid "" "Usage: %s -g <Tag File> <File list>\n" @@ -4854,7 +4861,7 @@ msgstr "" "Verwendung: %s -g <Tag-Datei> <Datei-Liste>\n" "\n" -#: ../src/symbols.c:1803 +#: ../src/symbols.c:1805 #, c-format msgid "" "Example:\n" @@ -4865,40 +4872,40 @@ msgstr "" "CFLAGS=`pkg-config gtk+-2.0 --cflags` %s -g gtk2.c.tags /usr/include/gtk-2.0/" "gtk/gtk.h\n" -#: ../src/symbols.c:1817 +#: ../src/symbols.c:1819 msgid "Load Tags" msgstr "Tags laden" -#: ../src/symbols.c:1824 +#: ../src/symbols.c:1826 msgid "Geany tag files (*.*.tags)" msgstr "Geany Tag-Datei (*.*.tags)" #. For translators: the first wildcard is the filetype, the second the filename -#: ../src/symbols.c:1844 +#: ../src/symbols.c:1846 #, c-format msgid "Loaded %s tags file '%s'." msgstr "%s Tag-Datei »%s« geladen." -#: ../src/symbols.c:1847 +#: ../src/symbols.c:1849 #, c-format msgid "Could not load tags file '%s'." msgstr "Konnte Tag-Datei »%s« nicht laden." -#: ../src/symbols.c:1985 +#: ../src/symbols.c:1987 #, c-format msgid "Forward declaration \"%s\" not found." msgstr "(Vorwärts-)Deklaration von »%s« nicht gefunden." -#: ../src/symbols.c:1987 +#: ../src/symbols.c:1989 #, c-format msgid "Definition of \"%s\" not found." msgstr "Definition von »%s« nicht gefunden." -#: ../src/symbols.c:2364 +#: ../src/symbols.c:2366 msgid "Sort by _Name" msgstr "Nach _Namen sortieren" -#: ../src/symbols.c:2371 +#: ../src/symbols.c:2373 msgid "Sort by _Appearance" msgstr "Nach _Auftreten sortieren" -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] b64642: Only close reload infobar if the response succeeded
by Nick Treleaven
24 Sep '14
24 Sep '14
Branch: refs/heads/master Author: Nick Treleaven <nick.treleaven(a)btinternet.com> Committer: Nick Treleaven <nick.treleaven(a)btinternet.com> Date: Wed, 24 Sep 2014 11:21:32 UTC Commit: b646424ddb715382a937d233a75bc684c22e18ec
https://github.com/geany/geany/commit/b646424ddb715382a937d233a75bc684c22e1…
Log Message: ----------- Only close reload infobar if the response succeeded Modified Paths: -------------- src/document.c Modified: src/document.c 18 lines changed, 15 insertions(+), 3 deletions(-) =================================================================== @@ -3218,7 +3218,6 @@ static GtkWidget* document_show_message(GeanyDocument *doc, GtkMessageType msgty g_free(markup); g_signal_connect(info_widget, "response", G_CALLBACK(response_cb), doc); - g_signal_connect_after(info_widget, "response", G_CALLBACK(gtk_widget_destroy), NULL); hbox = gtk_hbox_new(FALSE, 12); gtk_box_pack_start(GTK_BOX(content_area), hbox, TRUE, TRUE, 0); @@ -3266,15 +3265,28 @@ static GtkWidget* document_show_message(GeanyDocument *doc, GtkMessageType msgty static void on_monitor_reload_file_response(GtkWidget *bar, gint response_id, GeanyDocument *doc) { + gboolean close = FALSE; + + // disable info bar so actions complete normally unprotect_document(doc); doc->priv->info_bars[MSG_TYPE_RELOAD] = NULL; if (response_id == RESPONSE_DOCUMENT_RELOAD) - document_reload_prompt(doc, doc->encoding); + close = document_reload_prompt(doc, doc->encoding); else if (response_id == RESPONSE_DOCUMENT_SAVE) - document_save_file(doc, TRUE); + close = document_save_file(doc, TRUE); // force overwrite else if (response_id == GTK_RESPONSE_CANCEL) + { document_set_text_changed(doc, TRUE); + close = TRUE; + } + if (!close) + { + doc->priv->info_bars[MSG_TYPE_RELOAD] = bar; + protect_document(doc); + return; + } + gtk_widget_destroy(bar); } -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 383024: Confirm info-bar reload when document has modifications
by Nick Treleaven
24 Sep '14
24 Sep '14
Branch: refs/heads/master Author: Nick Treleaven <nick.treleaven(a)btinternet.com> Committer: Nick Treleaven <nick.treleaven(a)btinternet.com> Date: Wed, 24 Sep 2014 11:21:30 UTC Commit: 3830240cb8a7b0a7699125b1870d5169b2dcdf70
https://github.com/geany/geany/commit/3830240cb8a7b0a7699125b1870d5169b2dcd…
Log Message: ----------- Confirm info-bar reload when document has modifications Modified Paths: -------------- src/document.c Modified: src/document.c 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -1409,7 +1409,7 @@ void document_open_files(const GSList *filenames, gboolean readonly, GeanyFilety /** - * Reloads the document with the specified file encoding + * Reloads the document with the specified file encoding. * @a forced_enc or @c NULL to auto-detect the file encoding. * * @param doc The document to reload. @@ -3270,7 +3270,7 @@ static void on_monitor_reload_file_response(GtkWidget *bar, gint response_id, Ge doc->priv->info_bars[MSG_TYPE_RELOAD] = NULL; if (response_id == RESPONSE_DOCUMENT_RELOAD) - document_reload_file(doc, doc->encoding); + document_reload_prompt(doc, doc->encoding); else if (response_id == RESPONSE_DOCUMENT_SAVE) document_save_file(doc, TRUE); else if (response_id == GTK_RESPONSE_CANCEL) -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 094119: Merge pull request #326 from ntrel/reload-modified
by Nick Treleaven
24 Sep '14
24 Sep '14
Branch: refs/heads/master Author: Nick Treleaven <nick.treleaven(a)btinternet.com> Committer: Nick Treleaven <nick.treleaven(a)btinternet.com> Date: Wed, 24 Sep 2014 11:20:03 UTC Commit: 09411956ada70783dac30de1f29d36613d8caf65
https://github.com/geany/geany/commit/09411956ada70783dac30de1f29d36613d8ca…
Log Message: ----------- Merge pull request #326 from ntrel/reload-modified Don't set document text as changed when file on disk is newer Modified Paths: -------------- src/document.c Modified: src/document.c 18 lines changed, 11 insertions(+), 7 deletions(-) =================================================================== @@ -1586,6 +1586,8 @@ static void protect_document(GeanyDocument *doc) /* do not call queue_colourise because to we want to keep the text-changed indication! */ if (!doc->priv->protected++) sci_set_readonly(doc->editor->sci, TRUE); + + ui_update_tab_status(doc); } @@ -1595,6 +1597,8 @@ static void unprotect_document(GeanyDocument *doc) if (!--doc->priv->protected && doc->readonly == FALSE) sci_set_readonly(doc->editor->sci, FALSE); + + ui_update_tab_status(doc); } @@ -2931,11 +2935,10 @@ static void document_redo_add(GeanyDocument *doc, guint type, gpointer data) enum { STATUS_CHANGED, -#ifdef USE_GIO_FILEMON STATUS_DISK_CHANGED, -#endif STATUS_READONLY }; + static struct { const gchar *name; @@ -2943,9 +2946,7 @@ static struct gboolean loaded; } document_status_styles[] = { { "geany-document-status-changed", {0}, FALSE }, -#ifdef USE_GIO_FILEMON { "geany-document-status-disk-changed", {0}, FALSE }, -#endif { "geany-document-status-readonly", {0}, FALSE } }; @@ -2956,8 +2957,10 @@ static gint document_get_status_id(GeanyDocument *doc) return STATUS_CHANGED; #ifdef USE_GIO_FILEMON else if (doc->priv->file_disk_status == FILE_CHANGED) - return STATUS_DISK_CHANGED; +#else + else if (doc->priv->protected) #endif + return STATUS_DISK_CHANGED; else if (doc->readonly) return STATUS_READONLY; @@ -3269,7 +3272,9 @@ static void on_monitor_reload_file_response(GtkWidget *bar, gint response_id, Ge if (response_id == RESPONSE_DOCUMENT_RELOAD) document_reload_file(doc, doc->encoding); else if (response_id == RESPONSE_DOCUMENT_SAVE) - document_save_file(doc, FALSE); + document_save_file(doc, TRUE); + else if (response_id == GTK_RESPONSE_CANCEL) + document_set_text_changed(doc, TRUE); } @@ -3327,7 +3332,6 @@ static void monitor_reload_file(GeanyDocument *doc) _("The file '%s' on the disk is more recent than the current buffer."), base_name); - document_set_text_changed(doc, TRUE); protect_document(doc); doc->priv->info_bars[MSG_TYPE_RELOAD] = bar; enable_key_intercept(doc, bar); -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 0a80a7: Set status id to STATUS_DISK_CHANGED when protecting document
by Nick Treleaven
24 Sep '14
24 Sep '14
Branch: refs/heads/master Author: Nick Treleaven <nick.treleaven(a)btinternet.com> Committer: Nick Treleaven <nick.treleaven(a)btinternet.com> Date: Wed, 24 Sep 2014 11:08:40 UTC Commit: 0a80a72f0bbf2ca883c50cccc8540910a9c9969d
https://github.com/geany/geany/commit/0a80a72f0bbf2ca883c50cccc8540910a9c99…
Log Message: ----------- Set status id to STATUS_DISK_CHANGED when protecting document Modified Paths: -------------- src/document.c Modified: src/document.c 13 lines changed, 8 insertions(+), 5 deletions(-) =================================================================== @@ -1586,6 +1586,8 @@ static void protect_document(GeanyDocument *doc) /* do not call queue_colourise because to we want to keep the text-changed indication! */ if (!doc->priv->protected++) sci_set_readonly(doc->editor->sci, TRUE); + + ui_update_tab_status(doc); } @@ -1595,6 +1597,8 @@ static void unprotect_document(GeanyDocument *doc) if (!--doc->priv->protected && doc->readonly == FALSE) sci_set_readonly(doc->editor->sci, FALSE); + + ui_update_tab_status(doc); } @@ -2931,11 +2935,10 @@ static void document_redo_add(GeanyDocument *doc, guint type, gpointer data) enum { STATUS_CHANGED, -#ifdef USE_GIO_FILEMON STATUS_DISK_CHANGED, -#endif STATUS_READONLY }; + static struct { const gchar *name; @@ -2943,9 +2946,7 @@ static struct gboolean loaded; } document_status_styles[] = { { "geany-document-status-changed", {0}, FALSE }, -#ifdef USE_GIO_FILEMON { "geany-document-status-disk-changed", {0}, FALSE }, -#endif { "geany-document-status-readonly", {0}, FALSE } }; @@ -2956,8 +2957,10 @@ static gint document_get_status_id(GeanyDocument *doc) return STATUS_CHANGED; #ifdef USE_GIO_FILEMON else if (doc->priv->file_disk_status == FILE_CHANGED) - return STATUS_DISK_CHANGED; +#else + else if (doc->priv->protected) #endif + return STATUS_DISK_CHANGED; else if (doc->readonly) return STATUS_READONLY; -------------- 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
Older →
Jump to page:
1
2
3
4
5
Results per page:
10
25
50
100
200