Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Tue, 29 May 2012 17:52:26
Commit: 18dea90938b19bdf12b2d932ce5c964f8c40080b
https://github.com/geany/geany/commit/18dea90938b19bdf12b2d932ce5c964f8c400…
Log Message:
-----------
Show shadow around license text view in the about dialog
Since the license is a huge piece of text expected to possibly scroll
horizontally, and since most themes display the background of text
views in a different color than the default widget background color,
adding a shadow makes the edges more visible and the UI neater.
Modified Paths:
--------------
src/about.c
Modified: src/about.c
3 files changed, 3 insertions(+), 0 deletions(-)
===================================================================
@@ -406,7 +406,10 @@ static GtkWidget *create_dialog(void)
gtk_container_set_border_width(GTK_CONTAINER(license_scrollwin), 6);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(license_scrollwin),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(license_scrollwin), GTK_SHADOW_IN);
license_textview = gtk_text_view_new();
+ gtk_text_view_set_left_margin(GTK_TEXT_VIEW(license_textview), 2);
+ gtk_text_view_set_right_margin(GTK_TEXT_VIEW(license_textview), 2);
gtk_text_view_set_editable(GTK_TEXT_VIEW(license_textview), FALSE);
gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(license_textview), FALSE);
gtk_widget_show(license_textview);
@@ Diff output truncated at 100000 characters. @@
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
Branch: refs/heads/master
Author: Nick Treleaven <nick.treleaven(a)btinternet.com>
Committer: Nick Treleaven <nick.treleaven(a)btinternet.com>
Date: Tue, 29 May 2012 17:05:56
Commit: 563249f7c6659ea2c6436f38af5977da4c5723c9
https://github.com/geany/geany/commit/563249f7c6659ea2c6436f38af5977da4c572…
Log Message:
-----------
Warn user if current filetype might not support color schemes
If the 'default' style isn't set to a named style, then probably the
filetype styles have been overridden with manual colors and may not
work properly with color schemes.
Note: HTML-based filetypes won't show a warning because they don't
have a 'default' style (they use 'html_default' instead).
This is a simple heuristic, but is worth having to avoid some
spurious bug reports when using the color schemes dialog.
Modified Paths:
--------------
src/filetypesprivate.h
src/highlighting.c
Modified: src/filetypesprivate.h
1 files changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -35,6 +35,7 @@
gint symbol_list_sort_mode;
gboolean xml_indent_tags; /* XML tag autoindentation, for HTML and XML filetypes */
GSList *tag_files;
+ gboolean warn_color_scheme;
}
GeanyFiletypePrivate;
Modified: src/highlighting.c
17 files changed, 17 insertions(+), 0 deletions(-)
===================================================================
@@ -41,6 +41,9 @@
#include "main.h"
#include "support.h"
#include "sciwrappers.h"
+#include "document.h"
+#include "dialogs.h"
+#include "filetypesprivate.h"
#include "highlightingmappings.h"
@@ -979,6 +982,7 @@ void highlighting_init_styles(guint filetype_idx, GKeyFile *config, GKeyFile *co
{
GeanyFiletype *ft = filetypes[filetype_idx];
guint lexer_id = get_lexer_filetype(ft);
+ gchar *default_str;
if (!style_sets)
style_sets = g_new0(StyleSet, filetypes_array->len);
@@ -987,6 +991,12 @@ void highlighting_init_styles(guint filetype_idx, GKeyFile *config, GKeyFile *co
free_styleset(filetype_idx);
read_properties(ft, config, configh);
+ /* If a default style exists, check it uses a named style
+ * Note: almost all filetypes have a "default" style, except HTML ones */
+ default_str = utils_get_setting(string, configh, config,
+ "styling", "default", "default");
+ ft->priv->warn_color_scheme = !g_ascii_isalpha(*default_str);
+ g_free(default_str);
/* None filetype handled specially */
if (filetype_idx == GEANY_FILETYPES_NONE)
@@ -1318,6 +1328,13 @@ void highlighting_show_color_scheme_dialog(void)
GtkTreeViewColumn *column;
GtkTreeSelection *treesel;
GtkWidget *vbox, *swin, *tree;
+ GeanyDocument *doc;
+
+ doc = document_get_current();
+ if (doc && doc->file_type->priv->warn_color_scheme)
+ dialogs_show_msgbox_with_secondary(GTK_MESSAGE_WARNING,
+ _("The current filetype overrides the default style."),
+ _("This may cause color schemes to display incorrectly."));
scheme_tree = tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
g_object_unref(store);
@@ Diff output truncated at 100000 characters. @@
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Sun, 27 May 2012 18:25:19
Commit: 2ed1d6d8bbc936a8a21d205d34cf9910114632c0
https://github.com/geany/geany/commit/2ed1d6d8bbc936a8a21d205d34cf991011463…
Log Message:
-----------
Do not apply color scheme upon color scheme selection dialog display
Current color scheme was applied upon color scheme selection dialog
display because the GtkTreeView::cursor-changed signal is emitted when
the tree view is initially shown (since it actually gets the focus for
the first time), uselessly re-applying the current color scheme.
This is a performance issue because when many documents are open
updating the color scheme can take a few seconds.
Now we watch for the GtkTreeSelection::changed signal on the tree
view's selection, which is only emitted when the selected item actually
changes. We also connect to that signal after filling the tree so we
don't get notified on the initial selection setup.
Modified Paths:
--------------
src/highlighting.c
Modified: src/highlighting.c
10 files changed, 5 insertions(+), 5 deletions(-)
===================================================================
@@ -1175,16 +1175,13 @@ enum
SCHEME_COLUMNS
};
-static void
-on_color_scheme_changed(void)
+static void on_color_scheme_changed(GtkTreeSelection *treesel, gpointer dummy)
{
- GtkTreeSelection *treesel;
GtkTreeModel *model;
GtkTreeIter iter;
gchar *fname;
gchar *path;
- treesel = gtk_tree_view_get_selection(GTK_TREE_VIEW(scheme_tree));
if (!gtk_tree_selection_get_selected(treesel, &model, &iter))
return;
gtk_tree_model_get(model, &iter, SCHEME_FILE, &fname, -1);
@@ -1319,13 +1316,13 @@ void highlighting_show_color_scheme_dialog(void)
G_TYPE_STRING, G_TYPE_STRING);
GtkCellRenderer *text_renderer;
GtkTreeViewColumn *column;
+ GtkTreeSelection *treesel;
GtkWidget *vbox, *swin, *tree;
scheme_tree = tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
g_object_unref(store);
gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(tree), TRUE);
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree), FALSE);
- g_signal_connect(tree, "cursor-changed", on_color_scheme_changed, NULL);
text_renderer = gtk_cell_renderer_text_new();
g_object_set(text_renderer, "wrap-mode", PANGO_WRAP_WORD, NULL);
@@ -1335,6 +1332,9 @@ void highlighting_show_color_scheme_dialog(void)
add_color_scheme_items(store);
+ treesel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree));
+ g_signal_connect(treesel, "changed", G_CALLBACK(on_color_scheme_changed), NULL);
+
/* old dialog may still be showing */
if (dialog)
gtk_widget_destroy(dialog);
@@ Diff output truncated at 100000 characters. @@
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
Branch: refs/heads/master
Author: Nick Treleaven <nick.treleaven(a)btinternet.com>
Committer: Nick Treleaven <nick.treleaven(a)btinternet.com>
Date: Sun, 27 May 2012 16:20:34
Commit: ffd3d739db23c2da70faf960bc060e4a3e29c4ae
https://github.com/geany/geany/commit/ffd3d739db23c2da70faf960bc060e4a3e29c…
Log Message:
-----------
Fix a missing tag on global tags merge (oops)
Modified Paths:
--------------
tagmanager/tm_tag.c
Modified: tagmanager/tm_tag.c
3 files changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -600,7 +600,8 @@ gboolean tm_tags_merge(GPtrArray *tags_array, gsize orig_len,
tags_array->pdata[i] = (cmp >= 0) ? *a-- : *b--;
if (a < tags_array->pdata)
{
- memcpy(tags_array->pdata, copy, (b - copy) * sizeof(gpointer));
+ /* include remainder of copy as well as current value of b */
+ memcpy(tags_array->pdata, copy, ((b + 1) - copy) * sizeof(gpointer));
break;
}
if (b < copy)
@@ Diff output truncated at 100000 characters. @@
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).