Compare commits

...

31 Commits
master ... 0.20

Author SHA1 Message Date
Enrico Tröger
9026ddac17 Add 'enum' to secondary keywords (closes #3305737, patch by Matthew Brush, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5818 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-22 15:25:09 +00:00
Enrico Tröger
68c7949f8b Replace escape character '\' by slash '/' in paths in the Windows Makefiles (patch by Matthew Brush, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5817 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-22 15:22:50 +00:00
Colomban Wendling
0fe2850324 Fix pattern filtering when not searching in subdirectories
grep's --include option doesn't filter files passed explicitly to grep,
so when we build the file list to search in, take the filters into
account.
Also drop the --include options in this case since they aren't useful.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5793 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-09 17:41:30 +00:00
Colomban Wendling
557391803f Avoid changing the tag tree if it's not the one of the current document
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5792 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-09 17:41:08 +00:00
Colomban Wendling
cad7584b10 Fix loading and updating menu accelerators for custom commands
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5791 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-09 17:40:47 +00:00
Colomban Wendling
ceec8c49ab Update regex for encoding detection to match quoted names
This allows encoding="utf8", adding support for XML encoding detection.

Closes #3183506.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5790 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-09 17:40:16 +00:00
Colomban Wendling
d695afa780 Properly use 0 as the invalid timeout source ID, rather than G_MAXUINT
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5789 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-09 17:39:57 +00:00
Colomban Wendling
f04b82f88b Fix a few Doxygen warnings
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5788 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-09 17:39:37 +00:00
Colomban Wendling
3a49ee5329 Fix the sidebar popup menu to popup for the correct selection
Fix the sidebar popup menu to properly use the currently selected item
rather than the previous one.

Also change the hack used for the selection to be updated in the input
handlers (key and mouse button) to call the GtkTreeView's handler
manually rather than doing the actual job in IDLE callbacks for the
TreeView's handler to have run.
This prevents from having several different handlers but removes the
need to work in IDLE time and then possible have a lag, as well as
simplifying the code.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5787 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-09 17:39:11 +00:00
Colomban Wendling
2f98fcb6fd Fix some compiler warnings
* Shadowed function (splitwindow plugin);
 * Invalid escape sequence (classbuilder plugin);
 * Non-static local functions (classbuilder plugin);
 * Missing function argument type (keybindings.c).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5786 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-09 17:38:45 +00:00
Colomban Wendling
55b2234fea Make a few variable holding strings constant
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5785 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-09 17:38:21 +00:00
Colomban Wendling
98567a93f9 Update forced indent settings when setting the filetype
This makes documents created or set to a filetype with forced indent
setting (Makefile, F77) to have the correct setting right away.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5784 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-09 17:38:02 +00:00
Colomban Wendling
1efa31622c Create a new undo action when inserting templates
This makes sure the user can undo the template insertion without also
undoing a previous action.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5783 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-09 17:37:39 +00:00
Colomban Wendling
18d230ffa9 Don't use non-C89 initializers
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5782 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-09 17:37:17 +00:00
Colomban Wendling
dca94ac10d Correctly expand the menubar if the toolbar is appended to it but not visible (closes #3204955)
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5781 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-09 17:36:59 +00:00
Colomban Wendling
7907cf8e22 When sorting tags by line, also sort by scope if line is the same
This avoids wrong sorting, and then wrong display in the symbols list,
if a parent tag is on the same line than its children, and one of it's
children would be sorted before alphabetically (closes #3193982).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5780 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-09 17:36:39 +00:00
Colomban Wendling
93b422d45f Fix some debugging functions in C tag parser
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5779 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-09 17:36:20 +00:00
Colomban Wendling
52ae0599bc Plug a memory leak in the C tag parser
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5778 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-09 17:35:56 +00:00
Colomban Wendling
700bd4ca0a Don't remove and add the symbols tree view if we re-add the same one
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5777 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-09 17:35:37 +00:00
Colomban Wendling
3d71795f95 Add missing documentation to some plugin API functions
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5776 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-09 17:35:09 +00:00
Enrico Tröger
411573f64c Add Markdown extension.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5773 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-08 17:11:23 +00:00
Enrico Tröger
7e6e0abc6a Fix off-by-one bug which hidden the last empty line of a document.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5772 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-08 17:09:49 +00:00
Enrico Tröger
cdbe975ad3 Fix wrong warning on empty backup directory setting if 'Backup Copy' is not enabled at all.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5771 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-08 17:05:21 +00:00
Enrico Tröger
480bae08aa Add a warning if writing the project file fails on close.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5770 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-08 17:03:33 +00:00
Enrico Tröger
217c9f46ca Improve error checking when trying to write project files (patch by Colomban Wendling, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5769 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-08 17:02:03 +00:00
Enrico Tröger
e1a6c28257 Fix memory leaks (reported by an anonymous IRC user).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5768 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-08 16:51:08 +00:00
Enrico Tröger
82aab28743 Ensure the editor widget has the focus when the editor menu is called.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5767 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-08 16:48:35 +00:00
Enrico Tröger
de666a1cf0 Welcome Colomban Wendling, a new Geany developer.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5766 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-08 16:44:08 +00:00
Enrico Tröger
5c9d535181 Update copyright information.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5765 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-08 16:35:07 +00:00
Enrico Tröger
a3f4f1a917 Version bump for Geany 0.20.1.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5764 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-08 16:31:42 +00:00
Enrico Tröger
d1e93e1602 create stable branch for bugfix release
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/0.20.1@5761 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-08 15:07:37 +00:00
120 changed files with 579 additions and 346 deletions

View File

@ -2,6 +2,7 @@ Developers:
-----------
Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Colomban Wendling <lists(dot)ban(at)herbesfolles(dot)org>
Enrico Troeger <enrico(dot)troeger(at)uvena(dot)de>
Frank Lanitz <frank(at)frank(dot)uvena(dot)de>

View File

@ -1,3 +1,83 @@
2011-05-22 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* tagmanager/makefile.win32:
Replace escape character '\' by slash '/' in paths in the
Windows Makefiles (patch by Matthew Brush, thanks).
* data/filetypes.java:
Add 'enum' to secondary keywords
(closes #3305737, patch by Matthew Brush, thanks).
2011-05-09 Colomban Wendling <colomban(at)geany(dot)org>
* src/sidebar.c:
Don't remove and add the symbols tree view if we re-add the same one.
* tagmanager/c.c:
Plug a memory leak.
* src/symbols.c:
When sorting tags by line, also sort by scope if line is the same, avoiding
wrong sorting if a parent tag is on the same line than its children, and one
of it's children would be sorted before alphabetically (closes #3193982).
* src/toolbar.c:
Correctly expand the menubar if the toolbar is appended to it but
not visible (closes #3204955).
* src/callbacks.c:
Create a new undo action when inserting templates, making sure the user
can undo the template insertion without also undoing a previous action.
* src/document.c:
Update forced indent settings when setting the filetype. This makes
documents created or set to a filetype with forced indent setting
(Makefile, F77) to have the correct setting right away.
* src/sidebar.c:
Fix the sidebar popup menu to properly use the currently selected item
rather than the previous one.
Also change the hack used for the selection to be updated in the input
handlers to call the GtkTreeView's handler manually rather than doing
the actual job in IDLE callbacks for the TreeView's handler to have run.
* doc/pluginsymbols.c, src/sciwrappers.c:
Fix a few Doxygen warnings.
* plugins/saveactions.c:
Properly use 0 as the invalid timeout source ID.
* src/encodings.c:
Update regex used to find encodings for it to allow the encoding to
be quoted, adding support for XML (closes #3183506).
* src/main.c, src/prefs.c, src/tools.c:
Fix loading and updating menu accelerators for custom commands.
* src/sidebar.c:
Avoid changing the tag tree if it's not the one of the current
document, fixing showing the wrong tag list when reloading
configuration files.
* src/search.c:
Fix pattern filtering when not searching in subdirectories.
2011-05-08 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* configure.ac, doc/geany.txt, geany.nsi, geany_private.rc,
win32-config.h, wscript:
Version bump for Geany 0.20.1.
* *.*:
Update copyright information.
* AUTHORS, src/about.c, README.Packagers, README:
Welcome Colomban Wendling, a new Geany developer.
* src/editor.c:
Ensure the editor widget has the focus when the editor menu is
called.
* tagmanager/php.c:
Fix memory leaks (reported by an anonymous IRC user).
* src/project.c:
Improve error checking when trying to write project files
(patch by Colomban Wendling, thanks).
Add a warning if writing the project file fails on close.
* plugins/saveactions.c:
Fix wrong warning on empty backup directory setting if
'Backup Copy' is not enabled at all.
* plugins/export.c:
Fix off-by-one bug which hidden the last empty line of a document.
* data/filetype_extensions.conf:
Add Markdown extension.
2011-01-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* New release: Geany 0.20 "Disra".

3
README
View File

@ -102,7 +102,8 @@ file.
--
2005-2010 by Enrico Tröger, Nick Treleaven and Frank Lanitz
2005-2011 by Enrico Tröger, Nick Treleaven, Colomban Wendling and Frank Lanitz
enrico(dot)troeger(at)uvena(dot)de
nick(dot)treleaven(at)btinternet(dot)com
lists(dot)ban(at)herbesfolles(dot)org
frank(at)frank(dot)uvena(dot)de

View File

@ -82,7 +82,8 @@ list to stay informed about major changes and of course, new releases.
--
2008-2010 by Enrico Tröger, Nick Treleaven and Frank Lanitz
2008-2011 by Enrico Tröger, Nick Treleaven, Colomban Wendling and Frank Lanitz
enrico(dot)troeger(at)uvena(dot)de
nick(dot)treleaven(at)btinternet(dot)com
lists(dot)ban(at)herbesfolles(dot)org
frank(at)frank(dot)uvena(dot)de

View File

@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
dnl $Id$
AC_INIT(configure.ac)
AM_INIT_AUTOMAKE(geany, 0.20)
AM_INIT_AUTOMAKE(geany, 0.20.1)
AC_CONFIG_MACRO_DIR([m4])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])

View File

@ -33,6 +33,7 @@ LaTeX=*.tex;*.sty;*.idx;*.ltx;*.latex;
Lisp=*.lisp;
Lua=*.lua;
Make=*.mak;*.mk;GNUmakefile;makefile;Makefile;makefile.*;Makefile.*;
Markdown=*.mdml;
Matlab=*.m;
NSIS=*.nsi;*.nsh;
Pascal=*.pas;*.pp;*.inc;*.dpr;*.dpk;

View File

@ -26,7 +26,7 @@ globalclass=type
[keywords]
primary=abstract assert break case catch class const continue default do else extends final finally for future generic goto if implements import inner instanceof interface native new outer package private protected public rest return static super switch synchronized this throw throws transient try var volatile while true false null
secondary=boolean byte char double float int long short void
secondary=boolean byte char double enum float int long short void
# documentation keywords for javadoc
doccomment=author deprecated exception param return see serial serialData serialField since throws todo version
typedefs=

View File

@ -1,4 +1,4 @@
.TH "GEANY" "1" "June 12, 2010" "geany @VERSION@" ""
.TH "GEANY" "1" "January 06, 2011" "geany @VERSION@" ""
.SH "NAME"
Geany \(em a small and lightweight IDE
.SH "SYNOPSIS"

View File

@ -1,4 +1,4 @@
.. |(version)| replace:: 0.20
.. |(version)| replace:: 0.20.1
=======
Geany
@ -14,7 +14,7 @@
:Date: $Date$
:Version: |(version)|
Copyright © 2005-2010
Copyright © 2005-2011
This document is distributed under the terms of the GNU General Public
License as published by the Free Software Foundation; either version 2

View File

@ -1,9 +1,9 @@
/*
* plugins.dox - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2008-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2009-2010 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* Copyright 2008-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2009-2011 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* pluginsignals.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2008-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2008-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* pluginsymbols.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2008-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2008-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -43,7 +43,7 @@ gint plugin_version_check(gint);
* @param info The data struct which should be initialized by this function. */
void plugin_set_info(PluginInfo *info);
/** @deprecated Use @ref geany_plugin->info instead.
/** @deprecated Use @ref GeanyPlugin.info instead.
* Basic information about a plugin, which is set in plugin_set_info(). */
const PluginInfo *plugin_info;

View File

@ -1,8 +1,8 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; geany.nsi - this file is part of Geany, a fast and lightweight IDE
;
; Copyright 2007-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
; Copyright 2007-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
; Copyright 2007-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
; Copyright 2007-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
@ -33,8 +33,8 @@ RequestExecutionLevel highest ; set execution level for Windows Vista
; helper defines ;
;;;;;;;;;;;;;;;;;;;
!define PRODUCT_NAME "Geany"
!define PRODUCT_VERSION "0.20"
!define PRODUCT_VERSION_ID "0.20.0.0"
!define PRODUCT_VERSION "0.20.1"
!define PRODUCT_VERSION_ID "0.20.1.0"
!define PRODUCT_PUBLISHER "The Geany developer team"
!define PRODUCT_WEB_SITE "http://www.geany.org/"
!define PRODUCT_DIR_REGKEY "Software\Geany"
@ -51,7 +51,7 @@ VIProductVersion "${PRODUCT_VERSION_ID}"
VIAddVersionKey "ProductName" "${PRODUCT_NAME}"
VIAddVersionKey "FileVersion" "${PRODUCT_VERSION}"
VIAddVersionKey "ProductVersion" "${PRODUCT_VERSION}"
VIAddVersionKey "LegalCopyright" "Copyright 2005-2010 by the Geany developer team"
VIAddVersionKey "LegalCopyright" "Copyright 2005-2011 by the Geany developer team"
VIAddVersionKey "FileDescription" "${PRODUCT_NAME} Installer"
BrandingText "$(^NAME) installer (NSIS 2.46)"

View File

@ -1,8 +1,8 @@
#include <windows.h> // include for version info constants
#define VER_FILEVERSION 0,20,0,0
#define VER_FILEVERSION_STR "0.20"
#define VER_FILEVERSION 0,20,1,0
#define VER_FILEVERSION_STR "0.20.1"
A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "../icons/geany.ico"
@ -21,7 +21,7 @@ FILETYPE VFT_APP
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "FileDescription", "Geany"
VALUE "InternalName", "Geany"
VALUE "LegalCopyright", "Copyright 2005-2010 by the Geany developers"
VALUE "LegalCopyright", "Copyright 2005-2011 by the Geany developers"
VALUE "LegalTrademarks", ""
VALUE "OriginalFilename", "Geany.exe"
VALUE "ProductName", "Geany"

View File

@ -2,8 +2,8 @@
* classbuilder.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2007 Alexander Rodin <rodin(dot)alexander(at)gmail(dot)com>
* Copyright 2007-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2007-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -201,7 +201,7 @@ static const gchar templates_php_class_source[] = "<?php\n\
{fileheader}\n\
{namespace_decl}\n\
{base_include}\n\
{abstract_decl}class {class_name}{base_decl}{implements_decl}\n\{\n\
{abstract_decl}class {class_name}{base_decl}{implements_decl}\n{\n\
{singleton_impl}\
{constructor_impl}\
{destructor_impl}\n\
@ -356,7 +356,7 @@ get_template_class_source(ClassInfo *class_info)
}
void show_dialog_create_class(gint type)
static void show_dialog_create_class(gint type)
{
CreateClassDialog *cc_dlg;
GtkWidget *main_box;

View File

@ -1,8 +1,8 @@
/*
* demoplugin.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2007-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2007-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* export.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2007-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2007-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -354,7 +354,7 @@ static void write_latex_file(GeanyDocument *doc, const gchar *filename, gboolean
/* read the document and write the LaTeX code */
body = g_string_new("");
doc_len = sci_get_length(doc->editor->sci);
for (i = 0; i < doc_len; i++)
for (i = 0; i <= doc_len; i++)
{
style = sci_get_style_at(doc->editor->sci, i);
c = sci_get_char_at(doc->editor->sci, i);
@ -369,10 +369,12 @@ static void write_latex_file(GeanyDocument *doc, const gchar *filename, gboolean
g_string_append(body, "}\n");
block_open = FALSE;
}
if (i < doc_len)
{
g_string_append_printf(body, "\\style%s{", get_tex_style(style));
block_open = TRUE;
}
}
/* escape the current character if necessary else just add it */
switch (c)
{
@ -574,7 +576,7 @@ static void write_html_file(GeanyDocument *doc, const gchar *filename, gboolean
/* read the document and write the HTML body */
body = g_string_new("");
doc_len = sci_get_length(doc->editor->sci);
for (i = 0; i < doc_len; i++)
for (i = 0; i <= doc_len; i++)
{
style = sci_get_style_at(doc->editor->sci, i);
c = sci_get_char_at(doc->editor->sci, i);
@ -589,10 +591,12 @@ static void write_html_file(GeanyDocument *doc, const gchar *filename, gboolean
{
g_string_append(body, "</span>");
}
if (i < doc_len)
{
g_string_append_printf(body, "<span class=\"style_%d\">", style);
span_open = TRUE;
}
}
/* escape the current character if necessary else just add it */
switch (c)
{

View File

@ -1,8 +1,8 @@
/*
* filebrowser.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2007-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2007-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* geanyplugin.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2009-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2009-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2009-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2009-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -3,8 +3,8 @@
#
# genapi.py - this file is part of Geany, a fast and lightweight IDE
#
# Copyright 2008-2010 Nick Treleaven <nick.treleaven<at>btinternet.com>
# Copyright 2008-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
# Copyright 2008-2011 Nick Treleaven <nick.treleaven<at>btinternet.com>
# Copyright 2008-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -1,9 +1,9 @@
/*
* htmlchars.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2009-2010 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* Copyright 2006-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2009-2011 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* Copyright 2006-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* saveactions.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2007-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2007-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -74,7 +74,7 @@ static gboolean enable_backupcopy;
static gint autosave_interval;
static gboolean autosave_print_msg;
static gboolean autosave_save_all;
static guint autosave_src_id = G_MAXUINT;
static guint autosave_src_id = 0;
static gchar *instantsave_default_ft;
@ -321,7 +321,7 @@ static void autosave_set_timeout(void)
if (! enable_autosave)
return;
if (autosave_src_id != G_MAXUINT)
if (autosave_src_id != 0)
g_source_remove(autosave_src_id);
autosave_src_id = g_timeout_add(autosave_interval * 1000, (GSourceFunc) auto_save, NULL);
}
@ -347,7 +347,7 @@ void plugin_init(GeanyData *data)
instantsave_default_ft = utils_get_setting_string(config, "instantsave", "default_ft",
filetypes[GEANY_FILETYPES_NONE]->name);
autosave_src_id = G_MAXUINT; /* mark as invalid */
autosave_src_id = 0; /* mark as invalid */
autosave_interval = utils_get_setting_integer(config, "autosave", "interval", 300);
autosave_print_msg = utils_get_setting_boolean(config, "autosave", "print_messages", FALSE);
autosave_save_all = utils_get_setting_boolean(config, "autosave", "save_all", FALSE);
@ -453,7 +453,9 @@ static void configure_response_cb(GtkDialog *dialog, gint response, G_GNUC_UNUSE
g_key_file_set_integer(config, "backupcopy", "dir_levels", backupcopy_dir_levels);
g_key_file_set_string(config, "backupcopy", "time_fmt", text_time);
setptr(backupcopy_time_fmt, g_strdup(text_time));
if (*text_dir != '\0' && backupcopy_set_backup_dir(text_dir))
if (enable_backupcopy)
{
if (NZV(text_dir) && backupcopy_set_backup_dir(text_dir))
{
g_key_file_set_string(config, "backupcopy", "backup_dir", text_dir);
}
@ -462,6 +464,7 @@ static void configure_response_cb(GtkDialog *dialog, gint response, G_GNUC_UNUSE
dialogs_show_msgbox(GTK_MESSAGE_ERROR,
_("Backup directory does not exist or is not writable."));
}
}
if (! g_file_test(config_dir, G_FILE_TEST_IS_DIR) && utils_mkdir(config_dir, TRUE) != 0)
@ -716,7 +719,7 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
void plugin_cleanup(void)
{
if (autosave_src_id != G_MAXUINT)
if (autosave_src_id != 0)
g_source_remove(autosave_src_id);
g_free(instantsave_default_ft);

View File

@ -1,8 +1,8 @@
/*
* splitwindow.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2008-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2008-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2008-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -174,14 +174,14 @@ static const gchar *ui_get_stock_label(const gchar *stock_id)
static GtkWidget *ui_tool_button_new(const gchar *stock_id, const gchar *label, const gchar *tooltip)
{
GtkToolItem *item;
gchar *dup = NULL;
gchar *dupl = NULL;
if (stock_id && !label)
{
label = ui_get_stock_label(stock_id);
}
dup = utils_str_remove_chars(g_strdup(label), "_");
label = dup;
dupl = utils_str_remove_chars(g_strdup(label), "_");
label = dupl;
item = gtk_tool_button_new(NULL, label);
if (stock_id)
@ -192,7 +192,7 @@ static GtkWidget *ui_tool_button_new(const gchar *stock_id, const gchar *label,
if (tooltip)
ui_widget_set_tooltip_text(GTK_WIDGET(item), tooltip);
g_free(dup);
g_free(dupl);
return GTK_WIDGET(item);
}

View File

@ -1,5 +1,5 @@
#!/usr/bin/env perl
# Copyright: 2008-2010, Nick Treleaven
# Copyright: 2008-2011, Nick Treleaven
# License: GNU GPL V2 or later, as published by the Free Software Foundation, USA.
# Warranty: NONE

View File

@ -1,5 +1,5 @@
#!/usr/bin/env perl
# Copyright: 2009-2010, Nick Treleaven
# Copyright: 2009-2011, Nick Treleaven
# License: GNU GPL V2 or later, as published by the Free Software Foundation, USA.
# Warranty: NONE

View File

@ -1,8 +1,8 @@
/*
* plugin_test.c
*
* Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2010-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2010-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* about.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -40,7 +40,7 @@
#define INFO "<span size=\"larger\" weight=\"bold\">%s</span>"
#define CODENAME "<span weight=\"bold\">\"" GEANY_CODENAME "\"</span>"
#define BUILDDATE "<span size=\"smaller\">%s</span>"
#define COPYRIGHT "Copyright (c) 2005-2010\nNick Treleaven\nEnrico Tröger\nFrank Lanitz\nAll rights reserved."
#define COPYRIGHT "Copyright (c) 2005-2011\nNick Treleaven\nColomban Wendling\nEnrico Tröger\nFrank Lanitz\nAll rights reserved."
const gchar *translators[][2] = {
{ "ast", "Marcos Costales &lt;marcoscostales@gmail.com&gt;"},
@ -262,7 +262,7 @@ static GtkWidget *create_dialog(void)
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(credits_scrollwin),
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
table = gtk_table_new(18 + translators_len + prev_translators_len, 3, FALSE);
table = gtk_table_new(20 + translators_len + prev_translators_len, 3, FALSE);
gtk_table_set_col_spacings(GTK_TABLE(table), 10);
row = 0;
@ -284,6 +284,14 @@ static GtkWidget *create_dialog(void)
ROW("", row, 0, 0, 0, 0);
row++;
g_snprintf(buffer, sizeof(buffer), "Colomban Wendling - %s", _("developer"));
ROW(buffer, row, 0, 0, 0, 1);
row++;
ROW("&lt;lists.ban@herbesfolles.org&gt;", row, 0, 0, 0, 1);
row++;
ROW("", row, 0, 0, 0, 0);
row++;
g_snprintf(buffer, sizeof(buffer), "Enrico Tröger - %s", _("developer"));
ROW(buffer, row, 0, 0, 0, 1);
row++;
@ -293,7 +301,7 @@ static GtkWidget *create_dialog(void)
row++;
g_snprintf(buffer, sizeof(buffer), "Frank Lanitz - %s", _("translation maintainer"));
ROW(buffer, 7, 0, 0, 0, 1);
ROW(buffer, row, 0, 0, 0, 1);
row++;
ROW("&lt;frank@frank.uvena.de&gt;", row, 0, 0, 0, 1);
row++;

View File

@ -1,8 +1,8 @@
/*
* about.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* build.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2009 Lex Trotman <elextr(at)gmail(dot)com>
*
* This program is free software; you can redistribute it and/or modify
@ -189,10 +189,10 @@ static void set_command(GeanyBuildCommand *bc, gint id, gchar *str)
}
static const gchar *config_keys[] = {
[GEANY_BC_LABEL] = "LB",
[GEANY_BC_COMMAND] = "CM",
[GEANY_BC_WORKING_DIR] = "WD"
static const gchar *config_keys[GEANY_BC_CMDENTRIES_COUNT] = {
"LB", /* label */
"CM", /* command */
"WD" /* working directory */
};
/*-----------------------------------------------------
@ -1762,7 +1762,7 @@ static void set_row_color(RowWidgets *r, GdkColor *color )
for (i = 0; i < GEANY_BC_CMDENTRIES_COUNT; i++)
gtk_widget_modify_text(r->entries[i], GTK_STATE_NORMAL, color);
};
}
static void set_build_command_entry_text(GtkWidget *wid, const gchar *text)

View File

@ -1,8 +1,8 @@
/*
* build.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* callbacks.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -1299,7 +1299,9 @@ on_comments_function_activate (GtkMenuItem *menuitem,
text = templates_get_template_function(doc, cur_tag);
sci_start_undo_action(doc->editor->sci);
sci_insert_text(doc->editor->sci, pos, text);
sci_end_undo_action(doc->editor->sci);
g_free(text);
}
@ -1339,7 +1341,9 @@ on_comments_gpl_activate (GtkMenuItem *menuitem,
verify_click_pos(doc); /* make sure that the click_pos is valid */
sci_start_undo_action(doc->editor->sci);
sci_insert_text(doc->editor->sci, editor_info.click_pos, text);
sci_end_undo_action(doc->editor->sci);
g_free(text);
}
@ -1358,7 +1362,9 @@ on_comments_bsd_activate (GtkMenuItem *menuitem,
verify_click_pos(doc); /* make sure that the click_pos is valid */
sci_start_undo_action(doc->editor->sci);
sci_insert_text(doc->editor->sci, editor_info.click_pos, text);
sci_end_undo_action(doc->editor->sci);
g_free(text);
}
@ -1374,10 +1380,12 @@ on_comments_changelog_activate (GtkMenuItem *menuitem,
g_return_if_fail(doc != NULL);
text = templates_get_template_changelog(doc);
sci_start_undo_action(doc->editor->sci);
sci_insert_text(doc->editor->sci, 0, text);
/* sets the cursor to the right position to type the changelog text,
* the template has 21 chars + length of name and email */
sci_goto_pos(doc->editor->sci, 21 + strlen(template_prefs.developer) + strlen(template_prefs.mail), TRUE);
sci_end_undo_action(doc->editor->sci);
g_free(text);
}
@ -1398,8 +1406,10 @@ on_comments_fileheader_activate (GtkMenuItem *menuitem,
fname = doc->file_name;
text = templates_get_template_fileheader(FILETYPE_ID(ft), fname);
sci_start_undo_action(doc->editor->sci);
sci_insert_text(doc->editor->sci, 0, text);
sci_goto_pos(doc->editor->sci, 0, FALSE);
sci_end_undo_action(doc->editor->sci);
g_free(text);
}
@ -1451,8 +1461,10 @@ on_insert_date_activate (GtkMenuItem *menuitem,
{
verify_click_pos(doc); /* make sure that the click_pos is valid */
sci_start_undo_action(doc->editor->sci);
sci_insert_text(doc->editor->sci, editor_info.click_pos, time_str);
sci_goto_pos(doc->editor->sci, editor_info.click_pos + strlen(time_str), FALSE);
sci_end_undo_action(doc->editor->sci);
g_free(time_str);
}
else
@ -1487,7 +1499,9 @@ on_insert_include_activate (GtkMenuItem *menuitem,
text = g_strconcat("#include <", user_data, ">\n", NULL);
}
sci_start_undo_action(doc->editor->sci);
sci_insert_text(doc->editor->sci, editor_info.click_pos, text);
sci_end_undo_action(doc->editor->sci);
g_free(text);
if (pos >= 0)
sci_goto_pos(doc->editor->sci, pos, FALSE);

View File

@ -1,8 +1,8 @@
/*
* callbacks.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* dialogs.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* dialogs.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* document.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -1152,24 +1152,33 @@ static GeanyIndentType detect_indent_type(GeanyEditor *editor)
}
void document_apply_indent_settings(GeanyDocument *doc)
static gboolean apply_forced_indent_settings(GeanyDocument *doc)
{
const GeanyIndentPrefs *iprefs = editor_get_indent_prefs(NULL);
GeanyIndentType type = iprefs->type;
switch (doc->file_type->id)
{
case GEANY_FILETYPES_MAKE:
/* force using tabs for indentation for Makefiles */
editor_set_indent(doc->editor, GEANY_INDENT_TYPE_TABS, iprefs->width);
return;
return TRUE;
case GEANY_FILETYPES_F77:
/* force using spaces for indentation for Fortran 77 */
editor_set_indent(doc->editor, GEANY_INDENT_TYPE_SPACES, iprefs->width);
return;
default:
break;
return TRUE;
}
return FALSE;
}
void document_apply_indent_settings(GeanyDocument *doc)
{
const GeanyIndentPrefs *iprefs = editor_get_indent_prefs(NULL);
GeanyIndentType type = iprefs->type;
if (apply_forced_indent_settings(doc))
return;
if (iprefs->detect_type)
{
type = detect_indent_type(doc->editor);
@ -2585,6 +2594,8 @@ void document_set_filetype(GeanyDocument *doc, GeanyFiletype *type)
if (ft_changed)
{
if (apply_forced_indent_settings(doc)) /* update forced indents, like Makefiles and F77 */
ui_document_show_hide(doc);
sidebar_openfiles_update(doc); /* to update the icon */
g_signal_emit_by_name(geany_object, "document-filetype-set", doc, old_ft);
}

View File

@ -1,8 +1,8 @@
/*
* document.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* document-private.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2008-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2008-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,9 +1,9 @@
/*
* editor.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2009-2010 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2009-2011 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -341,6 +341,9 @@ static gboolean on_editor_button_press_event(GtkWidget *widget, GdkEventButton *
{
gboolean can_goto;
/* ensure the editor widget has the focus after this operation */
gtk_widget_grab_focus(widget);
editor_find_current_word(editor, editor_info.click_pos,
current_word, sizeof current_word, NULL);

View File

@ -1,8 +1,8 @@
/*
* editor.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* encodings.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -53,7 +53,7 @@
/* <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> */
#define PATTERN_HTMLMETA "<meta[ \t\n\r\f]http-equiv[ \t\n\r\f]*=[ \t\n\r\f]*\"content-type\"[ \t\n\r\f]+content[ \t\n\r\f]*=[ \t\n\r\f]*\"text/x?html;[ \t\n\r\f]*charset=([a-z0-9_-]+)\"[ \t\n\r\f]*/?>"
/* " geany_encoding=utf-8 " or " coding: utf-8 " */
#define PATTERN_CODING "coding[\t ]*[:=][\t ]*([a-z0-9-]+)[\t ]*"
#define PATTERN_CODING "coding[\t ]*[:=][\t ]*\"?([a-z0-9-]+)\"?[\t ]*"
/* precompiled regexps */
static regex_t pregs[2];

View File

@ -1,8 +1,8 @@
/*
* encodings.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* filetypes.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* filetypes.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* filetypesprivate.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2008-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2008-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* gb.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* geany.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* geanyentryaction.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2008-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2008-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -17,6 +17,8 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $Id$
*/
/* GtkAction subclass to provide a GtkEntry in a toolbar.

View File

@ -1,8 +1,8 @@
/*
* geanyentryaction.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2008-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2008-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* geanymenubuttonaction.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2009-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2009-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2009-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2009-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -17,6 +17,8 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $Id$
*/
/* GtkAction subclass to provide a GtkMenuToolButton in a toolbar.

View File

@ -1,8 +1,8 @@
/*
* geanymenubuttonaction.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2009-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2009-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2009-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2009-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -17,6 +17,8 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $Id$
*/

View File

@ -1,8 +1,8 @@
/*
* geanyobject.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2007-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2007-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* geanyobject.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2007-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2007-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* geanywraplabel.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2009-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2009-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2009-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2009-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* geanywraplabel.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2009-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2009-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2009-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2009-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* highlighting.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* highlighting.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* images.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* keybindings.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2006-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2006-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -1775,7 +1775,7 @@ static GtkWidget *create_switch_dialog(void)
}
static void update_filename_label()
static void update_filename_label(void)
{
if (!switch_dialog)
{

View File

@ -1,8 +1,8 @@
/*
* keybindings.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2006-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2006-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* keyfile.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* keyfile.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* log.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2008-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2008-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* log.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2008-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2008-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* main.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -1030,7 +1030,6 @@ gint main(gint argc, gchar **argv)
ui_create_insert_menu_items();
ui_create_insert_date_menu_items();
keybindings_init();
tools_create_insert_custom_command_menu_items();
notebook_init();
filetypes_init();
templates_init();
@ -1080,6 +1079,10 @@ gint main(gint argc, gchar **argv)
/* load keybinding settings after plugins have added their groups */
keybindings_load_keyfile();
/* create the custom command menu after the keybindings have been loaded to have the proper
* accelerator shown for the menu items */
tools_create_insert_custom_command_menu_items();
/* load any command line files or session files */
main_status.opening_session_files = TRUE;
load_startup_files(argc, argv);

View File

@ -1,8 +1,8 @@
/*
* main.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2006-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2006-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* msgwindow.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* msgwindow.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -2,8 +2,8 @@
* navqueue.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2007 Dave Moore <wrex006(at)gmail(dot)com>
* Copyright 2007-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2007-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -2,8 +2,8 @@
* navqueue.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2007 Dave Moore <wrex006(at)gmail(dot)com>
* Copyright 2007-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2007-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* notebook.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2006-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2006-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* notebook.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2006-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2006-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* plugindata.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2007-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2007-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* pluginprivate.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2009-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2009-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2009-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2009-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* plugins.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2007-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2007-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* plugins.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2007-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2007-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* pluginutils.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2009-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2009-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2009-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2009-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* pluginutils.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2009-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2009-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2009-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2009-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* prefs.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -59,6 +59,7 @@
#include "templates.h"
#include "search.h"
#include "toolbar.h"
#include "tools.h"
#include "stash.h"
#include "keyfile.h"
#include "filetypes.h"
@ -1120,6 +1121,7 @@ on_prefs_dialog_response(GtkDialog *dialog, gint response, gpointer user_data)
if (edited)
{
kb_update();
tools_create_insert_custom_command_menu_items();
keybindings_write_to_file();
}

View File

@ -1,8 +1,8 @@
/*
* prefs.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* printing.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2007-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2007-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* printing.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2007-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2007-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* project.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2007-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2007-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -29,6 +29,7 @@
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include "project.h"
#include "projectprivate.h"
@ -80,7 +81,7 @@ typedef struct _PropertyDialogElements
} PropertyDialogElements;
static gboolean update_config(const PropertyDialogElements *e);
static gboolean update_config(const PropertyDialogElements *e, gboolean new_project);
static void on_file_save_button_clicked(GtkButton *button, PropertyDialogElements *e);
static gboolean load_config(const gchar *filename);
static gboolean write_config(gboolean emit_signal);
@ -189,15 +190,19 @@ void project_new(void)
while (gtk_dialog_run(GTK_DIALOG(e->dialog)) == GTK_RESPONSE_OK)
{
if (update_config(e))
if (update_config(e, TRUE))
{
if (!write_config(TRUE))
SHOW_ERR(_("Project file could not be written"));
else
{
write_config(TRUE);
ui_set_statusbar(TRUE, _("Project \"%s\" created."), app->project->name);
ui_add_recent_project_file(app->project->file_name);
break;
}
}
}
gtk_widget_destroy(e->dialog);
g_free(e);
}
@ -342,7 +347,8 @@ void project_close(gboolean open_default)
ui_set_statusbar(TRUE, _("Project \"%s\" closed."), app->project->name);
/* use write_config() to save project session files */
write_config(FALSE);
if (!write_config(FALSE))
g_warning("Project file \"%s\" could not be written", app->project->file_name);
/* remove project filetypes build entries */
if (app->project->build_filetypes_list != NULL)
@ -577,14 +583,18 @@ static void show_project_properties(gboolean show_build)
while (gtk_dialog_run(GTK_DIALOG(e->dialog)) == GTK_RESPONSE_OK)
{
if (update_config(e))
if (update_config(e, FALSE))
{
g_signal_emit_by_name(geany_object, "project-dialog-confirmed", e->notebook);
write_config(TRUE);
if (!write_config(TRUE))
SHOW_ERR(_("Project file could not be written"));
else
{
ui_set_statusbar(TRUE, _("Project \"%s\" saved."), app->project->name);
break;
}
}
}
build_free_fields(e->build_properties);
gtk_widget_destroy(e->dialog);
g_free(e);
@ -644,13 +654,12 @@ static GeanyProject *create_project(void)
/* Verifies data for New & Properties dialogs.
* Returns: FALSE if the user needs to change any data. */
static gboolean update_config(const PropertyDialogElements *e)
static gboolean update_config(const PropertyDialogElements *e, gboolean new_project)
{
const gchar *name, *file_name, *base_path;
gchar *locale_filename;
gint name_len;
gint err_code = 0;
gboolean new_project = FALSE;
GeanyProject *p;
g_return_val_if_fail(e != NULL, TRUE);
@ -670,7 +679,7 @@ static gboolean update_config(const PropertyDialogElements *e)
return FALSE;
}
if (app->project == NULL)
if (new_project)
file_name = gtk_entry_get_text(GTK_ENTRY(e->file_name));
else
file_name = gtk_label_get_text(GTK_LABEL(e->file_name));
@ -720,7 +729,8 @@ static gboolean update_config(const PropertyDialogElements *e)
g_free(locale_path);
}
/* finally test whether the given project file can be written */
if ((err_code = utils_is_file_writeable(locale_filename)) != 0)
if ((err_code = utils_is_file_writeable(locale_filename)) != 0 ||
(err_code = g_file_test(locale_filename, G_FILE_TEST_IS_DIR) ? EISDIR : 0) != 0)
{
SHOW_ERR1(_("Project file could not be written (%s)."), g_strerror(err_code));
gtk_widget_grab_focus(e->file_name);

View File

@ -1,8 +1,8 @@
/*
* project.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2007-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2007-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2007-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* projectprivate.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2008-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2008-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2008-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* sciwrappers.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -357,7 +357,8 @@ gint sci_marker_previous(ScintillaObject *sci, gint line, gint marker_mask, gboo
/** Gets the line number from @a position.
* @param sci Scintilla widget.
* @param position Position. */
* @param position Position.
* @return The line. */
gint sci_get_line_from_position(ScintillaObject *sci, gint position)
{
return SSM(sci, SCI_LINEFROMPOSITION, position, 0);
@ -366,7 +367,8 @@ gint sci_get_line_from_position(ScintillaObject *sci, gint position)
/** Gets the column number relative to the start of the line that @a position is on.
* @param sci Scintilla widget.
* @param position Position. */
* @param position Position.
* @return The column. */
gint sci_get_col_from_position(ScintillaObject *sci, gint position)
{
return SSM(sci, SCI_GETCOLUMN, position, 0);
@ -419,7 +421,8 @@ void sci_set_current_line(ScintillaObject *sci, gint line)
/** Gets the total number of lines.
* @param sci Scintilla widget. */
* @param sci Scintilla widget.
* @return The line count. */
gint sci_get_line_count(ScintillaObject *sci)
{
return SSM(sci, SCI_GETLINECOUNT, 0, 0);
@ -450,6 +453,10 @@ void sci_set_selection(ScintillaObject *sci, gint anchorPos, gint currentPos)
}
/** Gets the position at the end of a line
* @param sci Scintilla widget.
* @param line Line.
* @return The position at the end of the line. */
gint sci_get_line_end_position(ScintillaObject *sci, gint line)
{
return SSM(sci, SCI_GETLINEENDPOSITION, line, 0);
@ -823,6 +830,10 @@ gint sci_find_text(ScintillaObject *sci, gint flags, struct Sci_TextToFind *ttf)
}
/** Sets the font for a particular style
* @param style The style
* @param font The font name
* @param size The font size */
void sci_set_font(ScintillaObject *sci, gint style, const gchar *font, gint size)
{
SSM(sci, SCI_STYLESETFONT, style, (sptr_t) font);

View File

@ -1,8 +1,8 @@
/*
* sciwrappers.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* search.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2006-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2006-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -1514,14 +1514,27 @@ search_find_in_files(const gchar *utf8_search_text, const gchar *dir, const gcha
}
static gboolean pattern_list_match(GSList *patterns, const gchar *str)
{
GSList *item;
foreach_slist(item, patterns)
{
if (g_pattern_match_string(item->data, str))
return TRUE;
}
return FALSE;
}
/* Creates an argument vector of strings, copying argv_prefix[] values for
* the first arguments, then followed by filenames found in dir.
* Returns NULL if no files were found, otherwise returned vector should be fully freed. */
static gchar **search_get_argv(const gchar **argv_prefix, const gchar *dir)
{
guint prefix_len, list_len, i;
guint prefix_len, list_len, i, j;
gchar **argv;
GSList *list, *item;
GSList *list, *item, *patterns = NULL;
GError *error = NULL;
g_return_val_if_fail(dir != NULL, NULL);
@ -1539,13 +1552,40 @@ static gchar **search_get_argv(const gchar **argv_prefix, const gchar *dir)
argv = g_new(gchar*, prefix_len + list_len + 1);
for (i = 0; i < prefix_len; i++)
argv[i] = g_strdup(argv_prefix[i]);
for (i = 0, j = 0; i < prefix_len; i++)
{
if (g_str_has_prefix(argv_prefix[i], "--include="))
{
const gchar *pat = &(argv_prefix[i][10]); /* the pattern part of the argument */
patterns = g_slist_prepend(patterns, g_pattern_spec_new(pat));
}
else
argv[j++] = g_strdup(argv_prefix[i]);
}
if (patterns)
{
GSList *pat;
foreach_slist(item, list)
argv[i++] = item->data;
{
if (pattern_list_match(patterns, item->data))
argv[j++] = item->data;
else
g_free(item->data);
}
foreach_slist(pat, patterns)
g_pattern_spec_free(pat->data);
g_slist_free(patterns);
}
else
{
foreach_slist(item, list)
argv[j++] = item->data;
}
argv[i] = NULL;
argv[j] = NULL;
g_slist_free(list);
return argv;
}

View File

@ -1,8 +1,8 @@
/*
* search.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2006-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2006-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* sidebar.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -62,12 +62,6 @@ static struct
}
doc_items = {NULL, NULL, NULL, NULL, NULL};
static struct
{
GtkTreeSelection *selection;
guint keyval;
} selection_change = {NULL, 0};
enum
{
TREEVIEW_SYMBOL = 0,
@ -97,9 +91,7 @@ static gboolean documents_show_paths;
static GtkWidget *tag_window; /* scrolled window that holds the symbol list GtkTreeView */
/* callback prototypes */
static gboolean on_openfiles_tree_selection_changed(gpointer data);
static void on_openfiles_document_action(GtkMenuItem *menuitem, gpointer user_data);
static gboolean on_taglist_tree_selection_changed(gpointer data);
static gboolean sidebar_button_press_cb(GtkWidget *widget, GdkEventButton *event,
gpointer user_data);
static gboolean sidebar_key_press_cb(GtkWidget *widget, GdkEventKey *event,
@ -198,8 +190,21 @@ static void create_default_tag_tree(void)
/* update = rescan the tags for doc->filename */
void sidebar_update_tag_list(GeanyDocument *doc, gboolean update)
{
if (gtk_bin_get_child(GTK_BIN(tag_window)))
gtk_container_remove(GTK_CONTAINER(tag_window), gtk_bin_get_child(GTK_BIN(tag_window)));
GtkWidget *child = gtk_bin_get_child(GTK_BIN(tag_window));
/* changes the tree view to the given one, trying not to do useless changes */
#define CHANGE_TREE(new_child) \
G_STMT_START { \
/* only change the tag tree if it's actually not the same (to avoid flickering) and if
* it's the one of the current document (to avoid problems when e.g. reloading
* configuration files */ \
if (child != new_child && doc == document_get_current()) \
{ \
if (child) \
gtk_container_remove(GTK_CONTAINER(tag_window), child); \
gtk_container_add(GTK_CONTAINER(tag_window), new_child); \
} \
} G_STMT_END
if (tv.default_tag_tree == NULL)
create_default_tag_tree();
@ -207,7 +212,7 @@ void sidebar_update_tag_list(GeanyDocument *doc, gboolean update)
/* show default empty tag tree if there are no tags */
if (doc == NULL || doc->file_type == NULL || ! filetype_has_tags(doc->file_type))
{
gtk_container_add(GTK_CONTAINER(tag_window), tv.default_tag_tree);
CHANGE_TREE(tv.default_tag_tree);
return;
}
@ -228,12 +233,14 @@ void sidebar_update_tag_list(GeanyDocument *doc, gboolean update)
if (doc->has_tags)
{
gtk_container_add(GTK_CONTAINER(tag_window), doc->priv->tag_tree);
CHANGE_TREE(doc->priv->tag_tree);
}
else
{
gtk_container_add(GTK_CONTAINER(tag_window), tv.default_tag_tree);
CHANGE_TREE(tv.default_tag_tree);
}
#undef CHANGE_TREE
}
@ -704,6 +711,7 @@ static void create_openfiles_popup_menu(void)
gtk_container_add(GTK_CONTAINER(openfiles_popup_menu), item);
doc_items.show_paths = gtk_check_menu_item_new_with_mnemonic(_("Show _Paths"));
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(doc_items.show_paths), documents_show_paths);
gtk_widget_show(doc_items.show_paths);
gtk_container_add(GTK_CONTAINER(openfiles_popup_menu), doc_items.show_paths);
g_signal_connect(doc_items.show_paths, "activate",
@ -824,14 +832,14 @@ static void change_focus_to_editor(GeanyDocument *doc, GtkWidget *source_widget)
}
static gboolean on_openfiles_tree_selection_changed(gpointer data)
static gboolean openfiles_go_to_selection(GtkTreeSelection *selection, guint keyval)
{
GtkTreeIter iter;
GtkTreeModel *model;
GeanyDocument *doc = NULL;
/* use switch_notebook_page to ignore changing the notebook page because it is already done */
if (gtk_tree_selection_get_selected(selection_change.selection, &model, &iter) && ! ignore_callback)
if (gtk_tree_selection_get_selected(selection, &model, &iter) && ! ignore_callback)
{
gtk_tree_model_get(model, &iter, DOCUMENTS_DOCUMENT, &doc, -1);
if (! doc)
@ -841,20 +849,20 @@ static gboolean on_openfiles_tree_selection_changed(gpointer data)
gtk_notebook_set_current_page(GTK_NOTEBOOK(main_widgets.notebook),
gtk_notebook_page_num(GTK_NOTEBOOK(main_widgets.notebook),
(GtkWidget*) doc->editor->sci));
if (selection_change.keyval != GDK_space)
if (keyval != GDK_space)
change_focus_to_editor(doc, tv.tree_openfiles);
}
return FALSE;
}
static gboolean on_taglist_tree_selection_changed(gpointer data)
static gboolean taglist_go_to_selection(GtkTreeSelection *selection, guint keyval)
{
GtkTreeIter iter;
GtkTreeModel *model;
gint line = 0;
if (gtk_tree_selection_get_selected(selection_change.selection, &model, &iter))
if (gtk_tree_selection_get_selected(selection, &model, &iter))
{
const TMTag *tag;
@ -870,7 +878,7 @@ static gboolean on_taglist_tree_selection_changed(gpointer data)
if (doc != NULL)
{
navqueue_goto_line(doc, doc, line);
if (selection_change.keyval != GDK_space)
if (keyval != GDK_space)
change_focus_to_editor(doc, NULL);
}
}
@ -879,29 +887,28 @@ static gboolean on_taglist_tree_selection_changed(gpointer data)
}
static void update_selection_change(GtkTreeSelection *selection, guint keyval)
{
selection_change.selection = selection;
selection_change.keyval = keyval;
}
static gboolean sidebar_key_press_cb(GtkWidget *widget, GdkEventKey *event,
gpointer user_data)
{
may_steal_focus = FALSE;
if (ui_is_keyval_enter_or_return(event->keyval) || event->keyval == GDK_space)
{
GtkWidgetClass *widget_class = GTK_WIDGET_GET_CLASS(widget);
GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget));
may_steal_focus = TRUE;
/* delay the query of selection state because this callback is executed before GTK
* changes the selection (g_signal_connect_after would be better but it doesn't work) */
update_selection_change(selection, event->keyval);
/* force the TreeView handler to run before us for it to do its job (selection & stuff).
* doing so will prevent further handlers to be run in most cases, but the only one is our
* own, so guess it's fine. */
if (widget_class->key_press_event)
widget_class->key_press_event(widget, event);
if (widget == tv.tree_openfiles) /* tag and doc list have separate handlers */
g_idle_add(on_openfiles_tree_selection_changed, NULL);
openfiles_go_to_selection(selection, event->keyval);
else
g_idle_add(on_taglist_tree_selection_changed, NULL);
taglist_go_to_selection(selection, event->keyval);
return TRUE;
}
return FALSE;
}
@ -911,6 +918,14 @@ static gboolean sidebar_button_press_cb(GtkWidget *widget, GdkEventButton *event
G_GNUC_UNUSED gpointer user_data)
{
GtkTreeSelection *selection;
GtkWidgetClass *widget_class = GTK_WIDGET_GET_CLASS(widget);
gboolean handled = FALSE;
/* force the TreeView handler to run before us for it to do its job (selection & stuff).
* doing so will prevent further handlers to be run in most cases, but the only one is our own,
* so guess it's fine. */
if (widget_class->button_press_event)
handled = widget_class->button_press_event(widget, event);
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget));
may_steal_focus = TRUE;
@ -938,14 +953,11 @@ static gboolean sidebar_button_press_cb(GtkWidget *widget, GdkEventButton *event
}
else if (event->button == 1)
{ /* allow reclicking of taglist treeview item */
/* delay the query of selection state because this callback is executed before GTK
* changes the selection (g_signal_connect_after would be better but it doesn't work) */
update_selection_change(selection, 0);
if (widget == tv.tree_openfiles)
g_idle_add(on_openfiles_tree_selection_changed, NULL);
openfiles_go_to_selection(selection, 0);
else
g_idle_add(on_taglist_tree_selection_changed, NULL);
taglist_go_to_selection(selection, 0);
handled = TRUE;
}
else if (event->button == 3)
{
@ -964,8 +976,9 @@ static gboolean sidebar_button_press_cb(GtkWidget *widget, GdkEventButton *event
gtk_menu_popup(GTK_MENU(tv.popup_taglist), NULL, NULL, NULL, NULL,
event->button, event->time);
}
handled = TRUE;
}
return FALSE;
return handled;
}

View File

@ -1,8 +1,8 @@
/*
* sidebar.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* socket.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2006-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2006-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2006 Hiroyuki Yamamoto (author of Sylpheed)
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,8 +1,8 @@
/*
* socket.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2006-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2006-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* stash.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2008-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2008-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2008-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* stash.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2008-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2008-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2008-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2008-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* support.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2006-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2006-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* symbols.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2006-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2006-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -451,16 +451,27 @@ static gint compare_symbol(const TMTag *tag_a, const TMTag *tag_b)
}
/* sort by line only */
/* sort by line, then scope */
static gint compare_symbol_lines(gconstpointer a, gconstpointer b)
{
const TMTag *tag_a = TM_TAG(a);
const TMTag *tag_b = TM_TAG(b);
gint ret;
if (a == NULL || b == NULL)
return 0;
return tag_a->atts.entry.line - tag_b->atts.entry.line;
ret = tag_a->atts.entry.line - tag_b->atts.entry.line;
if (ret == 0)
{
if (tag_a->atts.entry.scope == NULL)
return -(tag_a->atts.entry.scope != tag_b->atts.entry.scope);
if (tag_b->atts.entry.scope == NULL)
return tag_a->atts.entry.scope != tag_b->atts.entry.scope;
else
return strcmp(tag_a->atts.entry.scope, tag_b->atts.entry.scope);
}
return ret;
}

View File

@ -1,8 +1,8 @@
/*
* symbols.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2006-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2006-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* templates.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* templates.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
/*
* toolbar.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2009-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2009-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Copyright 2009-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Copyright 2009-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -479,7 +479,8 @@ void toolbar_update_ui(void)
/* we need to adjust the packing flags for the menubar to expand it if it is alone in the
* hbox and not expand it if the toolbar is appended */
gtk_box_set_child_packing(GTK_BOX(hbox_menubar), menubar,
! toolbar_prefs.append_to_menu, ! toolbar_prefs.append_to_menu, 0, GTK_PACK_START);
! (toolbar_prefs.visible && toolbar_prefs.append_to_menu),
! (toolbar_prefs.visible && toolbar_prefs.append_to_menu), 0, GTK_PACK_START);
}

Some files were not shown because too many files have changed in this diff Show More