Compare commits

...

4 Commits
master ... 1.23

Author SHA1 Message Date
Colomban Wendling
b65284d973 Pre-release version bump for 1.23.1 2013-05-19 15:11:41 +02:00
Enrico Tröger
9b015febb2 Update NEWS for 1.23.1 2013-05-19 15:44:03 +03:00
unknown
eea7ffbff0 Fix #3613096 by remembering the directory Geany was started from
This is one for more workaround for the current directory handling
on Windows: we now remember the directory from which Geany was started
to use this to resolve relative paths used to load files from
the command line.
2013-05-18 15:45:18 +02:00
Colomban Wendling
a97b56e19c Fix our custom styles under KDE and for people using gtk-chtheme
We have a custom RC file defining various styles we need, and we want
the user to be able to override them (e.g. if they want -- or need --
other colors).  Fair enough, one would simply call gtk_rc_parse() with
the appropriate filename.  However, the styling rules applies in the
order they are loaded, then if we load our styles after GTK has loaded
the user's ones we'd override them.

There are 2 solutions to fix this:
1) set our styles' priority to something with lower than "user"
   (actually "theme" priority because rules precedence are first
   calculated depending on the priority no matter of how precise the
   rules is, so we need to override the theme).
2) prepend our custom style to GTK's list while keeping priority to
   user (which is the default), so it gets loaded before real user's
   ones and so gets overridden by them.

One would normally go for 1 because it's ways simpler and requires less
code: you just have to add the priorities to your styles, which is a
matter of adding a few ":theme" in the RC file.  However, KDE being a
bitch it doesn't set the gtk-theme-name but rather directly includes
the style to use in a user gtkrc file, which makes the theme have
"user" priority, hence overriding our styles.  So, we cannot set
priorities in the RC file if we want to support running under KDE,
which pretty much leave us with no choice but to go with solution 2,
which unfortunately requires writing ugly code since GTK don't have a
gtk_rc_prepend_default_file() function.  Thank you very much KDE.

Though, as a side benefit it also makes the code work with people using
gtk-chtheme, which also found it funny to include the theme in the user
RC file.
2013-03-16 16:41:51 +01:00
12 changed files with 87 additions and 35 deletions

8
NEWS
View File

@ -1,3 +1,11 @@
Geany 1.23.1 (May 19, 2013)
Bug fixes
* Fix custom styles under KDE and for people using gtk-chtheme
(corrects tab coloring, #3607935).
* Fix broken opening files from command line on Windows (#3613096).
Geany 1.23 (March 10, 2013)
General

View File

@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.60])
AC_INIT([Geany], [1.23],
AC_INIT([Geany], [1.23.1],
[https://sourceforge.net/tracker/?group_id=153444&atid=787791])
AC_CONFIG_SRCDIR([src/geany.h])
AC_CONFIG_AUX_DIR([build-aux])

View File

@ -7,21 +7,21 @@ style "geany-close-tab-button-style" {
xthickness = 0
ythickness = 0
}
widget "*.geany-close-tab-button" style:theme "geany-close-tab-button-style"
widget "*.geany-close-tab-button" style "geany-close-tab-button-style"
# use monospaced font in search entries for easier reading of regexp (#1907117)
style "geany-monospace" {
font_name = "Monospace"
}
widget "GeanyDialogSearch.*.GtkEntry" style:theme "geany-monospace"
widget "GeanyDialogSearch.*.geany-search-entry-no-match" style:theme "geany-monospace"
widget "GeanyDialogSearch.*.GtkEntry" style "geany-monospace"
widget "GeanyDialogSearch.*.geany-search-entry-no-match" style "geany-monospace"
# set red background for GtkEntries showing unmatched searches
style "geany-search-entry-no-match-style" {
base[NORMAL] = "#ffff66666666"
text[NORMAL] = "#ffffffffffff"
}
widget "*.geany-search-entry-no-match" style:theme "geany-search-entry-no-match-style"
widget "*.geany-search-entry-no-match" style "geany-search-entry-no-match-style"
# document status colors
style "geany-document-status-changed-style" {
@ -36,6 +36,6 @@ style "geany-document-status-readonly-style" {
fg[NORMAL] = "#00007fff0000"
fg[ACTIVE] = "#00007fff0000"
}
widget "*.geany-document-status-changed" style:theme "geany-document-status-changed-style"
widget "*.geany-document-status-disk-changed" style:theme "geany-document-status-disk-changed-style"
widget "*.geany-document-status-readonly" style:theme "geany-document-status-readonly-style"
widget "*.geany-document-status-changed" style "geany-document-status-changed-style"
widget "*.geany-document-status-disk-changed" style "geany-document-status-disk-changed-style"
widget "*.geany-document-status-readonly" style "geany-document-status-readonly-style"

View File

@ -1,4 +1,4 @@
.TH "GEANY" "1" "March 10, 2013" "geany @VERSION@" ""
.TH "GEANY" "1" "May 19, 2013" "geany @VERSION@" ""
.SH "NAME"
Geany \(em a small and lightweight IDE
.SH "SYNOPSIS"

View File

@ -3,10 +3,10 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.8.1: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" />
<title>Geany</title>
<meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz Colomban Wendling Matthew Brush" />
<meta name="date" content="2013-03-10" />
<meta name="date" content="2013-05-19" />
<style type="text/css">
/*
@ -141,9 +141,9 @@ Stylesheet for Geany's documentation based on a version of John Gabriele.
<br />Colomban Wendling
<br />Matthew Brush</td></tr>
<tr><th class="docinfo-name">Date:</th>
<td>2013-03-10</td></tr>
<td>2013-05-19</td></tr>
<tr><th class="docinfo-name">Version:</th>
<td>1.23</td></tr>
<td>1.23.1</td></tr>
</tbody>
</table>
<p>Copyright © 2005-2012</p>
@ -5696,7 +5696,7 @@ bsd, gpl, snippets.</td>
</tr>
<tr><td>geanyversion</td>
<td>The actual Geany version, e.g.
&quot;Geany 1.23&quot;.</td>
&quot;Geany 1.23.1&quot;.</td>
<td>file templates, file header,
function description, ChangeLog entry,
bsd, gpl, snippets.</td>
@ -6028,7 +6028,7 @@ editing the file, to build the HTML document to see how your changes
look, run &quot;<tt class="docutils literal">make doc</tt>&quot; in the subdirectory <tt class="docutils literal">doc</tt> of Geany's source
directory. This regenerates the <tt class="docutils literal">geany.html</tt> file. To generate a PDF
file, use the command &quot;<tt class="docutils literal">make pdf</tt>&quot; which should generate a file called
geany-1.23.pdf.</p>
geany-1.23.1.pdf.</p>
<p>After you are happy with your changes, create a patch e.g. by using:</p>
<pre class="literal-block">
% git diff geany.txt &gt; foo.patch
@ -6836,7 +6836,7 @@ USE OR PERFORMANCE OF THIS SOFTWARE.</p>
<div class="footer">
<hr class="footer" />
<a class="reference external" href="geany.txt">View document source</a>.
Generated on: 2013-03-10 12:45 UTC.
Generated on: 2013-05-19 13:09 UTC.
Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>

View File

@ -1,4 +1,4 @@
.. |(version)| replace:: 1.23
.. |(version)| replace:: 1.23.1
=======
Geany
@ -13,7 +13,7 @@
Frank Lanitz,
Colomban Wendling,
Matthew Brush
:Date: 2013-03-10
:Date: 2013-05-19
:Version: |(version)|
Copyright © 2005-2012

View File

@ -32,8 +32,8 @@ RequestExecutionLevel highest ; set execution level for Windows Vista
; helper defines ;
;;;;;;;;;;;;;;;;;;;
!define PRODUCT_NAME "Geany"
!define PRODUCT_VERSION "1.23"
!define PRODUCT_VERSION_ID "1.23.0.0"
!define PRODUCT_VERSION "1.23.1"
!define PRODUCT_VERSION_ID "1.23.1.0"
!define PRODUCT_PUBLISHER "The Geany developer team"
!define PRODUCT_WEB_SITE "http://www.geany.org/"
!define PRODUCT_DIR_REGKEY "Software\Geany"

View File

@ -1,8 +1,8 @@
#include <windows.h> // include for version info constants
#define VER_FILEVERSION 1,23,0,0
#define VER_FILEVERSION_STR "1.23"
#define VER_FILEVERSION 1,23,1,0
#define VER_FILEVERSION_STR "1.23.1"
#define APP_MANIFEST 1
A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "../icons/geany.ico"

View File

@ -91,6 +91,7 @@ gboolean ignore_callback; /* hack workaround for GTK+ toggle button callback pro
GeanyStatus main_status;
CommandLineOptions cl_options; /* fields initialised in parse_command_line_options */
static gchar *original_cwd = NULL;
static const gchar geany_lib_versions[] = "GTK %u.%u.%u, GLib %u.%u.%u";
@ -310,7 +311,11 @@ gchar *main_get_argv_filename(const gchar *filename)
else
{
/* use current dir */
gchar *cur_dir = g_get_current_dir();
gchar *cur_dir = NULL;
if (original_cwd == NULL)
cur_dir = g_get_current_dir();
else
cur_dir = g_strdup(original_cwd);
result = g_strjoin(
G_DIR_SEPARATOR_S, cur_dir, filename, NULL);
@ -379,6 +384,8 @@ static void get_line_and_column_from_filename(gchar *filename, gint *line, gint
#ifdef G_OS_WIN32
static void change_working_directory_on_windows(const gchar *install_dir)
{
/* remember original working directory for use with opening files from the command line */
original_cwd = g_get_current_dir();
/* On Windows, change the working directory to the Geany installation path to not lock
* the directory of a file passed as command line argument (see bug #2626124).
* This also helps if plugins or other code uses relative paths to load
@ -969,6 +976,50 @@ static const gchar *get_locale(void)
}
/* This prepends our own gtkrc file to the list of RC files to be loaded by GTK at startup.
* This function *has* to be called before gtk_init().
*
* We have a custom RC file defining various styles we need, and we want the user to be
* able to override them (e.g. if they want -- or need -- other colors). Fair enough, one
* would simply call gtk_rc_parse() with the appropriate filename. However, the styling
* rules applies in the order they are loaded, then if we load our styles after GTK has
* loaded the user's ones we'd override them.
*
* There are 2 solutions to fix this:
* 1) set our styles' priority to something with lower than "user" (actually "theme"
* priority because rules precedence are first calculated depending on the priority
* no matter of how precise the rules is, so we need to override the theme).
* 2) prepend our custom style to GTK's list while keeping priority to user (which is the
* default), so it gets loaded before real user's ones and so gets overridden by them.
*
* One would normally go for 1 because it's ways simpler and requires less code: you just
* have to add the priorities to your styles, which is a matter of adding a few ":theme" in
* the RC file. However, KDE being a bitch it doesn't set the gtk-theme-name but rather
* directly includes the style to use in a user gtkrc file, which makes the theme have
* "user" priority, hence overriding our styles. So, we cannot set priorities in the RC
* file if we want to support running under KDE, which pretty much leave us with no choice
* but to go with solution 2, which unfortunately requires writing ugly code since GTK
* don't have a gtk_rc_prepend_default_file() function. Thank you very much KDE.
*
* Though, as a side benefit it also makes the code work with people using gtk-chtheme,
* which also found it funny to include the theme in the user RC file. */
static void setup_gtk2_styles(void)
{
gchar **gtk_files = gtk_rc_get_default_files();
gchar **new_files = g_malloc(sizeof *new_files * (g_strv_length(gtk_files) + 2));
guint i = 0;
new_files[i++] = g_build_filename(app->datadir, "geany.gtkrc", NULL);
for (; *gtk_files; gtk_files++)
new_files[i++] = g_strdup(*gtk_files);
new_files[i] = NULL;
gtk_rc_set_default_files(new_files);
g_strfreev(new_files);
}
gint main(gint argc, gchar **argv)
{
GeanyDocument *doc;
@ -990,6 +1041,7 @@ gint main(gint argc, gchar **argv)
memset(&ui_widgets, 0, sizeof(UIWidgets));
setup_paths();
setup_gtk2_styles();
#ifdef ENABLE_NLS
main_locale_init(GEANY_LOCALEDIR, GETTEXT_PACKAGE);
#endif
@ -1264,6 +1316,7 @@ void main_quit()
g_object_unref(geany_object);
geany_object = NULL;
g_free(original_cwd);
g_free(app);
ui_finalize_builder();

View File

@ -2158,18 +2158,9 @@ void ui_init_builder(void)
}
static void init_custom_style(void)
{
gchar *gtkrc_file = g_build_filename(app->datadir, "geany.gtkrc", NULL);
gtk_rc_parse(gtkrc_file);
g_free(gtkrc_file);
}
void ui_init(void)
{
init_custom_style();
/* custom styles are initialized in setup_gtk2_styles() in main.c */
init_recent_files();

View File

@ -314,7 +314,7 @@
/* #undef volatile */
/* Version number of package */
#define VERSION "1.23"
#define VERSION "1.23.1"
#define REVISION "-1"

View File

@ -49,7 +49,7 @@ from waflib.TaskGen import feature
APPNAME = 'geany'
VERSION = '1.23'
VERSION = '1.23.1'
LINGUAS_FILE = 'po/LINGUAS'
MINIMUM_GTK_VERSION = '2.16.0'
MINIMUM_GLIB_VERSION = '2.20.0'