Branch: refs/heads/master
Author: Mark O'Donovan <shiftee(a)tutanota.com>
Committer: elextr <elextr(a)gmail.com>
Date: Mon, 17 Jul 2017 07:44:54 UTC
Commit: 75a69aad932e81c97291b4944a738b90df75b033
https://github.com/geany/geany/commit/75a69aad932e81c97291b4944a738b90df75b…
Log Message:
-----------
Added option to auto reload files changed on disk (#1246)
When option is enabled geany automatically reloads files which
have changed on disk but have no changes in the buffer.
When the option is disabled (default) geany shows the reload
dialog as before.
Tested @vfaronov
Modified Paths:
--------------
doc/geany.txt
src/document.c
src/document.h
src/keyfile.c
Modified: doc/geany.txt
5 lines changed, 5 insertions(+), 0 deletions(-)
===================================================================
@@ -2598,6 +2598,11 @@ gio_unsafe_save_backup Make a backup when using GIO unsafe file f
keep_edit_history_on_reload Whether to maintain the edit history when true immediately
reloading a file, and allow the operation
to be reverted.
+reload_clean_doc_on_file_change Whether to automatically reload documents false immediately
+ that have no changes but which have changed
+ on disk.
+ If unsaved changes exist then the user is
+ prompted to reload manually.
**Filetype related**
extract_filetype_regex Regex to extract filetype name from file See below. immediately
via capture group one.
Modified: src/document.c
6 lines changed, 6 insertions(+), 0 deletions(-)
===================================================================
@@ -3609,6 +3609,12 @@ static void enable_key_intercept(GeanyDocument *doc, GtkWidget *bar)
static void monitor_reload_file(GeanyDocument *doc)
{
+ if (! doc->changed && file_prefs.reload_clean_doc_on_file_change)
+ {
+ document_reload_force(doc, doc->encoding);
+ return;
+ }
+
gchar *base_name = g_path_get_basename(doc->file_name);
/* show this message only once */
Modified: src/document.h
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -66,6 +66,7 @@ typedef struct GeanyFilePrefs
gboolean tab_close_switch_to_mru;
gboolean keep_edit_history_on_reload; /* Keep undo stack upon, and allow undoing of, document reloading. */
gboolean show_keep_edit_history_on_reload_msg; /* whether to show the message introducing the above feature */
+ gboolean reload_clean_doc_on_file_change;
}
GeanyFilePrefs;
Modified: src/keyfile.c
2 lines changed, 2 insertions(+), 0 deletions(-)
===================================================================
@@ -246,6 +246,8 @@ static void init_pref_groups(void)
"keep_edit_history_on_reload", TRUE);
stash_group_add_boolean(group, &file_prefs.show_keep_edit_history_on_reload_msg,
"show_keep_edit_history_on_reload_msg", TRUE);
+ stash_group_add_boolean(group, &file_prefs.reload_clean_doc_on_file_change,
+ "reload_clean_doc_on_file_change", FALSE);
/* for backwards-compatibility */
stash_group_add_integer(group, &editor_prefs.indentation->hard_tab_width,
"indent_hard_tab_width", 8);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Sun, 16 Jul 2017 04:03:53 UTC
Commit: b2b81359c3e271f7ea835fd1ba25bd2ca59514d9
https://github.com/geany/geany/commit/b2b81359c3e271f7ea835fd1ba25bd2ca5951…
Log Message:
-----------
Python: Don't highlight sub-identifiers as keywords
For example, highlight `file` as a builtin when appearing by itself,
but not in a construct like `obj.file`.
Fixes #1542.
Modified Paths:
--------------
data/filedefs/filetypes.python
Modified: data/filedefs/filetypes.python
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -34,6 +34,7 @@ identifiers=ArithmeticError AssertionError AttributeError BaseException Blocking
[lexer_properties]
fold.comment.python=1
fold.quotes.python=1
+lexer.python.keywords2.no.sub.identifiers=1
[settings]
# default extension used when saving files
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Vasiliy Faronov <vfaronov(a)gmail.com>
Committer: elextr <elextr(a)gmail.com>
Date: Tue, 11 Jul 2017 23:44:53 UTC
Commit: 70273779981e4ce3610955ee4d27f557188c3717
https://github.com/geany/geany/commit/70273779981e4ce3610955ee4d27f557188c3…
Log Message:
-----------
Update HTML keywords (#1530)
* Add newly standardized HTML elements to filetypes.html
To enable highlighting them as keywords in HTML documents, add
the following elements defined in W3C HTML 5.1
(https://www.w3.org/TR/html51/fullindex.html#index-elements):
- menuitem
- picture
- rb
- rtc
- template
as well as the following elements defined in WHATWG HTML Living Standard
(https://html.spec.whatwg.org/multipage/indices.html#elements-3):
- math
- slot
- svg
* Add newly standardized HTML attributes to filetypes.html
To enable highlighting them as keywords in HTML documents, add
30 attributes defined in W3C HTML 5.1
(https://www.w3.org/TR/html51/fullindex.html#attributes-table)
and a further 15 attributes defined in the WHATWG HTML Living Standard
(https://html.spec.whatwg.org/multipage/indices.html#attributes-3).
* Sort the list of HTML keywords
Modified Paths:
--------------
data/filedefs/filetypes.html
Modified: data/filedefs/filetypes.html
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -77,7 +77,7 @@
[keywords]
-html=a abbr acronym address applet area b base basefont bdo big blockquote body br button caption center cite code col colgroup dd del dfn dir div dl dt em embed fieldset font form frame frameset h1 h2 h3 h4 h5 h6 head hr html i iframe img input ins isindex kbd label legend li link map menu meta noframes noscript object ol optgroup option p param pre q quality s samp script select small span strike strong style sub sup table tbody td textarea tfoot th thead title tr tt u ul var xmlns leftmargin topmargin abbr accept-charset accept accesskey action align alink alt archive axis background bgcolor border cellpadding cellspacing char charoff charset checked cite class classid clear codebase codetype color cols colspan compact content coords data datafld dataformatas datapagesize datasrc datetime declare defer dir disabled enctype face for frame frameborder selected headers height href hreflang hspace http-equiv id ismap label lang language link longdesc marginwidth marginheight maxlength media framespacing method multiple name nohref noresize noshade nowrap object onblur onchange onclick ondblclick onfocus onkeydown onkeypress onkeyup onload onmousedown onmousemove onmouseover onmouseout onmouseup onreset onselect onsubmit onunload profile prompt pluginspage readonly rel rev rows rowspan rules scheme scope scrolling shape size span src standby start style summary tabindex target text title type usemap valign value valuetype version vlink vspace width text password checkbox radio submit reset file hidden image public doctype xml xml:lang article aside audio bdi canvas command details datalist dialog figure figcaption footer header hgroup keygen main mark meter nav output progress section source time video wbr async autocomplete autofocus contenteditable contextmenu draggable formaction formenctype formnovalidate formtarget list manifest max min novalidate pattern ping placeholder required reversed role rp rt ruby sandbox scoped seamless sizes spellcheck srcdoc step summary track ^data- ^aria-
+html=^aria- ^data- a abbr accept accept-charset accesskey acronym action address align alink allowfullscreen allowpaymentrequest allowusermedia alt applet archive area article as aside async audio autocomplete autofocus autoplay axis b background base basefont bdi bdo bgcolor big blockquote body border br button canvas caption cellpadding cellspacing center challenge char charoff charset checkbox checked cite class classid clear code codebase codetype col colgroup color cols colspan command compact content contenteditable contextmenu controls coords crossorigin data datafld dataformatas datalist datapagesize datasrc datetime dd declare default defer del details dfn dialog dir dirname disabled div dl doctype download draggable dropzone dt em embed enctype face fieldset figcaption figure file font footer for form formaction formenctype formmethod formnovalidate formtarget frame frameborder frameset framespacing h1 h2 h3 h4 h5 h6 head header headers height hgroup hidden high hr href hreflang hspace html http-equiv i icon id iframe image img input inputmode ins integrity is isindex ismap itemid itemprop itemref itemscope itemtype kbd keygen keytype kind label lang language leftmargin legend li link list longdesc loop low main manifest map marginheight marginwidth mark math max maxlength media menu menuitem meta meter method min minlength multiple muted name nav noframes nohref nomodule nonce noresize noscript noshade novalidate nowrap object ol onblur onchange onclick ondblclick onfocus onkeydown onkeypress onkeyup onload onmousedown onmousemove onmouseout onmouseover onmouseup onreset onselect onsubmit onunload open optgroup optimum option output p param password pattern picture ping placeholder playsinline pluginspage poster pre preload profile progress prompt public q quality radio radiogroup rb readonly referrerpolicy rel required reset rev reversed role rows rowspan rp rt rtc ruby rules s samp sandbox scheme scope scoped script scrolling seamless section select selected shape size sizes slot small source span spellcheck src srcdoc srclang srcset standby start step strike strong style sub submit summary sup svg tabindex table target tbody td template text textarea tfoot th thead time title topmargin tr track translate tt type typemustmatch u ul updateviacache usemap valign value valuetype var version video vlink vspace wbr width workertype wrap xml xml:lang xmlns
javascript=abs abstract acos anchor asin atan atan2 big bold boolean break byte case catch ceil char charAt charCodeAt class concat const continue cos Date debugger default delete do double else enum escape eval exp export extends false final finally fixed float floor fontcolor fontsize for fromCharCode function goto if implements import in indexOf Infinity instanceof int interface isFinite isNaN italics join lastIndexOf length link log long Math max MAX_VALUE min MIN_VALUE NaN native NEGATIVE_INFINITY new null Number package parseFloat parseInt pop POSITIVE_INFINITY pow private protected public push random return reverse round shift short sin slice small sort splice split sqrt static strike string String sub substr substring sup super switch synchronized tan this throw throws toLowerCase toString toUpperCase transient true try typeof undefined unescape unshift valueOf var void volatile while with
vbscript=and as boolean byref byte byval call case class const continue currency date dim do double each else elseif empty end error exit false for function get global goto if in integer long loop me new next not nothing object on optional or private property public put redim rem resume select set single string sub then to true type until variant wend while with
python=and assert break class continue complex def del elif else except exec finally for from global if import in inherit is int lambda not or pass print raise return tuple try unicode while yield long float str list
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Vasiliy Faronov <vfaronov(a)gmail.com>
Committer: Vasiliy Faronov <vfaronov(a)gmail.com>
Date: Sat, 08 Jul 2017 15:46:01 UTC
Commit: 4f1b2a031377cd4104d3bc60c02c7f3ee89268dd
https://github.com/geany/geany/commit/4f1b2a031377cd4104d3bc60c02c7f3ee8926…
Log Message:
-----------
Fix converting color to hex for insertion
Fixes #1527.
In win32_show_color_dialog, utils_scale_round is not necessary at all
because Get{R,G,B}Value [1] already return 0..255, which we can immediately
render as hex.
[1] https://msdn.microsoft.com/en-us/library/windows/desktop/dd144923.aspx
Modified Paths:
--------------
src/utils.c
src/win32.c
Modified: src/utils.c
14 lines changed, 9 insertions(+), 5 deletions(-)
===================================================================
@@ -451,10 +451,14 @@ const gchar *utils_path_skip_root(const gchar *path)
}
+/* Convert a fractional @a val in the range [0, 1] to a whole value in the range [0, @a factor].
+ * In particular, this is used for converting a @c GdkColor to the "#RRGGBB" format in a way that
+ * agrees with GTK+, so the "#RRGGBB" in the color picker is the same "#RRGGBB" that is inserted
+ * into the document. See https://github.com/geany/geany/issues/1527
+ */
gdouble utils_scale_round(gdouble val, gdouble factor)
{
- /*val = floor(val * factor + 0.5);*/
- val = floor(val);
+ val = floor(val * factor + 0.5);
val = MAX(val, 0);
val = MIN(val, factor);
@@ -881,9 +885,9 @@ gchar *utils_get_hex_from_color(GdkColor *color)
g_return_val_if_fail(color != NULL, NULL);
return g_strdup_printf("#%02X%02X%02X",
- (guint) (utils_scale_round(color->red / 256, 255)),
- (guint) (utils_scale_round(color->green / 256, 255)),
- (guint) (utils_scale_round(color->blue / 256, 255)));
+ (guint) (utils_scale_round(color->red / 65535.0, 255)),
+ (guint) (utils_scale_round(color->green / 65535.0, 255)),
+ (guint) (utils_scale_round(color->blue / 65535.0, 255)));
}
Modified: src/win32.c
5 lines changed, 1 insertions(+), 4 deletions(-)
===================================================================
@@ -626,10 +626,7 @@ void win32_show_color_dialog(const gchar *colour)
{
rgb_current = cc.rgbResult;
g_snprintf(hex, 11, "#%02X%02X%02X",
- (guint) (utils_scale_round(GetRValue(rgb_current), 255)),
- (guint) (utils_scale_round(GetGValue(rgb_current), 255)),
- (guint) (utils_scale_round(GetBValue(rgb_current), 255)));
-
+ GetRValue(rgb_current), GetGValue(rgb_current), GetBValue(rgb_current));
editor_insert_color(doc->editor, hex);
}
g_free(hex);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).