Update branch to trunk and backout disputed changes in branch
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/build-system@3645 ea778897-0a13-0410-b9d1-a72fbfd435f5
12806
ChangeLog.pre-0-17
Normal file
63
HACKING
@ -20,6 +20,8 @@ Writing plugins
|
|||||||
* See plugins/demoplugin.c for a very basic example plugin.
|
* See plugins/demoplugin.c for a very basic example plugin.
|
||||||
* src/plugins.c loads and unloads plugins (you shouldn't need to read
|
* src/plugins.c loads and unloads plugins (you shouldn't need to read
|
||||||
this really).
|
this really).
|
||||||
|
* The API documentation contains a few basic guidelines and hints to
|
||||||
|
write plugins.
|
||||||
|
|
||||||
You should generate and read the plugin API documentation, see below.
|
You should generate and read the plugin API documentation, see below.
|
||||||
|
|
||||||
@ -28,6 +30,8 @@ Plugin API documentation
|
|||||||
You can generate documentation for the plugin API using the doxygen
|
You can generate documentation for the plugin API using the doxygen
|
||||||
tool. Run ``make api-doc`` in the doc subdirectory. The documentation
|
tool. Run ``make api-doc`` in the doc subdirectory. The documentation
|
||||||
will be output to doc/reference/index.html.
|
will be output to doc/reference/index.html.
|
||||||
|
Alternatively you can view the API documentation online at
|
||||||
|
http://www.geany.org/manual/reference/.
|
||||||
|
|
||||||
Patches
|
Patches
|
||||||
-------
|
-------
|
||||||
@ -89,28 +93,28 @@ If you're in any doubt when making changes to plugin API code, just ask us.
|
|||||||
Glade
|
Glade
|
||||||
-----
|
-----
|
||||||
Use the code generation features of Glade instead of editing interface.c
|
Use the code generation features of Glade instead of editing interface.c
|
||||||
or support.c. Glade 2.10 is recommended as long as we support GTK+ 2.6,
|
or support.c. Glade 2.12 is recommended as long as we support GTK+ 2.8,
|
||||||
because later versions of Glade are not 100% compatible with GTK+ 2.6
|
because later versions of Glade are not 100% compatible with GTK+ 2.8
|
||||||
(e.g. they may use functions added in GTK+ 2.8).
|
(e.g. they may use functions added in GTK+ 2.10).
|
||||||
|
|
||||||
You can build Glade 2.10 and run the binary in place, without installing
|
You can build Glade 2.12 and run the binary in place, without installing
|
||||||
it - this should work fine even if you have another version of Glade
|
it - this should work fine even if you have another version of Glade
|
||||||
installed on the system.
|
installed on the system.
|
||||||
|
|
||||||
GTK API documentation
|
GTK API documentation
|
||||||
---------------------
|
---------------------
|
||||||
The official GTK 2.6 API documentation is not available online anymore,
|
The official GTK 2.8 API documentation is not available online anymore,
|
||||||
so we put them on http://www.geany.org/manual/gtk/.
|
so we put them on http://www.geany.org/manual/gtk/.
|
||||||
There is also a tarball with all available files for download and use
|
There is also a tarball with all available files for download and use
|
||||||
with devhelp.
|
with devhelp.
|
||||||
|
|
||||||
Using the 2.6 API documentation of the GTK libs (including GLib, GDK and
|
Using the 2.8 API documentation of the GTK libs (including GLib, GDK and
|
||||||
Pango) has the advantages that you don't get confused by any newer API
|
Pango) has the advantages that you don't get confused by any newer API
|
||||||
additions and you don't have to take care about whether you can use
|
additions and you don't have to take care about whether you can use
|
||||||
them or not.
|
them or not.
|
||||||
This is because Geany depends on GTK 2.6. API symbols from newer
|
This is because Geany depends on GTK 2.8. API symbols from newer
|
||||||
GTK/GLib versions should be avoided to keep the source code building
|
GTK/GLib versions should be avoided to keep the source code building
|
||||||
against GTK 2.6.
|
against GTK 2.8.
|
||||||
|
|
||||||
Coding
|
Coding
|
||||||
------
|
------
|
||||||
@ -118,8 +122,8 @@ Coding
|
|||||||
them down into smaller static functions where possible. This makes code
|
them down into smaller static functions where possible. This makes code
|
||||||
much easier to read and maintain.
|
much easier to read and maintain.
|
||||||
* Use GLib types and functions - e.g. g_free instead of free.
|
* Use GLib types and functions - e.g. g_free instead of free.
|
||||||
* Your code should build against GLib 2.6 and GTK 2.6. At least for the
|
* Your code should build against GLib 2.8 and GTK 2.8. At least for the
|
||||||
moment, we want to keep the minimum requirement for GTK at 2.6 (of
|
moment, we want to keep the minimum requirement for GTK at 2.8 (of
|
||||||
course, you can use the GTK_CHECK_VERSION macro to protect code using
|
course, you can use the GTK_CHECK_VERSION macro to protect code using
|
||||||
later versions).
|
later versions).
|
||||||
* We currently try to support the old GCC 2.9.x compiler,
|
* We currently try to support the old GCC 2.9.x compiler,
|
||||||
@ -144,8 +148,8 @@ Style
|
|||||||
* We don't put spaces between function names and the opening brace for
|
* We don't put spaces between function names and the opening brace for
|
||||||
argument lists.
|
argument lists.
|
||||||
* Try to fit in with the existing code brace indenting style, comments,
|
* Try to fit in with the existing code brace indenting style, comments,
|
||||||
operator spacing etc. It's not required but it makes our lives easier
|
operator spacing etc. It's not required for patches but it will save
|
||||||
;-)
|
us having to manually reformat them.
|
||||||
|
|
||||||
Libraries
|
Libraries
|
||||||
---------
|
---------
|
||||||
@ -290,10 +294,39 @@ Update init_tag_list() for foo, listing the tm_tag_* types corresponding
|
|||||||
to the s_tag_type_names strings used in foo.c for FooKinds.
|
to the s_tag_type_names strings used in foo.c for FooKinds.
|
||||||
|
|
||||||
|
|
||||||
Loading a plugin from GDB
|
GDB
|
||||||
-------------------------
|
---
|
||||||
|
|
||||||
|
Stop on warnings
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
When a GLib or GTK warning is printed, often you want to get a
|
||||||
|
backtrace to find out what code caused them. You can do that with the
|
||||||
|
``--g-fatal-warnings`` argument, which will abort Geany on the first
|
||||||
|
warning it receives.
|
||||||
|
|
||||||
|
But for ordinary testing, you don't always want your editor to abort
|
||||||
|
just because of a warning - use::
|
||||||
|
|
||||||
|
(gdb) b handler_log if level <= G_LOG_LEVEL_WARNING
|
||||||
|
|
||||||
|
|
||||||
|
Running with batch commands
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
Use::
|
||||||
|
|
||||||
|
$ gdb src/geany -x gdb-commands
|
||||||
|
|
||||||
|
Where ``gdb-commands`` is a file with the following lines::
|
||||||
|
|
||||||
|
set pagination off
|
||||||
|
b handler_log if level <= G_LOG_LEVEL_WARNING
|
||||||
|
r -d
|
||||||
|
|
||||||
|
|
||||||
|
Loading a plugin
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
This is useful so you can load plugins without installing them first.
|
This is useful so you can load plugins without installing them first.
|
||||||
Alternatively you can use a symlink in ~/.geany/plugins or
|
Alternatively you can use a symlink in ~/.config/geany/plugins or
|
||||||
$prefix/lib/geany (where $prefix is /usr/local by default).
|
$prefix/lib/geany (where $prefix is /usr/local by default).
|
||||||
|
|
||||||
The gdb session below was run from the toplevel Geany source directory.
|
The gdb session below was run from the toplevel Geany source directory.
|
||||||
|
11
Makefile.am
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
SUBDIRS = tagmanager scintilla src plugins icons po doc
|
SUBDIRS = tagmanager scintilla src plugins icons po doc
|
||||||
|
|
||||||
|
AUTOMAKE_OPTIONS = 1.7
|
||||||
|
|
||||||
WIN32_BUILD_FILES = \
|
WIN32_BUILD_FILES = \
|
||||||
geany_private.rc \
|
geany_private.rc \
|
||||||
win32-config.h \
|
win32-config.h \
|
||||||
@ -11,7 +13,7 @@ WIN32_BUILD_FILES = \
|
|||||||
src/makefile.win32
|
src/makefile.win32
|
||||||
|
|
||||||
SYS_DATA_FILES = \
|
SYS_DATA_FILES = \
|
||||||
data/global.tags \
|
data/c99.tags \
|
||||||
data/php.tags \
|
data/php.tags \
|
||||||
data/python.tags \
|
data/python.tags \
|
||||||
data/latex.tags \
|
data/latex.tags \
|
||||||
@ -19,16 +21,19 @@ SYS_DATA_FILES = \
|
|||||||
data/html_entities.tags \
|
data/html_entities.tags \
|
||||||
$(srcdir)/data/filetypes.* \
|
$(srcdir)/data/filetypes.* \
|
||||||
data/filetype_extensions.conf \
|
data/filetype_extensions.conf \
|
||||||
data/snippets.conf
|
data/snippets.conf \
|
||||||
|
data/ui_toolbar.xml
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
autogen.sh \
|
autogen.sh \
|
||||||
wscript \
|
wscript \
|
||||||
|
waf \
|
||||||
geany.desktop.in \
|
geany.desktop.in \
|
||||||
geany.pc.in \
|
geany.pc.in \
|
||||||
geany.spec \
|
geany.spec \
|
||||||
geany.glade \
|
geany.glade \
|
||||||
geany.gladep \
|
geany.gladep \
|
||||||
|
ChangeLog.pre-0-17 \
|
||||||
HACKING \
|
HACKING \
|
||||||
README.I18N \
|
README.I18N \
|
||||||
README.Packagers \
|
README.Packagers \
|
||||||
@ -57,7 +62,7 @@ install-data-local:
|
|||||||
$(INSTALL_DATA) $(srcdir)/pixmaps/geany.png $(DESTDIR)$(datadir)/pixmaps; \
|
$(INSTALL_DATA) $(srcdir)/pixmaps/geany.png $(DESTDIR)$(datadir)/pixmaps; \
|
||||||
fi
|
fi
|
||||||
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir); \
|
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir); \
|
||||||
$(INSTALL_DATA) $(srcdir)/data/global.tags $(DESTDIR)$(pkgdatadir); \
|
$(INSTALL_DATA) $(srcdir)/data/c99.tags $(DESTDIR)$(pkgdatadir); \
|
||||||
$(INSTALL_DATA) $(srcdir)/data/php.tags $(DESTDIR)$(pkgdatadir); \
|
$(INSTALL_DATA) $(srcdir)/data/php.tags $(DESTDIR)$(pkgdatadir); \
|
||||||
$(INSTALL_DATA) $(srcdir)/data/python.tags $(DESTDIR)$(pkgdatadir); \
|
$(INSTALL_DATA) $(srcdir)/data/python.tags $(DESTDIR)$(pkgdatadir); \
|
||||||
$(INSTALL_DATA) $(srcdir)/data/pascal.tags $(DESTDIR)$(pkgdatadir); \
|
$(INSTALL_DATA) $(srcdir)/data/pascal.tags $(DESTDIR)$(pkgdatadir); \
|
||||||
|
196
NEWS
@ -1,3 +1,199 @@
|
|||||||
|
Geany 0.16 (February 15, 2009)
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
* Fix indenting for Tabs & Spaces mode when inserting snippets.
|
||||||
|
* Fix snippets and smart indent using too much indentation when the
|
||||||
|
line contains whitespace after non-whitespace characters (#2215044).
|
||||||
|
* Fix segfault when showing Find in Files dialog when no documents are
|
||||||
|
open (#2228544).
|
||||||
|
* Fix not switching to 2nd last used document when the last used
|
||||||
|
document has been closed (#1945162).
|
||||||
|
|
||||||
|
General:
|
||||||
|
* Group child tags by their parents in the symbol list for C-like
|
||||||
|
filetypes, Python, Conf (thanks to Conrad Steenberg).
|
||||||
|
* Use a tree for the Documents sidebar, grouped by path.
|
||||||
|
* Add 'Tools->Configuration Files' menu with items to open
|
||||||
|
filetype_extensions.conf and ignore.tags. These files are also
|
||||||
|
reloaded automatically when saved.
|
||||||
|
* Change configuration directory path to $XDG_CONFIG_HOME/geany
|
||||||
|
(most often this is ~/.config/geany).
|
||||||
|
* Allow to specify files on the command line and from remote instances
|
||||||
|
to be URIs (local and with GIO also remote URIs).
|
||||||
|
* Increase minimum required GTK version to 2.8.
|
||||||
|
|
||||||
|
Prefs:
|
||||||
|
* Add Project Indentation prefs, which override the Editor
|
||||||
|
Preferences dialog options. For new projects, these default to
|
||||||
|
the editor indent prefs.
|
||||||
|
* Add an interface pref for whether to hide additional widgets when
|
||||||
|
double-clicking on document notebook tabs (off by default).
|
||||||
|
* Add a preference to invert all colours for syntax highlighting.
|
||||||
|
* Add a hidden preference "allow_always_save" to make the Save buttons
|
||||||
|
and menu items always sensitive.
|
||||||
|
|
||||||
|
Interface:
|
||||||
|
* Rework the toolbar: now all elements can be added/removed/reordered
|
||||||
|
using a simple XML file.
|
||||||
|
* Add new toolbar buttons for Cut, Copy, Paste, Delete, Preferences,
|
||||||
|
Close All and Build (including a submenu for Make actions).
|
||||||
|
* Add a progressbar widget to the statusbar to show progress for time
|
||||||
|
consuming actions.
|
||||||
|
|
||||||
|
Editor:
|
||||||
|
* Make Ctrl-click go to matching brace if there's no current word.
|
||||||
|
* Make Shift+Mouse wheel scroll the editor view horizontally.
|
||||||
|
* Make the 'Mark' button for Find highlight the results with rounded boxes
|
||||||
|
instead of marking the whole line.
|
||||||
|
* Add auto-closing of braces, brackets and quotes (Guillaume de Rorthais).
|
||||||
|
* Support multiple %cursor% wildcards in Snippets (Thomas Martitz).
|
||||||
|
|
||||||
|
Filetypes:
|
||||||
|
* Add new filetypes Ada, CMake, Matlab, NSIS, Vala and YAML.
|
||||||
|
* Update HTML character entities (thanks to Tyler D'Agosta).
|
||||||
|
* Parse restructuredText sections in the order of first-used underline
|
||||||
|
character, which can now be any punctuation character (as per the spec).
|
||||||
|
* Remove GTK global tags, replace them with C (C99) tags. The GTK tags
|
||||||
|
file is still available for download on the website.
|
||||||
|
* Minor improvements for filetypes CSS, Fortran, FreeBasic, HTML, Tcl
|
||||||
|
and Vala.
|
||||||
|
|
||||||
|
Windows:
|
||||||
|
* Improve tab close icon size.
|
||||||
|
* Changes to the Windows installer:
|
||||||
|
- The full installer now includes the GTK 2.14 runtime environment.
|
||||||
|
- Register ".geany" as Geany Project File extension.
|
||||||
|
- Install GTK translation files only if installation of translation
|
||||||
|
files were requested (saves about 22 MB otherwise).
|
||||||
|
- Support silent installations.
|
||||||
|
|
||||||
|
Plugins:
|
||||||
|
* Add Split Window 'Split Vertically' command (thanks to Moritz Barsnick).
|
||||||
|
* Make Version Diff plugin set the indent type for diffs based on the
|
||||||
|
current file's indent type.
|
||||||
|
* Minor improvements to the filebrowser plugin
|
||||||
|
|
||||||
|
Plugin API:
|
||||||
|
* Generate plugin API header geanyfunctions.h containing macros to
|
||||||
|
avoid having to type the function pointer names manually.
|
||||||
|
* Deprecate pluginmacros.h in favour of geanyfunctions.h.
|
||||||
|
* Add "editor-notify" to the plugin API.
|
||||||
|
* Add new plugin symbol plugin_help() which is called by Geany when the
|
||||||
|
plugin should show its documentation (if any, symbol is optional).
|
||||||
|
|
||||||
|
Documentation:
|
||||||
|
* Update Scintilla regular expression info for v1.77 (character
|
||||||
|
classes, ASCII escaping, character sets containing square
|
||||||
|
brackets peculiarities). Adapted from SciTE doc.
|
||||||
|
* Complete 'Hello World' Plugin Howto.
|
||||||
|
|
||||||
|
Internationalisation:
|
||||||
|
* Updated translations: bg, ca, cs, de, en_GB, fr, hu, it, ja,
|
||||||
|
pt_BR, sv, ru, tr, vi, zh_CN
|
||||||
|
|
||||||
|
|
||||||
|
Geany 0.15 (October 19, 2008)
|
||||||
|
|
||||||
|
General:
|
||||||
|
* Add Previous Message, Previous Error commands (thanks also to Beau
|
||||||
|
Barker).
|
||||||
|
* Add 'Close Other Documents' File menu command (#1976724).
|
||||||
|
* Add Find Document Usage popup menu command & keybinding.
|
||||||
|
* Check that the current file is still on disk (as well as checking the
|
||||||
|
modification time).
|
||||||
|
* Add support for custom file templates (found at startup) in the
|
||||||
|
~/.geany/templates/files directory, shown underneath filetype templates
|
||||||
|
in the New with Template menu.
|
||||||
|
* Make socket open command support filename:line:column syntax.
|
||||||
|
* Add filetypes.* [build_settings] key 'error_regex' to support custom
|
||||||
|
error message parsing using a GNU-style extended regular expression.
|
||||||
|
* Allow loading projects from command line (#1961083).
|
||||||
|
* Add alternative build system: Waf.
|
||||||
|
* Add Tools menu item to reload configuration data without a restart.
|
||||||
|
* Add support to use template wildcards in snippets.
|
||||||
|
* Increase LSB compliance.
|
||||||
|
|
||||||
|
Prefs:
|
||||||
|
* Make disk check timeout configurable (zero disables disk checks).
|
||||||
|
* Add search pref: 'Use the current file's directory for Find in Files'
|
||||||
|
(#1930435).
|
||||||
|
|
||||||
|
Interface:
|
||||||
|
* Make keyboard shortcuts dialog non-modal (#1999384).
|
||||||
|
* Add a debug messages window to easily view debug messages/warnings.
|
||||||
|
|
||||||
|
Editor:
|
||||||
|
* Update Scintilla to version 1.77 (includes many fixes).
|
||||||
|
* Add basic Line Breaking option in the Document menu and 'Line breaking
|
||||||
|
column' editor pref (for now only works when typing characters past
|
||||||
|
the line breaking column number).
|
||||||
|
* Don't colourise any documents until they need to be drawn (this
|
||||||
|
should make opening a session faster for filetypes that support typename
|
||||||
|
highlighting).
|
||||||
|
* Make Ctrl-click on a word perform Go to Tag Definition.
|
||||||
|
* Add 'Max. symbol name suggestions' autocompletion pref.
|
||||||
|
* Show ellipsis (...) item when there are too many symbol names for
|
||||||
|
autocompletion.
|
||||||
|
* Highlight matching brace indent guides (thanks to Jason Oster;
|
||||||
|
#2104099).
|
||||||
|
* Show brace indent guides on empty lines when appropriate (thanks to
|
||||||
|
Jason Oster; #2105982).
|
||||||
|
* Add 'Tab key indents' pref, on by default.
|
||||||
|
* Implement soft tabs support (#1662173). There's now a 'Tabs & Spaces'
|
||||||
|
Indent Type, and separate Width, Hard Tab Width indent prefs. (Thanks
|
||||||
|
to Joerg Desch for explaining how it needed to work).
|
||||||
|
* Auto-update the line margin width as lines are added (thanks to Jason
|
||||||
|
Oster; #2129157).
|
||||||
|
* Add "Replace spaces by tabs".
|
||||||
|
|
||||||
|
Windows:
|
||||||
|
* Install plugins into lib/ not into plugins/.
|
||||||
|
* Install Geany's message catalogs into share/locale rather than
|
||||||
|
lib/locale as GTK does since 2.12.2.
|
||||||
|
|
||||||
|
Keybindings:
|
||||||
|
* Add Go to Start/End of Line keybindings (#1996175).
|
||||||
|
* Add 'Switch to Compiler' keybinding (useful when checking build
|
||||||
|
progress).
|
||||||
|
* Add keybindings for Line wrapping, Line breaking, Toggle fold and
|
||||||
|
Replace Spaces by tabs, Previous/Next word part.
|
||||||
|
|
||||||
|
Filetypes:
|
||||||
|
* Add OpenGL Shader Language (GLSL) filetype (thanks to Colomban
|
||||||
|
Wendling; #2060961).
|
||||||
|
* Add R language filetype (thanks to Andrew Rowland; #2121502).
|
||||||
|
* Split filetype Fortran into Fortran 77 and Fortran 90.
|
||||||
|
* Add Gettext translation filetype (#2131985).
|
||||||
|
* CSS improvements, thanks to Jason Oster.
|
||||||
|
|
||||||
|
Embedded Terminal:
|
||||||
|
* Fix hang when restarting the VTE (#1990323) with VTE 0.16.14.
|
||||||
|
(Note that with VTE 0.16.14 the reset sometimes leaves a blank
|
||||||
|
terminal, but pressing enter makes it then behave as normal).
|
||||||
|
|
||||||
|
Plugins:
|
||||||
|
* Add Split Window plugin (should work OK for viewing; full editing
|
||||||
|
support is not implemented yet).
|
||||||
|
* Merge InstantSave, AutoSave and BackupCopy plugins into the new
|
||||||
|
plugin 'Save Actions'.
|
||||||
|
|
||||||
|
Documentation:
|
||||||
|
* Add Tips and Tricks appendix.
|
||||||
|
* Updated Installation section.
|
||||||
|
* Update 'Build system' for custom error regexes.
|
||||||
|
* Add a section for internal plugins.
|
||||||
|
|
||||||
|
Plugin API:
|
||||||
|
* Many changes; see the API documentation (make api-doc) and the
|
||||||
|
geany-devel list archives.
|
||||||
|
* Deprecated: plugin_fields, plugin_info symbols.
|
||||||
|
|
||||||
|
Internationalisation:
|
||||||
|
* New translations: ko, tr.
|
||||||
|
* Updated translations: be, ca, de, en_GB, fi, hu, it, ja, pl,
|
||||||
|
ro, ru, sv, zh_CN
|
||||||
|
|
||||||
|
|
||||||
Geany 0.14 (April 19, 2008)
|
Geany 0.14 (April 19, 2008)
|
||||||
|
|
||||||
General:
|
General:
|
||||||
|
4
README
@ -28,7 +28,7 @@ The basic features of Geany are:
|
|||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
For compiling Geany yourself, you will need the GTK (>= 2.6.0) libraries
|
For compiling Geany yourself, you will need the GTK (>= 2.8.0) libraries
|
||||||
and header files. You will also need its dependency libraries and header
|
and header files. You will also need its dependency libraries and header
|
||||||
files, such as Pango, Glib and ATK. All these files are available at
|
files, such as Pango, Glib and ATK. All these files are available at
|
||||||
http://www.gtk.org.
|
http://www.gtk.org.
|
||||||
@ -102,7 +102,7 @@ file.
|
|||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
2005-2008 by Enrico Tröger, Nick Treleaven and Frank Lanitz
|
2005-2009 by Enrico Tröger, Nick Treleaven and Frank Lanitz
|
||||||
enrico(dot)troeger(at)uvena(dot)de
|
enrico(dot)troeger(at)uvena(dot)de
|
||||||
nick(dot)treleaven(at)btinternet(dot)com
|
nick(dot)treleaven(at)btinternet(dot)com
|
||||||
frank(at)frank(dot)uvena(dot)de
|
frank(at)frank(dot)uvena(dot)de
|
||||||
|
@ -20,6 +20,9 @@ text editor (like Geany ;-)) or you can also use a graphical
|
|||||||
interface. I can suggest PoEdit (http://www.poedit.net/), but
|
interface. I can suggest PoEdit (http://www.poedit.net/), but
|
||||||
there are several other GUIs.
|
there are several other GUIs.
|
||||||
|
|
||||||
|
Make sure you add your language to the file po/LINGUAS.
|
||||||
|
Just open the file with a text editor and add your code.
|
||||||
|
|
||||||
When you have finished editing the file, check the file with:
|
When you have finished editing the file, check the file with:
|
||||||
|
|
||||||
$ msgfmt -c --check-accelerators=_ it.po
|
$ msgfmt -c --check-accelerators=_ it.po
|
||||||
@ -27,7 +30,7 @@ $ msgfmt -c --check-accelerators=_ it.po
|
|||||||
Please take care of menu accelerators(strings containing a "_").
|
Please take care of menu accelerators(strings containing a "_").
|
||||||
The "_" character should also be in your translation. Additionally,
|
The "_" character should also be in your translation. Additionally,
|
||||||
it would be nice if these accelerators are not twice for two strings
|
it would be nice if these accelerators are not twice for two strings
|
||||||
inside on dialog or sub menu.
|
inside a dialog or sub menu.
|
||||||
|
|
||||||
You can also use intl_stats.sh, e.g. by running the following command
|
You can also use intl_stats.sh, e.g. by running the following command
|
||||||
in the top source directory of Geany:
|
in the top source directory of Geany:
|
||||||
|
@ -81,7 +81,7 @@ list to stay informed about major changes and of course, new releases.
|
|||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
2008 by Enrico Tröger, Nick Treleaven and Frank Lanitz
|
2008-2009 by Enrico Tröger, Nick Treleaven and Frank Lanitz
|
||||||
enrico(dot)troeger(at)uvena(dot)de
|
enrico(dot)troeger(at)uvena(dot)de
|
||||||
nick(dot)treleaven(at)btinternet(dot)com
|
nick(dot)treleaven(at)btinternet(dot)com
|
||||||
frank(at)frank(dot)uvena(dot)de
|
frank(at)frank(dot)uvena(dot)de
|
||||||
|
24
THANKS
@ -50,6 +50,19 @@ Timothy Boronczyk <tboronczyk(at)gmail(dot)com> - scroll_stop_at_last_line GUI p
|
|||||||
Jason Oster <parasytic(at)users(dot)sourceforge(dot)net> - various patches
|
Jason Oster <parasytic(at)users(dot)sourceforge(dot)net> - various patches
|
||||||
Andrew Rowland <weibullguy(at)charter(dot)net> - R filetype patch
|
Andrew Rowland <weibullguy(at)charter(dot)net> - R filetype patch
|
||||||
Lex Trotman <elextr(at)gmail(dot)com> - build system improvements
|
Lex Trotman <elextr(at)gmail(dot)com> - build system improvements
|
||||||
|
Bronisław Białek <after89(at)gmail(dot)com> - CSS parser update
|
||||||
|
Roland Baudin <roland(dot)baudin(at)thalesaleniaspace(dot)com> - Matlab filetype patch
|
||||||
|
Conrad Steenberg <gnocci-man(at)users(dot)sourceforge(dot)net> - symbol tree patch
|
||||||
|
Herbert Voss <voss(at)perce(dot)de> - LaTeX file template
|
||||||
|
Moritz Barsnick <barsnick(at)users(dot)sourceforge(dot)net> - Split Vertically command
|
||||||
|
Tyler D'Agosta - Add missing HTML entities
|
||||||
|
Walery Studennikov <despairr(at)gmail(dot)com> - YAML filetype patch
|
||||||
|
Guillaume de Rorthais <ioguix(at)free(dot)fr> - Auto-close brackets/braces/quotes patch
|
||||||
|
Tyler Mulligan <tyler(at)doknowevil(dot)net> - Close All toolbar icon
|
||||||
|
Philipp Gildein <philipp(at)gildein(dot)com> - Ada filetype patch
|
||||||
|
Thomas Martitz <thomas47(at)arcor(dot)de> - Multiple %cursor% wildcards in Snippets patch
|
||||||
|
David Gleich <dgleich(at)stanford(dot)edu> - Send Selection to Terminal patch
|
||||||
|
Chris Macksey <cmacksey(at)users(dot)sourceforge(dot)net> - ActionScript filetype patch
|
||||||
|
|
||||||
Translators:
|
Translators:
|
||||||
------------
|
------------
|
||||||
@ -59,19 +72,24 @@ Dilyan Rusev <dilyanrusev(at)gmail(dot)com> - bg
|
|||||||
Toni Garcia-Navarro <topi(at)elpiset(dot)net> - ca_ES
|
Toni Garcia-Navarro <topi(at)elpiset(dot)net> - ca_ES
|
||||||
Petr Messner <messa(at)messa(dot)cz> - cs_CZ
|
Petr Messner <messa(at)messa(dot)cz> - cs_CZ
|
||||||
Anna Talianova <anickat1(at)gmail(dot)com> - cs_CZ
|
Anna Talianova <anickat1(at)gmail(dot)com> - cs_CZ
|
||||||
|
Karel Kolman <kolmis(at)gmail(dot)com> - cs_CZ
|
||||||
Frank Lanitz <frank(at)frank(dot)uvena(dot)de> - de_DE
|
Frank Lanitz <frank(at)frank(dot)uvena(dot)de> - de_DE
|
||||||
Dominic Hopf <dmaphy(at)googlemail(dotcom> - de_DE
|
Dominic Hopf <dmaphy(at)googlemail(dot)com> - de_DE
|
||||||
Stavros Temertzidis <bullgr(at)gmail(dot)com> - el
|
Stavros Temertzidis <bullgr(at)gmail(dot)com> - el
|
||||||
Jeff Bailes <thepizzaking(at)gmail(dot)com - en_GB
|
Jeff Bailes <thepizzaking(at)gmail(dot)com - en_GB
|
||||||
Damián Viano <debian(at)damianv(dot)com(dot)ar> - es
|
Damián Viano <debian(at)damianv(dot)com(dot)ar> - es
|
||||||
|
Antonio Jiménez González <tonificante(at)hotmail(dot)com> - es
|
||||||
Nacho Cabanes <ncabanes(at)gmail(dot)com> - es
|
Nacho Cabanes <ncabanes(at)gmail(dot)com> - es
|
||||||
Harri Koskinen <harri(at)fastmonkey(dot)org> - fi_FI
|
Harri Koskinen <harri(at)fastmonkey(dot)org> - fi
|
||||||
|
Jari Rahkonen <jari(dot)rahkonen(at)pp1(dot)inet(dot)fi> - fi
|
||||||
Jean-Philippe Moal <skateinmars(at)skateinmars(dot)net> - fr
|
Jean-Philippe Moal <skateinmars(at)skateinmars(dot)net> - fr
|
||||||
|
Roland Baudin <roland(dot)baudin(at)thalesaleniaspace(dot)com> - fr
|
||||||
Gabor Kmetyko aka kilo <kg_kilo(at)freemail(dot)hu> - hu
|
Gabor Kmetyko aka kilo <kg_kilo(at)freemail(dot)hu> - hu
|
||||||
M.Baldinelli <m(dot)baldinelli(at)agora(dot)it> - it
|
M.Baldinelli <m(dot)baldinelli(at)agora(dot)it> - it
|
||||||
Dario Santomarco <dariello(at)yahoo(dot)it> - it
|
Dario Santomarco <dariello(at)yahoo(dot)it> - it
|
||||||
Tarot Osuji <tarot(at)sdf(dot)lonestar(dot)org> - ja
|
Tarot Osuji <tarot(at)sdf(dot)lonestar(dot)org> - ja
|
||||||
Chikahiro Masami <cmasa(dot)z321(at)gmail(dot)com> - ja
|
Chikahiro Masami <cmasa(dot)z321(at)gmail(dot)com> - ja
|
||||||
|
Park Jang-heon <dotkabi(at)gmail(dot)com> - ko
|
||||||
Kurt De Bree <kdebree(at)telenet(dot)be> - nl
|
Kurt De Bree <kdebree(at)telenet(dot)be> - nl
|
||||||
Jacek Wolszczak <shutdownrunner(at)o2(dot)pl> - pl_PL
|
Jacek Wolszczak <shutdownrunner(at)o2(dot)pl> - pl_PL
|
||||||
Jarosław Foksa <jfoksa(at)gmail(dot)com> - pl_PL
|
Jarosław Foksa <jfoksa(at)gmail(dot)com> - pl_PL
|
||||||
@ -82,6 +100,8 @@ Alex Eftimie <alex(at)rosedu(dot)org> - ro
|
|||||||
brahmann_ <brahmann(at)pisem(dot)net> - ru_RU
|
brahmann_ <brahmann(at)pisem(dot)net> - ru_RU
|
||||||
Nikita E. Shalaev <nshalaev(at)eu(dot)spb(dot)ru> - ru_RU
|
Nikita E. Shalaev <nshalaev(at)eu(dot)spb(dot)ru> - ru_RU
|
||||||
stat.c <Static-Const(at)yandex(dot)ru> - ru_RU
|
stat.c <Static-Const(at)yandex(dot)ru> - ru_RU
|
||||||
|
Andrew Drynov <adryno(at)gmail(dot)com> - ru_RU
|
||||||
|
John Wehin <john(dot)wehin(at)gmail(dot)com> - ru_RU
|
||||||
Tony Mattsson <superxorn(at)gmail(dot)com> - sv
|
Tony Mattsson <superxorn(at)gmail(dot)com> - sv
|
||||||
Gürkan Gür <seqizz(at)gmail(dot)com - tr
|
Gürkan Gür <seqizz(at)gmail(dot)com - tr
|
||||||
Boris Dibrov <dibrov(dot)bor(at)gmail(dot)com> - uk
|
Boris Dibrov <dibrov(dot)bor(at)gmail(dot)com> - uk
|
||||||
|
6
TODO
@ -3,7 +3,6 @@ TODO List:
|
|||||||
Note: features included in brackets have lower priority.
|
Note: features included in brackets have lower priority.
|
||||||
|
|
||||||
Fix bugs:
|
Fix bugs:
|
||||||
o fix bug that prevents UTF-16, UTF-32 files from being loaded
|
|
||||||
o tagmanager fails on UTF-16/32
|
o tagmanager fails on UTF-16/32
|
||||||
|
|
||||||
|
|
||||||
@ -14,8 +13,6 @@ Note: features included in brackets have lower priority.
|
|||||||
o configurable filetype and project make commands (e.g. using
|
o configurable filetype and project make commands (e.g. using
|
||||||
bud for D)
|
bud for D)
|
||||||
o recent projects menu
|
o recent projects menu
|
||||||
o project indentation settings support
|
|
||||||
o improve Compile toolbar button for Make (drop down radio list?)
|
|
||||||
o MRU documents switching
|
o MRU documents switching
|
||||||
o (support for adding plugin filetypes - SCI_LOADLEXERLIBRARY?)
|
o (support for adding plugin filetypes - SCI_LOADLEXERLIBRARY?)
|
||||||
o (selectable menu of arguments to use for Make, from Make Custom)
|
o (selectable menu of arguments to use for Make, from Make Custom)
|
||||||
@ -33,13 +30,10 @@ Note: features included in brackets have lower priority.
|
|||||||
target...)
|
target...)
|
||||||
o (tango-like icons for the symbol list)
|
o (tango-like icons for the symbol list)
|
||||||
o (show autocompletion symbol icons - see SCI_REGISTERIMAGE)
|
o (show autocompletion symbol icons - see SCI_REGISTERIMAGE)
|
||||||
o (GFileMonitor support, if/when GIO gets merged with GLib)
|
|
||||||
|
|
||||||
|
|
||||||
1.0:
|
1.0:
|
||||||
o generating tags for latex/pascal/php
|
o generating tags for latex/pascal/php
|
||||||
o include standard library tags only for C global.tags (offer
|
|
||||||
separate GTK tags file for download)
|
|
||||||
o stable plugin ABI for the 1.0 series? (Split up geany_data, prefs,
|
o stable plugin ABI for the 1.0 series? (Split up geany_data, prefs,
|
||||||
GeanyKeyCommand enum into groups)
|
GeanyKeyCommand enum into groups)
|
||||||
o review documentation
|
o review documentation
|
||||||
|
12
autogen.sh
@ -34,9 +34,19 @@ DIE=0
|
|||||||
DIE=1
|
DIE=1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(libtoolize --version) < /dev/null > /dev/null 2>&1 || {
|
||||||
|
(glibtoolize --version) < /dev/null > /dev/null 2>&1 || {
|
||||||
|
echo
|
||||||
|
echo "**Error**: You must have \`libtool' installed."
|
||||||
|
echo "You can get it from:"
|
||||||
|
echo " http://www.gnu.org/software/libtool/"
|
||||||
|
DIE=1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
||||||
echo
|
echo
|
||||||
echo "**Error**: You must have \`automake' installed."
|
echo "**Error**: You must have \`automake' (1.7 or later) installed."
|
||||||
echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
|
echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
|
||||||
DIE=1
|
DIE=1
|
||||||
NO_AUTOMAKE=yes
|
NO_AUTOMAKE=yes
|
||||||
|
15
configure.in
@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
|
|||||||
dnl $Id$
|
dnl $Id$
|
||||||
|
|
||||||
AC_INIT(configure.in)
|
AC_INIT(configure.in)
|
||||||
AM_INIT_AUTOMAKE(geany, 0.15)
|
AM_INIT_AUTOMAKE(geany, 0.17)
|
||||||
|
|
||||||
AM_CONFIG_HEADER(config.h)
|
AM_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
@ -128,10 +128,18 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# GTK checks
|
# GTK checks
|
||||||
gtk_modules="gtk+-2.0 >= 2.6.0"
|
gtk_modules="gtk+-2.0 >= 2.8.0"
|
||||||
PKG_CHECK_MODULES(GTK, [$gtk_modules])
|
PKG_CHECK_MODULES(GTK, [$gtk_modules])
|
||||||
AC_SUBST(GTK_CFLAGS)
|
AC_SUBST(GTK_CFLAGS)
|
||||||
AC_SUBST(GTK_LIBS)
|
AC_SUBST(GTK_LIBS)
|
||||||
|
# GIO checks
|
||||||
|
gio_modules="gio-2.0 >= 2.16"
|
||||||
|
PKG_CHECK_MODULES(GIO, [$gio_modules], have_gio=1, have_gio=0)
|
||||||
|
AC_SUBST(GIO_CFLAGS)
|
||||||
|
AC_SUBST(GIO_LIBS)
|
||||||
|
if test $have_gio = 1 ; then
|
||||||
|
AC_DEFINE(HAVE_GIO, 1, [Whether GIO is available])
|
||||||
|
fi
|
||||||
|
|
||||||
# --disable-deprecated switch for GTK2 purification
|
# --disable-deprecated switch for GTK2 purification
|
||||||
AC_ARG_ENABLE(deprecated, [ --disable-deprecated Disable deprecated GTK functions. ],
|
AC_ARG_ENABLE(deprecated, [ --disable-deprecated Disable deprecated GTK functions. ],
|
||||||
@ -165,7 +173,8 @@ case "${host}" in
|
|||||||
])
|
])
|
||||||
AC_DEFINE_UNQUOTED([WIN32], 1, [we are cross compiling for WIN32])
|
AC_DEFINE_UNQUOTED([WIN32], 1, [we are cross compiling for WIN32])
|
||||||
want_vte="no"
|
want_vte="no"
|
||||||
want_socket="no"
|
want_socket="yes"
|
||||||
|
AC_DEFINE(HAVE_SOCKET, 1, [Define if you want to detect a running instance])
|
||||||
AC_EXEEXT
|
AC_EXEEXT
|
||||||
AM_CONDITIONAL(MINGW, true)
|
AM_CONDITIONAL(MINGW, true)
|
||||||
;;
|
;;
|
||||||
|
1618
data/c99.tags
Normal file
@ -5,11 +5,10 @@
|
|||||||
#See Geany's main documentation for details.
|
#See Geany's main documentation for details.
|
||||||
[Extensions]
|
[Extensions]
|
||||||
ASM=*.asm;
|
ASM=*.asm;
|
||||||
C=*.c;
|
Ada=*.adb;*.ads;
|
||||||
H=*.h;
|
C=*.c;*.h;
|
||||||
C++=*.cpp;*.cxx;*.c++;*.cc;*.C;
|
C++=*.cpp;*.cxx;*.c++;*.cc;*.h;*.hpp;*.hxx;*.h++;*.hh;*.C;
|
||||||
H++=*.hpp;*.h;*.hxx;*.h++;*.hh;
|
C#=*.cs;
|
||||||
C#=*.cs;*.vala;
|
|
||||||
CAML=*.ml;*.mli;
|
CAML=*.ml;*.mli;
|
||||||
D=*.d;*.di;
|
D=*.d;*.di;
|
||||||
F77=*.f;*.for;*.ftn;*.f77;
|
F77=*.f;*.for;*.ftn;*.f77;
|
||||||
@ -18,14 +17,16 @@ FreeBasic=*.bas;*.bi;
|
|||||||
GLSL=*.glsl;*.frag;*.vert;
|
GLSL=*.glsl;*.frag;*.vert;
|
||||||
Haskell=*.hs;*.lhs;
|
Haskell=*.hs;*.lhs;
|
||||||
Haxe=*.hx;
|
Haxe=*.hx;
|
||||||
|
ActionScript=*.as;
|
||||||
Java=*.java;*.jsp;
|
Java=*.java;*.jsp;
|
||||||
Pascal=*.pas;*.pp;*.inc;*.dpr;*.dpk;
|
Pascal=*.pas;*.pp;*.inc;*.dpr;*.dpk;
|
||||||
|
Vala=*.vala;*.vapi;
|
||||||
VHDL=*.vhd;*.vhdl;
|
VHDL=*.vhd;*.vhdl;
|
||||||
Ferite=*.fe;
|
Ferite=*.fe;
|
||||||
Javascript=*.js;
|
Javascript=*.js;
|
||||||
Lua=*.lua;
|
Lua=*.lua;
|
||||||
Make=*.mak;*.mk;GNUmakefile;makefile;Makefile;makefile.*;Makefile.*;
|
Make=*.mak;*.mk;GNUmakefile;makefile;Makefile;makefile.*;Makefile.*;
|
||||||
O-Matrix=*.oms;
|
Matlab=*.m;
|
||||||
Perl=*.pl;*.perl;*.pm;*.agi;*.pod;
|
Perl=*.pl;*.perl;*.pm;*.agi;*.pod;
|
||||||
PHP=*.php;*.php3;*.php4;*.php5;*.phtml;
|
PHP=*.php;*.php3;*.php4;*.php5;*.phtml;
|
||||||
Python=*.py;*.pyw;
|
Python=*.py;*.pyw;
|
||||||
@ -37,10 +38,13 @@ CSS=*.css;
|
|||||||
Docbook=*.docbook;
|
Docbook=*.docbook;
|
||||||
HTML=*.htm;*.html;*.shtml;*.hta;*.htd;*.htt;*.cfm;
|
HTML=*.htm;*.html;*.shtml;*.hta;*.htd;*.htt;*.cfm;
|
||||||
XML=*.xml;*.sgml;*.xsl;*.xslt;*.xsd;*.xhtml;
|
XML=*.xml;*.sgml;*.xsl;*.xslt;*.xsd;*.xhtml;
|
||||||
Conf=*.conf;*.ini;config;*rc;*.cfg;
|
CMake=CMakeLists.txt;*.cmake;*.ctest;
|
||||||
|
Conf=*.conf;*.ini;config;*rc;*.cfg;*.desktop;
|
||||||
Diff=*.diff;*.patch;*.rej;
|
Diff=*.diff;*.patch;*.rej;
|
||||||
|
NSIS=*.nsi;*.nsh;
|
||||||
|
Po=*.po;*.pot;
|
||||||
LaTeX=*.tex;*.sty;*.idx;*.ltx;
|
LaTeX=*.tex;*.sty;*.idx;*.ltx;
|
||||||
reStructuredText=*.rest;*.reST;*.rst;
|
reStructuredText=*.rest;*.reST;*.rst;
|
||||||
SQL=*.sql;
|
SQL=*.sql;
|
||||||
Po=*.po;*.pot;
|
YAML=*.yaml;*.yml;
|
||||||
None=*;
|
None=*;
|
||||||
|
18
data/filetypes.h → data/filetypes.actionscript
Executable file → Normal file
@ -21,20 +21,16 @@ commentlinedoc=0x3f5fbf;0xffffff;true;false
|
|||||||
commentdockeyword=0x3f5fbf;0xffffff;true;true
|
commentdockeyword=0x3f5fbf;0xffffff;true;true
|
||||||
commentdockeyworderror=0x3f5fbf;0xffffff;false;false
|
commentdockeyworderror=0x3f5fbf;0xffffff;false;false
|
||||||
globalclass=0x0000d0;0xffffff;true;false
|
globalclass=0x0000d0;0xffffff;true;false
|
||||||
# whether arguments of preprocessor commands should be styled (only first argument is used)
|
|
||||||
# 1 to enable, 0 to disable
|
|
||||||
styling_within_preprocessor=1;0;false;false
|
|
||||||
|
|
||||||
[keywords]
|
[keywords]
|
||||||
# all items must be in one line
|
# all items must be in one line
|
||||||
primary=volatile default export goto sizeof typename asm enum bool union NULL FALSE TRUE typedef struct char int float double void unsigned signed long short extern static register auto const if else switch for while do break continue return inline case
|
primary=break case catch class const continue default do dynamic each else extends false final finally for function get if implements import in include Infinity int interface internal label namespace NaN native new null override package private protected public return set static super switch this throw true try typeof uint undefined var while with void
|
||||||
secondary=
|
secondary=arguments decodeURI decodeURIcomponent encodeURI encodeURIcomponent escape isFinite isNaN isXMLName parseFloat parseInt trace unescape
|
||||||
# these are some doxygen keywords (incomplete)
|
classes=ArgumentError Array Boolean Class Date DefinitionError Error EvalError Function Math NameSpace Null Number Object QName RangeError ReferenceError RegExp SecurityError String SyntaxError TypeError URIError Vector VerifyError XML XMLList
|
||||||
docComment=attention author brief bug class code date def enum example exception file fn namespace note param remarks return see since struct throw todo typedef var version warning union
|
|
||||||
|
|
||||||
[settings]
|
[settings]
|
||||||
# default extension used when saving files
|
# default extension used when saving files
|
||||||
#extension=c
|
#extension=as
|
||||||
|
|
||||||
# the following characters are these which a "word" can contains, see documentation
|
# the following characters are these which a "word" can contains, see documentation
|
||||||
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
|
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
|
||||||
@ -42,9 +38,6 @@ docComment=attention author brief bug class code date def enum example exception
|
|||||||
# if only single comment char is supported like # in this file, leave comment_close blank
|
# if only single comment char is supported like # in this file, leave comment_close blank
|
||||||
comment_open=//
|
comment_open=//
|
||||||
comment_close=
|
comment_close=
|
||||||
# this is an alternative way, so multiline comments are used
|
|
||||||
#comment_open=/*
|
|
||||||
#comment_close=*/
|
|
||||||
|
|
||||||
# set to false if a comment character/string should start at column 0 of a line, true uses any
|
# set to false if a comment character/string should start at column 0 of a line, true uses any
|
||||||
# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d
|
# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d
|
||||||
@ -61,8 +54,7 @@ context_action_cmd=
|
|||||||
# %f will be replaced by the complete filename
|
# %f will be replaced by the complete filename
|
||||||
# %e will be replaced by the filename without extension
|
# %e will be replaced by the filename without extension
|
||||||
# (use only one of it at one time)
|
# (use only one of it at one time)
|
||||||
compiler=gcc -Wall -c "%f"
|
compiler=
|
||||||
linker=
|
|
||||||
run_cmd=
|
run_cmd=
|
||||||
|
|
||||||
|
|
@ -27,7 +27,7 @@ styling_within_preprocessor=1;0;false;false
|
|||||||
|
|
||||||
[keywords]
|
[keywords]
|
||||||
# all items must be in one line
|
# all items must be in one line
|
||||||
primary=volatile default export goto sizeof typename asm enum bool union NULL FALSE TRUE typedef struct char int float double void unsigned signed long short extern static register auto const if else switch for while do break continue return class new delete inline case
|
primary=asm auto break case char const continue default do double else enum extern float for goto if inline int long register return short signed sizeof static struct switch typedef union unsigned void volatile while FALSE NULL TRUE
|
||||||
secondary=
|
secondary=
|
||||||
# these are some doxygen keywords (incomplete)
|
# these are some doxygen keywords (incomplete)
|
||||||
docComment=attention author brief bug class code date def enum example exception file fn namespace note param remarks return see since struct throw todo typedef var version warning union
|
docComment=attention author brief bug class code date def enum example exception file fn namespace note param remarks return see since struct throw todo typedef var version warning union
|
||||||
|
47
data/filetypes.cmake
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
# For complete documentation of this file, please see Geany's main documentation
|
||||||
|
[styling]
|
||||||
|
# foreground;background;bold;italic
|
||||||
|
default=0x000000;0xffffff;false;false;
|
||||||
|
comment=0x808080;0xffffff;false;false;
|
||||||
|
stringdq=0xff901e;0xffffff;false;false;
|
||||||
|
stringlq=0x008000;0xffffff;false;false;
|
||||||
|
stringrq=0x008000;0xffffff;false;false;
|
||||||
|
command=0x00007f;0xffffff;false;false;
|
||||||
|
parameters=0x991111;0xffffff;false;false;
|
||||||
|
variable=0x007f7f;0xffffff;false;false;
|
||||||
|
userdefined=0x0000d0;0xffffff;true;false;
|
||||||
|
whiledef=0x00007f;0xffffff;true;false;
|
||||||
|
foreachdef=0x00007f;0xffffff;true;false;
|
||||||
|
ifdefinedef=0x00007f;0xffffff;true;false;
|
||||||
|
macrodef=0x00007f;0xffffff;true;false;
|
||||||
|
stringvar=0x007f7f;0xffffff;false;false;
|
||||||
|
number=0x007f00;0xffffff;false;false;
|
||||||
|
|
||||||
|
[keywords]
|
||||||
|
# all items must be in one line
|
||||||
|
commands=add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory build_command build_name cmake_minimum_required configure_file create_test_sourcelist else elseif enable_language enable_testing endforeach endif endmacro endwhile exec_program execute_process export_library_dependencies file find_file find_library find_package find_path find_program fltk_wrap_ui foreach get_cmake_property get_directory_property get_filename_component get_source_file_property get_target_property get_test_property if include include_directories include_external_msproject include_regular_expression install install_files install_programs install_targets link_directories link_libraries list load_cache load_command macro make_directory mark_as_advanced math message option output_required_files project qt_wrap_cpp qt_wrap_ui remove remove_definitions separate_arguments set set_directory_properties set_source_files_properties set_target_properties set_tests_properties site_name source_group string subdir_depends subdirs target_link_libraries try_compile try_run use_mangled_mesa utility_source variable_requires vtk_make_instantiator vtk_wrap_java vtk_wrap_python vtk_wrap_tcl while write_file
|
||||||
|
parameters=ABSOLUTE ABSTRACT ADDITIONAL_MAKE_CLEAN_FILES ALL AND APPEND APPLE ARGS ASCII BEFORE BORLAND CACHE CACHE_VARIABLES CLEAR CMAKE_COMPILER_2005 COMMAND COMMAND_NAME COMMANDS COMMENT COMPARE COMPILE_FLAGS COPYONLY CYGWIN DEFINED DEFINE_SYMBOL DEPENDS DOC EQUAL ESCAPE_QUOTES EXCLUDE EXCLUDE_FROM_ALL EXISTS EXPORT_MACRO EXT EXTRA_INCLUDE FATAL_ERROR FILE FILES FORCE FUNCTION GENERATED GLOB GLOB_RECURSE GREATER GROUP_SIZE HEADER_FILE_ONLY HEADER_LOCATION IMMEDIATE INCLUDE_DIRECTORIES INCLUDE_INTERNALS INCLUDE_REGULAR_EXPRESSION INCLUDES LESS LINK_DIRECTORIES LINK_FLAGS LOCATION MACOSX_BUNDLE MACROS MAIN_DEPENDENCY MAKE_DIRECTORY MATCH MATCHALL MATCHES MINGW MODULE MSVC MSVC60 MSVC70 MSVC71 MSVC80 MSVC_IDE MSYS NAME NAME_WE NO_SYSTEM_PATH NOT NOTEQUAL OBJECT_DEPENDS OFF ON OPTIONAL OR OUTPUT OUTPUT_VARIABLE PATH PATHS POST_BUILD POST_INSTALL_SCRIPT PRE_BUILD PREFIX PRE_INSTALL_SCRIPT PRE_LINK PREORDER PROGRAM PROGRAM_ARGS PROPERTIES QUIET RANGE READ REGEX REGULAR_EXPRESSION REPLACE REQUIRED RETURN_VALUE RUNTIME_DIRECTORY SEND_ERROR SHARED SOURCES STATIC STATUS STREQUAL STRGREATER STRLESS SUFFIX TARGET TOLOWER TOUPPER VAR VARIABLES VERSION WATCOM WIN32 WRAP_EXCLUDE WRITE
|
||||||
|
userdefined=
|
||||||
|
|
||||||
|
|
||||||
|
[settings]
|
||||||
|
# default extension used when saving files
|
||||||
|
#extension=cmake
|
||||||
|
|
||||||
|
# the following characters are these which a "word" can contains, see documentation
|
||||||
|
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
|
||||||
|
|
||||||
|
# if only single comment char is supported like # in this file, leave comment_close blank
|
||||||
|
comment_open=#
|
||||||
|
comment_close=
|
||||||
|
|
||||||
|
# set to false if a comment character/string should start at column 0 of a line, true uses any
|
||||||
|
# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d
|
||||||
|
#command_example();
|
||||||
|
# setting to false would generate this
|
||||||
|
# command_example();
|
||||||
|
# This setting works only for single line comments
|
||||||
|
comment_use_indent=true
|
||||||
|
|
||||||
|
# context action command (please see Geany's main documentation for details)
|
||||||
|
context_action_cmd=
|
@ -5,7 +5,7 @@ default=0x000000;0xffffff;false;false
|
|||||||
|
|
||||||
# 3rd selection argument is true to override default foreground
|
# 3rd selection argument is true to override default foreground
|
||||||
# 4th selection argument is true to override default background
|
# 4th selection argument is true to override default background
|
||||||
selection=0xc0c0c0;0x7f0000;false;false
|
selection=0x000000;0xc0c0c0;false;false
|
||||||
|
|
||||||
# style for a matching brace
|
# style for a matching brace
|
||||||
brace_good=0x0000ff;0xFFFFFF;true;false
|
brace_good=0x0000ff;0xFFFFFF;true;false
|
||||||
@ -51,7 +51,7 @@ indent_guide=0xc0c0c0;0xffffff;false;false
|
|||||||
|
|
||||||
# third argument: if true, use this foreground color. If false, use the default value defined by the filetypes.
|
# third argument: if true, use this foreground color. If false, use the default value defined by the filetypes.
|
||||||
# fourth argument: if true, use this background color. If false, use the default value defined by the filetypes.
|
# fourth argument: if true, use this background color. If false, use the default value defined by the filetypes.
|
||||||
white_space=0xc0c0c0;0xffffff;true;true
|
white_space=0xc0c0c0;0xffffff;true;false
|
||||||
|
|
||||||
# style of folding icons, only first and second arguments are used, valid values are:
|
# style of folding icons, only first and second arguments are used, valid values are:
|
||||||
# first argument: 1 for boxes, 2 for circles
|
# first argument: 1 for boxes, 2 for circles
|
||||||
|
@ -14,17 +14,27 @@ doublestring=0x330066;0xffffff;false;false
|
|||||||
singlestring=0x330066;0xffffff;false;false
|
singlestring=0x330066;0xffffff;false;false
|
||||||
attribute=0x007f00;0xffffff;false;false
|
attribute=0x007f00;0xffffff;false;false
|
||||||
value=0x303030;0xffffff;false;false
|
value=0x303030;0xffffff;false;false
|
||||||
id=0x7f0000;0xffffff;false;false
|
id=0xff9000;0xffffff;true;false
|
||||||
identifier2=0x6b6bff;0xffffff;false;false
|
identifier2=0x6b6bff;0xffffff;true;false
|
||||||
important=0xff0000;0xffffff;false;false
|
important=0x990000;0xffffff;true;false
|
||||||
directive=0x006bff;0xffffff;false;true
|
directive=0x006bff;0xffffff;false;true
|
||||||
|
identifier3=0x00c8ff;0xffffff;true;false
|
||||||
|
pseudoelement=0x666610;0xffffff;true;true
|
||||||
|
extended_identifier=0x9090a0;0xffffff;true;false
|
||||||
|
extended_pseudoclass=0x907080;0xffffff;true;true
|
||||||
|
extended_pseudoelement=0x909080;0xffffff;true;true
|
||||||
|
|
||||||
[keywords]
|
[keywords]
|
||||||
# CSS 1 keywords
|
# CSS 1 properties
|
||||||
primary=color background-color background-image background-repeat background-attachment background-position background font-family font-style font-variant font-weight font-size font word-spacing letter-spacing text-decoration vertical-align text-transform text-align text-indent line-height margin-top margin-right margin-bottom margin-left margin padding-top padding-right padding-bottom padding-left padding border-top-width border-right-width border-bottom-width border-left-width border-width border-top border-right border-bottom border-left border border-color border-style width height float clear display white-space list-style-type list-style-image list-style-position list-style
|
primary=background background-attachment background-color background-image background-position background-repeat border border-bottom border-bottom-width border-color border-left border-left-width border-right border-right-width border-style border-top border-top-width border-width clear color display float font font-family font-size font-style font-variant font-weight height letter-spacing line-height list-style list-style-image list-style-position list-style-type margin margin-bottom margin-left margin-right margin-top padding padding-bottom padding-left padding-right padding-top text-align text-decoration text-indent text-transform vertical-align white-space width word-spacing
|
||||||
# CSS 2 keywords
|
# CSS 2 properties
|
||||||
secondary=border-top-color border-right-color border-bottom-color border-left-color border-color border-top-style border-right-style border-bottom-style border-left-style border-style top right bottom left position z-index direction unicode-bidi min-width max-width min-height max-height overflow clip visibility content quotes counter-reset counter-increment marker-offset size marks page-break-before page-break-after page-break-inside page orphans widows font-stretch font-size-adjust unicode-range units-per-em src panose-1 stemv stemh slope cap-height x-height ascent descent widths bbox definition-src baseline centerline mathline topline text-shadow caption-side table-layout border-collapse border-spacing empty-cells speak-header cursor outline outline-width outline-style outline-color volume speak pause-before pause-after pause cue-before cue-after cue play-during azimuth elevation speech-rate voice-family pitch pitch-range stress richness speak-punctuation speak-numeral
|
secondary=azimuth border-bottom-color border-bottom-style border-collapse border-left-color border-left-style border-right-color border-right-style border-spacing border-top-color border-top-style bottom caption-side clip content counter-increment counter-reset cue cue-after cue-before cursor direction elevation empty-cells font-size-adjust font-stretch left max-height max-width min-height min-width orphans outline outline-color outline-style outline-width overflow page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position quotes richness right speak speak-header speak-numeral speak-punctuation speech-rate stress table-layout top unicode-bidi visibility voice-family volume widows z-index
|
||||||
pseudoclasses=first-letter first-line link active visited lang first-child focus hover before after left right first
|
css3_properties=alignment-adjust alignment-baseline appearance ascent background-break background-clip background-origin background-size baseline baseline-shift bbox bookmark-label bookmark-level bookmark-target border-bottom-left-radius border-bottom-right-radius border-break border-image border-length border-radius border-top-left-radius border-top-right-radius box-align box-direction box-flex box-flex-group box-lines box-orient box-pack box-shadow box-sizing box-sizing cap-height centerline column-break-after column-break-before column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width columns column-span column-width crop definition-src descent dominant-baseline drop-initial-after-adjust drop-initial-after-align drop-initial-before-adjust drop-initial-before-align drop-initial-size drop-initial-value fit fit-position float-offset font-effect font-emphasize font-emphasize-position font-emphasize-style font-size-adjust font-smooth hanging-punctuation hyphenate-after hyphenate-before hyphenate-character hyphenate-lines hyphenate-resource hyphens icon image-orientation image-resolution inline-box-align line-stacking line-stacking-ruby line-stacking-shift line-stacking-strategy mark mark-after mark-before marks marquee-direction marquee-loop marquee-speed marquee-style mathline move-to nav-down nav-index nav-left nav-right nav-up opacity outline-offset overflow-style overflow-x overflow-y page page-policy panose-1 phonemes presentation-level punctuation-trim resize rest rest-after rest-before rotation rotation-point ruby-align ruby-overhang ruby-position ruby-span size slope src stemh stemv string-set tab-side target target-name target-new target-position text-align-last text-emphasis text-height text-indent text-justify text-outline text-replace text-shadow text-wrap topline unicode-range units-per-em voice-balance voice-duration voice-pitch voice-pitch-range voice-rate voice-stress voice-volume white-space-collapse widths word-break word-wrap x-height
|
||||||
|
pseudoclasses=active after before checked current disabled empty enabled first-child first-letter first-line first-of-type focus hover lang last-of-type link not nth-child nth-last-child nth-last-of-type nth-of-type only-child only-of-type root target visited
|
||||||
|
pseudo_elements=after before choices first-letter first-line line-marker marker outside repeat-index repeat-item selection slot value
|
||||||
|
browser_css_properties=
|
||||||
|
browser_pseudo_classes=
|
||||||
|
browser_pseudo_elements=
|
||||||
|
|
||||||
|
|
||||||
[settings]
|
[settings]
|
||||||
@ -32,7 +42,7 @@ pseudoclasses=first-letter first-line link active visited lang first-child focus
|
|||||||
#extension=css
|
#extension=css
|
||||||
|
|
||||||
# the following characters are these which a "word" can contains, see documentation
|
# the following characters are these which a "word" can contains, see documentation
|
||||||
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
|
#wordchars=_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
|
||||||
|
|
||||||
# if only single comment char is supported like # in this file, leave comment_close blank
|
# if only single comment char is supported like # in this file, leave comment_close blank
|
||||||
comment_open=/*
|
comment_open=/*
|
||||||
|
@ -8,6 +8,7 @@ header=0x7f0000;0xffffff;false;false
|
|||||||
position=0x00007f;0xffffff;false;false
|
position=0x00007f;0xffffff;false;false
|
||||||
deleted=0xff2727;0xffffff;false;false
|
deleted=0xff2727;0xffffff;false;false
|
||||||
added=0x34b034;0xffffff;false;false
|
added=0x34b034;0xffffff;false;false
|
||||||
|
changed=0x7f007f;0xffffff;false;false
|
||||||
|
|
||||||
|
|
||||||
[settings]
|
[settings]
|
||||||
|
@ -21,7 +21,7 @@ label=0xa861a8;0xffffff;true;false
|
|||||||
|
|
||||||
[keywords]
|
[keywords]
|
||||||
# all items must be in one line
|
# all items must be in one line
|
||||||
primary=access action advance allocatable allocate apostrophe assign assignment associate asynchronous backspace bind blank blockdata call case character class close common complex contains continue cycle data deallocate decimal delim default dimension direct do dowhile double doubleprecision elemental else elseif elsewhere encoding end endassociate endblockdata enddo endfile endforall endfunction endif endinterface endmodule endprogram endselect endsubroutine endtype endwhere entry eor equivalence err errmsg exist exit external file flush fmt forall form format formatted function go goto id if implicit in include inout integer inquire intent interface intrinsic iomsg iolength iostat kind len logical module name named namelist nextrec nml none nullify number only open opened operator optional out pad parameter pass pause pending pointer pos position precision print private procedure program protected public quote pure read readwrite real rec recl recursive result return rewind save select selectcase selecttype sequential sign size stat status stop stream subroutine target then to type unformatted unit use value volatile wait where while write
|
primary=access action advance allocatable allocate apostrophe assign assignment associate asynchronous backspace bind blank blockdata call case character class close common complex contains continue cycle data deallocate decimal delim default dimension direct do dowhile double doubleprecision elemental else elseif elsewhere encoding end endassociate endblockdata enddo endfile endforall endfunction endif endinterface endmodule endprogram endselect endsubroutine endtype endwhere entry eor equivalence err errmsg exist exit extends external file flush fmt forall form format formatted function go goto id if implicit in include inout integer inquire intent interface intrinsic iomsg iolength iostat kind len logical module name named namelist nextrec nml none nullify number only open opened operator optional out pad parameter pass pause pending pointer pos position precision print private procedure program protected public quote pure read readwrite real rec recl recursive result return rewind save select selectcase selecttype sequential sign size stat status stop stream subroutine target then to type unformatted unit use value volatile wait where while write
|
||||||
intrinsic_functions=abs achar acos acosd adjustl adjustr aimag aimax0 aimin0 aint ajmax0 ajmin0 akmax0 akmin0 all allocated alog alog10 amax0 amax1 amin0 amin1 amod anint any asin asind associated atan atan2 atan2d atand bitest bitl bitlr bitrl bjtest bit_size bktest break btest cabs ccos cdabs cdcos cdexp cdlog cdsin cdsqrt ceiling cexp char clog cmplx conjg cos cosd cosh count cpu_time cshift csin csqrt dabs dacos dacosd dasin dasind datan datan2 datan2d datand date date_and_time dble dcmplx dconjg dcos dcosd dcosh dcotan ddim dexp dfloat dflotk dfloti dflotj digits dim dimag dint dlog dlog10 dmax1 dmin1 dmod dnint dot_product dprod dreal dsign dsin dsind dsinh dsqrt dtan dtand dtanh eoshift epsilon errsns exp exponent float floati floatj floatk floor fraction free huge iabs iachar iand ibclr ibits ibset ichar idate idim idint idnint ieor ifix iiabs iiand iibclr iibits iibset iidim iidint iidnnt iieor iifix iint iior iiqint iiqnnt iishft iishftc iisign ilen imax0 imax1 imin0 imin1 imod index inint inot int int1 int2 int4 int8 iqint iqnint ior ishft ishftc isign isnan izext jiand jibclr jibits jibset jidim jidint jidnnt jieor jifix jint jior jiqint jiqnnt jishft jishftc jisign jmax0 jmax1 jmin0 jmin1 jmod jnint jnot jzext kiabs kiand kibclr kibits kibset kidim kidint kidnnt kieor kifix kind kint kior kishft kishftc kisign kmax0 kmax1 kmin0 kmin1 kmod knint knot kzext lbound leadz len len_trim lenlge lge lgt lle llt log log10 logical lshift malloc matmul max max0 max1 maxexponent maxloc maxval merge min min0 min1 minexponent minloc minval mod modulo mvbits nearest nint not nworkers number_of_processors pack popcnt poppar precision present product radix random random_number random_seed range real repeat reshape rrspacing rshift scale scan secnds selected_int_kind selected_real_kind set_exponent shape sign sin sind sinh size sizeof sngl snglq spacing spread sqrt sum system_clock tan tand tanh tiny transfer transpose trim ubound unpack verify
|
intrinsic_functions=abs achar acos acosd adjustl adjustr aimag aimax0 aimin0 aint ajmax0 ajmin0 akmax0 akmin0 all allocated alog alog10 amax0 amax1 amin0 amin1 amod anint any asin asind associated atan atan2 atan2d atand bitest bitl bitlr bitrl bjtest bit_size bktest break btest cabs ccos cdabs cdcos cdexp cdlog cdsin cdsqrt ceiling cexp char clog cmplx conjg cos cosd cosh count cpu_time cshift csin csqrt dabs dacos dacosd dasin dasind datan datan2 datan2d datand date date_and_time dble dcmplx dconjg dcos dcosd dcosh dcotan ddim dexp dfloat dflotk dfloti dflotj digits dim dimag dint dlog dlog10 dmax1 dmin1 dmod dnint dot_product dprod dreal dsign dsin dsind dsinh dsqrt dtan dtand dtanh eoshift epsilon errsns exp exponent float floati floatj floatk floor fraction free huge iabs iachar iand ibclr ibits ibset ichar idate idim idint idnint ieor ifix iiabs iiand iibclr iibits iibset iidim iidint iidnnt iieor iifix iint iior iiqint iiqnnt iishft iishftc iisign ilen imax0 imax1 imin0 imin1 imod index inint inot int int1 int2 int4 int8 iqint iqnint ior ishft ishftc isign isnan izext jiand jibclr jibits jibset jidim jidint jidnnt jieor jifix jint jior jiqint jiqnnt jishft jishftc jisign jmax0 jmax1 jmin0 jmin1 jmod jnint jnot jzext kiabs kiand kibclr kibits kibset kidim kidint kidnnt kieor kifix kind kint kior kishft kishftc kisign kmax0 kmax1 kmin0 kmin1 kmod knint knot kzext lbound leadz len len_trim lenlge lge lgt lle llt log log10 logical lshift malloc matmul max max0 max1 maxexponent maxloc maxval merge min min0 min1 minexponent minloc minval mod modulo mvbits nearest nint not nworkers number_of_processors pack popcnt poppar precision present product radix random random_number random_seed range real repeat reshape rrspacing rshift scale scan secnds selected_int_kind selected_real_kind set_exponent shape sign sin sind sinh size sizeof sngl snglq spacing spread sqrt sum system_clock tan tand tanh tiny transfer transpose trim ubound unpack verify
|
||||||
user_functions=cdabs cdcos cdexp cdlog cdsin cdsqrt cotan cotand dcmplx dconjg dcotan dcotand decode dimag dll_export dll_import doublecomplex dreal dvchk encode find flen flush getarg getcharqq getcl getdat getenv gettim hfix ibchng identifier imag int1 int2 int4 intc intrup invalop iostat_msg isha ishc ishl jfix lacfar locking locnear map nargs nbreak ndperr ndpexc offset ovefl peekcharqq precfill prompt qabs qacos qacosd qasin qasind qatan qatand qatan2 qcmplx qconjg qcos qcosd qcosh qdim qexp qext qextd qfloat qimag qlog qlog10 qmax1 qmin1 qmod qreal qsign qsin qsind qsinh qsqrt qtan qtand qtanh ran rand randu rewrite segment setdat settim system timer undfl unlock union val virtual volatile zabs zcos zexp zlog zsin zsqrt
|
user_functions=cdabs cdcos cdexp cdlog cdsin cdsqrt cotan cotand dcmplx dconjg dcotan dcotand decode dimag dll_export dll_import doublecomplex dreal dvchk encode find flen flush getarg getcharqq getcl getdat getenv gettim hfix ibchng identifier imag int1 int2 int4 intc intrup invalop iostat_msg isha ishc ishl jfix lacfar locking locnear map nargs nbreak ndperr ndpexc offset ovefl peekcharqq precfill prompt qabs qacos qacosd qasin qasind qatan qatand qatan2 qcmplx qconjg qcos qcosd qcosh qdim qexp qext qextd qfloat qimag qlog qlog10 qmax1 qmin1 qmod qreal qsign qsin qsind qsinh qsqrt qtan qtand qtanh ran rand randu rewrite segment setdat settim system timer undfl unlock union val virtual volatile zabs zcos zexp zlog zsin zsqrt
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ user_functions=cdabs cdcos cdexp cdlog cdsin cdsqrt cotan cotand dcmplx dconjg d
|
|||||||
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
|
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
|
||||||
|
|
||||||
# if only single comment char is supported like # in this file, leave comment_close blank
|
# if only single comment char is supported like # in this file, leave comment_close blank
|
||||||
comment_open=c
|
comment_open=!
|
||||||
comment_close=
|
comment_close=
|
||||||
|
|
||||||
# set to false if a comment character/string should start at column 0 of a line, true uses any
|
# set to false if a comment character/string should start at column 0 of a line, true uses any
|
||||||
|
@ -1,67 +0,0 @@
|
|||||||
# For complete documentation of this file, please see Geany's main documentation
|
|
||||||
[styling]
|
|
||||||
# foreground;background;bold;italic
|
|
||||||
default=0x000000;0xffffff;false;false
|
|
||||||
comment=0xd00000;0xffffff;false;false
|
|
||||||
commentline=0xd00000;0xffffff;false;false
|
|
||||||
commentdoc=0x3f5fbf;0xffffff;false;false
|
|
||||||
number=0x007f00;0xffffff;false;false
|
|
||||||
word=0x00007f;0xffffff;true;false
|
|
||||||
word2=0x991111;0xffffff;true;false
|
|
||||||
string=0xff901e;0xffffff;false;false
|
|
||||||
character=0xff901e;0xffffff;false;false
|
|
||||||
uuid=0x404080;0xffffff;false;false
|
|
||||||
preprocessor=0x007F7F;0xffffff;false;false
|
|
||||||
operator=0x301010;0xffffff;false;false
|
|
||||||
identifier=0x000000;0xffffff;false;false
|
|
||||||
stringeol=0x000000;0xe0c0e0;false;false
|
|
||||||
verbatim=0x101030;0xffffff;false;false
|
|
||||||
regex=0x105090;0xffffff;false;false
|
|
||||||
commentlinedoc=0x3f5fbf;0xffffff;true;false
|
|
||||||
commentdockeyword=0x3f5fbf;0xffffff;true;true
|
|
||||||
commentdockeyworderror=0x3f5fbf;0xffffff;false;false
|
|
||||||
globalclass=0x0000d0;0xffffff;true;false
|
|
||||||
# whether arguments of preprocessor commands should be styled (only first argument is used)
|
|
||||||
# 1 to enable, 0 to disable
|
|
||||||
styling_within_preprocessor=1;0;false;false
|
|
||||||
|
|
||||||
[keywords]
|
|
||||||
# all items must be in one line
|
|
||||||
primary=and and_eq asm auto bitand bitor bool break case catch char class compl const const_cast continue default delete do double dynamic_cast else enum explicit export extern false float for friend goto if inline int long mutable namespace new not not_eq operator or or_eq private protected public register reinterpret_cast return short signed sizeof static static_cast struct switch template this throw true try typedef typeid typename union unsigned using virtual void volatile wchar_t while xor xor_eq
|
|
||||||
secondary=
|
|
||||||
# these are some doxygen keywords (incomplete)
|
|
||||||
docComment=attention author brief bug class code date def enum example exception file fn namespace note param remarks return see since struct throw todo typedef var version warning union
|
|
||||||
|
|
||||||
[settings]
|
|
||||||
# default extension used when saving files
|
|
||||||
#extension=cpp
|
|
||||||
|
|
||||||
# the following characters are these which a "word" can contains, see documentation
|
|
||||||
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
|
|
||||||
|
|
||||||
# if only single comment char is supported like # in this file, leave comment_close blank
|
|
||||||
comment_open=//
|
|
||||||
comment_close=
|
|
||||||
# this is an alternative way, so multiline comments are used
|
|
||||||
#comment_open=/*
|
|
||||||
#comment_close=*/
|
|
||||||
|
|
||||||
# set to false if a comment character/string should start at column 0 of a line, true uses any
|
|
||||||
# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d
|
|
||||||
#command_example();
|
|
||||||
# setting to false would generate this
|
|
||||||
# command_example();
|
|
||||||
# This setting works only for single line comments
|
|
||||||
comment_use_indent=true
|
|
||||||
|
|
||||||
# context action command (please see Geany's main documentation for details)
|
|
||||||
context_action_cmd=
|
|
||||||
|
|
||||||
[build_settings]
|
|
||||||
# %f will be replaced by the complete filename
|
|
||||||
# %e will be replaced by the filename without extension
|
|
||||||
# (use only one of it at one time)
|
|
||||||
compiler=g++ -Wall -c "%f"
|
|
||||||
linker=
|
|
||||||
run_cmd=
|
|
||||||
|
|
@ -9,7 +9,7 @@ comment=0x007f00;0xffffff;false;true
|
|||||||
|
|
||||||
[keywords]
|
[keywords]
|
||||||
# all items must be in one line
|
# all items must be in one line
|
||||||
primary=above abovedisplayshortskip abovedisplayskip abovewithdelims accent adjdemerits advance afterassignment aftergroup atop atopwithdelims badness baselineskip batchmode begingroup begin belowdisplayshortskip belowdisplayskip binoppenalty botmark box boxmaxdepth brokenpenalty catcode char chardef cleaders closein closeout clubpenalty copy count countdef cr crcr csname day deadcycles def defaulthyphenchar defaultskewchar delcode delimiter delimiterfactor delimeters delimitershortfall delimeters dimen dimendef discretionary displayindent displaylimits displaystyle displaywidowpenalty displaywidth divide doublehyphendemerits dp dump edef else emergencystretch end endcsname endgroup endinput endlinechar eqno errhelp errmessage errorcontextlines errorstopmode escapechar everycr everydisplay everyhbox everyjob everymath everypar everyvbox exhyphenpenalty expandafter fam fi finalhyphendemerits firstmark floatingpenalty font fontdimen fontname futurelet gdef global group globaldefs halign hangafter hangindent hbadness hbox hfil horizontal hfill horizontal hfilneg hfuzz hoffset holdinginserts hrule hsize hskip hss horizontal ht hyphenation hyphenchar hyphenpenalty hyphen if ifcase ifcat ifdim ifeof iffalse ifhbox ifhmode ifinner ifmmode ifnum ifodd iftrue ifvbox ifvmode ifvoid ifx ignorespaces immediate indent input inputlineno input insert insertpenalties interlinepenalty jobname kern language lastbox lastkern lastpenalty lastskip lccode leaders left lefthyphenmin leftskip leqno let limits linepenalty line lineskip lineskiplimit long looseness lower lowercase mag mark mathaccent mathbin mathchar mathchardef mathchoice mathclose mathcode mathinner mathop mathopen mathord mathpunct mathrel mathsurround maxdeadcycles maxdepth meaning medmuskip message mkern month moveleft moveright mskip multiply muskip muskipdef newlinechar noalign noboundary noexpand noindent nolimits nonscript scriptscript nonstopmode nulldelimiterspace nullfont number omit openin openout or outer output outputpenalty over overfullrule overline overwithdelims pagedepth pagefilllstretch pagefillstretch pagefilstretch pagegoal pageshrink pagestretch pagetotal par parfillskip parindent parshape parskip patterns pausing penalty postdisplaypenalty predisplaypenalty predisplaysize pretolerance prevdepth prevgraf radical raise read relax relpenalty right righthyphenmin rightskip romannumeral scriptfont scriptscriptfont scriptscriptstyle scriptspace scriptstyle scrollmode setbox setlanguage sfcode shipout show showbox showboxbreadth showboxdepth showlists showthe skewchar skip skipdef spacefactor spaceskip span special splitbotmark splitfirstmark splitmaxdepth splittopskip string subsection tabskip textfont textstyle the thickmuskip thinmuskip time toks toksdef tolerance topmark topskip tracingcommands tracinglostchars tracingmacros tracingonline tracingoutput tracingpages tracingparagraphs tracingrestores tracingstats uccode uchyph underline unhbox unhcopy unkern unpenalty unskip unvbox unvcopy uppercase vadjust valign vbadness vbox vcenter vfil vfill vfilneg vfuzz voffset vrule vsize vskip vsplit vss vtop wd widowpenalty write xdef xleaders xspaceskip year
|
primary=above abovedisplayshortskip abovedisplayskip abovewithdelims accent adjdemerits advance afterassignment aftergroup atop atopwithdelims badness baselineskip batchmode begin begingroup belowdisplayshortskip belowdisplayskip binoppenalty botmark box boxmaxdepth brokenpenalty catcode char chardef cleaders closein closeout clubpenalty copy count countdef cr crcr csname day deadcycles def defaulthyphenchar defaultskewchar delcode delimeters delimiter delimiterfactor delimitershortfall dimen dimendef discretionary displayindent displaylimits displaystyle displaywidowpenalty displaywidth divide doublehyphendemerits dp dump edef else emergencystretch end endcsname endgroup endinput endlinechar eqno errhelp errmessage errorcontextlines errorstopmode escapechar everycr everydisplay everyhbox everyjob everymath everypar everyvbox exhyphenpenalty expandafter fam fi finalhyphendemerits firstmark floatingpenalty font fontdimen fontname futurelet gdef global globaldefs group halign hangafter hangindent hbadness hbox hfil hfill hfilneg hfuzz hoffset holdinginserts horizontal hrule hsize hskip hss ht hyphen hyphenation hyphenchar hyphenpenalty if ifcase ifcat ifdim ifeof iffalse ifhbox ifhmode ifinner ifmmode ifnum ifodd iftrue ifvbox ifvmode ifvoid ifx ignorespaces immediate indent input inputlineno insert insertpenalties interlinepenalty jobname kern language lastbox lastkern lastpenalty lastskip lccode leaders left lefthyphenmin leftskip leqno let limits line linepenalty lineskip lineskiplimit long looseness lower lowercase mag mark mathaccent mathbin mathchar mathchardef mathchoice mathclose mathcode mathinner mathop mathopen mathord mathpunct mathrel mathsurround maxdeadcycles maxdepth meaning medmuskip message mkern month moveleft moveright mskip multiply muskip muskipdef newlinechar noalign noboundary noexpand noindent nolimits nonscript nonstopmode nulldelimiterspace nullfont number omit openin openout or outer output outputpenalty over overfullrule overline overwithdelims pagedepth pagefilllstretch pagefillstretch pagefilstretch pagegoal pageshrink pagestretch pagetotal par parfillskip parindent parshape parskip patterns pausing penalty postdisplaypenalty predisplaypenalty predisplaysize pretolerance prevdepth prevgraf radical raise read relax relpenalty right righthyphenmin rightskip romannumeral scriptfont scriptscript scriptscriptfont scriptscriptstyle scriptspace scriptstyle scrollmode setbox setlanguage sfcode shipout show showbox showboxbreadth showboxdepth showlists showthe skewchar skip skipdef spacefactor spaceskip span special splitbotmark splitfirstmark splitmaxdepth splittopskip string subsection tabskip textfont textstyle the thickmuskip thinmuskip time toks toksdef tolerance topmark topskip tracingcommands tracinglostchars tracingmacros tracingonline tracingoutput tracingpages tracingparagraphs tracingrestores tracingstats uccode uchyph underline unhbox unhcopy unkern unpenalty unskip unvbox unvcopy uppercase vadjust valign vbadness vbox vcenter vfil vfill vfilneg vfuzz voffset vrule vsize vskip vsplit vss vtop wd widowpenalty write xdef xleaders xspaceskip year
|
||||||
|
|
||||||
|
|
||||||
[settings]
|
[settings]
|
||||||
|
@ -2,31 +2,28 @@
|
|||||||
[styling]
|
[styling]
|
||||||
# foreground;background;bold;italic
|
# foreground;background;bold;italic
|
||||||
default=0x000000;0xffffff;false;false
|
default=0x000000;0xffffff;false;false
|
||||||
commentline=0x909090;0xffffff;false;false
|
comment=0x808080;0xffffff;false;false
|
||||||
|
command=0x111199;0xffffff;true;false
|
||||||
number=0x007f00;0xffffff;false;false
|
number=0x007f00;0xffffff;false;false
|
||||||
word=0x991111;0xffffff;false;false
|
keyword=0x001a7f;0xffffff;true;false
|
||||||
string=0xff901e;0xffffff;false;false
|
string=0xff901e;0xffffff;false;false
|
||||||
character=0x404000;0xffffff;false;false
|
operator=0x301010;0xffffff;false;false
|
||||||
operator=0x000000;0xffffff;false;false
|
|
||||||
identifier=0x000000;0xffffff;false;false
|
identifier=0x000000;0xffffff;false;false
|
||||||
backticks=0x000000;0xe0c0e0;false;false
|
doublequotedstring=0xff901e;0xffffff;false;false
|
||||||
param=0x991111;0x0000ff;false;false
|
|
||||||
scalar=0x0000ff;0xffffff;false;false
|
|
||||||
|
|
||||||
[keywords]
|
[keywords]
|
||||||
# all items must be in one line
|
# all items must be in one line
|
||||||
primary=clear seq fillcols fillrowsgaspect gaddview gtitle gxaxis gyaxis max contour gcolor gplot gaddview gxaxis gyaxis gcolor fill coldim gplot gtitle clear arcov dpss fspec cos gxaxis gyaxis gtitle gplot gupdate rowdim fill print for to begin end write cocreate coinvoke codispsave cocreate codispset copropput colsum sqrt adddialog addcontrol addcontrol delwin fillrows gaspect function conjdir
|
primary=break case catch continue else elseif end for function global if otherwise persistent return switch try while
|
||||||
|
|
||||||
|
|
||||||
[settings]
|
[settings]
|
||||||
# default extension used when saving files
|
# default extension used when saving files
|
||||||
#extension=oms
|
#extension=m
|
||||||
|
|
||||||
# the following characters are these which a "word" can contains, see documentation
|
# the following characters are these which a "word" can contains, see documentation
|
||||||
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
|
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
|
||||||
|
|
||||||
# if only single comment char is supported like # in this file, leave comment_close blank
|
# if only single comment char is supported like # in this file, leave comment_close blank
|
||||||
comment_open=#
|
comment_open=%
|
||||||
comment_close=
|
comment_close=
|
||||||
|
|
||||||
# set to false if a comment character/string should start at column 0 of a line, true uses any
|
# set to false if a comment character/string should start at column 0 of a line, true uses any
|
60
data/filetypes.nsis
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
# For complete documentation of this file, please see Geany's main documentation
|
||||||
|
[styling]
|
||||||
|
# foreground;background;bold;italic
|
||||||
|
default=0x000000;0xffffff;false;false;
|
||||||
|
comment=0x808080;0xffffff;false;false;
|
||||||
|
stringdq=0xff901e;0xffffff;false;false;
|
||||||
|
stringlq=0x008000;0xffffff;false;false;
|
||||||
|
stringrq=0x008000;0xffffff;false;false;
|
||||||
|
function=0x00007f;0xffffff;false;false;
|
||||||
|
variable=0x991111;0xffffff;false;false;
|
||||||
|
label=0x007f7f;0xffffff;false;false;
|
||||||
|
userdefined=0x0000d0;0xffffff;true;false;
|
||||||
|
sectiondef=0x00007f;0xffffff;true;false;
|
||||||
|
subsectiondef=0x00007f;0xffffff;true;false;
|
||||||
|
ifdefinedef=0x00007f;0xffffff;true;false;
|
||||||
|
macrodef=0x00007f;0xffffff;true;false;
|
||||||
|
stringvar=0x991111;0xffffff;false;false;
|
||||||
|
number=0x007f00;0xffffff;false;false;
|
||||||
|
sectiongroup=0x00007f;0xffffff;true;false;
|
||||||
|
pageex=0x00007f;0xffffff;true;false;
|
||||||
|
functiondef=0x00007f;0xffffff;true;false;
|
||||||
|
commentbox=0x808080;0xffffff;false;false;
|
||||||
|
|
||||||
|
|
||||||
|
[keywords]
|
||||||
|
# all items must be in one line and in lowercase
|
||||||
|
functions=abort addbrandingimage !addincludedir !addincludedirdir !addplugindir addsize addsizesize_to_add_to_section_in_kb allowrootdirinstall allowskipfiles !appendfile autoclosewindow bgfont bggradient brandingtext bringtofront call callinstdll caption captioninstaller_caption !cd changeui checkbitmap clearerrors completedtext componenttext contributors: copyfiles crccheck createdirectory createdirectorydirectory_name createfont createshortcut !define delete deleteinisec deleteinistr deleteregkey deleteregvalue !delfilefile detailprint detailprintmessage detailsbuttontext dirshow dirtext dirvar dirverify dirverifyauto !echo !echomessage !else enablewindow !endif enumregkey enumregvalue !error exch exec execshell !execute execwait expandenvstrings file filebufsize fileclose fileerrortext fileopen fileread filereadbyte fileseek filewrite filewritebyte findclose findfirst findnext findwindow flushini function functionend function_name getcurinsttype getcurrentaddress getcurrentaddressoutput getdlgitem getdllversion getdllversionlocal geterrorlevel getfiletime getfiletimelocal getfullpathname getfunctionaddress getinstdirerror getlabeladdress gettempfilename goto gotolabel hidewindow icon !if ifabort !ifdef iferrors iffileexists !ifmacrodef !ifmacrondef !ifndef ifrebootflag ifsilent !include initpluginsdir !insertmacro installbuttontext installcolors installdir installdirregkey instprogressflags insttype insttypegettext insttypesettext intcmp intcmpu intfmt intop iswindow langstring langstringup licensebkcolor licensedata licenseforceselection licenselangstring licensetext loadlanguagefile lockwindow logset logtext !macro !macroend makensis messagebox miscbuttontext name none nop outfile !packhdr page pagecallbacks pageex pageexend pop portions push pushstring quit readenvstr readinistr readregdword readregstr reboot regdll rename requestexecutionlevel reservefile return rmdir !searchparse searchpath !searchreplace section sectionend sectiongetflags sectiongetinsttypes sectiongetsize sectiongettext sectiongroup sectiongroupend sectionin sectionsetflags sectionsetinsttypes sectionsetsize sectionsettext sendmessage setautoclose setbrandingimage setcompress setcompressionlevel setcompressor setcompressordictsize setctlcolors setcurinsttype setdatablockoptimize setdatesave setdetailsprint setdetailsview seterrorlevel seterrors setfileattributes setfont setoutpath setoverwrite setpluginunload setrebootflag setregview setshellvarcontext setsilent showinstdetails showuninstdetails showwindow silentinstall silentuninstall sleep spacetexts strcmp strcmps strcpy strlen subcaption subsection subsectionend !system !tempfilesymbol !undef uninstallbuttontext uninstallcaption uninstallexename uninstallicon uninstallsubcaption uninstalltext uninstpage unregdll var !verbose viaddversionkey viproductversion !warning windowicon writeinistr writeregbin writeregdword writeregexpandstr writeregstr writeuninstaller xpstyle
|
||||||
|
variables=$$ $` $' $" $0 $0, $1 $2 $3 $4 $5 $6 $7 $8 $9 $admintools $appdata $cdburn_area $cmdline $commonfiles $cookies $desktop $documents $exedir $favorites $fonts $history $hwndparent $instdir $internet_cache $language $music $nethood ${nsisdir} $outdir $pictures $pluginsdir $printhood $profile $programfiles $quicklaunch $\r $r0 $r1 $r2 $r3 $r4 $r5 $r6 $r7 $r8 $r9 $recent $resources $resources_localized $sendto $smprograms $smstartup $startmenu $sysdir $temp $templates $varname $videos $windir
|
||||||
|
lables=all alt alwaysoff archive auto both bottom bzip2 center colored components control current custom directory dlg_id ext false file_attribute_archive file_attribute_hidden file_attribute_normal file_attribute_offline file_attribute_readonly file_attribute_system file_attribute_temporary filesonly force hidden hide hkcc hkcr hkcu hkdd hkey_classes_root hkey_current_config hkey_current_user hkey_dyn_data hkey_local_machine hkey_performance_data hkey_users hklm hkpd hku idabort idcancel idignore idno idok idretry idyes ifdiff ifnewer instfiles italic lastused leave left license listonly lzma manual mb_abortretryignore mb_defbutton1 mb_defbutton2 mb_defbutton3 mb_defbutton4 mb_iconexclamation mb_iconinformation mb_iconquestion mb_iconstop mb_ok mb_okcancel mb_retrycancel mb_right mb_setforeground mb_topmost mb_yesno mb_yesnocancel nevershow none nonfatal normal of off offline on open print readonly rebootok right shctx shift show silent silentlog smooth strike sw_hide sw_showmaximized sw_showmaximized sw_showminimized sw_showminimized sw_showminnoactive sw_showna sw_shownoactivate sw_shownormal sw_shownormal system temporary textonly top trim true try underline uninstconfirm zlib
|
||||||
|
userdefined=
|
||||||
|
|
||||||
|
|
||||||
|
[settings]
|
||||||
|
# default extension used when saving files
|
||||||
|
#extension=nsi
|
||||||
|
|
||||||
|
# the following characters are these which a "word" can contains, see documentation
|
||||||
|
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
|
||||||
|
|
||||||
|
# if only single comment char is supported like # in this file, leave comment_close blank
|
||||||
|
comment_open=;
|
||||||
|
comment_close=
|
||||||
|
|
||||||
|
# set to false if a comment character/string should start at column 0 of a line, true uses any
|
||||||
|
# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d
|
||||||
|
#command_example();
|
||||||
|
# setting to false would generate this
|
||||||
|
# command_example();
|
||||||
|
# This setting works only for single line comments
|
||||||
|
comment_use_indent=true
|
||||||
|
|
||||||
|
# context action command (please see Geany's main documentation for details)
|
||||||
|
context_action_cmd=
|
||||||
|
|
||||||
|
[build_settings]
|
||||||
|
# %f will be replaced by the complete filename
|
||||||
|
# %e will be replaced by the filename without extension
|
||||||
|
# (use only one of it at one time)
|
||||||
|
compiler=makensis "%f"
|
||||||
|
run_cmd="./%e"
|
@ -21,10 +21,10 @@ wordexpand=0x7f0000;0xffffff;true;false
|
|||||||
|
|
||||||
[keywords]
|
[keywords]
|
||||||
# all items must be in one line
|
# all items must be in one line
|
||||||
tcl=after append array auto_execok auto_import auto_load auto_load_index auto_qualify beep bgerror binary break case catch cd clock close concat continue dde default echo else elseif encoding eof error eval exec exit expr fblocked fconfigure fcopy file fileevent flush for foreach format gets glob global history http if incr info interp join lappend lindex linsert list llength load loadTk lrange lreplace lsearch lset lsort memory msgcat namespace open package pid pkg::create pkg_mkIndex Platform-specific proc puts pwd re_syntax read regexp registry regsub rename resource return scan seek set socket source split string subst switch tclLog tclMacPkgSearch tclPkgSetup tclPkgUnknown tell time trace unknown unset update uplevel upvar variable vwait while
|
tcl=after append apply array auto_execok auto_import auto_load auto_load_index auto_mkindex auto_mkindex_old auto_qualify auto_reset beep bgerror binary break case catch cd chan clock close concat continue dde default dict echo else elseif encoding eof error eval exec exit expr fblocked fconfigure fcopy file fileevent filename flush for foreach format gets glob global history http if incr info interp join lappend lassign lindex linsert list llength load loadTk lrange lrepeat lreplace lreverse lsearch lset lsort mathfunc mathop memory msgcat namespace open package parray pid pkg::create pkg_mkIndex platform platform::shell Platform-specific proc puts pwd read refchan regexp registry regsub rename resource re_syntax return Safe Base scan seek set socket source split string subst switch Tcl tcl_endOfWord tcl_findLibrary tclLog tclMacPkgSearch tclPkgSetup tclPkgUnknown tcl_startOfNextWord tcl_startOfPreviousWord tcltest tclvars tcl_wordBreakAfter tcl_wordBreakBefore tell time tm trace unknown unload unset update uplevel upvar variable vwait while
|
||||||
tk=bell bind bindtags bitmap button canvas checkbutton clipboard colors console cursors destroy entry event focus font frame grab grid image Inter-client keysyms label labelframe listbox lower menu menubutton message option options pack panedwindow photo place radiobutton raise scale scrollbar selection send spinbox text tk tk_chooseColor tk_chooseDirectory tk_dialog tk_focusNext tk_getOpenFile tk_messageBox tk_optionMenu tk_popup tk_setPalette tkerror tkvars tkwait toplevel winfo wish wm
|
tk=bell bind bindtags bitmap button canvas checkbutton clipboard colors console cursors destroy entry event focus font frame grab grid image Inter-client keysyms label labelframe listbox loadTk lower menu menubutton message option options pack panedwindow photo place radiobutton raise scale scrollbar selection send spinbox text toplevel winfo wish wm
|
||||||
itcl=@scope body class code common component configbody constructor define destructor hull import inherit itcl itk itk_component itk_initialize itk_interior itk_option iwidgets keep method private protected public
|
itcl=@scope body class code common component configbody constructor define destructor hull import inherit itcl itk itk_component itk_initialize itk_interior itk_option iwidgets keep method private protected public
|
||||||
tkcommands=tk_bisque tk_chooseColor tk_dialog tk_focusFollowsMouse tk_focusNext tk_focusPrev tk_getOpenFile tk_getSaveFile tk_messageBox tk_optionMenu tk_popup tk_setPalette tk_textCopy tk_textCut tk_textPaste tkButtonAutoInvoke tkButtonDown tkButtonEnter tkButtonInvoke tkButtonLeave tkButtonUp tkCancelRepeat tkCheckRadioDown tkCheckRadioEnter tkCheckRadioInvoke tkColorDialog tkColorDialog_BuildDialog tkColorDialog_CancelCmd tkColorDialog_Config tkColorDialog_CreateSelector tkColorDialog_DrawColorScale tkColorDialog_EnterColorBar tkColorDialog_HandleRGBEntry tkColorDialog_HandleSelEntry tkColorDialog_InitValues tkColorDialog_LeaveColorBar tkColorDialog_MoveSelector tkColorDialog_OkCmd tkColorDialog_RedrawColorBars tkColorDialog_RedrawFinalColor tkColorDialog_ReleaseMouse tkColorDialog_ResizeColorBars tkColorDialog_RgbToX tkColorDialog_SetRGBValue tkColorDialog_StartMove tkColorDialog_XToRgb tkConsoleAbout tkConsoleBind tkConsoleExit tkConsoleHistory tkConsoleInit tkConsoleInsert tkConsoleInvoke tkConsoleOutput tkConsolePrompt tkConsoleSource tkDarken tkEntryAutoScan tkEntryBackspace tkEntryButton1 tkEntryClosestGap tkEntryGetSelection tkEntryInsert tkEntryKeySelect tkEntryMouseSelect tkEntryNextWord tkEntryPaste tkEntryPreviousWord tkEntrySeeInsert tkEntrySetCursor tkEntryTranspose tkEventMotifBindings tkFDGetFileTypes tkFirstMenu tkFocusGroup_BindIn tkFocusGroup_BindOut tkFocusGroup_Create tkFocusGroup_Destroy tkFocusGroup_In tkFocusGroup_Out tkFocusOK tkGenerateMenuSelect tkIconList tkIconList_Add tkIconList_Arrange tkIconList_AutoScan tkIconList_Btn1 tkIconList_Config tkIconList_Create tkIconList_CtrlBtn1 tkIconList_Curselection tkIconList_DeleteAll tkIconList_Double1 tkIconList_DrawSelection tkIconList_FocusIn tkIconList_FocusOut tkIconList_Get tkIconList_Goto tkIconList_Index tkIconList_Invoke tkIconList_KeyPress tkIconList_Leave1 tkIconList_LeftRight tkIconList_Motion1 tkIconList_Reset tkIconList_ReturnKey tkIconList_See tkIconList_Select tkIconList_Selection tkIconList_ShiftBtn1 tkIconList_UpDown tkListbox tkListboxAutoScan tkListboxBeginExtend tkListboxBeginSelect tkListboxBeginToggle tkListboxCancel tkListboxDataExtend tkListboxExtendUpDown tkListboxKeyAccel_Goto tkListboxKeyAccel_Key tkListboxKeyAccel_Reset tkListboxKeyAccel_Set tkListboxKeyAccel_Unset tkListboxMotion tkListboxSelectAll tkListboxUpDown tkMbButtonUp tkMbEnter tkMbLeave tkMbMotion tkMbPost tkMenuButtonDown tkMenuDownArrow tkMenuDup tkMenuEscape tkMenuFind tkMenuFindName tkMenuFirstEntry tkMenuInvoke tkMenuLeave tkMenuLeftArrow tkMenuMotion tkMenuNextEntry tkMenuNextMenu tkMenuRightArrow tkMenuUnpost tkMenuUpArrow tkMessageBox tkMotifFDialog tkMotifFDialog_ActivateDList tkMotifFDialog_ActivateFEnt tkMotifFDialog_ActivateFList tkMotifFDialog_ActivateSEnt tkMotifFDialog_BrowseDList tkMotifFDialog_BrowseFList tkMotifFDialog_BuildUI tkMotifFDialog_CancelCmd tkMotifFDialog_Config tkMotifFDialog_Create tkMotifFDialog_FileTypes tkMotifFDialog_FilterCmd tkMotifFDialog_InterpFilter tkMotifFDialog_LoadFiles tkMotifFDialog_MakeSList tkMotifFDialog_OkCmd tkMotifFDialog_SetFilter tkMotifFDialog_SetListMode tkMotifFDialog_Update tkPostOverPoint tkRecolorTree tkRestoreOldGrab tkSaveGrabInfo tkScaleActivate tkScaleButton2Down tkScaleButtonDown tkScaleControlPress tkScaleDrag tkScaleEndDrag tkScaleIncrement tkScreenChanged tkScrollButton2Down tkScrollButtonDown tkScrollButtonDrag tkScrollButtonUp tkScrollByPages tkScrollByUnits tkScrollDrag tkScrollEndDrag tkScrollSelect tkScrollStartDrag tkScrollTopBottom tkScrollToPos tkTabToWindow tkTearOffMenu tkTextAutoScan tkTextButton1 tkTextClosestGap tkTextInsert tkTextKeyExtend tkTextKeySelect tkTextNextPara tkTextNextPos tkTextNextWord tkTextPaste tkTextPrevPara tkTextPrevPos tkTextPrevWord tkTextResetAnchor tkTextScrollPages tkTextSelectTo tkTextSetCursor tkTextTranspose tkTextUpDownLine tkTraverseToMenu tkTraverseWithinMenu
|
tkcommands=tk tk_bisque tkButtonAutoInvoke tkButtonDown tkButtonEnter tkButtonInvoke tkButtonLeave tkButtonUp tkCancelRepeat tkCheckRadioDown tkCheckRadioEnter tkCheckRadioInvoke tk_chooseColor tk_chooseDirectory tkColorDialog tkColorDialog_BuildDialog tkColorDialog_CancelCmd tkColorDialog_Config tkColorDialog_CreateSelector tkColorDialog_DrawColorScale tkColorDialog_EnterColorBar tkColorDialog_HandleRGBEntry tkColorDialog_HandleSelEntry tkColorDialog_InitValues tkColorDialog_LeaveColorBar tkColorDialog_MoveSelector tkColorDialog_OkCmd tkColorDialog_RedrawColorBars tkColorDialog_RedrawFinalColor tkColorDialog_ReleaseMouse tkColorDialog_ResizeColorBars tkColorDialog_RgbToX tkColorDialog_SetRGBValue tkColorDialog_StartMove tkColorDialog_XToRgb tkConsoleAbout tkConsoleBind tkConsoleExit tkConsoleHistory tkConsoleInit tkConsoleInsert tkConsoleInvoke tkConsoleOutput tkConsolePrompt tkConsoleSource tkDarken tk_dialog tkEntryAutoScan tkEntryBackspace tkEntryButton1 tkEntryClosestGap tkEntryGetSelection tkEntryInsert tkEntryKeySelect tkEntryMouseSelect tkEntryNextWord tkEntryPaste tkEntryPreviousWord tkEntrySeeInsert tkEntrySetCursor tkEntryTranspose tkerror tkEventMotifBindings tkFDGetFileTypes tkFirstMenu tk_focusFollowsMouse tkFocusGroup_BindIn tkFocusGroup_BindOut tkFocusGroup_Create tkFocusGroup_Destroy tkFocusGroup_In tkFocusGroup_Out tk_focusNext tkFocusOK tk_focusPrev tkGenerateMenuSelect tk_getOpenFile tk_getSaveFile tkIconList tkIconList_Add tkIconList_Arrange tkIconList_AutoScan tkIconList_Btn1 tkIconList_Config tkIconList_Create tkIconList_CtrlBtn1 tkIconList_Curselection tkIconList_DeleteAll tkIconList_Double1 tkIconList_DrawSelection tkIconList_FocusIn tkIconList_FocusOut tkIconList_Get tkIconList_Goto tkIconList_Index tkIconList_Invoke tkIconList_KeyPress tkIconList_Leave1 tkIconList_LeftRight tkIconList_Motion1 tkIconList_Reset tkIconList_ReturnKey tkIconList_See tkIconList_Select tkIconList_Selection tkIconList_ShiftBtn1 tkIconList_UpDown tkListbox tkListboxAutoScan tkListboxBeginExtend tkListboxBeginSelect tkListboxBeginToggle tkListboxCancel tkListboxDataExtend tkListboxExtendUpDown tkListboxKeyAccel_Goto tkListboxKeyAccel_Key tkListboxKeyAccel_Reset tkListboxKeyAccel_Set tkListboxKeyAccel_Unset tkListboxMotion tkListboxSelectAll tkListboxUpDown tkMbButtonUp tkMbEnter tkMbLeave tkMbMotion tkMbPost tkMenuButtonDown tkMenuDownArrow tkMenuDup tkMenuEscape tkMenuFind tkMenuFindName tkMenuFirstEntry tkMenuInvoke tkMenuLeave tkMenuLeftArrow tkMenuMotion tkMenuNextEntry tkMenuNextMenu tkMenuRightArrow tk_menuSetFocus tkMenuUnpost tkMenuUpArrow tk_messageBox tkMessageBox tkMotifFDialog tkMotifFDialog_ActivateDList tkMotifFDialog_ActivateFEnt tkMotifFDialog_ActivateFList tkMotifFDialog_ActivateSEnt tkMotifFDialog_BrowseDList tkMotifFDialog_BrowseFList tkMotifFDialog_BuildUI tkMotifFDialog_CancelCmd tkMotifFDialog_Config tkMotifFDialog_Create tkMotifFDialog_FileTypes tkMotifFDialog_FilterCmd tkMotifFDialog_InterpFilter tkMotifFDialog_LoadFiles tkMotifFDialog_MakeSList tkMotifFDialog_OkCmd tkMotifFDialog_SetFilter tkMotifFDialog_SetListMode tkMotifFDialog_Update tk_optionMenu tk_popup tkPostOverPoint tkRecolorTree tkRestoreOldGrab tkSaveGrabInfo tkScaleActivate tkScaleButton2Down tkScaleButtonDown tkScaleControlPress tkScaleDrag tkScaleEndDrag tkScaleIncrement tkScreenChanged tkScrollButton2Down tkScrollButtonDown tkScrollButtonDrag tkScrollButtonUp tkScrollByPages tkScrollByUnits tkScrollDrag tkScrollEndDrag tkScrollSelect tkScrollStartDrag tkScrollTopBottom tkScrollToPos tk_setPalette tkTabToWindow tkTearOffMenu tkTextAutoScan tkTextButton1 tkTextClosestGap tk_textCopy tk_textCut tkTextInsert tkTextKeyExtend tkTextKeySelect tkTextNextPara tkTextNextPos tkTextNextWord tk_textPaste tkTextPaste tkTextPrevPara tkTextPrevPos tkTextPrevWord tkTextResetAnchor tkTextScrollPages tkTextSelectTo tkTextSetCursor tkTextTranspose tkTextUpDownLine tkTraverseToMenu tkTraverseWithinMenu tkvars tkwait toplevel ttk::button ttk::checkbutton ttk::combobox ttk::entry ttk::frame ttk::image ttk::intro ttk::label ttk::labelframe ttk::menubutton ttk::notebook ttk::panedwindow ttk::progressbar ttk::radiobutton ttk::scale ttk::scrollbar ttk::separator ttk::sizegrip ttk::style ttk::treeview ttk::widget
|
||||||
expand=
|
expand=
|
||||||
|
|
||||||
|
|
||||||
@ -58,6 +58,6 @@ context_action_cmd=
|
|||||||
# %f will be replaced by the complete filename
|
# %f will be replaced by the complete filename
|
||||||
# %e will be replaced by the filename without extension
|
# %e will be replaced by the filename without extension
|
||||||
# (use only one of it at one time)
|
# (use only one of it at one time)
|
||||||
compiler=tclsh8.4 "%f"
|
compiler=tclsh "%f"
|
||||||
run_cmd=tclsh8.4 "%f"
|
run_cmd=tclsh "%f"
|
||||||
|
|
||||||
|
63
data/filetypes.vala
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
# For complete documentation of this file, please see Geany's main documentation
|
||||||
|
[styling]
|
||||||
|
# foreground;background;bold;italic
|
||||||
|
#default=0x000000;0xffffff;false;false
|
||||||
|
#comment=0xd00000;0xffffff;false;false
|
||||||
|
#commentline=0xd00000;0xffffff;false;false
|
||||||
|
#commentdoc=0x3f5fbf;0xffffff;false;false
|
||||||
|
#number=0x007f00;0xffffff;false;false
|
||||||
|
#word=0x00007f;0xffffff;true;false
|
||||||
|
#word2=0x991111;0xffffff;true;false
|
||||||
|
#string=0xff901e;0xffffff;false;false
|
||||||
|
#character=0xff901e;0xffffff;false;false
|
||||||
|
#uuid=0x404080;0xffffff;false;false
|
||||||
|
#preprocessor=0x007F7F;0xffffff;false;false
|
||||||
|
#operator=0x301010;0xffffff;false;false
|
||||||
|
#identifier=0x000000;0xffffff;false;false
|
||||||
|
#stringeol=0x000000;0xe0c0e0;false;false
|
||||||
|
#verbatim=0x101030;0xffffff;false;false
|
||||||
|
#regex=0x105090;0xffffff;false;false
|
||||||
|
#commentlinedoc=0x3f5fbf;0xffffff;true;false
|
||||||
|
#commentdockeyword=0x3f5fbf;0xffffff;true;true
|
||||||
|
#commentdockeyworderror=0x3f5fbf;0xffffff;false;false
|
||||||
|
#globalclass=0x0000d0;0xffffff;true;false
|
||||||
|
|
||||||
|
[keywords]
|
||||||
|
# all items must be in one line
|
||||||
|
#primary=
|
||||||
|
#secondary=
|
||||||
|
# these are some doxygen keywords (incomplete)
|
||||||
|
#docComment=attention author brief bug class code date def enum example exception file fn namespace note param remarks return see since struct throw todo typedef var version warning union
|
||||||
|
|
||||||
|
[settings]
|
||||||
|
# default extension used when saving files
|
||||||
|
#extension=vala
|
||||||
|
|
||||||
|
# the following characters are these which a "word" can contains, see documentation
|
||||||
|
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
|
||||||
|
|
||||||
|
# if only single comment char is supported like # in this file, leave comment_close blank
|
||||||
|
#comment_open=//
|
||||||
|
#comment_close=
|
||||||
|
# this is an alternative way, so multiline comments are used
|
||||||
|
#comment_open=/*
|
||||||
|
#comment_close=*/
|
||||||
|
|
||||||
|
# set to false if a comment character/string should start at column 0 of a line, true uses any
|
||||||
|
# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d
|
||||||
|
#command_example();
|
||||||
|
# setting to false would generate this
|
||||||
|
# command_example();
|
||||||
|
# This setting works only for single line comments
|
||||||
|
#comment_use_indent=true
|
||||||
|
|
||||||
|
# context action command (please see Geany's main documentation for details)
|
||||||
|
#context_action_cmd=
|
||||||
|
|
||||||
|
[build_settings]
|
||||||
|
# %f will be replaced by the complete filename
|
||||||
|
# %e will be replaced by the filename without extension
|
||||||
|
# (use only one of it at one time)
|
||||||
|
compiler=valac -c "%f"
|
||||||
|
linker=valac "%f"
|
||||||
|
run_cmd=./"%e"
|
41
data/filetypes.yaml
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
# For complete documentation of this file, please see Geany's main documentation
|
||||||
|
[styling]
|
||||||
|
# foreground;background;bold;italic
|
||||||
|
default=0x000000;0xffffff;false;false
|
||||||
|
comment=0x808080;0xffffff;false;false
|
||||||
|
identifier=0x000088;0xffffff;true;false
|
||||||
|
keyword=0x991111;0xffffff;true;false
|
||||||
|
number=0x007f00;0xffffff;false;false
|
||||||
|
reference=0x008888;0xffffff;false;false
|
||||||
|
document=0x000088;0xffffff;false;false
|
||||||
|
text=0x333366;0xffffff;false;false
|
||||||
|
error=0xff0000;0xffffff;true;true
|
||||||
|
operator=0x301010;0xffffff;false;false
|
||||||
|
|
||||||
|
|
||||||
|
[keywords]
|
||||||
|
# all items must be in one line
|
||||||
|
keywords=true false yes no
|
||||||
|
|
||||||
|
|
||||||
|
[settings]
|
||||||
|
# default extension used when saving files
|
||||||
|
extension=yaml
|
||||||
|
|
||||||
|
# the following characters are these which a "word" can contains, see documentation
|
||||||
|
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
|
||||||
|
|
||||||
|
# if only single comment char is supported like # in this file, leave comment_close blank
|
||||||
|
comment_open=#
|
||||||
|
comment_close=
|
||||||
|
|
||||||
|
# set to false if a comment character/string should start at column 0 of a line, true uses any
|
||||||
|
# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d
|
||||||
|
#command_example();
|
||||||
|
# setting to false would generate this
|
||||||
|
# command_example();
|
||||||
|
# This setting works only for single line comments
|
||||||
|
comment_use_indent=true
|
||||||
|
|
||||||
|
# context action command (please see Geany's main documentation for details)
|
||||||
|
context_action_cmd=
|
14907
data/global.tags
@ -1,95 +1,255 @@
|
|||||||
# each of the following lines represent a html entity
|
# each of the following lines represent a html entity
|
||||||
# used in HTML and PHP files when typing &...
|
# used in HTML and PHP files when typing &...
|
||||||
Á
|
Á
|
||||||
|
á
|
||||||
Â
|
Â
|
||||||
æ
|
â
|
||||||
|
´
|
||||||
Æ
|
Æ
|
||||||
|
æ
|
||||||
|
à
|
||||||
À
|
À
|
||||||
|
ℵ
|
||||||
|
Α
|
||||||
α
|
α
|
||||||
&
|
&
|
||||||
å
|
∧
|
||||||
|
∠
|
||||||
|
'
|
||||||
Å
|
Å
|
||||||
|
å
|
||||||
|
≈
|
||||||
Ã
|
Ã
|
||||||
ä
|
ã
|
||||||
Ä
|
Ä
|
||||||
|
ä
|
||||||
|
„
|
||||||
|
Β
|
||||||
|
β
|
||||||
|
¦
|
||||||
•
|
•
|
||||||
ç
|
∩
|
||||||
Ç
|
Ç
|
||||||
|
ç
|
||||||
|
¸
|
||||||
¢
|
¢
|
||||||
|
χ
|
||||||
|
Χ
|
||||||
|
ˆ
|
||||||
|
♣
|
||||||
|
≅
|
||||||
©
|
©
|
||||||
|
↵
|
||||||
|
∪
|
||||||
¤
|
¤
|
||||||
|
‡
|
||||||
|
†
|
||||||
|
⇓
|
||||||
|
↓
|
||||||
°
|
°
|
||||||
|
δ
|
||||||
|
Δ
|
||||||
|
♦
|
||||||
÷
|
÷
|
||||||
|
é
|
||||||
É
|
É
|
||||||
ê
|
ê
|
||||||
Ê
|
Ê
|
||||||
è
|
è
|
||||||
È
|
È
|
||||||
∅
|
∅
|
||||||
|
 
|
||||||
|
 
|
||||||
|
ε
|
||||||
|
Ε
|
||||||
|
≡
|
||||||
|
Η
|
||||||
|
η
|
||||||
|
ð
|
||||||
|
Ð
|
||||||
ë
|
ë
|
||||||
Ë
|
Ë
|
||||||
€
|
€
|
||||||
|
∃
|
||||||
|
ƒ
|
||||||
|
∀
|
||||||
½
|
½
|
||||||
¼
|
¼
|
||||||
¾
|
¾
|
||||||
|
⁄
|
||||||
|
Γ
|
||||||
|
γ
|
||||||
|
≥
|
||||||
>
|
>
|
||||||
|
↔
|
||||||
|
⇔
|
||||||
|
♥
|
||||||
|
…
|
||||||
Í
|
Í
|
||||||
î
|
í
|
||||||
Î
|
Î
|
||||||
ì
|
î
|
||||||
|
¡
|
||||||
Ì
|
Ì
|
||||||
|
ì
|
||||||
|
ℑ
|
||||||
∞
|
∞
|
||||||
|
∫
|
||||||
|
Ι
|
||||||
|
ι
|
||||||
|
¿
|
||||||
∈
|
∈
|
||||||
ï
|
ï
|
||||||
Ï
|
Ï
|
||||||
|
κ
|
||||||
|
Κ
|
||||||
|
Λ
|
||||||
|
λ
|
||||||
|
⟨
|
||||||
|
«
|
||||||
|
←
|
||||||
|
⇐
|
||||||
|
⌈
|
||||||
|
“
|
||||||
|
≤
|
||||||
|
⌊
|
||||||
∗
|
∗
|
||||||
|
◊
|
||||||
|
‎
|
||||||
|
‹
|
||||||
|
‘
|
||||||
<
|
<
|
||||||
|
¯
|
||||||
|
—
|
||||||
µ
|
µ
|
||||||
|
·
|
||||||
−
|
−
|
||||||
|
μ
|
||||||
|
Μ
|
||||||
|
∇
|
||||||
|
|
||||||
ñ
|
–
|
||||||
|
≠
|
||||||
|
∋
|
||||||
|
¬
|
||||||
|
∉
|
||||||
|
⊄
|
||||||
Ñ
|
Ñ
|
||||||
ó
|
ñ
|
||||||
|
ν
|
||||||
|
Ν
|
||||||
Ó
|
Ó
|
||||||
ô
|
ó
|
||||||
Ô
|
Ô
|
||||||
ò
|
ô
|
||||||
|
œ
|
||||||
|
Œ
|
||||||
Ò
|
Ò
|
||||||
|
ò
|
||||||
|
‾
|
||||||
ω
|
ω
|
||||||
Ω
|
Ω
|
||||||
|
Ο
|
||||||
|
ο
|
||||||
|
⊕
|
||||||
|
∨
|
||||||
ª
|
ª
|
||||||
º
|
º
|
||||||
ø
|
|
||||||
Ø
|
Ø
|
||||||
|
ø
|
||||||
õ
|
õ
|
||||||
Õ
|
Õ
|
||||||
|
⊗
|
||||||
ö
|
ö
|
||||||
Ö
|
Ö
|
||||||
¶
|
¶
|
||||||
|
∂
|
||||||
|
‰
|
||||||
|
⊥
|
||||||
|
Φ
|
||||||
|
φ
|
||||||
π
|
π
|
||||||
|
Π
|
||||||
|
ϖ
|
||||||
±
|
±
|
||||||
£
|
£
|
||||||
|
″
|
||||||
|
′
|
||||||
∏
|
∏
|
||||||
∝
|
∝
|
||||||
|
Ψ
|
||||||
|
ψ
|
||||||
"
|
"
|
||||||
|
√
|
||||||
|
⟩
|
||||||
|
»
|
||||||
|
⇒
|
||||||
|
→
|
||||||
|
⌉
|
||||||
|
”
|
||||||
|
ℜ
|
||||||
®
|
®
|
||||||
|
⌋
|
||||||
|
Ρ
|
||||||
|
ρ
|
||||||
|
‏
|
||||||
|
›
|
||||||
|
’
|
||||||
|
‚
|
||||||
|
š
|
||||||
|
Š
|
||||||
|
⋅
|
||||||
§
|
§
|
||||||
|
­
|
||||||
|
σ
|
||||||
|
Σ
|
||||||
|
ς
|
||||||
|
∼
|
||||||
|
♠
|
||||||
|
⊂
|
||||||
|
⊆
|
||||||
∑
|
∑
|
||||||
|
⊃
|
||||||
¹
|
¹
|
||||||
²
|
²
|
||||||
³
|
³
|
||||||
|
⊇
|
||||||
ß
|
ß
|
||||||
|
τ
|
||||||
|
Τ
|
||||||
|
∴
|
||||||
|
Θ
|
||||||
|
θ
|
||||||
|
ϑ
|
||||||
|
 
|
||||||
|
þ
|
||||||
|
Þ
|
||||||
|
˜
|
||||||
×
|
×
|
||||||
™
|
™
|
||||||
ú
|
|
||||||
Ú
|
Ú
|
||||||
|
ú
|
||||||
|
↑
|
||||||
|
⇑
|
||||||
û
|
û
|
||||||
Û
|
Û
|
||||||
ù
|
ù
|
||||||
Ù
|
Ù
|
||||||
¨
|
¨
|
||||||
ü
|
ϒ
|
||||||
|
Υ
|
||||||
|
υ
|
||||||
Ü
|
Ü
|
||||||
|
ü
|
||||||
|
℘
|
||||||
|
Ξ
|
||||||
|
ξ
|
||||||
|
Ý
|
||||||
ý
|
ý
|
||||||
¥
|
¥
|
||||||
|
Ÿ
|
||||||
ÿ
|
ÿ
|
||||||
|
Ζ
|
||||||
|
ζ
|
||||||
|
‍
|
||||||
|
‌
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
# format=pipe
|
||||||
\above|||
|
\above|||
|
||||||
\abovecaptionskip|||
|
\abovecaptionskip|||
|
||||||
\abovedisplayshortskip|||
|
\abovedisplayshortskip|||
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
# format=pipe
|
||||||
arc||(X: SmallInt, Y: SmallInt, StAngle: Word, EndAngle: Word, Radius: Word)|
|
arc||(X: SmallInt, Y: SmallInt, StAngle: Word, EndAngle: Word, Radius: Word)|
|
||||||
assigncrt||(File: Text)|
|
assigncrt||(File: Text)|
|
||||||
bar||(x1: SmallInt; y1: SmallInt; x2: SmallInt; y2: SmallInt)|
|
bar||(x1: SmallInt; y1: SmallInt; x2: SmallInt; y2: SmallInt)|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Automatically generated file - do not edit (created on Tue, 10 Jun 2008 18:27:43 +0200)
|
# format=tagmanager - Automatically generated file - do not edit (created on Wed, 14 Jan 2009 16:59:30 +0100)
|
||||||
absÌ128Í(int number)Ïint
|
absÌ128Í(int number)Ïint
|
||||||
acoshÌ128Í(float number)Ïfloat
|
acoshÌ128Í(float number)Ïfloat
|
||||||
acosÌ128Í(float number)Ïfloat
|
acosÌ128Í(float number)Ïfloat
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Automatically generated file - do not edit (created on Tue Jun 10 18:27:52 2008)
|
# format=tagmanager - Automatically generated file - do not edit (created on Wed Jan 14 16:59:26 2009)
|
||||||
AbstractHTTPHandlerÌ1Í(BaseHandler)
|
AbstractHTTPHandlerÌ1Í(BaseHandler)
|
||||||
AbstractWriterÌ1Í(NullWriter)
|
AbstractWriterÌ1Í(NullWriter)
|
||||||
AddPackagePathÌ128Í(packagename, path)
|
AddPackagePathÌ128Í(packagename, path)
|
||||||
@ -377,6 +377,7 @@ artcmd
|
|||||||
articleÌ128Í(self, id)
|
articleÌ128Í(self, id)
|
||||||
asBase64Ì128Í(self, maxlinelength=76)
|
asBase64Ì128Í(self, maxlinelength=76)
|
||||||
as_tupleÌ128Í(self)
|
as_tupleÌ128Í(self)
|
||||||
|
ascii_upperÌ128Í(s)
|
||||||
assert_line_dataÌ128Í(self, flag=1)
|
assert_line_dataÌ128Í(self, flag=1)
|
||||||
assure_pickle_consistencyÌ128Í(verbose=False)
|
assure_pickle_consistencyÌ128Í(verbose=False)
|
||||||
async_chatÌ1Í(asyncore.dispatcher)
|
async_chatÌ1Í(asyncore.dispatcher)
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
# Geany's snippets configuration file
|
# Geany's snippets configuration file
|
||||||
# use \n or %newline% for a new line (it will be replaced by the used EOL char(s) - LF, CR/LF, CR)
|
#
|
||||||
# use \t ot %ws% for an indentation step, if using only spaces for indentation only spaces will be used
|
# use \n or %newline% for a new line (it will be replaced by the used EOL char(s) - LF, CR/LF, CR).
|
||||||
# use \s to force whitespace at beginning or end of a value ('key= value' won't work, use 'key=\svalue')
|
# use \t or %ws% for an indentation step, it will be replaced according to the current document's indent mode.
|
||||||
# use %cursor% to define where the cursor should be placed after completion
|
# use \s to force whitespace at beginning or end of a value ('key= value' won't work, use 'key=\svalue').
|
||||||
# use %key% for all keys defined in the [Special] section
|
# use %key% for all keys defined in the [Special] section.
|
||||||
# you can define a section for each supported filetype to overwrite default settings, the section
|
# use %cursor% to define where the cursor should be placed after completion. You can define multiple
|
||||||
# name must match exactly the internal filetype name, run 'geany --ft-names' for a full list
|
# %cursor% wildcards and use the "Move cursor in snippet" to jump to the next defined cursor
|
||||||
|
# position in the completed snippet.
|
||||||
|
# You can define a section for each supported filetype to overwrite default settings, the section
|
||||||
|
# name must match exactly the internal filetype name, run 'geany --ft-names' for a full list.
|
||||||
#
|
#
|
||||||
# Additionally, you can use most of the template wildcards like {developer} or {date} in the snippets.
|
# Additionally, you can use most of the template wildcards like {developer} or {date} in the snippets.
|
||||||
# See the documentation for details.
|
# See the documentation for details.
|
||||||
@ -17,13 +20,13 @@
|
|||||||
|
|
||||||
# Default is used for all filetypes and keys can be overwritten by [filetype] sections
|
# Default is used for all filetypes and keys can be overwritten by [filetype] sections
|
||||||
[Default]
|
[Default]
|
||||||
if=if (%cursor%)%brace_open%\n%brace_close%
|
if=if (%cursor%)%block_cursor%
|
||||||
else=else%brace_open%%cursor%\n%brace_close%
|
else=else%block_cursor%
|
||||||
for=for (i = 0; i < %cursor%; i++)%brace_open%\n%brace_close%
|
for=for (i = 0; i < %cursor%; i++)%block_cursor%
|
||||||
while=while (%cursor%)%brace_open%\n%brace_close%
|
while=while (%cursor%)%block_cursor%
|
||||||
do=do%brace_open%%cursor%\n%brace_close% while ()
|
do=do\n{\n\t%cursor%\n} while(%cursor%)\n%cursor%
|
||||||
switch=switch (%cursor%)%brace_open%case : break;\n%ws%default: \n%brace_close%
|
switch=switch (%cursor%)%brace_open%case %cursor%:\n\t\t%cursor%\n\t\tbreak;\n\tdefault:\n\t\t%cursor%\n%brace_close%%cursor%
|
||||||
try=try%block_cursor%catch ()%block%
|
try=try%block%\ncatch (%cursor%)%block_cursor%
|
||||||
|
|
||||||
# special keys to be used in other snippets, cannot be used "standalone"
|
# special keys to be used in other snippets, cannot be used "standalone"
|
||||||
# can be used by %key%, e.g. %brace_open%
|
# can be used by %key%, e.g. %brace_open%
|
||||||
@ -33,8 +36,8 @@ try=try%block_cursor%catch ()%block%
|
|||||||
[Special]
|
[Special]
|
||||||
brace_open=\n{\n\t
|
brace_open=\n{\n\t
|
||||||
brace_close=}\n
|
brace_close=}\n
|
||||||
block=\n{\n\t\n}\n
|
block=\n{\n\t%cursor%\n}
|
||||||
block_cursor=\n{\n\t%cursor%\n}\n
|
block_cursor=\n{\n\t%cursor%\n}\n%cursor%
|
||||||
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
|
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
|
||||||
|
|
||||||
[C++]
|
[C++]
|
||||||
@ -48,6 +51,14 @@ for=for ($i = 0; $i < %cursor%; $i++)%brace_open%\n%brace_close%
|
|||||||
|
|
||||||
[Python]
|
[Python]
|
||||||
for=for i in xrange(%cursor%):\n\t
|
for=for i in xrange(%cursor%):\n\t
|
||||||
|
if=if %cursor%:\n\t
|
||||||
|
elif=elif %cursor%:\n\t
|
||||||
|
else=else:\n\t
|
||||||
|
while=while %cursor%:\n\t
|
||||||
|
try=try:\n\t%cursor%\nexcept Exception, ex:\n\t
|
||||||
|
with=with %cursor%:\n\t
|
||||||
|
def=def %cursor% (%cursor%):\n\t""" Function doc """\n\t
|
||||||
|
class=class %cursor%:\n\t""" Class doc """\n\t\n\tdef __init__ (self):\n\t\t""" Class initialiser """\n\t\tpass
|
||||||
|
|
||||||
[Ferite]
|
[Ferite]
|
||||||
iferr=iferr%block_cursor%fix%block%
|
iferr=iferr%block_cursor%fix%block%
|
||||||
|
41
data/ui_toolbar.xml
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<!--
|
||||||
|
This is Geany's toolbar UI definition.
|
||||||
|
The DTD can be found at http://library.gnome.org/devel/gtk/stable/GtkUIManager.html#GtkUIManager.description.
|
||||||
|
|
||||||
|
You can re-order all items and freely add and remove available actions.
|
||||||
|
You cannot add new actions which are not listed below.
|
||||||
|
Everything you add or change must be inside the /ui/toolbar/ path.
|
||||||
|
|
||||||
|
For changes to take effect, you need to restart Geany.
|
||||||
|
|
||||||
|
A list of available actions can be found in the documentation included with Geany or
|
||||||
|
at http://www.geany.org/manual/current/index.html#customizing-the-toolbar.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<ui>
|
||||||
|
<toolbar name='GeanyToolbar'>
|
||||||
|
<toolitem action='New' />
|
||||||
|
<toolitem action='Open' />
|
||||||
|
<toolitem action='Save' />
|
||||||
|
<toolitem action='SaveAll' />
|
||||||
|
<separator/>
|
||||||
|
<toolitem action='Reload' />
|
||||||
|
<toolitem action='Close' />
|
||||||
|
<separator/>
|
||||||
|
<toolitem action='NavBack' />
|
||||||
|
<toolitem action='NavFor' />
|
||||||
|
<separator/>
|
||||||
|
<toolitem action='Compile' />
|
||||||
|
<toolitem action='Run' />
|
||||||
|
<separator/>
|
||||||
|
<toolitem action='Color' />
|
||||||
|
<separator/>
|
||||||
|
<toolitem action='SearchEntry' />
|
||||||
|
<toolitem action='Search' />
|
||||||
|
<separator/>
|
||||||
|
<toolitem action='GotoEntry' />
|
||||||
|
<toolitem action='Goto' />
|
||||||
|
<separator/>
|
||||||
|
<toolitem action='Quit' />
|
||||||
|
</toolbar>
|
||||||
|
</ui>
|
@ -31,7 +31,6 @@ SHORT_NAMES = NO
|
|||||||
JAVADOC_AUTOBRIEF = YES
|
JAVADOC_AUTOBRIEF = YES
|
||||||
QT_AUTOBRIEF = NO
|
QT_AUTOBRIEF = NO
|
||||||
MULTILINE_CPP_IS_BRIEF = NO
|
MULTILINE_CPP_IS_BRIEF = NO
|
||||||
DETAILS_AT_TOP = NO
|
|
||||||
INHERIT_DOCS = YES
|
INHERIT_DOCS = YES
|
||||||
SEPARATE_MEMBER_PAGES = NO
|
SEPARATE_MEMBER_PAGES = NO
|
||||||
TAB_SIZE = 4
|
TAB_SIZE = 4
|
||||||
@ -41,7 +40,7 @@ ALIASES = "signal=- @ref " \
|
|||||||
"endsignaldef= " \
|
"endsignaldef= " \
|
||||||
"signalproto=@code " \
|
"signalproto=@code " \
|
||||||
"endsignalproto=@endcode " \
|
"endsignalproto=@endcode " \
|
||||||
"signaldesc=@par Description: " \
|
"signaldesc=" \
|
||||||
"signals=@b Signals: " \
|
"signals=@b Signals: " \
|
||||||
"endsignals= "
|
"endsignals= "
|
||||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||||
@ -76,7 +75,7 @@ SORT_BY_SCOPE_NAME = NO
|
|||||||
GENERATE_TODOLIST = YES
|
GENERATE_TODOLIST = YES
|
||||||
GENERATE_TESTLIST = NO
|
GENERATE_TESTLIST = NO
|
||||||
GENERATE_BUGLIST = YES
|
GENERATE_BUGLIST = YES
|
||||||
GENERATE_DEPRECATEDLIST= NO
|
GENERATE_DEPRECATEDLIST= YES
|
||||||
ENABLED_SECTIONS =
|
ENABLED_SECTIONS =
|
||||||
MAX_INITIALIZER_LINES = 30
|
MAX_INITIALIZER_LINES = 30
|
||||||
SHOW_USED_FILES = NO
|
SHOW_USED_FILES = NO
|
||||||
@ -95,7 +94,10 @@ WARN_LOGFILE =
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to the input files
|
# configuration options related to the input files
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
INPUT = ../src/ ./ ../plugins/pluginmacros.h
|
INPUT = ../src/ ./ ../plugins/pluginmacros.h \
|
||||||
|
../tagmanager/tm_source_file.c ../tagmanager/include/tm_source_file.h \
|
||||||
|
../tagmanager/tm_work_object.c ../tagmanager/include/tm_work_object.h \
|
||||||
|
../tagmanager/tm_workspace.c ../tagmanager/include/tm_workspace.h
|
||||||
INPUT_ENCODING = UTF-8
|
INPUT_ENCODING = UTF-8
|
||||||
FILE_PATTERNS = *.c \
|
FILE_PATTERNS = *.c \
|
||||||
*.cc \
|
*.cc \
|
||||||
@ -226,7 +228,7 @@ SEARCH_INCLUDES = NO
|
|||||||
INCLUDE_PATH =
|
INCLUDE_PATH =
|
||||||
INCLUDE_FILE_PATTERNS =
|
INCLUDE_FILE_PATTERNS =
|
||||||
# make G_GNUC_PRINTF a no-op unless doxygen would ignore functions with varargs
|
# make G_GNUC_PRINTF a no-op unless doxygen would ignore functions with varargs
|
||||||
PREDEFINED = "G_GNUC_PRINTF(x,y)=" GEANY_DISABLE_DEPRECATED
|
PREDEFINED = "G_GNUC_PRINTF(x,y)=" GEANY_DISABLE_DEPRECATED HAVE_PLUGINS
|
||||||
EXPAND_AS_DEFINED =
|
EXPAND_AS_DEFINED =
|
||||||
SKIP_FUNCTION_MACROS = NO
|
SKIP_FUNCTION_MACROS = NO
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
@ -18,6 +18,7 @@ hacking-doc: ../HACKING
|
|||||||
|
|
||||||
# when generating documentation, first try rst2html.py as it is the upstream default
|
# when generating documentation, first try rst2html.py as it is the upstream default
|
||||||
doc: geany.txt
|
doc: geany.txt
|
||||||
|
(rst2html.py --version) < /dev/null > /dev/null 2>&1 && \
|
||||||
rst2html.py -stg --stylesheet=geany.css $(srcdir)/geany.txt geany.html || \
|
rst2html.py -stg --stylesheet=geany.css $(srcdir)/geany.txt geany.html || \
|
||||||
rst2html -stg --stylesheet=geany.css $(srcdir)/geany.txt geany.html
|
rst2html -stg --stylesheet=geany.css $(srcdir)/geany.txt geany.html
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.TH "GEANY" "1" "April 19, 2008" "geany @VERSION@" ""
|
.TH "GEANY" "1" "February 15, 2009" "geany @VERSION@" ""
|
||||||
.SH "NAME"
|
.SH "NAME"
|
||||||
Geany \(em a small and lightweight IDE
|
Geany \(em a small and lightweight IDE
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
@ -30,10 +30,8 @@ place the cursor in line 7.
|
|||||||
Set initial column number for the first opened file (useful in conjunction with \-\-line).
|
Set initial column number for the first opened file (useful in conjunction with \-\-line).
|
||||||
.IP "\fB-c\fP, \fB\-\-config\fP " 10
|
.IP "\fB-c\fP, \fB\-\-config\fP " 10
|
||||||
Use an alternate configuration directory. Default configuration directory is
|
Use an alternate configuration directory. Default configuration directory is
|
||||||
~/.geany/ and there resides geany.conf and some template files.
|
~/.config/geany/ and there resides geany.conf and some template files.
|
||||||
.IP "\fB-d\fP, \fB\-\-debug\fP " 10
|
.IP "\fB\fP \fB\-\-ft\-names\fP " 10
|
||||||
Run Geany in debug mode, which means being verbose and printing lots of information.
|
|
||||||
.IP "\fB\fP, \fB\-\-ft\-names\fP " 10
|
|
||||||
Print a list of Geany's internal filetype names (useful snippets configuration).
|
Print a list of Geany's internal filetype names (useful snippets configuration).
|
||||||
.IP "\fB-g\fP, \fB\-\-generate\-tags\fP " 10
|
.IP "\fB-g\fP, \fB\-\-generate\-tags\fP " 10
|
||||||
Generate a global tags file (see documentation).
|
Generate a global tags file (see documentation).
|
||||||
@ -52,7 +50,7 @@ Don't load symbol completion and call tip data. Use this option, if you don't wa
|
|||||||
For more information please see documentation.
|
For more information please see documentation.
|
||||||
.IP "\fB-p\fP, \fB\-\-no-plugins\fP " 10
|
.IP "\fB-p\fP, \fB\-\-no-plugins\fP " 10
|
||||||
Don't load plugin support.
|
Don't load plugin support.
|
||||||
.IP "\fB\fP \fB\-\-print-prefix\fP " 10
|
.IP "\fB\fP \fB\-\-print-prefix\fP " 10
|
||||||
Print installation prefix, the data directory, the lib directory and the locale directory (in
|
Print installation prefix, the data directory, the lib directory and the locale directory (in
|
||||||
this order) to stdout, each per line. This is mainly intended for plugin authors to detect
|
this order) to stdout, each per line. This is mainly intended for plugin authors to detect
|
||||||
installation paths.
|
installation paths.
|
||||||
@ -62,11 +60,13 @@ Don't load the previous session's files.
|
|||||||
Don't load terminal support. Use this option, if you don't want to load the virtual terminal
|
Don't load terminal support. Use this option, if you don't want to load the virtual terminal
|
||||||
emulator widget at startup. If you don't have libvte.so.4 installed, then terminal-support is
|
emulator widget at startup. If you don't have libvte.so.4 installed, then terminal-support is
|
||||||
automatically disabled. Only available if Geany was compiled with support for VTE.
|
automatically disabled. Only available if Geany was compiled with support for VTE.
|
||||||
.IP "\fB\fP \fB\-\-vte-lib\fP " 10
|
.IP "\fB\fP \fB\-\-vte-lib\fP " 10
|
||||||
Specify explicitly the path including filename or only the filename to the VTE library, e.g.
|
Specify explicitly the path including filename or only the filename to the VTE library, e.g.
|
||||||
/usr/lib/libvte.so or libvte.so. This option is only needed, when the autodetection doesn't
|
/usr/lib/libvte.so or libvte.so. This option is only needed, when the autodetection doesn't
|
||||||
work. Only available if Geany was compiled with support for VTE.
|
work. Only available if Geany was compiled with support for VTE.
|
||||||
.IP "\fB-v\fP, \fB\-\-version\fP " 10
|
.IP "\fB-v\fP, \fB\-\-verbose\fP " 10
|
||||||
|
Be verbose (print useful status messages).
|
||||||
|
.IP "\fB-V\fP, \fB\-\-version\fP " 10
|
||||||
Show version information and exit.
|
Show version information and exit.
|
||||||
.IP "\fB-?\fP, \fB\-\-help\fP " 10
|
.IP "\fB-?\fP, \fB\-\-help\fP " 10
|
||||||
Show help information and exit.
|
Show help information and exit.
|
||||||
|
1364
doc/geany.html
872
doc/geany.txt
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 34 KiB |
BIN
doc/images/pref_dialog_edit_completions.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
doc/images/pref_dialog_edit_display.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
doc/images/pref_dialog_edit_features.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
doc/images/pref_dialog_edit_indentation.png
Normal file
After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 37 KiB |
BIN
doc/images/pref_dialog_gen_misc.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
doc/images/pref_dialog_gen_startup.png
Normal file
After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
390
doc/plugins.dox
@ -1,8 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* plugins.dox - this file is part of Geany, a fast and lightweight IDE
|
* plugins.dox - this file is part of Geany, a fast and lightweight IDE
|
||||||
*
|
*
|
||||||
* Copyright 2008 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
* Copyright 2008-2009 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||||
* Copyright 2008 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
* Copyright 2008-2009 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||||
|
* Copyright 2009 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -30,7 +31,7 @@
|
|||||||
*
|
*
|
||||||
* @mainpage Geany Plugin API Documentation
|
* @mainpage Geany Plugin API Documentation
|
||||||
*
|
*
|
||||||
* @author Enrico Tröger, Nick Treleaven
|
* @author Enrico Tröger, Nick Treleaven, Frank Lanitz
|
||||||
* @date $Date$
|
* @date $Date$
|
||||||
*
|
*
|
||||||
* @section Intro
|
* @section Intro
|
||||||
@ -43,8 +44,8 @@
|
|||||||
* Other pages:
|
* Other pages:
|
||||||
* - @link plugindata.h Main Datatypes and Macros @endlink
|
* - @link plugindata.h Main Datatypes and Macros @endlink
|
||||||
* - @link pluginsymbols.c Plugin Symbols @endlink
|
* - @link pluginsymbols.c Plugin Symbols @endlink
|
||||||
* - @link pluginmacros.h Optional Macros @endlink
|
|
||||||
* - @link signals Plugin Signals @endlink
|
* - @link signals Plugin Signals @endlink
|
||||||
|
* - @link guidelines Plugin Writing Guidelines @endlink
|
||||||
*
|
*
|
||||||
* @note Some of these pages are also listed in Related Pages.
|
* @note Some of these pages are also listed in Related Pages.
|
||||||
*/
|
*/
|
||||||
@ -57,6 +58,7 @@
|
|||||||
*
|
*
|
||||||
* To use plugin signals in Geany, you simply create a PluginCallback array, list the signals
|
* To use plugin signals in Geany, you simply create a PluginCallback array, list the signals
|
||||||
* you want to listen to and create the appropiate signal callbacks for each signal.
|
* you want to listen to and create the appropiate signal callbacks for each signal.
|
||||||
|
* The callback array is read @a after plugin_init() has been called.
|
||||||
* @note The PluginCallback array has to be ended with a final NULL entry.
|
* @note The PluginCallback array has to be ended with a final NULL entry.
|
||||||
*
|
*
|
||||||
* The following code demonstrates how to use signals in Geany plugins. The code can be inserted
|
* The following code demonstrates how to use signals in Geany plugins. The code can be inserted
|
||||||
@ -83,6 +85,9 @@ PluginCallback plugin_callbacks[] =
|
|||||||
* @endsignalproto
|
* @endsignalproto
|
||||||
* @signaldesc
|
* @signaldesc
|
||||||
* Sent when a new %document is created.
|
* Sent when a new %document is created.
|
||||||
|
*
|
||||||
|
* You need to include "document.h" for the declaration of GeanyDocument.
|
||||||
|
*
|
||||||
* @param obj a GeanyObject instance, should be ignored.
|
* @param obj a GeanyObject instance, should be ignored.
|
||||||
* @param doc the new document.
|
* @param doc the new document.
|
||||||
* @param user_data user data.
|
* @param user_data user data.
|
||||||
@ -94,6 +99,9 @@ PluginCallback plugin_callbacks[] =
|
|||||||
* @endsignalproto
|
* @endsignalproto
|
||||||
* @signaldesc
|
* @signaldesc
|
||||||
* Sent when a new %document is opened.
|
* Sent when a new %document is opened.
|
||||||
|
*
|
||||||
|
* You need to include "document.h" for the declaration of GeanyDocument.
|
||||||
|
*
|
||||||
* @param obj a GeanyObject instance, should be ignored.
|
* @param obj a GeanyObject instance, should be ignored.
|
||||||
* @param doc the opened document.
|
* @param doc the opened document.
|
||||||
* @param user_data user data.
|
* @param user_data user data.
|
||||||
@ -105,6 +113,9 @@ PluginCallback plugin_callbacks[] =
|
|||||||
* @endsignalproto
|
* @endsignalproto
|
||||||
* @signaldesc
|
* @signaldesc
|
||||||
* Sent when a new %document is saved.
|
* Sent when a new %document is saved.
|
||||||
|
*
|
||||||
|
* You need to include "document.h" for the declaration of GeanyDocument.
|
||||||
|
*
|
||||||
* @param obj a GeanyObject instance, should be ignored.
|
* @param obj a GeanyObject instance, should be ignored.
|
||||||
* @param doc the saved document.
|
* @param doc the saved document.
|
||||||
* @param user_data user data.
|
* @param user_data user data.
|
||||||
@ -116,6 +127,9 @@ PluginCallback plugin_callbacks[] =
|
|||||||
* @endsignalproto
|
* @endsignalproto
|
||||||
* @signaldesc
|
* @signaldesc
|
||||||
* Sent when switching notebook pages.
|
* Sent when switching notebook pages.
|
||||||
|
*
|
||||||
|
* You need to include "document.h" for the declaration of GeanyDocument.
|
||||||
|
*
|
||||||
* @param obj a GeanyObject instance, should be ignored.
|
* @param obj a GeanyObject instance, should be ignored.
|
||||||
* @param doc the current document.
|
* @param doc the current document.
|
||||||
* @param user_data user data.
|
* @param user_data user data.
|
||||||
@ -127,6 +141,9 @@ PluginCallback plugin_callbacks[] =
|
|||||||
* @endsignalproto
|
* @endsignalproto
|
||||||
* @signaldesc
|
* @signaldesc
|
||||||
* Sent before closing a document.
|
* Sent before closing a document.
|
||||||
|
*
|
||||||
|
* You need to include "document.h" for the declaration of GeanyDocument.
|
||||||
|
*
|
||||||
* @param obj a GeanyObject instance, should be ignored.
|
* @param obj a GeanyObject instance, should be ignored.
|
||||||
* @param doc the document about to be closed.
|
* @param doc the document about to be closed.
|
||||||
* @param user_data user data.
|
* @param user_data user data.
|
||||||
@ -176,8 +193,12 @@ PluginCallback plugin_callbacks[] =
|
|||||||
* @signaldesc
|
* @signaldesc
|
||||||
* Sent before the popup menu of the editing widget is shown. This can be used to modify or extend
|
* Sent before the popup menu of the editing widget is shown. This can be used to modify or extend
|
||||||
* the popup menu.
|
* the popup menu.
|
||||||
|
*
|
||||||
* @note You can add menu items from @c plugin_init() using @c geany->main_widgets->editor_menu,
|
* @note You can add menu items from @c plugin_init() using @c geany->main_widgets->editor_menu,
|
||||||
* remembering to destroy them in @c plugin_cleanup().
|
* remembering to destroy them in @c plugin_cleanup().
|
||||||
|
*
|
||||||
|
* You need to include "document.h" for the declaration of GeanyDocument.
|
||||||
|
*
|
||||||
* @param obj a GeanyObject instance, should be ignored.
|
* @param obj a GeanyObject instance, should be ignored.
|
||||||
* @param word the current word (in UTF-8 encoding) below the cursor position
|
* @param word the current word (in UTF-8 encoding) below the cursor position
|
||||||
where the popup menu will be opened.
|
where the popup menu will be opened.
|
||||||
@ -186,6 +207,120 @@ PluginCallback plugin_callbacks[] =
|
|||||||
* @param user_data user data.
|
* @param user_data user data.
|
||||||
* @endsignaldef
|
* @endsignaldef
|
||||||
*
|
*
|
||||||
|
* @signaldef editor-notify
|
||||||
|
* @signalproto
|
||||||
|
* gboolean user_function(GObject *obj, GeanyEditor *editor, SCNotification *nt,
|
||||||
|
* gpointer user_data);
|
||||||
|
* @endsignalproto
|
||||||
|
* @signaldesc
|
||||||
|
* This signal is sent whenever something in the editor widget changes (character added,
|
||||||
|
* fold level changes, clicks to the line number margin, ...).
|
||||||
|
* A detailed description of possible notifications and the SCNotification can be found at
|
||||||
|
* http://www.scintilla.org/ScintillaDoc.html#Notifications.
|
||||||
|
*
|
||||||
|
* If you connect to this signal, you must check @c nt->nmhdr.code for the notification type
|
||||||
|
* to prevent handling unwanted notifications. This is important because for instance SCN_UPDATEUI
|
||||||
|
* is sent very often whereas you probably don't want to handle this notification.
|
||||||
|
*
|
||||||
|
* By default, the signal is sent before Geany's default handler is processing the event.
|
||||||
|
* Your callback function should return FALSE to allow Geany processing the event as well. If you
|
||||||
|
* want to prevent this for some reason, return TRUE.
|
||||||
|
* Please use this with care as it can break basic functionality of Geany.
|
||||||
|
*
|
||||||
|
* The signal can be sent after Geany's default handler has been run when you set
|
||||||
|
* PluginCallback::after field to TRUE.
|
||||||
|
*
|
||||||
|
* An example callback implemention of this signal can be found in the Demo plugin.
|
||||||
|
*
|
||||||
|
* @warning This signal has much power and should be used carefully. You should especially
|
||||||
|
* care about the return value; make sure to return TRUE only if it is necessary
|
||||||
|
* and in the correct situations.
|
||||||
|
*
|
||||||
|
* You need to include "editor.h" for the declaration of GeanyEditor and "Scintilla.h" for
|
||||||
|
* SCNotification.
|
||||||
|
*
|
||||||
|
* @param obj a GeanyObject instance, should be ignored.
|
||||||
|
* @param editor The current GeanyEditor.
|
||||||
|
* @param nt A pointer to the SCNotification struct which holds additional information for
|
||||||
|
* the event.
|
||||||
|
* @param user_data user data.
|
||||||
|
* @return @c TRUE to stop other handlers from being invoked for the event.
|
||||||
|
* @c FALSE to propagate the event further.
|
||||||
|
*
|
||||||
|
* @since 0.16
|
||||||
|
* @endsignaldef
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @page guidelines Plugin Writing Guidelines
|
||||||
|
*
|
||||||
|
* @section intro Introduction
|
||||||
|
*
|
||||||
|
* The following hints and guidelines are only recommendations. Nobody is forced to follow
|
||||||
|
* them at all.
|
||||||
|
*
|
||||||
|
* @section general General notes
|
||||||
|
*
|
||||||
|
* @subsection ideas Getting a plugin idea
|
||||||
|
*
|
||||||
|
* If you want to write a plugin but don't know yet what it should do, have a look at
|
||||||
|
* http://www.geany.org/Support/PluginWishlist to get an idea about what users wish.
|
||||||
|
*
|
||||||
|
* @subsection code Managing the source code
|
||||||
|
*
|
||||||
|
* For authors of plugins for Geany, we created a dedicated @a geany-plugins project at
|
||||||
|
* Sourceforge to ease development of plugins and help new authors.
|
||||||
|
* Project website: http://sourceforge.net/projects/geany-plugins
|
||||||
|
*
|
||||||
|
* Each plugin author is welcome to use these services. To do so, you need an account at
|
||||||
|
* Sourceforge. You can easily register at (http://sourceforge.net/account/registration/).
|
||||||
|
* After you successfully created an account,
|
||||||
|
* tell your account name Enrico or Nick and you will write access to the SVN repository
|
||||||
|
* (http://geany-plugins.svn.sourceforge.net/viewvc/geany-plugins/).
|
||||||
|
* Then you can use the repository for your own plugin.
|
||||||
|
*
|
||||||
|
* Authors using this service should subscribe to the
|
||||||
|
* geany-plugins-commits at uvena.de and geany-plugins-tracker at uvena.de
|
||||||
|
* mailing lists(see my previous post) to stay up to date with changes.
|
||||||
|
* General plugin discussion can happen on the normal geany at uvena.de or
|
||||||
|
* geany-devel at uvena.de lists.
|
||||||
|
*
|
||||||
|
* At time of writing, there are some plugins already available in the
|
||||||
|
* repository. Feel free to use any of these plugins as a start for your own,
|
||||||
|
* maybe by copying the directory structure and the autotools files
|
||||||
|
* (Makefile.am, configure.in, ...). Most of the available plugins are also ready for
|
||||||
|
* i18n support, just for reference.
|
||||||
|
*
|
||||||
|
* New plugins should be imported into a new directory inside the trunk/
|
||||||
|
* directory. There are also the common branches and tags directories, use
|
||||||
|
* them as needed, use always a subdirectory for your own plugin.
|
||||||
|
*
|
||||||
|
* We encourage authors using this service to only commit changes to their
|
||||||
|
* own plugin and not to others' plugins. Instead just send patches to
|
||||||
|
* geany-devel at uvena.de or the plugin author directly.
|
||||||
|
*
|
||||||
|
* (the full announcement of this service can be found at
|
||||||
|
* http://lists.uvena.de/geany/2008-April/003225.html)
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @section paths Installation paths
|
||||||
|
*
|
||||||
|
* - The plugin binary (@c pluginname.so) should be installed in Geany's libdir. This is
|
||||||
|
* necessary so that Geany can find the plugin.
|
||||||
|
* An easy way to retrieve Geany's libdir is to use the pkg-config tool, e.g. @code
|
||||||
|
* `$PKG_CONFIG --variable=libdir geany`/ geany
|
||||||
|
* @endcode
|
||||||
|
* - If your plugin creates other binary files like helper programs or helper libraries,
|
||||||
|
* they should go into @c $prefix/bin (for programs, ideally prefixed with @a geany),
|
||||||
|
* additional libraries should be installed in Geany's libdir, maybe in a subdirectory.
|
||||||
|
* - Plugins should install their documentation files (README, NEWS, ChangeLog, licences and
|
||||||
|
* other documentation files) into the common documentation directory
|
||||||
|
* @c $prefix/share/doc/geany-plugins/$pluginname/
|
||||||
|
* - Translation files should be installed normally into @c $prefix/share/locale. There is no
|
||||||
|
* need to use Geany's translation directory. To set up translation support properly and
|
||||||
|
* for additional information, see main_locale_init().
|
||||||
|
* - Do @a never install anything into a user's home directory like installing
|
||||||
|
* the plugin binary in @c ~/.config/geany/plugins/.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @page howto Plugin Howto
|
* @page howto Plugin Howto
|
||||||
@ -197,70 +332,229 @@ PluginCallback plugin_callbacks[] =
|
|||||||
* plugins by writing a simple "Hello World" plugin in C.
|
* plugins by writing a simple "Hello World" plugin in C.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @section start Getting started
|
* @section buildenv Build environment
|
||||||
*
|
|
||||||
* @subsection structure Plugin structure
|
|
||||||
*
|
|
||||||
* Every plugin must contain some essential symbols unless it won't work. A complete
|
|
||||||
* list of all necessary and optional symbols can be found in
|
|
||||||
* @link pluginsymbols.c Plugin Symbols @endlink.
|
|
||||||
* Every plugin should include "geany.h" and "plugindata.h" which provide necessary
|
|
||||||
* preprocessor macros and other basic information.
|
|
||||||
* There are two important preprocessor macros which need to be used at the beginning:
|
|
||||||
* PLUGIN_SET_INFO() and PLUGIN_VERSION_CHECK().
|
|
||||||
*
|
|
||||||
* PLUGIN_SET_INFO() tells Geany about basic plugin information like name, description,
|
|
||||||
* version and author of the plugin.
|
|
||||||
*
|
|
||||||
* PLUGIN_VERSION_CHECK() checks for compatibility of the API version which
|
|
||||||
* the plugin uses with the used Geany sources. Furthermore, it also checks
|
|
||||||
* the binary compatiblity of the plugin with Geany.
|
|
||||||
*
|
|
||||||
* A few functions are necessary to let Geany work with the plugin, at least plugin_init() must
|
|
||||||
* exist in the plugin. plugin_cleanup() should also be used to free allocated memory or destroy
|
|
||||||
* created widgets.
|
|
||||||
*
|
|
||||||
* @subsection buildenv Build environment
|
|
||||||
*
|
*
|
||||||
* To be able to write plugins for Geany, you need the source code and some development
|
* To be able to write plugins for Geany, you need the source code and some development
|
||||||
* packages for GTK and its dependencies. I will only describe the way to compile and
|
* packages for GTK and its dependencies. The following will only describe the way to compile and
|
||||||
* build plugins on Unix-like systems [1].
|
* build plugins on Unix-like systems [1].
|
||||||
* If you already have the Geany source code and compiled it from them, you can skip the
|
* If you already have the Geany source code and compiled it from them, you can skip the
|
||||||
* following.
|
* following.
|
||||||
*
|
*
|
||||||
* First you need to get the source code of Geany from the website at
|
* First you need to have Geany installed. Then install the development files for GTK
|
||||||
* http://www.geany.org/Download/Releases [2]. Then install the development files for GTK
|
|
||||||
* and its dependencies. The easiest way to do this is to use your distribution's package
|
* and its dependencies. The easiest way to do this is to use your distribution's package
|
||||||
* management system, e.g. on Debian and Ubuntu systems you can use
|
* management system, e.g. on Debian and Ubuntu systems you can use
|
||||||
* @code apt-get install libgtk2.0-dev intltool @endcode
|
* @code apt-get install libgtk2.0-dev intltool @endcode
|
||||||
* This will install all necessary files to be able to compile Geany and plugins. On other
|
* This will install all necessary files to be able to compile plugins for Geany. On other
|
||||||
* distributions, the package names and commands to use may differ.
|
* distributions, the package names and commands to use may differ.
|
||||||
*
|
*
|
||||||
* Basically, we are done at this point and could continue with writing the plugin code.
|
* Basically, you are done at this point and could continue with writing the plugin code.
|
||||||
* You don't need necessarily to configure and build the Geany sources when the sources
|
|
||||||
* have the same version as your running Geany installation. But if the version of the
|
|
||||||
* sources differ from your Geany installation or especially when you used the source code
|
|
||||||
* from the Subversion repository, we strongly recommend to configure and build these
|
|
||||||
* sources and use it. To do so, run @code
|
|
||||||
./configure && make
|
|
||||||
su -c "make install"
|
|
||||||
* @endcode
|
|
||||||
* in your Geany source directory. This will build and install Geany on your system.
|
|
||||||
*
|
*
|
||||||
* [1] For Windows, it is basically the same but you might have some more work on setting up
|
* [1] For Windows, it is basically the same but you might have some more work on setting up
|
||||||
* the general build environment(compiler, GTK development files, ...). This is described on
|
* the general build environment(compiler, GTK development files, ...). This is described on
|
||||||
* Geany's website at http://www.geany.org/Support/BuildingOnWin32.
|
* Geany's website at http://www.geany.org/Support/BuildingOnWin32.
|
||||||
*
|
*
|
||||||
* [2] You can also use the bleedging edge source code from our Subversion repository.
|
* @section helloworld "Hello World"
|
||||||
* More information about this can be found at http://www.geany.org/Download/SVN.
|
|
||||||
*
|
*
|
||||||
* @section helloworld "Hello World"
|
* When writing a plugin, you will find a couple of functions or macros which are mandatory
|
||||||
|
* and some which are free to use for implementing some useful feature once your plugin
|
||||||
|
* becomes more powerful like including a configuration or help dialog.
|
||||||
*
|
*
|
||||||
* We want to write a really simple "Hello World" plugin which opens a message dialog
|
* You should start your plugin with including some of the needed C header files and defining
|
||||||
* and just prints "Hello World".
|
* some basic global variables which will help you to access all needed functions of the plugin
|
||||||
|
* API in a more comfortable way.
|
||||||
*
|
*
|
||||||
|
* Let's start with the very basic headers and add more later if necessary.
|
||||||
|
* @code
|
||||||
|
#include "geany.h"
|
||||||
|
#include "plugindata.h"
|
||||||
|
#include "geanyfunctions.h"
|
||||||
|
* @endcode
|
||||||
*
|
*
|
||||||
* ... to be continued ...
|
* @a geany.h will include the necessary GTK header files, so there is no need to include
|
||||||
|
* @a gtk/gtk.h yourself.
|
||||||
*
|
*
|
||||||
|
* @a plugindata.h contains the biggest part of the plugin API and provides some basic macros.
|
||||||
|
*
|
||||||
|
* @a geanyfunctions.h provide some macros for convenient access to the plugin API.
|
||||||
|
*
|
||||||
|
* Later, you will note that by adding more functionality more header file includes will be
|
||||||
|
* necessary. Best practice for including header files is to always include @a geany.h at first,
|
||||||
|
* then include other necessary header files and at last include plugindata.h and @a
|
||||||
|
* geanyfunctions.h.
|
||||||
|
*
|
||||||
|
* The you should define three basic variables which will give access to data fields and
|
||||||
|
* functions provided by the plugin API.
|
||||||
|
* @code
|
||||||
|
GeanyPlugin *geany_plugin;
|
||||||
|
GeanyData *geany_data;
|
||||||
|
GeanyFunctions *geany_functions;
|
||||||
|
* @endcode
|
||||||
|
*
|
||||||
|
* Now you can go on and write your first lines for your new plugin. As mentioned before,
|
||||||
|
* you will need to implement and fill out a couple of functions/macros to make the plugin work.
|
||||||
|
* So let's start with PLUGIN_VERSION_CHECK().
|
||||||
|
*
|
||||||
|
* PLUGIN_VERSION_CHECK() is a convenient way to tell Geany which version of Geany's plugin API
|
||||||
|
* is needed at minimum to run your plugin. The value is defined in
|
||||||
|
* @a plugindata.h by @a GEANY_API_VERSION. In most cases this should be your minimum.
|
||||||
|
* Nevertheless when setting this value, you should choose the lowest possible version here to
|
||||||
|
* make the plugin compatible with a bigger number of versions of Geany.
|
||||||
|
*
|
||||||
|
* As the next step, you will need to tell Geany a couple of basic information of your plugin,
|
||||||
|
* so it is able to show them e.g. on the plugin manager dialog.
|
||||||
|
*
|
||||||
|
* For doing this, you should use PLUGIN_SET_INFO() which expects 4 values:
|
||||||
|
* - Plugin name that should appear on the plugin manager dialog
|
||||||
|
* - Short plugin description
|
||||||
|
* - Plugin version
|
||||||
|
* - Author.
|
||||||
|
*
|
||||||
|
* Based on this, the line could look like:
|
||||||
|
* @code
|
||||||
|
PLUGIN_SET_INFO("HelloWorld", "Just another tool to say hello world",
|
||||||
|
"1.0", "John Doe <john.doe@example.org>");
|
||||||
|
* @endcode
|
||||||
|
*
|
||||||
|
* Once this is done, you will need to implement the function which will be executed when the
|
||||||
|
* plugin is loaded. Part of that function could be adding and removing of an item to
|
||||||
|
* Geany's Tools menu, setting up keybindings or registering some callbacks. Also you will
|
||||||
|
* need to implement the function that is called when your plugin is unloaded.
|
||||||
|
* These functions are called plugin_init() and plugin_cleanup(). Let's see how it could look like:
|
||||||
|
* @code
|
||||||
|
PLUGIN_VERSION_CHECK(130)
|
||||||
|
|
||||||
|
PLUGIN_SET_INFO("HelloWorld", "Just another tool to say hello world",
|
||||||
|
"1.0", "Joe Doe <joe.doe@example.org>");
|
||||||
|
|
||||||
|
void plugin_init(GeanyData *data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void plugin_cleanup(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
* @endcode
|
||||||
|
*
|
||||||
|
* If you think this plugin seems to doesn't implement any function right now and only waste
|
||||||
|
* some memory, you are right. At least, it should compile and load/unload on in Geany nicely.
|
||||||
|
* Now you have the very basic layout of a new plugin. Great, isn't it?
|
||||||
|
*
|
||||||
|
* Let's go on and implement some real functionality.
|
||||||
|
*
|
||||||
|
* As mentioned before, plugin_init() will be called when the plugin is loaded in Geany.
|
||||||
|
* So it should implement everything that needs to be done during startup. In this example case,
|
||||||
|
* we like to add a menu item to Geany's Tools menu which runs a dialog printing "Hello World".
|
||||||
|
* @code
|
||||||
|
void plugin_init(GeanyData *data)
|
||||||
|
{
|
||||||
|
GtkWidget *main_menu_item;
|
||||||
|
|
||||||
|
// Create a new menu item and show it
|
||||||
|
main_menu_item = gtk_menu_item_new_with_mnemonic("Hello World");
|
||||||
|
gtk_widget_show(main_menu_item);
|
||||||
|
|
||||||
|
// Attach the new menu item to the Tools menu
|
||||||
|
gtk_container_add(GTK_CONTAINER(geany->main_widgets->tools_menu),
|
||||||
|
main_menu_item);
|
||||||
|
|
||||||
|
// Connect the menu item with a callback function
|
||||||
|
// which is called when the item is clicked
|
||||||
|
g_signal_connect(main_menu_item, "activate",
|
||||||
|
G_CALLBACK(item_activate_cb), NULL);
|
||||||
|
}
|
||||||
|
* @endcode
|
||||||
|
*
|
||||||
|
* This will add an item to the Tools menu and connect this item to a function which implements
|
||||||
|
* what should be done when the menu item is activated by the user.
|
||||||
|
* This is done by g_signal_connect(). The Tools menu can be accessed with
|
||||||
|
* geany->main_widgets->tools_menu. The structure @a main_widgets contains pointers to some
|
||||||
|
* main GUI elements in Geany. To be able to use it, you must include ui_utils.h. This can
|
||||||
|
* be done by adding the following line to the include section of your code.
|
||||||
|
* @code
|
||||||
|
#include "ui_utils.h"
|
||||||
|
* @endcode
|
||||||
|
*
|
||||||
|
* Geany is offering a simple API for showing message dialogs. So the function contains
|
||||||
|
* only a few lines like:
|
||||||
|
* @code
|
||||||
|
void item_activate_cb(GtkMenuItem *menuitem, gpointer user_data)
|
||||||
|
{
|
||||||
|
dialogs_show_msgbox(GTK_MESSAGE_INFO, "Hello World");
|
||||||
|
}
|
||||||
|
* @endcode
|
||||||
|
*
|
||||||
|
* For the moment you don't need to worry about the parameters of that function.
|
||||||
|
*
|
||||||
|
* Do you remember, you need to clean up when unloading the plugin? Because of this,
|
||||||
|
* some more action is required.
|
||||||
|
*
|
||||||
|
* To remove the menu item from the Tools menu, you can use gtk_widget_destroy().
|
||||||
|
* gtk_widget_destroy() expects a pointer to a GtkWidget object.
|
||||||
|
*
|
||||||
|
* First you should add gtk_widget_destroy() to your plugin_cleanup() function.
|
||||||
|
* The argument for gtk_widget_destroy() is the widget object you created earlier in
|
||||||
|
* plugin_init(). To be able to access this pointer in plugin_cleanup(), you need to move
|
||||||
|
* its definition from plugin_init() into the global context so its visibility will increase
|
||||||
|
* and it can be accessed in all functions.
|
||||||
|
* @code
|
||||||
|
static GtkWidget *main_menu_item = NULL;
|
||||||
|
|
||||||
|
// ...
|
||||||
|
void plugin_init(GeanyData *data)
|
||||||
|
{
|
||||||
|
main_menu_item = gtk_menu_item_new_with_mnemonic("Hello World");
|
||||||
|
gtk_widget_show(main_menu_item);
|
||||||
|
// ...
|
||||||
|
}
|
||||||
|
|
||||||
|
void plugin_cleanup(void)
|
||||||
|
{
|
||||||
|
gtk_widget_destroy(main_menu_item);
|
||||||
|
}
|
||||||
|
* @endcode
|
||||||
|
*
|
||||||
|
* This will ensure, your menu item will be removed from the Tools menu as well as from
|
||||||
|
* memory once your plugin is unloaded and you don't leave any memory leaks back.
|
||||||
|
* Once this is done, your first plugin is ready. Congratulations!
|
||||||
|
*
|
||||||
|
* The complete listing (without comments):
|
||||||
|
* @code
|
||||||
|
#include "geany.h"
|
||||||
|
#include "ui_utils.h"
|
||||||
|
#include "plugindata.h"
|
||||||
|
#include "geanyfunctions.h"
|
||||||
|
|
||||||
|
GeanyPlugin *geany_plugin;
|
||||||
|
GeanyData *geany_data;
|
||||||
|
GeanyFunctions *geany_functions;
|
||||||
|
|
||||||
|
PLUGIN_VERSION_CHECK(130)
|
||||||
|
|
||||||
|
PLUGIN_SET_INFO("HelloWorld", "Just another tool to say hello world",
|
||||||
|
"1.0", "John Doe <john.doe@example.org>");
|
||||||
|
|
||||||
|
|
||||||
|
static GtkWidget *main_menu_item = NULL;
|
||||||
|
|
||||||
|
static void item_activate_cb(GtkMenuItem *menuitem, gpointer gdata)
|
||||||
|
{
|
||||||
|
dialogs_show_msgbox(GTK_MESSAGE_INFO, "Hello World");
|
||||||
|
}
|
||||||
|
|
||||||
|
void plugin_init(GeanyData *data)
|
||||||
|
{
|
||||||
|
main_menu_item = gtk_menu_item_new_with_mnemonic("Hello World");
|
||||||
|
gtk_widget_show(main_menu_item);
|
||||||
|
gtk_container_add(GTK_CONTAINER(geany->main_widgets->tools_menu),
|
||||||
|
main_menu_item);
|
||||||
|
g_signal_connect(main_menu_item, "activate",
|
||||||
|
G_CALLBACK(item_activate_cb), NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
void plugin_cleanup(void)
|
||||||
|
{
|
||||||
|
gtk_widget_destroy(main_menu_item);
|
||||||
|
}
|
||||||
|
* @endcode
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* pluginsymbols.c - this file is part of Geany, a fast and lightweight IDE
|
* pluginsymbols.c - this file is part of Geany, a fast and lightweight IDE
|
||||||
*
|
*
|
||||||
* Copyright 2008 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
* Copyright 2008-2009 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||||
* Copyright 2008 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
* Copyright 2008-2009 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -43,22 +43,27 @@ gint plugin_version_check(gint);
|
|||||||
* @param info The data struct which should be initialized by this function. */
|
* @param info The data struct which should be initialized by this function. */
|
||||||
void plugin_set_info(PluginInfo *info);
|
void plugin_set_info(PluginInfo *info);
|
||||||
|
|
||||||
/** Basic information about a plugin, which is set in plugin_set_info(). */
|
/** @deprecated Use @ref geany_plugin->info instead.
|
||||||
const PluginInfo* plugin_info;
|
* Basic information about a plugin, which is set in plugin_set_info(). */
|
||||||
|
const PluginInfo *plugin_info;
|
||||||
|
|
||||||
|
/** Basic information for the plugin and identification. */
|
||||||
|
const GeanyPlugin *geany_plugin;
|
||||||
|
|
||||||
/** Geany owned data pointers.
|
/** Geany owned data pointers.
|
||||||
* Example: @c assert(geany_data->app->configdir != NULL); */
|
* Example: @c assert(geany_data->app->configdir != NULL); */
|
||||||
const GeanyData* geany_data;
|
const GeanyData *geany_data;
|
||||||
|
|
||||||
/** Geany owned function pointers, split into groups.
|
/** Geany owned function pointers, split into groups.
|
||||||
* Example: @c geany_functions->p_document->new_file(NULL, NULL, NULL);
|
* Example: @code #include "geanyfunctions.h"
|
||||||
*
|
* ...
|
||||||
* Note: Usually plugins would use the pluginmacros.h file and just call:
|
* document_new_file(NULL, NULL, NULL); @endcode
|
||||||
* @c p_document->new_file(NULL, NULL, NULL); */
|
* This is equivalent of @c geany_functions->p_document->new_file(NULL, NULL, NULL); */
|
||||||
const GeanyFunctions* geany_functions;
|
const GeanyFunctions *geany_functions;
|
||||||
|
|
||||||
/** Plugin owned fields, including flags. */
|
/** @deprecated Use @ref ui_add_document_sensitive() instead.
|
||||||
PluginFields* plugin_fields;
|
* Plugin owned fields, including flags. */
|
||||||
|
PluginFields *plugin_fields;
|
||||||
|
|
||||||
/** An array for connecting GeanyObject events, which should be terminated with
|
/** An array for connecting GeanyObject events, which should be terminated with
|
||||||
* @c {NULL, NULL, FALSE, NULL}. See @link signals Signal documentation @endlink. */
|
* @c {NULL, NULL, FALSE, NULL}. See @link signals Signal documentation @endlink. */
|
||||||
@ -92,3 +97,9 @@ void plugin_init(GeanyData *data);
|
|||||||
* everything done in plugin_init() - e.g. destroy menu items, free memory. */
|
* everything done in plugin_init() - e.g. destroy menu items, free memory. */
|
||||||
void plugin_cleanup();
|
void plugin_cleanup();
|
||||||
|
|
||||||
|
/** Called whenever the plugin should show its documentation (if any). This may open a dialog,
|
||||||
|
* a browser with a website or a local installed HTML help file(see utils_start_browser())
|
||||||
|
* or something else.
|
||||||
|
* Can be omitted when not needed. */
|
||||||
|
void plugin_help();
|
||||||
|
|
||||||
|
4445
geany.glade
521
geany.nsi
@ -1,42 +1,49 @@
|
|||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; Installer script for Geany (Windows Installer) ;
|
; geany.nsi - this file is part of Geany, a fast and lightweight IDE
|
||||||
; Script generated by the HM NIS Edit Script Wizard. :
|
;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
; Copyright 2007-2009 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||||
|
; Copyright 2007-2009 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
|
||||||
|
; the Free Software Foundation; either version 2 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; This program is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; 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$
|
||||||
|
;
|
||||||
|
; Installer script for Geany (Windows Installer)
|
||||||
|
; (Script originally generated by the HM NIS Edit Script Wizard)
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
|
||||||
|
; Do a Cyclic Redundancy Check to make sure the installer was not corrupted by the download
|
||||||
|
CRCCheck force
|
||||||
|
RequestExecutionLevel user ; set execution level for Windows Vista
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;
|
||||||
; helper defines ;
|
; helper defines ;
|
||||||
;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;
|
||||||
!define PRODUCT_NAME "Geany"
|
!define PRODUCT_NAME "Geany"
|
||||||
!define PRODUCT_VERSION "0.15"
|
!define PRODUCT_VERSION "0.17"
|
||||||
!define PRODUCT_VERSION_ID "0.15.0.0"
|
!define PRODUCT_VERSION_ID "0.17.0.0"
|
||||||
!define PRODUCT_PUBLISHER "Enrico Troeger"
|
!define PRODUCT_PUBLISHER "The Geany developer team"
|
||||||
!define PRODUCT_WEB_SITE "http://www.geany.org/"
|
!define PRODUCT_WEB_SITE "http://www.geany.org/"
|
||||||
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Geany.exe"
|
!define PRODUCT_DIR_REGKEY "Software\Geany"
|
||||||
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
|
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
|
||||||
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
|
!define PRODUCT_EXE "$INSTDIR\bin\Geany.exe"
|
||||||
!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
|
!define PRODUCT_REGNAME "Geany.ProjectFile"
|
||||||
|
!define PRODUCT_EXT ".geany"
|
||||||
!define RESOURCEDIR "geany-${PRODUCT_VERSION}"
|
!define RESOURCEDIR "geany-${PRODUCT_VERSION}"
|
||||||
|
|
||||||
; only used when embedding GTK+ installer
|
|
||||||
!define GTK_INSTALLER "gtk+-2.10.6-1-setup.exe"
|
|
||||||
|
|
||||||
SetCompressor /SOLID lzma
|
|
||||||
XPStyle on
|
|
||||||
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
|
||||||
|
|
||||||
InstallDir "$PROGRAMFILES\Geany"
|
|
||||||
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
|
|
||||||
ShowInstDetails hide
|
|
||||||
ShowUnInstDetails hide
|
|
||||||
|
|
||||||
!ifdef INCLUDE_GTK
|
|
||||||
OutFile "geany-${PRODUCT_VERSION}_setup.exe"
|
|
||||||
!else
|
|
||||||
OutFile "geany-${PRODUCT_VERSION}_nogtk_setup.exe"
|
|
||||||
!endif
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;
|
||||||
; Version resource ;
|
; Version resource ;
|
||||||
;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;
|
||||||
@ -44,39 +51,31 @@ VIProductVersion "${PRODUCT_VERSION_ID}"
|
|||||||
VIAddVersionKey "ProductName" "${PRODUCT_NAME}"
|
VIAddVersionKey "ProductName" "${PRODUCT_NAME}"
|
||||||
VIAddVersionKey "FileVersion" "${PRODUCT_VERSION}"
|
VIAddVersionKey "FileVersion" "${PRODUCT_VERSION}"
|
||||||
VIAddVersionKey "ProductVersion" "${PRODUCT_VERSION}"
|
VIAddVersionKey "ProductVersion" "${PRODUCT_VERSION}"
|
||||||
VIAddVersionKey "LegalCopyright" "Copyright 2005-2008 by the Geany developers"
|
VIAddVersionKey "LegalCopyright" "Copyright 2005-2009 by the Geany developer team"
|
||||||
VIAddVersionKey "FileDescription" "${PRODUCT_NAME} Installer"
|
VIAddVersionKey "FileDescription" "${PRODUCT_NAME} Installer"
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;
|
BrandingText "$(^NAME) installer (NSIS 2.42)"
|
||||||
; Init code ;
|
InstallDir "$PROGRAMFILES\Geany"
|
||||||
;;;;;;;;;;;;;;;;
|
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
||||||
Function .onInit
|
SetCompressor /SOLID lzma
|
||||||
; prevent running multiple instances of the installer
|
ShowInstDetails hide
|
||||||
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "geany_installer") i .r1 ?e'
|
ShowUnInstDetails hide
|
||||||
Pop $R0
|
XPStyle on
|
||||||
StrCmp $R0 0 +3
|
!ifdef INCLUDE_GTK
|
||||||
MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."
|
OutFile "geany-${PRODUCT_VERSION}_setup.exe"
|
||||||
Abort
|
!else
|
||||||
; warn about a new install over an existing installation
|
OutFile "geany-${PRODUCT_VERSION}_nogtk_setup.exe"
|
||||||
ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString"
|
!endif
|
||||||
StrCmp $R0 "" done
|
|
||||||
|
|
||||||
MessageBox MB_YESNO|MB_ICONEXCLAMATION \
|
|
||||||
"Geany has already been installed. $\nDo you want to remove the previous version before installing $(^Name) ?" \
|
|
||||||
IDNO done
|
|
||||||
|
|
||||||
;Run the uninstaller
|
|
||||||
ClearErrors
|
|
||||||
ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
|
|
||||||
|
|
||||||
done:
|
|
||||||
FunctionEnd
|
|
||||||
|
|
||||||
|
Var Answer
|
||||||
|
Var UserName
|
||||||
|
Var StartmenuFolder
|
||||||
|
Var UNINSTDIR
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;
|
||||||
; MUI Settings ;
|
; MUI Settings ;
|
||||||
;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;
|
||||||
!include "MUI.nsh"
|
!include "MUI2.nsh"
|
||||||
|
|
||||||
!define MUI_ABORTWARNING
|
!define MUI_ABORTWARNING
|
||||||
!define MUI_ICON "pixmaps\geany.ico"
|
!define MUI_ICON "pixmaps\geany.ico"
|
||||||
@ -93,26 +92,23 @@ FunctionEnd
|
|||||||
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE OnDirLeave
|
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE OnDirLeave
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
!insertmacro MUI_PAGE_DIRECTORY
|
||||||
; Start menu page
|
; Start menu page
|
||||||
var ICONS_GROUP
|
|
||||||
!define MUI_STARTMENUPAGE_NODISABLE
|
|
||||||
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Geany"
|
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Geany"
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
|
!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
|
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
|
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
|
||||||
!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
|
!insertmacro MUI_PAGE_STARTMENU ${PRODUCT_NAME} "$StartmenuFolder"
|
||||||
; Instfiles page
|
; Instfiles page
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
; Finish page
|
; Finish page
|
||||||
|
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\News.txt"
|
||||||
|
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Show Release Notes"
|
||||||
|
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
||||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\bin\Geany.exe"
|
!define MUI_FINISHPAGE_RUN "$INSTDIR\bin\Geany.exe"
|
||||||
|
!define MUI_FINISHPAGE_RUN_NOTCHECKED
|
||||||
!insertmacro MUI_PAGE_FINISH
|
!insertmacro MUI_PAGE_FINISH
|
||||||
; Uninstaller pages
|
|
||||||
!insertmacro MUI_UNPAGE_INSTFILES
|
|
||||||
; Language files
|
|
||||||
!insertmacro MUI_LANGUAGE "English"
|
|
||||||
; Reserve files
|
|
||||||
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
|
|
||||||
; MUI end ------
|
|
||||||
|
|
||||||
|
!insertmacro MUI_UNPAGE_INSTFILES ; Uninstaller page
|
||||||
|
!insertmacro MUI_LANGUAGE "English" ; Language file
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; Sections and InstTypes ;
|
; Sections and InstTypes ;
|
||||||
@ -121,198 +117,309 @@ InstType "Full"
|
|||||||
InstType "Minimal"
|
InstType "Minimal"
|
||||||
|
|
||||||
Section "!Program Files" SEC01
|
Section "!Program Files" SEC01
|
||||||
SectionIn RO 1 2
|
SectionIn RO 1 2
|
||||||
SetOverwrite ifnewer
|
SetOverwrite ifnewer
|
||||||
|
|
||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
File "${RESOURCEDIR}\*.txt"
|
File "${RESOURCEDIR}\*.txt"
|
||||||
|
|
||||||
SetOutPath "$INSTDIR\bin"
|
SetOutPath "$INSTDIR\bin"
|
||||||
File "${RESOURCEDIR}\bin\Geany.exe"
|
File "${RESOURCEDIR}\bin\Geany.exe"
|
||||||
|
|
||||||
SetOutPath "$INSTDIR\data"
|
SetOutPath "$INSTDIR\data"
|
||||||
File "${RESOURCEDIR}\data\GPL-2"
|
File "${RESOURCEDIR}\data\GPL-2"
|
||||||
File "${RESOURCEDIR}\data\file*"
|
File "${RESOURCEDIR}\data\file*"
|
||||||
File "${RESOURCEDIR}\data\snippets.conf"
|
File "${RESOURCEDIR}\data\snippets.conf"
|
||||||
|
File "${RESOURCEDIR}\data\ui_toolbar.xml"
|
||||||
|
|
||||||
SetOutPath "$INSTDIR\share\icons"
|
SetOutPath "$INSTDIR\share\icons"
|
||||||
File /r "${RESOURCEDIR}\share\icons\*"
|
File /r "${RESOURCEDIR}\share\icons\*"
|
||||||
|
|
||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
|
||||||
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
|
CreateShortCut "$INSTDIR\Geany.lnk" "$INSTDIR\bin\Geany.exe"
|
||||||
CreateShortCut "$INSTDIR\Geany.lnk" "$INSTDIR\bin\Geany.exe"
|
!insertmacro MUI_STARTMENU_WRITE_BEGIN ${PRODUCT_NAME}
|
||||||
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Geany.lnk" "$INSTDIR\bin\Geany.exe"
|
CreateDirectory "$SMPROGRAMS\$StartmenuFolder"
|
||||||
CreateShortCut "$DESKTOP\Geany.lnk" "$INSTDIR\bin\Geany.exe"
|
CreateShortCut "$SMPROGRAMS\$StartmenuFolder\Geany.lnk" "$INSTDIR\bin\Geany.exe"
|
||||||
CreateShortCut "$QUICKLAUNCH\Geany.lnk" "$INSTDIR\bin\Geany.exe"
|
!insertmacro MUI_STARTMENU_WRITE_END
|
||||||
!insertmacro MUI_STARTMENU_WRITE_END
|
|
||||||
|
; register the extension .geany
|
||||||
|
; write information about file type
|
||||||
|
WriteRegStr SHCTX "Software\Classes\${PRODUCT_REGNAME}" "" "${PRODUCT_NAME} Project File"
|
||||||
|
WriteRegStr SHCTX "Software\Classes\${PRODUCT_REGNAME}\DefaultIcon" "" "${PRODUCT_EXE},0"
|
||||||
|
WriteRegStr SHCTX "Software\Classes\${PRODUCT_REGNAME}\Shell\open\command" "" '"${PRODUCT_EXE}" "%1"'
|
||||||
|
; write information about file extensions
|
||||||
|
WriteRegStr SHCTX "Software\Classes\${PRODUCT_EXT}" "" "${PRODUCT_REGNAME}"
|
||||||
|
; refresh shell
|
||||||
|
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) (0x08000000, 0, 0, 0)'
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Plugins" SEC02
|
Section "Plugins" SEC02
|
||||||
SectionIn 1
|
SectionIn 1
|
||||||
SetOverwrite ifnewer
|
SetOverwrite ifnewer
|
||||||
SetOutPath "$INSTDIR\lib"
|
SetOutPath "$INSTDIR\lib"
|
||||||
File "${RESOURCEDIR}\lib\*.dll"
|
File "${RESOURCEDIR}\lib\*.dll"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Language Files" SEC03
|
Section "Language Files" SEC03
|
||||||
SectionIn 1
|
SectionIn 1
|
||||||
SetOutPath "$INSTDIR\share\locale"
|
SetOutPath "$INSTDIR\share\locale"
|
||||||
File /r "${RESOURCEDIR}\share\locale\*"
|
File /r "${RESOURCEDIR}\share\locale\*"
|
||||||
|
!ifdef INCLUDE_GTK
|
||||||
|
SetOutPath "$INSTDIR\share"
|
||||||
|
File /r "gtk\share\*"
|
||||||
|
!endif
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Documentation" SEC04
|
Section "Documentation" SEC04
|
||||||
SectionIn 1
|
SectionIn 1
|
||||||
SetOverwrite ifnewer
|
SetOverwrite ifnewer
|
||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
File /r "${RESOURCEDIR}\doc"
|
File /r "${RESOURCEDIR}\doc"
|
||||||
|
WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" "$INSTDIR\doc\Manual.html"
|
||||||
; Shortcuts
|
!insertmacro MUI_STARTMENU_WRITE_BEGIN ${PRODUCT_NAME}
|
||||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
CreateShortCut "$SMPROGRAMS\$StartmenuFolder\Documentation.lnk" "$INSTDIR\Documentation.url"
|
||||||
WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" "$INSTDIR\doc\Manual.html"
|
!insertmacro MUI_STARTMENU_WRITE_END
|
||||||
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation.lnk" "$INSTDIR\Documentation.url"
|
|
||||||
!insertmacro MUI_STARTMENU_WRITE_END
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Autocompletion Tags" SEC05
|
Section "Autocompletion Tags" SEC05
|
||||||
SectionIn 1
|
SectionIn 1
|
||||||
SetOutPath "$INSTDIR\data"
|
SetOutPath "$INSTDIR\data"
|
||||||
SetOverwrite ifnewer
|
SetOverwrite ifnewer
|
||||||
File "${RESOURCEDIR}\data\php.tags"
|
File "${RESOURCEDIR}\data\php.tags"
|
||||||
File "${RESOURCEDIR}\data\pascal.tags"
|
File "${RESOURCEDIR}\data\pascal.tags"
|
||||||
File "${RESOURCEDIR}\data\latex.tags"
|
File "${RESOURCEDIR}\data\latex.tags"
|
||||||
File "${RESOURCEDIR}\data\python.tags"
|
File "${RESOURCEDIR}\data\python.tags"
|
||||||
File "${RESOURCEDIR}\data\html_entities.tags"
|
File "${RESOURCEDIR}\data\html_entities.tags"
|
||||||
File "${RESOURCEDIR}\data\global.tags"
|
File "${RESOURCEDIR}\data\c99.tags"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
; Include GTK runtime library but only if desired from command line
|
; Include GTK runtime library but only if desired from command line
|
||||||
!ifdef INCLUDE_GTK
|
!ifdef INCLUDE_GTK
|
||||||
Section "GTK 2.12 Runtime Environment" SEC06
|
Section "GTK 2.14 Runtime Environment" SEC06
|
||||||
SectionIn 1
|
SectionIn 1
|
||||||
SetOverwrite ifnewer
|
SetOverwrite ifnewer
|
||||||
SetOutPath "$INSTDIR\bin"
|
SetOutPath "$INSTDIR\bin"
|
||||||
File /r "gtk\bin\*"
|
File /r "gtk\bin\*"
|
||||||
SetOutPath "$INSTDIR\etc"
|
SetOutPath "$INSTDIR\etc"
|
||||||
File /r "gtk\etc\*"
|
File /r "gtk\etc\*"
|
||||||
SetOutPath "$INSTDIR\lib"
|
SetOutPath "$INSTDIR\lib"
|
||||||
File /r "gtk\lib\*"
|
File /r "gtk\lib\*"
|
||||||
SetOutPath "$INSTDIR\share"
|
|
||||||
File /r "gtk\share\*"
|
|
||||||
/* code to embed GTK+ installer executable
|
|
||||||
File ${GTK_INSTALLER}
|
|
||||||
ExecWait ${GTK_INSTALLER}
|
|
||||||
*/
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
Section "Context menus" SEC07
|
Section "Context Menus" SEC07
|
||||||
SectionIn 1
|
SectionIn 1
|
||||||
WriteRegStr HKCR "*\shell\OpenWithGeany" "" "Open with Geany"
|
WriteRegStr HKCR "*\shell\OpenWithGeany" "" "Open with Geany"
|
||||||
WriteRegStr HKCR "*\shell\OpenWithGeany\command" "" '$INSTDIR\bin\geany.exe "%1"'
|
WriteRegStr HKCR "*\shell\OpenWithGeany\command" "" '$INSTDIR\bin\geany.exe "%1"'
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section "Desktop Shortcuts" SEC08
|
||||||
|
SectionIn 1
|
||||||
|
CreateShortCut "$DESKTOP\Geany.lnk" "$INSTDIR\bin\Geany.exe"
|
||||||
|
CreateShortCut "$QUICKLAUNCH\Geany.lnk" "$INSTDIR\bin\Geany.exe"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section -AdditionalIcons
|
Section -AdditionalIcons
|
||||||
SetOutPath $INSTDIR
|
SetOutPath $INSTDIR
|
||||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
!insertmacro MUI_STARTMENU_WRITE_BEGIN ${PRODUCT_NAME}
|
||||||
WriteIniStr "$INSTDIR\Website.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
|
WriteIniStr "$INSTDIR\Website.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
|
||||||
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Website.lnk" "$INSTDIR\Website.url"
|
CreateShortCut "$SMPROGRAMS\$StartmenuFolder\Website.lnk" "$INSTDIR\Website.url"
|
||||||
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe"
|
CreateShortCut "$SMPROGRAMS\$StartmenuFolder\Uninstall.lnk" "$INSTDIR\uninst.exe"
|
||||||
!insertmacro MUI_STARTMENU_WRITE_END
|
!insertmacro MUI_STARTMENU_WRITE_END
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section -Post
|
Section -Post
|
||||||
WriteUninstaller "$INSTDIR\uninst.exe"
|
WriteUninstaller "$INSTDIR\uninst.exe"
|
||||||
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\bin\Geany.exe"
|
WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" Path "$INSTDIR"
|
||||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
|
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "StartMenu" "$SMPROGRAMS\$StartmenuFolder"
|
||||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
|
${if} $Answer == "yes" ; if user is admin
|
||||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\bin\Geany.exe"
|
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
|
||||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
|
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
|
||||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
|
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\bin\Geany.exe"
|
||||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLUpdateInfo" "${PRODUCT_WEB_SITE}"
|
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
|
||||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
|
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
|
||||||
|
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "URLUpdateInfo" "${PRODUCT_WEB_SITE}"
|
||||||
|
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
|
||||||
|
WriteRegDWORD SHCTX "${PRODUCT_UNINST_KEY}" "NoModify" 0x00000001
|
||||||
|
WriteRegDWORD SHCTX "${PRODUCT_UNINST_KEY}" "NoRepair" 0x00000001
|
||||||
|
${endif}
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
Section Uninstall
|
||||||
|
Delete "$INSTDIR\Website.url"
|
||||||
|
Delete "$INSTDIR\Documentation.url"
|
||||||
|
Delete "$INSTDIR\uninst.exe"
|
||||||
|
Delete "$INSTDIR\News.txt"
|
||||||
|
Delete "$INSTDIR\ReadMe.txt"
|
||||||
|
Delete "$INSTDIR\Thanks.txt"
|
||||||
|
Delete "$INSTDIR\ToDo.txt"
|
||||||
|
Delete "$INSTDIR\Authors.txt"
|
||||||
|
Delete "$INSTDIR\ChangeLog.txt"
|
||||||
|
Delete "$INSTDIR\Copying.txt"
|
||||||
|
Delete "$INSTDIR\Geany.lnk"
|
||||||
|
|
||||||
|
; delete start menu entry
|
||||||
|
ReadRegStr $0 SHCTX "${PRODUCT_UNINST_KEY}" "StartMenu"
|
||||||
|
RMDir /r "$0"
|
||||||
|
|
||||||
|
Delete "$QUICKLAUNCH\Geany.lnk"
|
||||||
|
Delete "$DESKTOP\Geany.lnk"
|
||||||
|
|
||||||
|
RMDir /r "$INSTDIR\bin"
|
||||||
|
RMDir /r "$INSTDIR\doc"
|
||||||
|
RMDir /r "$INSTDIR\data"
|
||||||
|
RMDir /r "$INSTDIR\etc"
|
||||||
|
RMDir /r "$INSTDIR\lib"
|
||||||
|
RMDir /r "$INSTDIR\share"
|
||||||
|
RMDir "$INSTDIR"
|
||||||
|
|
||||||
|
; remove .geany file extension
|
||||||
|
ReadRegStr $R0 SHCTX "Software\Classes\${PRODUCT_EXT}" ""
|
||||||
|
${if} $R0 == "${PRODUCT_REGNAME}"
|
||||||
|
DeleteRegKey SHCTX "${PRODUCT_EXT}"
|
||||||
|
DeleteRegKey HKCR "${PRODUCT_EXT}"
|
||||||
|
DeleteRegKey SHCTX "${PRODUCT_REGNAME}"
|
||||||
|
DeleteRegKey HKCR "${PRODUCT_REGNAME}"
|
||||||
|
${endif}
|
||||||
|
|
||||||
|
DeleteRegKey HKCR "*\shell\OpenWithGeany"
|
||||||
|
|
||||||
|
DeleteRegKey SHCTX "${PRODUCT_UNINST_KEY}"
|
||||||
|
DeleteRegKey HKCU "${PRODUCT_UNINST_KEY}"
|
||||||
|
DeleteRegKey SHCTX "${PRODUCT_DIR_REGKEY}"
|
||||||
|
DeleteRegKey HKCU "${PRODUCT_DIR_REGKEY}"
|
||||||
|
|
||||||
|
SetAutoClose true
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; Section descriptions ;
|
; Section descriptions ;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Required program files. You cannot skip these files."
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Required program files. You cannot skip these files."
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Available plugins like 'Version Diff', 'Class Builder' and 'Insert Special Characters'."
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Available plugins like 'Version Diff', 'Class Builder' and 'Insert Special Characters'."
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC03} "Various translations of Geany's interface."
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC03} "Various translations of Geany's interface."
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC04} "Manual in Text and HTML format."
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC04} "Manual in Text and HTML format."
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC05} "Symbol lists necessary for auto completion of symbols."
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC05} "Symbol lists necessary for auto completion of symbols."
|
||||||
!ifdef INCLUDE_GTK
|
!ifdef INCLUDE_GTK
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC06} "You need this files to run Geany. If you have already installed a GTK Runtime Environment (2.6 or higher), you can skip it."
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC06} "You need this files to run Geany. If you have already installed a GTK Runtime Environment (2.8 or higher), you can skip it."
|
||||||
!endif
|
!endif
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC07} "Add context menu item 'Open With Geany'"
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC07} "Add context menu item 'Open With Geany'"
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC08} "Create shortcuts for Geany on the desktop and in the Quicklaunch Bar"
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;
|
||||||
; helper functions ;
|
; helper functions ;
|
||||||
;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
; (from http://jabref.svn.sourceforge.net/viewvc/jabref/trunk/jabref/src/windows/nsis/setup.nsi)
|
||||||
|
!macro IsUserAdmin Result UName
|
||||||
|
ClearErrors
|
||||||
|
UserInfo::GetName
|
||||||
|
IfErrors Win9x
|
||||||
|
Pop $0
|
||||||
|
StrCpy ${UName} $0
|
||||||
|
UserInfo::GetAccountType
|
||||||
|
Pop $1
|
||||||
|
${if} $1 == "Admin"
|
||||||
|
StrCpy ${Result} "yes"
|
||||||
|
${else}
|
||||||
|
StrCpy ${Result} "no"
|
||||||
|
${endif}
|
||||||
|
Goto done
|
||||||
|
|
||||||
|
Win9x:
|
||||||
|
StrCpy ${Result} "yes"
|
||||||
|
done:
|
||||||
|
!macroend
|
||||||
|
|
||||||
|
Function .onInit
|
||||||
|
StrCpy "$StartmenuFolder" "Geany"
|
||||||
|
|
||||||
|
; (from http://jabref.svn.sourceforge.net/viewvc/jabref/trunk/jabref/src/windows/nsis/setup.nsi)
|
||||||
|
; If the user does *not* have administrator privileges, abort
|
||||||
|
StrCpy $Answer ""
|
||||||
|
StrCpy $UserName ""
|
||||||
|
!insertmacro IsUserAdmin $Answer $UserName ; macro from LyXUtils.nsh
|
||||||
|
${if} $Answer == "yes"
|
||||||
|
SetShellVarContext all ; set that e.g. shortcuts will be created for all users
|
||||||
|
${else}
|
||||||
|
SetShellVarContext current
|
||||||
|
; TODO is this really what we want? $PROGRAMFILES is not much better because
|
||||||
|
; probably the unprivileged user can't write it anyways
|
||||||
|
StrCpy $INSTDIR "$PROFILE\$(^Name)"
|
||||||
|
${endif}
|
||||||
|
|
||||||
|
; prevent running multiple instances of the installer
|
||||||
|
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "geany_installer") i .r1 ?e'
|
||||||
|
Pop $R0
|
||||||
|
StrCmp $R0 0 +3
|
||||||
|
MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running." /SD IDOK
|
||||||
|
Abort
|
||||||
|
; warn about a new install over an existing installation
|
||||||
|
ReadRegStr $R0 SHCTX "${PRODUCT_UNINST_KEY}" "UninstallString"
|
||||||
|
StrCmp $R0 "" finish
|
||||||
|
|
||||||
|
MessageBox MB_YESNO|MB_ICONEXCLAMATION \
|
||||||
|
"Geany has already been installed. $\nDo you want to remove the previous version before installing $(^Name) ?" \
|
||||||
|
/SD IDYES IDYES remove IDNO finish
|
||||||
|
|
||||||
|
remove:
|
||||||
|
; run the uninstaller
|
||||||
|
ClearErrors
|
||||||
|
; we read the installation path of the old installation from the Registry
|
||||||
|
ReadRegStr $UNINSTDIR SHCTX "${PRODUCT_DIR_REGKEY}" "Path"
|
||||||
|
IfSilent dosilent nonsilent
|
||||||
|
dosilent:
|
||||||
|
ExecWait '$R0 /S _?=$UNINSTDIR' ;Do not copy the uninstaller to a temp file
|
||||||
|
Goto finish
|
||||||
|
nonsilent:
|
||||||
|
ExecWait '$R0 _?=$UNINSTDIR' ;Do not copy the uninstaller to a temp file
|
||||||
|
finish:
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
Function un.onUninstSuccess
|
Function un.onUninstSuccess
|
||||||
HideWindow
|
HideWindow
|
||||||
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
|
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." \
|
||||||
|
/SD IDOK
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function un.onInit
|
Function un.onInit
|
||||||
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
|
; If the user does *not* have administrator privileges, abort
|
||||||
Abort
|
StrCpy $Answer ""
|
||||||
|
!insertmacro IsUserAdmin $Answer $UserName
|
||||||
|
${if} $Answer == "yes"
|
||||||
|
SetShellVarContext all
|
||||||
|
${else}
|
||||||
|
; check if the Geany has been installed with admin permisions
|
||||||
|
ReadRegStr $0 HKLM "${PRODUCT_UNINST_KEY}" "Publisher"
|
||||||
|
${if} $0 != ""
|
||||||
|
MessageBox MB_OK|MB_ICONSTOP "You need administrator privileges to uninstall Geany!" \
|
||||||
|
/SD IDOK
|
||||||
|
Abort
|
||||||
|
${endif}
|
||||||
|
SetShellVarContext current
|
||||||
|
${endif}
|
||||||
|
|
||||||
|
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" \
|
||||||
|
/SD IDYES IDYES +2
|
||||||
|
Abort
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function OnDirLeave
|
Function OnDirLeave
|
||||||
ClearErrors
|
ClearErrors
|
||||||
SetOutPath "$INSTDIR" ; what about IfError creating $INSTDIR?
|
SetOutPath "$INSTDIR" ; what about IfError creating $INSTDIR?
|
||||||
GetTempFileName $1 "$INSTDIR" ; creates tmp file (or fails)
|
GetTempFileName $1 "$INSTDIR" ; creates tmp file (or fails)
|
||||||
FileOpen $0 "$1" "w" ; error to open?
|
FileOpen $0 "$1" "w" ; error to open?
|
||||||
FileWriteByte $0 "0"
|
FileWriteByte $0 "0"
|
||||||
IfErrors notPossible possible
|
IfErrors notPossible possible
|
||||||
|
|
||||||
notPossible:
|
notPossible:
|
||||||
RMDir "$INSTDIR" ; removes folder if empty
|
RMDir "$INSTDIR" ; removes folder if empty
|
||||||
MessageBox MB_OK "The given directory is not writeable. Please choose another one!"
|
MessageBox MB_OK "The given directory is not writeable. Please choose another one!" /SD IDOK
|
||||||
Abort
|
Abort
|
||||||
possible:
|
possible:
|
||||||
FileClose $0
|
FileClose $0
|
||||||
Delete "$1"
|
Delete "$1"
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Section Uninstall
|
|
||||||
!insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
|
|
||||||
Delete "$INSTDIR\Website.url"
|
|
||||||
Delete "$INSTDIR\Documentation.url"
|
|
||||||
Delete "$INSTDIR\uninst.exe"
|
|
||||||
Delete "$INSTDIR\News.txt"
|
|
||||||
Delete "$INSTDIR\ReadMe.txt"
|
|
||||||
Delete "$INSTDIR\Thanks.txt"
|
|
||||||
Delete "$INSTDIR\ToDo.txt"
|
|
||||||
Delete "$INSTDIR\Authors.txt"
|
|
||||||
Delete "$INSTDIR\ChangeLog.txt"
|
|
||||||
Delete "$INSTDIR\Copying.txt"
|
|
||||||
Delete "$INSTDIR\Geany.lnk"
|
|
||||||
|
|
||||||
Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
|
|
||||||
Delete "$SMPROGRAMS\$ICONS_GROUP\Website.lnk"
|
|
||||||
Delete "$QUICKLAUNCH\Geany.lnk"
|
|
||||||
Delete "$DESKTOP\Geany.lnk"
|
|
||||||
Delete "$SMPROGRAMS\$ICONS_GROUP\Geany.lnk"
|
|
||||||
Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation.lnk"
|
|
||||||
|
|
||||||
RMDir "$SMPROGRAMS\$ICONS_GROUP"
|
|
||||||
RMDir /r "$INSTDIR\bin"
|
|
||||||
RMDir /r "$INSTDIR\doc"
|
|
||||||
RMDir /r "$INSTDIR\data"
|
|
||||||
RMDir /r "$INSTDIR\etc"
|
|
||||||
RMDir /r "$INSTDIR\lib"
|
|
||||||
RMDir /r "$INSTDIR\share"
|
|
||||||
RMDir "$INSTDIR"
|
|
||||||
|
|
||||||
DeleteRegKey HKCR "*\shell\OpenWithGeany"
|
|
||||||
|
|
||||||
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
|
|
||||||
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
|
|
||||||
SetAutoClose true
|
|
||||||
SectionEnd
|
|
||||||
|
@ -8,7 +8,7 @@ localedir=@localedir@
|
|||||||
|
|
||||||
Name: Geany
|
Name: Geany
|
||||||
Description: A fast and lightweight IDE using GTK2
|
Description: A fast and lightweight IDE using GTK2
|
||||||
Requires: gtk+-2.0 >= 2.6.0
|
Requires: gtk+-2.0 >= 2.8.0
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Libs: -L${libdir}
|
Libs: -L${libdir}
|
||||||
Cflags: -I${includedir}/geany -I${includedir}/geany/tagmanager -I${includedir}/geany/scintilla
|
Cflags: -I${includedir}/geany -I${includedir}/geany/tagmanager -I${includedir}/geany/scintilla
|
||||||
|
@ -4,25 +4,35 @@ Version: @VERSION@
|
|||||||
Release: 1
|
Release: 1
|
||||||
License: GPL2
|
License: GPL2
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
Vendor: Enrico Tröger <enrico.troeger@uvena.de>
|
Vendor: The Geany developer team <info@geany.org>
|
||||||
Packager: Enrico Tröger <enrico.troeger@uvena.de>
|
Packager: Dominic Hopf <dmaphy@gmail.com>
|
||||||
Source: http://files.uvena.de/geany/%{name}-%{version}.tar.bz2
|
Source: http://download.geany.org/%{name}-%{version}.tar.gz
|
||||||
URL: http://www.geany.org/
|
URL: http://www.geany.org/
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||||
Requires: glib2, gtk2, pango
|
Requires: glib2, gtk2, pango
|
||||||
BuildRequires: glib2-devel, gtk2-devel, pango-devel
|
BuildRequires: glib2-devel, gtk2-devel, pango-devel
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Geany is a small and fast editor with basic features of an integrated development environment.
|
Geany is a small and lightweight Integrated Development Environment. It
|
||||||
|
was developed to provide a small and fast IDE, which has only a few
|
||||||
|
dependencies from other packages. Another goal was to be as independent
|
||||||
|
as possible from a special Desktop Environment like KDE or GNOME -
|
||||||
|
Geany only requires the GTK2 runtime libraries.
|
||||||
|
|
||||||
Some features:
|
Some basic features of Geany:
|
||||||
- syntax highlighting
|
|
||||||
- code completion
|
- Syntax highlighting
|
||||||
- code folding
|
- Code folding
|
||||||
- call tips
|
- Symbol name auto-completion
|
||||||
- folding
|
- Construct completion/snippets
|
||||||
- many supported filetypes like C, Java, PHP, HTML, Python, Perl, Pascal
|
- Auto-closing of XML and HTML tags
|
||||||
- symbol lists
|
- Call tips
|
||||||
|
- Many supported filetypes including C, Java, PHP, HTML, Python, Perl, Pascal, and others
|
||||||
|
- Symbol lists
|
||||||
|
- Code navigation
|
||||||
|
- Build system to compile and execute your code
|
||||||
|
- Simple project management
|
||||||
|
- Plugin interface
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
@ -34,6 +44,11 @@ Some features:
|
|||||||
%install
|
%install
|
||||||
%__rm -Rf $RPM_BUILD_ROOT
|
%__rm -Rf $RPM_BUILD_ROOT
|
||||||
%makeinstall
|
%makeinstall
|
||||||
|
# If you experience build problems like
|
||||||
|
# "Found '/home/user/rpmbuild/BUILDROOT/geany-0.16svn-3328.i386' in installed files; aborting"
|
||||||
|
# try uncommenting the following line to workaround the problem (and add sed to BuildRequires)
|
||||||
|
#sed -i "s@libdir='.*'@libdir='%{_libdir}/%{name}'@g" $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
|
||||||
|
|
||||||
%__rm $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/icon-theme.cache
|
%__rm $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/icon-theme.cache
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
@ -43,7 +58,7 @@ Some features:
|
|||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%doc AUTHORS COPYING ChangeLog HACKING INSTALL NEWS README TODO THANKS
|
%doc AUTHORS COPYING ChangeLog HACKING INSTALL NEWS README TODO THANKS
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{_libdir}/geany/
|
%{_libdir}/%{name}/
|
||||||
%{_datadir}/%{name}
|
%{_datadir}/%{name}
|
||||||
%{_datadir}/applications/%{name}.desktop
|
%{_datadir}/applications/%{name}.desktop
|
||||||
%{_datadir}/locale/*/LC_MESSAGES/%{name}.mo
|
%{_datadir}/locale/*/LC_MESSAGES/%{name}.mo
|
||||||
@ -51,5 +66,5 @@ Some features:
|
|||||||
%{_datadir}/doc/%{name}/
|
%{_datadir}/doc/%{name}/
|
||||||
%{_mandir}/man1/%{name}.1.gz
|
%{_mandir}/man1/%{name}.1.gz
|
||||||
%{_datadir}/icons/hicolor/16x16/apps/classviewer-*.png
|
%{_datadir}/icons/hicolor/16x16/apps/classviewer-*.png
|
||||||
%{_includedir}/geany/
|
%{_includedir}/%{name}/
|
||||||
%{_libdir}/pkgconfig/
|
%{_libdir}/pkgconfig/
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "../pixmaps/geany.ico"
|
A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "../pixmaps/geany.ico"
|
||||||
|
|
||||||
1 VERSIONINFO
|
1 VERSIONINFO
|
||||||
FILEVERSION 0,15,0,0
|
FILEVERSION 0,17,0,0
|
||||||
PRODUCTVERSION 0,15,0,0
|
PRODUCTVERSION 0,17,0,0
|
||||||
FILETYPE VFT_APP
|
FILETYPE VFT_APP
|
||||||
{
|
{
|
||||||
BLOCK "StringFileInfo"
|
BLOCK "StringFileInfo"
|
||||||
@ -14,14 +14,14 @@ FILETYPE VFT_APP
|
|||||||
BLOCK "040704E4"
|
BLOCK "040704E4"
|
||||||
{
|
{
|
||||||
VALUE "CompanyName", ""
|
VALUE "CompanyName", ""
|
||||||
VALUE "FileVersion", "0.15"
|
VALUE "FileVersion", "0.17"
|
||||||
VALUE "FileDescription", "Geany"
|
VALUE "FileDescription", "Geany"
|
||||||
VALUE "InternalName", "geany"
|
VALUE "InternalName", "geany"
|
||||||
VALUE "LegalCopyright", "Copyright 2005-2008 by the Geany developers"
|
VALUE "LegalCopyright", "Copyright 2005-2009 by the Geany developers"
|
||||||
VALUE "LegalTrademarks", ""
|
VALUE "LegalTrademarks", ""
|
||||||
VALUE "OriginalFilename", "geany"
|
VALUE "OriginalFilename", "geany"
|
||||||
VALUE "ProductName", "geany"
|
VALUE "ProductName", "geany"
|
||||||
VALUE "ProductVersion", "0.15"
|
VALUE "ProductVersion", "0.17"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,30 +2,73 @@
|
|||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
makefile.win32 \
|
makefile.win32 \
|
||||||
pluginmacros.h
|
pluginmacros.h \
|
||||||
|
geanyfunctions.h \
|
||||||
|
genapi.py
|
||||||
|
|
||||||
plugindir = $(libdir)/geany
|
plugindir = $(libdir)/geany
|
||||||
|
|
||||||
plugins_includedir = $(includedir)/geany/
|
plugins_includedir = $(includedir)/geany
|
||||||
plugins_include_HEADERS = pluginmacros.h
|
plugins_include_HEADERS = \
|
||||||
|
pluginmacros.h \
|
||||||
|
geanyfunctions.h
|
||||||
|
|
||||||
|
# systems without python should continue to build OK
|
||||||
|
geanyfunctions.h: genapi.py ../src/plugins.c
|
||||||
|
python genapi.py || true
|
||||||
|
|
||||||
|
all: geanyfunctions.h
|
||||||
|
|
||||||
|
|
||||||
demoplugin_la_LDFLAGS = -module -avoid-version
|
demoplugin_la_LDFLAGS = -module -avoid-version
|
||||||
classbuilder_la_LDFLAGS = -module -avoid-version
|
classbuilder_la_LDFLAGS = -module -avoid-version
|
||||||
htmlchars_la_LDFLAGS = -module -avoid-version
|
htmlchars_la_LDFLAGS = -module -avoid-version
|
||||||
export_la_LDFLAGS = -module -avoid-version
|
export_la_LDFLAGS = -module -avoid-version
|
||||||
vcdiff_la_LDFLAGS = -module -avoid-version
|
|
||||||
saveactions_la_LDFLAGS = -module -avoid-version
|
saveactions_la_LDFLAGS = -module -avoid-version
|
||||||
filebrowser_la_LDFLAGS = -module -avoid-version
|
filebrowser_la_LDFLAGS = -module -avoid-version
|
||||||
splitwindow_la_LDFLAGS = -module -avoid-version
|
splitwindow_la_LDFLAGS = -module -avoid-version
|
||||||
|
|
||||||
if PLUGINS
|
if PLUGINS
|
||||||
|
|
||||||
|
if MINGW
|
||||||
|
# build Geany for Windows on non-Windows systems (cross-compile)
|
||||||
|
# (this is a little hack'ish and surely can be improved)
|
||||||
|
DLL_LD_FLAGS = -module -avoid-version
|
||||||
|
MINGW_CFLAGS = \
|
||||||
|
-DGEANY_DATADIR=\"data\" \
|
||||||
|
-DHAVE_CONFIG_H \
|
||||||
|
-I$(top_srcdir) \
|
||||||
|
-I$(top_srcdir)/src \
|
||||||
|
-I$(top_srcdir)/tagmanager/include \
|
||||||
|
-I$(top_srcdir)/scintilla/include \
|
||||||
|
$(GTK_CFLAGS) \
|
||||||
|
$(PLUGIN_CFLAGS)
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
|
|
||||||
|
all-local: \
|
||||||
|
classbuilder.dll \
|
||||||
|
htmlchars.dll \
|
||||||
|
export.dll \
|
||||||
|
saveactions.dll \
|
||||||
|
filebrowser.dll
|
||||||
|
# Split Window is broken on Windows
|
||||||
|
# splitwindow.dll
|
||||||
|
|
||||||
|
.c.dll:
|
||||||
|
$(CC) $(MINGW_CFLAGS) -o $@.o -c $<
|
||||||
|
$(CC) -shared $@.o $(GTK_LIBS) $(DLL_LD_FLAGS) -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o *.dll
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
# Plugins to be installed
|
# Plugins to be installed
|
||||||
plugin_LTLIBRARIES = \
|
plugin_LTLIBRARIES = \
|
||||||
classbuilder.la \
|
classbuilder.la \
|
||||||
htmlchars.la \
|
htmlchars.la \
|
||||||
export.la \
|
export.la \
|
||||||
vcdiff.la \
|
|
||||||
saveactions.la \
|
saveactions.la \
|
||||||
filebrowser.la \
|
filebrowser.la \
|
||||||
splitwindow.la
|
splitwindow.la
|
||||||
@ -38,7 +81,6 @@ demoplugin_la_SOURCES = demoplugin.c
|
|||||||
classbuilder_la_SOURCES = classbuilder.c
|
classbuilder_la_SOURCES = classbuilder.c
|
||||||
htmlchars_la_SOURCES = htmlchars.c
|
htmlchars_la_SOURCES = htmlchars.c
|
||||||
export_la_SOURCES = export.c
|
export_la_SOURCES = export.c
|
||||||
vcdiff_la_SOURCES = vcdiff.c
|
|
||||||
saveactions_la_SOURCES = saveactions.c
|
saveactions_la_SOURCES = saveactions.c
|
||||||
filebrowser_la_SOURCES = filebrowser.c
|
filebrowser_la_SOURCES = filebrowser.c
|
||||||
splitwindow_la_SOURCES = splitwindow.c
|
splitwindow_la_SOURCES = splitwindow.c
|
||||||
@ -48,11 +90,11 @@ demoplugin_la_LIBADD = $(GTK_LIBS)
|
|||||||
classbuilder_la_LIBADD = $(GTK_LIBS)
|
classbuilder_la_LIBADD = $(GTK_LIBS)
|
||||||
htmlchars_la_LIBADD = $(GTK_LIBS)
|
htmlchars_la_LIBADD = $(GTK_LIBS)
|
||||||
export_la_LIBADD = $(GTK_LIBS)
|
export_la_LIBADD = $(GTK_LIBS)
|
||||||
vcdiff_la_LIBADD = $(GTK_LIBS)
|
|
||||||
saveactions_la_LIBADD = $(GTK_LIBS)
|
saveactions_la_LIBADD = $(GTK_LIBS)
|
||||||
filebrowser_la_LIBADD = $(GTK_LIBS)
|
filebrowser_la_LIBADD = $(GTK_LIBS)
|
||||||
splitwindow_la_LIBADD = $(GTK_LIBS)
|
splitwindow_la_LIBADD = $(GTK_LIBS)
|
||||||
|
|
||||||
|
endif # MINGW
|
||||||
endif # PLUGINS
|
endif # PLUGINS
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
* classbuilder.c - this file is part of Geany, a fast and lightweight IDE
|
* 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 Alexander Rodin <rodin(dot)alexander(at)gmail(dot)com>
|
||||||
* Copyright 2007-2008 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
* Copyright 2007-2009 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||||
* Copyright 2007-2008 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
* Copyright 2007-2009 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -32,20 +32,22 @@
|
|||||||
#include "document.h"
|
#include "document.h"
|
||||||
#include "editor.h"
|
#include "editor.h"
|
||||||
#include "ui_utils.h"
|
#include "ui_utils.h"
|
||||||
#include "pluginmacros.h"
|
#include "geanyfunctions.h"
|
||||||
|
|
||||||
|
|
||||||
PluginFields *plugin_fields;
|
|
||||||
GeanyData *geany_data;
|
GeanyData *geany_data;
|
||||||
GeanyFunctions *geany_functions;
|
GeanyFunctions *geany_functions;
|
||||||
|
|
||||||
|
|
||||||
PLUGIN_VERSION_CHECK(69)
|
PLUGIN_VERSION_CHECK(GEANY_API_VERSION)
|
||||||
|
|
||||||
PLUGIN_SET_INFO(_("Class Builder"), _("Creates source files for new class types."), VERSION,
|
PLUGIN_SET_INFO(_("Class Builder"), _("Creates source files for new class types."), VERSION,
|
||||||
"Alexander Rodin")
|
"Alexander Rodin")
|
||||||
|
|
||||||
|
|
||||||
|
static GtkWidget *main_menu_item = NULL;
|
||||||
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
GEANY_CLASS_TYPE_CPP,
|
GEANY_CLASS_TYPE_CPP,
|
||||||
@ -166,52 +168,24 @@ struct _{class_name}Private\n\
|
|||||||
/* add your private declarations here */\n\
|
/* add your private declarations here */\n\
|
||||||
};\n\
|
};\n\
|
||||||
\n\
|
\n\
|
||||||
static void {class_name_low}_class_init ({class_name}Class *klass);\n\
|
|
||||||
static void {class_name_low}_init ({class_name} *self);\n\
|
|
||||||
{destructor_decl}\
|
{destructor_decl}\
|
||||||
\n\
|
\n\
|
||||||
/* Local data */\n\
|
G_DEFINE_TYPE({class_name}, {class_name_low}, {base_gtype});\n\
|
||||||
static {base_name}Class *parent_class = NULL;\n\
|
|
||||||
\n\
|
|
||||||
GType {class_name_low}_get_type(void)\n\
|
|
||||||
{\n\
|
|
||||||
static GType self_type = 0;\n\
|
|
||||||
if (! self_type)\n\
|
|
||||||
{\n\
|
|
||||||
static const GTypeInfo self_info = \n\
|
|
||||||
{\n\
|
|
||||||
sizeof({class_name}Class),\n\
|
|
||||||
NULL, /* base_init */\n\
|
|
||||||
NULL, /* base_finalize */\n\
|
|
||||||
(GClassInitFunc){class_name_low}_class_init,\n\
|
|
||||||
NULL, /* class_finalize */\n\
|
|
||||||
NULL, /* class_data */\n\
|
|
||||||
sizeof({class_name}),\n\
|
|
||||||
0,\n\
|
|
||||||
(GInstanceInitFunc){class_name_low}_init,\n\
|
|
||||||
NULL /* value_table */\n\
|
|
||||||
};\n\
|
|
||||||
\n\
|
|
||||||
self_type = g_type_register_static({base_gtype}, \"{class_name}\", &self_info, 0);\n\
|
|
||||||
}\n\
|
|
||||||
\n\
|
|
||||||
return self_type;\n\
|
|
||||||
}\n\
|
|
||||||
\n\n\
|
\n\n\
|
||||||
static void {class_name_low}_class_init({class_name}Class *klass)\n\
|
static void {class_name_low}_class_init({class_name}Class *klass)\n\
|
||||||
{\n\
|
{\n\
|
||||||
{gtk_destructor_registration}\n\
|
{gtk_destructor_registration}\n\
|
||||||
parent_class = ({base_name}Class*)g_type_class_peek({base_gtype});\n\
|
|
||||||
g_type_class_add_private((gpointer)klass, sizeof({class_name}Private));\n\
|
g_type_class_add_private((gpointer)klass, sizeof({class_name}Private));\n\
|
||||||
}\n\
|
}\n\
|
||||||
\n\n\
|
\n\
|
||||||
|
{destructor_impl}\n\
|
||||||
|
\n\
|
||||||
static void {class_name_low}_init({class_name} *self)\n\
|
static void {class_name_low}_init({class_name} *self)\n\
|
||||||
{\n\
|
{\n\
|
||||||
\n\
|
\n\
|
||||||
}\n\
|
}\n\
|
||||||
\n\
|
\n\
|
||||||
{constructor_impl}\n\
|
{constructor_impl}\n\
|
||||||
{destructor_impl}\n\
|
|
||||||
";
|
";
|
||||||
|
|
||||||
|
|
||||||
@ -221,27 +195,24 @@ static void cc_dlg_on_base_name_entry_changed(GtkWidget *entry, CreateClassDialo
|
|||||||
static void cc_dlg_on_create_class(CreateClassDialog *cc_dlg);
|
static void cc_dlg_on_create_class(CreateClassDialog *cc_dlg);
|
||||||
|
|
||||||
|
|
||||||
/* I don't want this to be in the plugin API because it can cause leaks if any pointers
|
/* The list must be ended with NULL as an extra check that arg_count is correct. */
|
||||||
* are NULL -ntrel. */
|
|
||||||
/* Frees all passed pointers if they are *ALL* non-NULL.
|
|
||||||
* Do not use if any pointers may be NULL.
|
|
||||||
* The first argument is nothing special, it will also be freed.
|
|
||||||
* The list must be ended with NULL. */
|
|
||||||
static void
|
static void
|
||||||
utils_free_pointers(gpointer first, ...)
|
utils_free_pointers(gsize arg_count, ...)
|
||||||
{
|
{
|
||||||
va_list a;
|
va_list a;
|
||||||
gpointer sa;
|
gsize i;
|
||||||
|
gpointer ptr;
|
||||||
|
|
||||||
for (va_start(a, first); (sa = va_arg(a, gpointer), sa!=NULL);)
|
va_start(a, arg_count);
|
||||||
{
|
for (i = 0; i < arg_count; i++)
|
||||||
if (sa != NULL)
|
{
|
||||||
g_free(sa);
|
ptr = va_arg(a, gpointer);
|
||||||
|
g_free(ptr);
|
||||||
}
|
}
|
||||||
|
ptr = va_arg(a, gpointer);
|
||||||
|
if (ptr)
|
||||||
|
g_warning("Wrong arg_count!");
|
||||||
va_end(a);
|
va_end(a);
|
||||||
|
|
||||||
if (first != NULL)
|
|
||||||
g_free(first);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -254,30 +225,30 @@ get_template_class_header(ClassInfo *class_info)
|
|||||||
switch (class_info->type)
|
switch (class_info->type)
|
||||||
{
|
{
|
||||||
case GEANY_CLASS_TYPE_CPP:
|
case GEANY_CLASS_TYPE_CPP:
|
||||||
fileheader = p_templates->get_template_fileheader(GEANY_FILETYPES_CPP, class_info->header);
|
fileheader = templates_get_template_fileheader(GEANY_FILETYPES_CPP, class_info->header);
|
||||||
template = g_string_new(templates_cpp_class_header);
|
template = g_string_new(templates_cpp_class_header);
|
||||||
p_utils->string_replace_all(template, "{fileheader}", fileheader);
|
utils_string_replace_all(template, "{fileheader}", fileheader);
|
||||||
p_utils->string_replace_all(template, "{header_guard}", class_info->header_guard);
|
utils_string_replace_all(template, "{header_guard}", class_info->header_guard);
|
||||||
p_utils->string_replace_all(template, "{base_include}", class_info->base_include);
|
utils_string_replace_all(template, "{base_include}", class_info->base_include);
|
||||||
p_utils->string_replace_all(template, "{class_name}", class_info->class_name);
|
utils_string_replace_all(template, "{class_name}", class_info->class_name);
|
||||||
p_utils->string_replace_all(template, "{base_decl}", class_info->base_decl);
|
utils_string_replace_all(template, "{base_decl}", class_info->base_decl);
|
||||||
p_utils->string_replace_all(template, "{constructor_decl}",
|
utils_string_replace_all(template, "{constructor_decl}",
|
||||||
class_info->constructor_decl);
|
class_info->constructor_decl);
|
||||||
p_utils->string_replace_all(template, "{destructor_decl}",
|
utils_string_replace_all(template, "{destructor_decl}",
|
||||||
class_info->destructor_decl);
|
class_info->destructor_decl);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GEANY_CLASS_TYPE_GTK:
|
case GEANY_CLASS_TYPE_GTK:
|
||||||
fileheader = p_templates->get_template_fileheader(GEANY_FILETYPES_C, class_info->header);
|
fileheader = templates_get_template_fileheader(GEANY_FILETYPES_C, class_info->header);
|
||||||
template = g_string_new(templates_gtk_class_header);
|
template = g_string_new(templates_gtk_class_header);
|
||||||
p_utils->string_replace_all(template, "{fileheader}", fileheader);
|
utils_string_replace_all(template, "{fileheader}", fileheader);
|
||||||
p_utils->string_replace_all(template, "{header_guard}", class_info->header_guard);
|
utils_string_replace_all(template, "{header_guard}", class_info->header_guard);
|
||||||
p_utils->string_replace_all(template, "{base_include}", class_info->base_include);
|
utils_string_replace_all(template, "{base_include}", class_info->base_include);
|
||||||
p_utils->string_replace_all(template, "{class_name}", class_info->class_name);
|
utils_string_replace_all(template, "{class_name}", class_info->class_name);
|
||||||
p_utils->string_replace_all(template, "{class_name_up}", class_info->class_name_up);
|
utils_string_replace_all(template, "{class_name_up}", class_info->class_name_up);
|
||||||
p_utils->string_replace_all(template, "{class_name_low}", class_info->class_name_low);
|
utils_string_replace_all(template, "{class_name_low}", class_info->class_name_low);
|
||||||
p_utils->string_replace_all(template, "{base_name}", class_info->base_name);
|
utils_string_replace_all(template, "{base_name}", class_info->base_name);
|
||||||
p_utils->string_replace_all(template, "{constructor_decl}",
|
utils_string_replace_all(template, "{constructor_decl}",
|
||||||
class_info->constructor_decl);
|
class_info->constructor_decl);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -300,35 +271,35 @@ get_template_class_source(ClassInfo *class_info)
|
|||||||
switch (class_info->type)
|
switch (class_info->type)
|
||||||
{
|
{
|
||||||
case GEANY_CLASS_TYPE_CPP:
|
case GEANY_CLASS_TYPE_CPP:
|
||||||
fileheader = p_templates->get_template_fileheader(GEANY_FILETYPES_CPP, class_info->source);
|
fileheader = templates_get_template_fileheader(GEANY_FILETYPES_CPP, class_info->source);
|
||||||
template = g_string_new(templates_cpp_class_source);
|
template = g_string_new(templates_cpp_class_source);
|
||||||
p_utils->string_replace_all(template, "{fileheader}", fileheader);
|
utils_string_replace_all(template, "{fileheader}", fileheader);
|
||||||
p_utils->string_replace_all(template, "{header}", class_info->header);
|
utils_string_replace_all(template, "{header}", class_info->header);
|
||||||
p_utils->string_replace_all(template, "{class_name}", class_info->class_name);
|
utils_string_replace_all(template, "{class_name}", class_info->class_name);
|
||||||
p_utils->string_replace_all(template, "{base_include}", class_info->base_include);
|
utils_string_replace_all(template, "{base_include}", class_info->base_include);
|
||||||
p_utils->string_replace_all(template, "{base_name}", class_info->base_name);
|
utils_string_replace_all(template, "{base_name}", class_info->base_name);
|
||||||
p_utils->string_replace_all(template, "{constructor_impl}",
|
utils_string_replace_all(template, "{constructor_impl}",
|
||||||
class_info->constructor_impl);
|
class_info->constructor_impl);
|
||||||
p_utils->string_replace_all(template, "{destructor_impl}",
|
utils_string_replace_all(template, "{destructor_impl}",
|
||||||
class_info->destructor_impl);
|
class_info->destructor_impl);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GEANY_CLASS_TYPE_GTK:
|
case GEANY_CLASS_TYPE_GTK:
|
||||||
fileheader = p_templates->get_template_fileheader(GEANY_FILETYPES_C, class_info->source);
|
fileheader = templates_get_template_fileheader(GEANY_FILETYPES_C, class_info->source);
|
||||||
template = g_string_new(templates_gtk_class_source);
|
template = g_string_new(templates_gtk_class_source);
|
||||||
p_utils->string_replace_all(template, "{fileheader}", fileheader);
|
utils_string_replace_all(template, "{fileheader}", fileheader);
|
||||||
p_utils->string_replace_all(template, "{header}", class_info->header);
|
utils_string_replace_all(template, "{header}", class_info->header);
|
||||||
p_utils->string_replace_all(template, "{class_name}", class_info->class_name);
|
utils_string_replace_all(template, "{class_name}", class_info->class_name);
|
||||||
p_utils->string_replace_all(template, "{class_name_up}", class_info->class_name_up);
|
utils_string_replace_all(template, "{class_name_up}", class_info->class_name_up);
|
||||||
p_utils->string_replace_all(template, "{class_name_low}", class_info->class_name_low);
|
utils_string_replace_all(template, "{class_name_low}", class_info->class_name_low);
|
||||||
p_utils->string_replace_all(template, "{base_name}", class_info->base_name);
|
utils_string_replace_all(template, "{base_name}", class_info->base_name);
|
||||||
p_utils->string_replace_all(template, "{base_gtype}", class_info->base_gtype);
|
utils_string_replace_all(template, "{base_gtype}", class_info->base_gtype);
|
||||||
p_utils->string_replace_all(template, "{destructor_decl}", class_info->destructor_decl);
|
utils_string_replace_all(template, "{destructor_decl}", class_info->destructor_decl);
|
||||||
p_utils->string_replace_all(template, "{constructor_impl}",
|
utils_string_replace_all(template, "{constructor_impl}",
|
||||||
class_info->constructor_impl);
|
class_info->constructor_impl);
|
||||||
p_utils->string_replace_all(template, "{destructor_impl}",
|
utils_string_replace_all(template, "{destructor_impl}",
|
||||||
class_info->destructor_impl);
|
class_info->destructor_impl);
|
||||||
p_utils->string_replace_all(template, "{gtk_destructor_registration}",
|
utils_string_replace_all(template, "{gtk_destructor_registration}",
|
||||||
class_info->gtk_destructor_registration);
|
class_info->gtk_destructor_registration);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -363,9 +334,9 @@ void show_dialog_create_class(gint type)
|
|||||||
NULL);
|
NULL);
|
||||||
g_signal_connect_swapped(cc_dlg->dialog, "destroy", G_CALLBACK(g_free), (gpointer)cc_dlg);
|
g_signal_connect_swapped(cc_dlg->dialog, "destroy", G_CALLBACK(g_free), (gpointer)cc_dlg);
|
||||||
|
|
||||||
main_box = p_ui->dialog_vbox_new(GTK_DIALOG(cc_dlg->dialog));
|
main_box = ui_dialog_vbox_new(GTK_DIALOG(cc_dlg->dialog));
|
||||||
|
|
||||||
frame = p_ui->frame_new_with_alignment(_("Class"), &align);
|
frame = ui_frame_new_with_alignment(_("Class"), &align);
|
||||||
gtk_container_add(GTK_CONTAINER(main_box), frame);
|
gtk_container_add(GTK_CONTAINER(main_box), frame);
|
||||||
|
|
||||||
vbox = gtk_vbox_new(FALSE, 10);
|
vbox = gtk_vbox_new(FALSE, 10);
|
||||||
@ -400,7 +371,7 @@ void show_dialog_create_class(gint type)
|
|||||||
cc_dlg->source_entry = gtk_entry_new();
|
cc_dlg->source_entry = gtk_entry_new();
|
||||||
gtk_container_add(GTK_CONTAINER(hbox), cc_dlg->source_entry);
|
gtk_container_add(GTK_CONTAINER(hbox), cc_dlg->source_entry);
|
||||||
|
|
||||||
frame = p_ui->frame_new_with_alignment(_("Inheritance"), &align);
|
frame = ui_frame_new_with_alignment(_("Inheritance"), &align);
|
||||||
gtk_container_add(GTK_CONTAINER(main_box), frame);
|
gtk_container_add(GTK_CONTAINER(main_box), frame);
|
||||||
|
|
||||||
vbox = gtk_vbox_new(FALSE, 10);
|
vbox = gtk_vbox_new(FALSE, 10);
|
||||||
@ -447,7 +418,7 @@ void show_dialog_create_class(gint type)
|
|||||||
gtk_container_add(GTK_CONTAINER(hbox), cc_dlg->base_gtype_entry);
|
gtk_container_add(GTK_CONTAINER(hbox), cc_dlg->base_gtype_entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
frame = p_ui->frame_new_with_alignment(_("Options"), &align);
|
frame = ui_frame_new_with_alignment(_("Options"), &align);
|
||||||
gtk_container_add(GTK_CONTAINER(main_box), frame);
|
gtk_container_add(GTK_CONTAINER(main_box), frame);
|
||||||
|
|
||||||
vbox = gtk_vbox_new(FALSE, 10);
|
vbox = gtk_vbox_new(FALSE, 10);
|
||||||
@ -560,7 +531,7 @@ static void cc_dlg_on_base_name_entry_changed(GtkWidget *entry, CreateClassDialo
|
|||||||
/*tmp = g_strconcat("gtk/", gtk_entry_get_text(GTK_ENTRY(entry)), ".h", NULL);*/
|
/*tmp = g_strconcat("gtk/", gtk_entry_get_text(GTK_ENTRY(entry)), ".h", NULL);*/
|
||||||
/* With GTK 2.14 (and later GTK 3), single header includes are encouraged */
|
/* With GTK 2.14 (and later GTK 3), single header includes are encouraged */
|
||||||
tmp = g_strdup("gtk/gtk.h");
|
tmp = g_strdup("gtk/gtk.h");
|
||||||
else if (p_utils->str_equal(gtk_entry_get_text(GTK_ENTRY(entry)), "GObject"))
|
else if (utils_str_equal(gtk_entry_get_text(GTK_ENTRY(entry)), "GObject"))
|
||||||
tmp = g_strdup("glib-object.h");
|
tmp = g_strdup("glib-object.h");
|
||||||
else
|
else
|
||||||
tmp = g_strconcat(gtk_entry_get_text(GTK_ENTRY(entry)), ".h", NULL);
|
tmp = g_strconcat(gtk_entry_get_text(GTK_ENTRY(entry)), ".h", NULL);
|
||||||
@ -576,7 +547,7 @@ static void cc_dlg_on_base_name_entry_changed(GtkWidget *entry, CreateClassDialo
|
|||||||
tmp = g_strdup_printf("%.3s_TYPE%s",
|
tmp = g_strdup_printf("%.3s_TYPE%s",
|
||||||
base_name_splitted,
|
base_name_splitted,
|
||||||
base_name_splitted + 3);
|
base_name_splitted + 3);
|
||||||
else if (p_utils->str_equal(gtk_entry_get_text(GTK_ENTRY(entry)), "GObject"))
|
else if (utils_str_equal(gtk_entry_get_text(GTK_ENTRY(entry)), "GObject"))
|
||||||
tmp = g_strdup("G_TYPE_OBJECT");
|
tmp = g_strdup("G_TYPE_OBJECT");
|
||||||
else
|
else
|
||||||
tmp = g_strconcat(base_name_splitted, "_TYPE", NULL);
|
tmp = g_strconcat(base_name_splitted, "_TYPE", NULL);
|
||||||
@ -601,7 +572,7 @@ static void cc_dlg_on_create_class(CreateClassDialog *cc_dlg)
|
|||||||
|
|
||||||
g_return_if_fail(cc_dlg != NULL);
|
g_return_if_fail(cc_dlg != NULL);
|
||||||
|
|
||||||
if (p_utils->str_equal(gtk_entry_get_text(GTK_ENTRY(cc_dlg->class_name_entry)), ""))
|
if (utils_str_equal(gtk_entry_get_text(GTK_ENTRY(cc_dlg->class_name_entry)), ""))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
class_info = g_new0(ClassInfo, 1);
|
class_info = g_new0(ClassInfo, 1);
|
||||||
@ -610,7 +581,7 @@ static void cc_dlg_on_create_class(CreateClassDialog *cc_dlg)
|
|||||||
tmp = str_case_split(class_info->class_name, '_');
|
tmp = str_case_split(class_info->class_name, '_');
|
||||||
class_info->class_name_up = g_ascii_strup(tmp, -1);
|
class_info->class_name_up = g_ascii_strup(tmp, -1);
|
||||||
class_info->class_name_low = g_ascii_strdown(class_info->class_name_up, -1);
|
class_info->class_name_low = g_ascii_strdown(class_info->class_name_up, -1);
|
||||||
if (! p_utils->str_equal(gtk_entry_get_text(GTK_ENTRY(cc_dlg->base_name_entry)), ""))
|
if (! utils_str_equal(gtk_entry_get_text(GTK_ENTRY(cc_dlg->base_name_entry)), ""))
|
||||||
{
|
{
|
||||||
class_info->base_name = g_strdup(gtk_entry_get_text(GTK_ENTRY(cc_dlg->base_name_entry)));
|
class_info->base_name = g_strdup(gtk_entry_get_text(GTK_ENTRY(cc_dlg->base_name_entry)));
|
||||||
class_info->base_include = g_strdup_printf("\n#include %c%s%c\n",
|
class_info->base_include = g_strdup_printf("\n#include %c%s%c\n",
|
||||||
@ -633,7 +604,7 @@ static void cc_dlg_on_create_class(CreateClassDialog *cc_dlg)
|
|||||||
case GEANY_CLASS_TYPE_CPP:
|
case GEANY_CLASS_TYPE_CPP:
|
||||||
{
|
{
|
||||||
class_info->source = g_strdup(gtk_entry_get_text(GTK_ENTRY(cc_dlg->source_entry)));
|
class_info->source = g_strdup(gtk_entry_get_text(GTK_ENTRY(cc_dlg->source_entry)));
|
||||||
if (! p_utils->str_equal(class_info->base_name, ""))
|
if (! utils_str_equal(class_info->base_name, ""))
|
||||||
class_info->base_decl = g_strdup_printf(": public %s", class_info->base_name);
|
class_info->base_decl = g_strdup_printf(": public %s", class_info->base_name);
|
||||||
else
|
else
|
||||||
class_info->base_decl = g_strdup("");
|
class_info->base_decl = g_strdup("");
|
||||||
@ -641,7 +612,7 @@ static void cc_dlg_on_create_class(CreateClassDialog *cc_dlg)
|
|||||||
{
|
{
|
||||||
gchar *base_constructor;
|
gchar *base_constructor;
|
||||||
|
|
||||||
if (p_utils->str_equal(class_info->base_name, ""))
|
if (utils_str_equal(class_info->base_name, ""))
|
||||||
base_constructor = g_strdup("");
|
base_constructor = g_strdup("");
|
||||||
else
|
else
|
||||||
base_constructor = g_strdup_printf("\t: %s()\n", class_info->base_name);
|
base_constructor = g_strdup_printf("\t: %s()\n", class_info->base_name);
|
||||||
@ -680,13 +651,12 @@ static void cc_dlg_on_create_class(CreateClassDialog *cc_dlg)
|
|||||||
gtk_entry_get_text(GTK_ENTRY(cc_dlg->gtk_constructor_type_entry)),
|
gtk_entry_get_text(GTK_ENTRY(cc_dlg->gtk_constructor_type_entry)),
|
||||||
class_info->class_name_low);
|
class_info->class_name_low);
|
||||||
class_info->constructor_impl = g_strdup_printf("\n"
|
class_info->constructor_impl = g_strdup_printf("\n"
|
||||||
"%s* %s_new(void)\n"
|
"%s *%s_new(void)\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
"\treturn (%s*)g_object_new(%s_TYPE, NULL);\n"
|
"\treturn g_object_new(%s_TYPE, NULL);\n"
|
||||||
"}\n",
|
"}\n",
|
||||||
gtk_entry_get_text(GTK_ENTRY(cc_dlg->gtk_constructor_type_entry)),
|
gtk_entry_get_text(GTK_ENTRY(cc_dlg->gtk_constructor_type_entry)),
|
||||||
class_info->class_name_low,
|
class_info->class_name_low,
|
||||||
gtk_entry_get_text(GTK_ENTRY(cc_dlg->gtk_constructor_type_entry)),
|
|
||||||
class_info->class_name_up);
|
class_info->class_name_up);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -711,13 +681,13 @@ static void cc_dlg_on_create_class(CreateClassDialog *cc_dlg)
|
|||||||
"\tg_return_if_fail(object != NULL);\n"
|
"\tg_return_if_fail(object != NULL);\n"
|
||||||
"\tg_return_if_fail(IS_%s(object));\n\n"
|
"\tg_return_if_fail(IS_%s(object));\n\n"
|
||||||
"\tself = %s(object);\n\n"
|
"\tself = %s(object);\n\n"
|
||||||
"\tif (G_OBJECT_CLASS(parent_class)->finalize)\n"
|
"\tG_OBJECT_CLASS(%s_parent_class)->finalize(object);\n"
|
||||||
"\t\t(* G_OBJECT_CLASS(parent_class)->finalize)(object);\n"
|
|
||||||
"}\n",
|
"}\n",
|
||||||
class_info->class_name_low,
|
class_info->class_name_low,
|
||||||
class_info->class_name,
|
class_info->class_name,
|
||||||
class_info->class_name_up,
|
class_info->class_name_up,
|
||||||
class_info->class_name_up);
|
class_info->class_name_up,
|
||||||
|
class_info->class_name_low);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -730,23 +700,23 @@ static void cc_dlg_on_create_class(CreateClassDialog *cc_dlg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* only create the files if the filename is not empty */
|
/* only create the files if the filename is not empty */
|
||||||
if (! p_utils->str_equal(class_info->source, ""))
|
if (! utils_str_equal(class_info->source, ""))
|
||||||
{
|
{
|
||||||
text = get_template_class_source(class_info);
|
text = get_template_class_source(class_info);
|
||||||
doc = p_document->new_file(class_info->source, NULL, NULL);
|
doc = document_new_file(class_info->source, NULL, NULL);
|
||||||
p_sci->set_text(doc->editor->sci, text);
|
sci_set_text(doc->editor->sci, text);
|
||||||
g_free(text);
|
g_free(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! p_utils->str_equal(class_info->header, ""))
|
if (! utils_str_equal(class_info->header, ""))
|
||||||
{
|
{
|
||||||
text = get_template_class_header(class_info);
|
text = get_template_class_header(class_info);
|
||||||
doc = p_document->new_file(class_info->header, NULL, NULL);
|
doc = document_new_file(class_info->header, NULL, NULL);
|
||||||
p_sci->set_text(doc->editor->sci, text);
|
sci_set_text(doc->editor->sci, text);
|
||||||
g_free(text);
|
g_free(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
utils_free_pointers(tmp, class_info->class_name, class_info->class_name_up,
|
utils_free_pointers(17, tmp, class_info->class_name, class_info->class_name_up,
|
||||||
class_info->base_name, class_info->class_name_low, class_info->base_include,
|
class_info->base_name, class_info->class_name_low, class_info->base_include,
|
||||||
class_info->header, class_info->header_guard, class_info->source, class_info->base_decl,
|
class_info->header, class_info->header_guard, class_info->source, class_info->base_decl,
|
||||||
class_info->constructor_decl, class_info->constructor_impl,
|
class_info->constructor_decl, class_info->constructor_impl,
|
||||||
@ -774,17 +744,13 @@ on_menu_create_gtk_class_activate (GtkMenuItem *menuitem,
|
|||||||
void plugin_init(GeanyData *data)
|
void plugin_init(GeanyData *data)
|
||||||
{
|
{
|
||||||
GtkWidget *menu_create_class1;
|
GtkWidget *menu_create_class1;
|
||||||
GtkWidget *image1861;
|
|
||||||
GtkWidget *menu_create_class1_menu;
|
GtkWidget *menu_create_class1_menu;
|
||||||
GtkWidget *menu_create_cpp_class;
|
GtkWidget *menu_create_cpp_class;
|
||||||
GtkWidget *menu_create_gtk_class;
|
GtkWidget *menu_create_gtk_class;
|
||||||
|
|
||||||
menu_create_class1 = gtk_image_menu_item_new_with_mnemonic (_("Create Cla_ss"));
|
menu_create_class1 = ui_image_menu_item_new (GTK_STOCK_ADD, _("Create Cla_ss"));
|
||||||
gtk_container_add (GTK_CONTAINER (geany->main_widgets->tools_menu), menu_create_class1);
|
gtk_container_add (GTK_CONTAINER (geany->main_widgets->tools_menu), menu_create_class1);
|
||||||
|
|
||||||
image1861 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
|
|
||||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_create_class1), image1861);
|
|
||||||
|
|
||||||
menu_create_class1_menu = gtk_menu_new ();
|
menu_create_class1_menu = gtk_menu_new ();
|
||||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_create_class1), menu_create_class1_menu);
|
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_create_class1), menu_create_class1_menu);
|
||||||
|
|
||||||
@ -803,11 +769,12 @@ void plugin_init(GeanyData *data)
|
|||||||
|
|
||||||
gtk_widget_show_all(menu_create_class1);
|
gtk_widget_show_all(menu_create_class1);
|
||||||
|
|
||||||
plugin_fields->menu_item = menu_create_class1;
|
ui_add_document_sensitive(menu_create_class1);
|
||||||
|
main_menu_item = menu_create_class1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void plugin_cleanup(void)
|
void plugin_cleanup(void)
|
||||||
{
|
{
|
||||||
gtk_widget_destroy(plugin_fields->menu_item);
|
gtk_widget_destroy(main_menu_item);
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* demoplugin.c - this file is part of Geany, a fast and lightweight IDE
|
* demoplugin.c - this file is part of Geany, a fast and lightweight IDE
|
||||||
*
|
*
|
||||||
* Copyright 2007-2008 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
* Copyright 2007-2009 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||||
* Copyright 2007-2008 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
* Copyright 2007-2009 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -30,38 +30,98 @@
|
|||||||
* cd plugins
|
* cd plugins
|
||||||
* make demoplugin.so
|
* make demoplugin.so
|
||||||
*
|
*
|
||||||
* Then copy or symlink the plugins/demoplugin.so file to ~/.geany/plugins
|
* Then copy or symlink the plugins/demoplugin.so file to ~/.config/geany/plugins
|
||||||
* - it will be loaded at next startup.
|
* - it will be loaded at next startup.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "geany.h" /* for the GeanyApp data type */
|
#include "geany.h" /* for the GeanyApp data type */
|
||||||
#include "support.h" /* for the _() translation macro (see also po/POTFILES.in) */
|
#include "support.h" /* for the _() translation macro (see also po/POTFILES.in) */
|
||||||
|
#include "editor.h" /* for the declaration of the GeanyEditor struct, not strictly necessary
|
||||||
|
as it will be also included by plugindata.h */
|
||||||
|
#include "document.h" /* for the declaration of the GeanyDocument struct */
|
||||||
#include "ui_utils.h"
|
#include "ui_utils.h"
|
||||||
|
#include "Scintilla.h" /* for the SCNotification struct */
|
||||||
|
|
||||||
#include "plugindata.h" /* this defines the plugin API */
|
#include "plugindata.h" /* this defines the plugin API */
|
||||||
#include "pluginmacros.h" /* some useful macros to save typing */
|
#include "geanyfunctions.h" /* this wraps geany_functions function pointers */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* These items are set by Geany before plugin_init() is called. */
|
/* These items are set by Geany before plugin_init() is called. */
|
||||||
PluginInfo *plugin_info;
|
GeanyPlugin *geany_plugin;
|
||||||
PluginFields *plugin_fields;
|
|
||||||
GeanyData *geany_data;
|
GeanyData *geany_data;
|
||||||
GeanyFunctions *geany_functions;
|
GeanyFunctions *geany_functions;
|
||||||
|
|
||||||
|
|
||||||
/* Check that Geany supports plugin API version 7 or later, and check
|
/* Check that the running Geany supports the plugin API used below, and check
|
||||||
* for binary compatibility. */
|
* for binary compatibility. */
|
||||||
PLUGIN_VERSION_CHECK(64)
|
PLUGIN_VERSION_CHECK(112)
|
||||||
|
|
||||||
/* All plugins must set name, description, version and author. */
|
/* All plugins must set name, description, version and author. */
|
||||||
PLUGIN_SET_INFO(_("Demo"), _("Example plugin."), VERSION, _("The Geany developer team"))
|
PLUGIN_SET_INFO(_("Demo"), _("Example plugin."), VERSION, _("The Geany developer team"))
|
||||||
|
|
||||||
|
|
||||||
|
static GtkWidget *main_menu_item = NULL;
|
||||||
/* text to be shown in the plugin dialog */
|
/* text to be shown in the plugin dialog */
|
||||||
static gchar *welcome_text = NULL;
|
static gchar *welcome_text = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static gboolean on_editor_notify(GObject *object, GeanyEditor *editor,
|
||||||
|
SCNotification *nt, gpointer data)
|
||||||
|
{
|
||||||
|
/* For detailed documentation about the SCNotification struct, please see
|
||||||
|
* http://www.scintilla.org/ScintillaDoc.html#Notifications. */
|
||||||
|
switch (nt->nmhdr.code)
|
||||||
|
{
|
||||||
|
case SCN_UPDATEUI:
|
||||||
|
/* This notification is sent very often, you should not do time-consuming tasks here */
|
||||||
|
break;
|
||||||
|
case SCN_CHARADDED:
|
||||||
|
/* For demonstrating purposes simply print the typed character in the status bar */
|
||||||
|
ui_set_statusbar(FALSE, _("Typed character: %c"), nt->ch);
|
||||||
|
break;
|
||||||
|
case SCN_URIDROPPED:
|
||||||
|
{
|
||||||
|
/* Show a message dialog with the dropped URI list when files (i.e. a list of
|
||||||
|
* filenames) is dropped to the editor widget) */
|
||||||
|
if (nt->text != NULL)
|
||||||
|
{
|
||||||
|
GtkWidget *dialog;
|
||||||
|
|
||||||
|
dialog = gtk_message_dialog_new(
|
||||||
|
GTK_WINDOW(geany->main_widgets->window),
|
||||||
|
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||||
|
GTK_MESSAGE_INFO,
|
||||||
|
GTK_BUTTONS_OK,
|
||||||
|
_("The following files were dropped:"));
|
||||||
|
gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
|
||||||
|
"%s", nt->text);
|
||||||
|
|
||||||
|
gtk_dialog_run(GTK_DIALOG(dialog));
|
||||||
|
gtk_widget_destroy(dialog);
|
||||||
|
}
|
||||||
|
/* we return TRUE here which prevents Geany from processing the SCN_URIDROPPED
|
||||||
|
* notification, i.e. Geany won't open the passed files */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PluginCallback plugin_callbacks[] =
|
||||||
|
{
|
||||||
|
/* Set 'after' (third field) to TRUE to run the callback @a after the default handler.
|
||||||
|
* If 'after' is FALSE, the callback is run @a before the default handler, so the plugin
|
||||||
|
* can prevent Geany from processing the notification. Use this with care. */
|
||||||
|
{ "editor-notify", (GCallback) &on_editor_notify, FALSE, NULL },
|
||||||
|
{ NULL, NULL, FALSE, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/* Callback when the menu item is clicked. */
|
/* Callback when the menu item is clicked. */
|
||||||
static void
|
static void
|
||||||
item_activate(GtkMenuItem *menuitem, gpointer gdata)
|
item_activate(GtkMenuItem *menuitem, gpointer gdata)
|
||||||
@ -75,7 +135,7 @@ item_activate(GtkMenuItem *menuitem, gpointer gdata)
|
|||||||
GTK_BUTTONS_OK,
|
GTK_BUTTONS_OK,
|
||||||
"%s", welcome_text);
|
"%s", welcome_text);
|
||||||
gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
|
gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
|
||||||
_("(From the %s plugin)"), plugin_info->name);
|
_("(From the %s plugin)"), geany_plugin->info->name);
|
||||||
|
|
||||||
gtk_dialog_run(GTK_DIALOG(dialog));
|
gtk_dialog_run(GTK_DIALOG(dialog));
|
||||||
gtk_widget_destroy(dialog);
|
gtk_widget_destroy(dialog);
|
||||||
@ -94,10 +154,12 @@ void plugin_init(GeanyData *data)
|
|||||||
gtk_container_add(GTK_CONTAINER(geany->main_widgets->tools_menu), demo_item);
|
gtk_container_add(GTK_CONTAINER(geany->main_widgets->tools_menu), demo_item);
|
||||||
g_signal_connect(demo_item, "activate", G_CALLBACK(item_activate), NULL);
|
g_signal_connect(demo_item, "activate", G_CALLBACK(item_activate), NULL);
|
||||||
|
|
||||||
welcome_text = g_strdup(_("Hello World!"));
|
/* make the menu item sensitive only when documents are open */
|
||||||
|
ui_add_document_sensitive(demo_item);
|
||||||
/* keep a pointer to the menu item, so we can remove it when the plugin is unloaded */
|
/* keep a pointer to the menu item, so we can remove it when the plugin is unloaded */
|
||||||
plugin_fields->menu_item = demo_item;
|
main_menu_item = demo_item;
|
||||||
|
|
||||||
|
welcome_text = g_strdup(_("Hello World!"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -117,7 +179,7 @@ on_configure_response(GtkDialog *dialog, gint response, gpointer user_data)
|
|||||||
* (e.g. using GLib's GKeyFile API)
|
* (e.g. using GLib's GKeyFile API)
|
||||||
* all plugin specific files should be created in:
|
* all plugin specific files should be created in:
|
||||||
* geany->app->configdir G_DIR_SEPARATOR_S plugins G_DIR_SEPARATOR_S pluginname G_DIR_SEPARATOR_S
|
* geany->app->configdir G_DIR_SEPARATOR_S plugins G_DIR_SEPARATOR_S pluginname G_DIR_SEPARATOR_S
|
||||||
* e.g. this could be: ~/.geany/plugins/Demo/, please use geany->app->configdir */
|
* e.g. this could be: ~/.config/geany/plugins/Demo/, please use geany->app->configdir */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,7 +220,7 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
|
|||||||
void plugin_cleanup(void)
|
void plugin_cleanup(void)
|
||||||
{
|
{
|
||||||
/* remove the menu item added in plugin_init() */
|
/* remove the menu item added in plugin_init() */
|
||||||
gtk_widget_destroy(plugin_fields->menu_item);
|
gtk_widget_destroy(main_menu_item);
|
||||||
/* release other allocated strings and objects */
|
/* release other allocated strings and objects */
|
||||||
g_free(welcome_text);
|
g_free(welcome_text);
|
||||||
}
|
}
|
||||||
|
147
plugins/export.c
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* export.c - this file is part of Geany, a fast and lightweight IDE
|
* export.c - this file is part of Geany, a fast and lightweight IDE
|
||||||
*
|
*
|
||||||
* Copyright 2007-2008 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
* Copyright 2007-2009 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||||
* Copyright 2007-2008 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
* Copyright 2007-2009 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -35,17 +35,20 @@
|
|||||||
#include "prefs.h"
|
#include "prefs.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "ui_utils.h"
|
#include "ui_utils.h"
|
||||||
#include "pluginmacros.h"
|
#include "geanyfunctions.h"
|
||||||
|
|
||||||
|
|
||||||
PluginFields *plugin_fields;
|
|
||||||
GeanyData *geany_data;
|
GeanyData *geany_data;
|
||||||
GeanyFunctions *geany_functions;
|
GeanyFunctions *geany_functions;
|
||||||
|
|
||||||
PLUGIN_VERSION_CHECK(69)
|
PLUGIN_VERSION_CHECK(GEANY_API_VERSION)
|
||||||
PLUGIN_SET_INFO(_("Export"), _("Exports the current file into different formats."), VERSION,
|
PLUGIN_SET_INFO(_("Export"), _("Exports the current file into different formats."), VERSION,
|
||||||
_("The Geany developer team"))
|
_("The Geany developer team"))
|
||||||
|
|
||||||
|
|
||||||
|
static GtkWidget *main_menu_item = NULL;
|
||||||
|
|
||||||
|
|
||||||
#define ROTATE_RGB(color) \
|
#define ROTATE_RGB(color) \
|
||||||
(((color) & 0xFF0000) >> 16) + ((color) & 0x00FF00) + (((color) & 0x0000FF) << 16)
|
(((color) & 0xFF0000) >> 16) + ((color) & 0x00FF00) + (((color) & 0x0000FF) << 16)
|
||||||
#define TEMPLATE_HTML "\
|
#define TEMPLATE_HTML "\
|
||||||
@ -74,7 +77,7 @@ PLUGIN_SET_INFO(_("Export"), _("Exports the current file into different formats.
|
|||||||
% {export_filename} (LaTeX code generated by Geany " VERSION " on {export_date})\n\
|
% {export_filename} (LaTeX code generated by Geany " VERSION " on {export_date})\n\
|
||||||
\\documentclass[a4paper]{article}\n\
|
\\documentclass[a4paper]{article}\n\
|
||||||
\\usepackage[a4paper,margin=2cm]{geometry}\n\
|
\\usepackage[a4paper,margin=2cm]{geometry}\n\
|
||||||
\\usepackage[utf8x]{inputenc}\n\
|
\\usepackage[utf8]{inputenc}\n\
|
||||||
\\usepackage[T1]{fontenc}\n\
|
\\usepackage[T1]{fontenc}\n\
|
||||||
\\usepackage{color}\n\
|
\\usepackage{color}\n\
|
||||||
\\setlength{\\parindent}{0em}\n\
|
\\setlength{\\parindent}{0em}\n\
|
||||||
@ -155,15 +158,13 @@ static void create_file_save_as_dialog(const gchar *extension, ExportFunc func,
|
|||||||
gboolean show_zoom_level_checkbox)
|
gboolean show_zoom_level_checkbox)
|
||||||
{
|
{
|
||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
GtkTooltips *tooltips;
|
|
||||||
GeanyDocument *doc;
|
GeanyDocument *doc;
|
||||||
ExportInfo *exi;
|
ExportInfo *exi;
|
||||||
|
|
||||||
if (extension == NULL)
|
if (extension == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
doc = p_document->get_current();
|
doc = document_get_current();
|
||||||
tooltips = GTK_TOOLTIPS(p_support->lookup_widget(geany->main_widgets->window, "tooltips"));
|
|
||||||
|
|
||||||
exi = g_new(ExportInfo, 1);
|
exi = g_new(ExportInfo, 1);
|
||||||
exi->doc = doc;
|
exi->doc = doc;
|
||||||
@ -188,14 +189,14 @@ static void create_file_save_as_dialog(const gchar *extension, ExportFunc func,
|
|||||||
|
|
||||||
vbox = gtk_vbox_new(FALSE, 0);
|
vbox = gtk_vbox_new(FALSE, 0);
|
||||||
check_zoom_level = gtk_check_button_new_with_mnemonic(_("_Use current zoom level"));
|
check_zoom_level = gtk_check_button_new_with_mnemonic(_("_Use current zoom level"));
|
||||||
gtk_tooltips_set_tip(tooltips, check_zoom_level,
|
ui_widget_set_tooltip_text(check_zoom_level,
|
||||||
_("Renders the font size of the document together with the current zoom level."), NULL);
|
_("Renders the font size of the document together with the current zoom level"));
|
||||||
gtk_box_pack_start(GTK_BOX(vbox), check_zoom_level, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(vbox), check_zoom_level, FALSE, FALSE, 0);
|
||||||
gtk_widget_show_all(vbox);
|
gtk_widget_show_all(vbox);
|
||||||
gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(dialog), vbox);
|
gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(dialog), vbox);
|
||||||
|
|
||||||
g_object_set_data_full(G_OBJECT(dialog), "check_zoom_level",
|
g_object_set_data_full(G_OBJECT(dialog), "check_zoom_level",
|
||||||
gtk_widget_ref(check_zoom_level), (GDestroyNotify) gtk_widget_unref);
|
g_object_ref(check_zoom_level), (GDestroyNotify) g_object_unref);
|
||||||
|
|
||||||
exi->have_zoom_level_checkbox = TRUE;
|
exi->have_zoom_level_checkbox = TRUE;
|
||||||
}
|
}
|
||||||
@ -210,7 +211,7 @@ static void create_file_save_as_dialog(const gchar *extension, ExportFunc func,
|
|||||||
if (doc->file_name != NULL)
|
if (doc->file_name != NULL)
|
||||||
{
|
{
|
||||||
gchar *base_name = g_path_get_basename(doc->file_name);
|
gchar *base_name = g_path_get_basename(doc->file_name);
|
||||||
gchar *short_name = p_utils->remove_ext_from_filename(base_name);
|
gchar *short_name = utils_remove_ext_from_filename(base_name);
|
||||||
gchar *file_name;
|
gchar *file_name;
|
||||||
gchar *locale_filename;
|
gchar *locale_filename;
|
||||||
gchar *locale_dirname;
|
gchar *locale_dirname;
|
||||||
@ -220,7 +221,7 @@ static void create_file_save_as_dialog(const gchar *extension, ExportFunc func,
|
|||||||
suffix = "_export";
|
suffix = "_export";
|
||||||
|
|
||||||
file_name = g_strconcat(short_name, suffix, extension, NULL);
|
file_name = g_strconcat(short_name, suffix, extension, NULL);
|
||||||
locale_filename = p_utils->get_locale_from_utf8(doc->file_name);
|
locale_filename = utils_get_locale_from_utf8(doc->file_name);
|
||||||
locale_dirname = g_path_get_dirname(locale_filename);
|
locale_dirname = g_path_get_dirname(locale_filename);
|
||||||
/* set the current name to base_name.html which probably doesn't exist yet so
|
/* set the current name to base_name.html which probably doesn't exist yet so
|
||||||
* gtk_file_chooser_set_filename() can't be used and we need
|
* gtk_file_chooser_set_filename() can't be used and we need
|
||||||
@ -243,7 +244,7 @@ static void create_file_save_as_dialog(const gchar *extension, ExportFunc func,
|
|||||||
/* use default startup directory(if set) if no files are open */
|
/* use default startup directory(if set) if no files are open */
|
||||||
if (NZV(default_open_path) && g_path_is_absolute(default_open_path))
|
if (NZV(default_open_path) && g_path_is_absolute(default_open_path))
|
||||||
{
|
{
|
||||||
gchar *locale_path = p_utils->get_locale_from_utf8(default_open_path);
|
gchar *locale_path = utils_get_locale_from_utf8(default_open_path);
|
||||||
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), locale_path);
|
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), locale_path);
|
||||||
g_free(locale_path);
|
g_free(locale_path);
|
||||||
}
|
}
|
||||||
@ -267,33 +268,25 @@ static void on_menu_create_html_activate(GtkMenuItem *menuitem, gpointer user_da
|
|||||||
|
|
||||||
static void write_data(const gchar *filename, const gchar *data)
|
static void write_data(const gchar *filename, const gchar *data)
|
||||||
{
|
{
|
||||||
gint error_nr = p_utils->write_file(filename, data);
|
gint error_nr = utils_write_file(filename, data);
|
||||||
gchar *utf8_filename = p_utils->get_utf8_from_locale(filename);
|
gchar *utf8_filename = utils_get_utf8_from_locale(filename);
|
||||||
|
|
||||||
if (error_nr == 0)
|
if (error_nr == 0)
|
||||||
p_ui->set_statusbar(TRUE, _("Document successfully exported as '%s'."), utf8_filename);
|
ui_set_statusbar(TRUE, _("Document successfully exported as '%s'."), utf8_filename);
|
||||||
else
|
else
|
||||||
p_ui->set_statusbar(TRUE, _("File '%s' could not be written (%s)."),
|
ui_set_statusbar(TRUE, _("File '%s' could not be written (%s)."),
|
||||||
utf8_filename, g_strerror(error_nr));
|
utf8_filename, g_strerror(error_nr));
|
||||||
|
|
||||||
g_free(utf8_filename);
|
g_free(utf8_filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static const gchar *get_date(gint type)
|
static gchar *get_date(gint type)
|
||||||
{
|
{
|
||||||
static gchar str[128];
|
|
||||||
gchar *format;
|
gchar *format;
|
||||||
time_t t;
|
|
||||||
struct tm *tmp;
|
|
||||||
|
|
||||||
t = time(NULL);
|
|
||||||
tmp = localtime(&t);
|
|
||||||
if (tmp == NULL)
|
|
||||||
return "";
|
|
||||||
|
|
||||||
if (type == DATE_TYPE_HTML)
|
if (type == DATE_TYPE_HTML)
|
||||||
/** needs testing */
|
/* needs testing */
|
||||||
#ifdef _GNU_SOURCE
|
#ifdef _GNU_SOURCE
|
||||||
format = "%Y-%m-%dT%H:%M:%S%z";
|
format = "%Y-%m-%dT%H:%M:%S%z";
|
||||||
#else
|
#else
|
||||||
@ -302,9 +295,7 @@ static const gchar *get_date(gint type)
|
|||||||
else
|
else
|
||||||
format = "%c";
|
format = "%c";
|
||||||
|
|
||||||
strftime(str, sizeof str, format, tmp);
|
return utils_get_date_time(format, NULL);
|
||||||
|
|
||||||
return str;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -321,15 +312,15 @@ static void on_file_save_dialog_response(GtkDialog *dialog, gint response, gpoin
|
|||||||
if (exi->have_zoom_level_checkbox)
|
if (exi->have_zoom_level_checkbox)
|
||||||
{
|
{
|
||||||
use_zoom_level = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
|
use_zoom_level = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
|
||||||
p_support->lookup_widget(GTK_WIDGET(dialog), "check_zoom_level")));
|
ui_lookup_widget(GTK_WIDGET(dialog), "check_zoom_level")));
|
||||||
}
|
}
|
||||||
|
|
||||||
utf8_filename = p_utils->get_utf8_from_locale(new_filename);
|
utf8_filename = utils_get_utf8_from_locale(new_filename);
|
||||||
|
|
||||||
/* check if file exists and ask whether to overwrite or not */
|
/* check if file exists and ask whether to overwrite or not */
|
||||||
if (g_file_test(new_filename, G_FILE_TEST_EXISTS))
|
if (g_file_test(new_filename, G_FILE_TEST_EXISTS))
|
||||||
{
|
{
|
||||||
if (p_dialogs->show_question(
|
if (dialogs_show_question(
|
||||||
_("The file '%s' already exists. Do you want to overwrite it?"),
|
_("The file '%s' already exists. Do you want to overwrite it?"),
|
||||||
utf8_filename) == FALSE)
|
utf8_filename) == FALSE)
|
||||||
return;
|
return;
|
||||||
@ -348,33 +339,34 @@ static void on_file_save_dialog_response(GtkDialog *dialog, gint response, gpoin
|
|||||||
static void write_latex_file(GeanyDocument *doc, const gchar *filename, gboolean use_zoom)
|
static void write_latex_file(GeanyDocument *doc, const gchar *filename, gboolean use_zoom)
|
||||||
{
|
{
|
||||||
GeanyEditor *editor = doc->editor;
|
GeanyEditor *editor = doc->editor;
|
||||||
gint i, style = -1, old_style = 0, column = 0;
|
gint i, doc_len, style = -1, old_style = 0, column = 0;
|
||||||
gchar c, c_next, *tmp;
|
gchar c, c_next, *tmp, *date;
|
||||||
/* 0 - fore, 1 - back, 2 - bold, 3 - italic, 4 - font size, 5 - used(0/1) */
|
/* 0 - fore, 1 - back, 2 - bold, 3 - italic, 4 - font size, 5 - used(0/1) */
|
||||||
gint styles[STYLE_MAX + 1][MAX_TYPES];
|
gint styles[STYLE_MAX + 1][MAX_TYPES];
|
||||||
gboolean block_open = FALSE;
|
gboolean block_open = FALSE;
|
||||||
GString *body;
|
GString *body;
|
||||||
GString *cmds;
|
GString *cmds;
|
||||||
GString *latex;
|
GString *latex;
|
||||||
gint style_max = pow(2, p_sci->send_message(doc->editor->sci, SCI_GETSTYLEBITS, 0, 0));
|
gint style_max = pow(2, scintilla_send_message(doc->editor->sci, SCI_GETSTYLEBITS, 0, 0));
|
||||||
|
|
||||||
/* first read all styles from Scintilla */
|
/* first read all styles from Scintilla */
|
||||||
for (i = 0; i < style_max; i++)
|
for (i = 0; i < style_max; i++)
|
||||||
{
|
{
|
||||||
styles[i][FORE] = p_sci->send_message(doc->editor->sci, SCI_STYLEGETFORE, i, 0);
|
styles[i][FORE] = scintilla_send_message(doc->editor->sci, SCI_STYLEGETFORE, i, 0);
|
||||||
styles[i][BACK] = p_sci->send_message(doc->editor->sci, SCI_STYLEGETBACK, i, 0);
|
styles[i][BACK] = scintilla_send_message(doc->editor->sci, SCI_STYLEGETBACK, i, 0);
|
||||||
styles[i][BOLD] = p_sci->send_message(doc->editor->sci, SCI_STYLEGETBOLD, i, 0);
|
styles[i][BOLD] = scintilla_send_message(doc->editor->sci, SCI_STYLEGETBOLD, i, 0);
|
||||||
styles[i][ITALIC] = p_sci->send_message(doc->editor->sci, SCI_STYLEGETITALIC, i, 0);
|
styles[i][ITALIC] = scintilla_send_message(doc->editor->sci, SCI_STYLEGETITALIC, i, 0);
|
||||||
styles[i][USED] = 0;
|
styles[i][USED] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read the document and write the LaTeX code */
|
/* read the document and write the LaTeX code */
|
||||||
body = g_string_new("");
|
body = g_string_new("");
|
||||||
for (i = 0; i < p_sci->get_length(doc->editor->sci); i++)
|
doc_len = sci_get_length(doc->editor->sci);
|
||||||
|
for (i = 0; i < doc_len; i++)
|
||||||
{
|
{
|
||||||
style = p_sci->get_style_at(doc->editor->sci, i);
|
style = sci_get_style_at(doc->editor->sci, i);
|
||||||
c = p_sci->get_char_at(doc->editor->sci, i);
|
c = sci_get_char_at(doc->editor->sci, i);
|
||||||
c_next = p_sci->get_char_at(doc->editor->sci, i + 1);
|
c_next = sci_get_char_at(doc->editor->sci, i + 1);
|
||||||
|
|
||||||
if (style != old_style || ! block_open)
|
if (style != old_style || ! block_open)
|
||||||
{
|
{
|
||||||
@ -409,7 +401,7 @@ static void write_latex_file(GeanyDocument *doc, const gchar *filename, gboolean
|
|||||||
}
|
}
|
||||||
case '\t':
|
case '\t':
|
||||||
{
|
{
|
||||||
gint tab_width = p_sci->get_tab_width(editor->sci);
|
gint tab_width = sci_get_tab_width(editor->sci);
|
||||||
gint tab_stop = tab_width - (column % tab_width);
|
gint tab_stop = tab_width - (column % tab_width);
|
||||||
|
|
||||||
column += tab_stop - 1; /* -1 because we add 1 at the end of the loop */
|
column += tab_stop - 1; /* -1 because we add 1 at the end of the loop */
|
||||||
@ -532,29 +524,31 @@ static void write_latex_file(GeanyDocument *doc, const gchar *filename, gboolean
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
date = get_date(DATE_TYPE_DEFAULT);
|
||||||
/* write all */
|
/* write all */
|
||||||
latex = g_string_new(TEMPLATE_LATEX);
|
latex = g_string_new(TEMPLATE_LATEX);
|
||||||
p_utils->string_replace_all(latex, "{export_content}", body->str);
|
utils_string_replace_all(latex, "{export_content}", body->str);
|
||||||
p_utils->string_replace_all(latex, "{export_styles}", cmds->str);
|
utils_string_replace_all(latex, "{export_styles}", cmds->str);
|
||||||
p_utils->string_replace_all(latex, "{export_date}", get_date(DATE_TYPE_DEFAULT));
|
utils_string_replace_all(latex, "{export_date}", date);
|
||||||
if (doc->file_name == NULL)
|
if (doc->file_name == NULL)
|
||||||
p_utils->string_replace_all(latex, "{export_filename}", GEANY_STRING_UNTITLED);
|
utils_string_replace_all(latex, "{export_filename}", GEANY_STRING_UNTITLED);
|
||||||
else
|
else
|
||||||
p_utils->string_replace_all(latex, "{export_filename}", doc->file_name);
|
utils_string_replace_all(latex, "{export_filename}", doc->file_name);
|
||||||
|
|
||||||
write_data(filename, latex->str);
|
write_data(filename, latex->str);
|
||||||
|
|
||||||
g_string_free(body, TRUE);
|
g_string_free(body, TRUE);
|
||||||
g_string_free(cmds, TRUE);
|
g_string_free(cmds, TRUE);
|
||||||
g_string_free(latex, TRUE);
|
g_string_free(latex, TRUE);
|
||||||
|
g_free(date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void write_html_file(GeanyDocument *doc, const gchar *filename, gboolean use_zoom)
|
static void write_html_file(GeanyDocument *doc, const gchar *filename, gboolean use_zoom)
|
||||||
{
|
{
|
||||||
GeanyEditor *editor = doc->editor;
|
GeanyEditor *editor = doc->editor;
|
||||||
gint i, style = -1, old_style = 0, column = 0;
|
gint i, doc_len, style = -1, old_style = 0, column = 0;
|
||||||
gchar c, c_next;
|
gchar c, c_next, *date;
|
||||||
/* 0 - fore, 1 - back, 2 - bold, 3 - italic, 4 - font size, 5 - used(0/1) */
|
/* 0 - fore, 1 - back, 2 - bold, 3 - italic, 4 - font size, 5 - used(0/1) */
|
||||||
gint styles[STYLE_MAX + 1][MAX_TYPES];
|
gint styles[STYLE_MAX + 1][MAX_TYPES];
|
||||||
gboolean span_open = FALSE;
|
gboolean span_open = FALSE;
|
||||||
@ -564,15 +558,15 @@ static void write_html_file(GeanyDocument *doc, const gchar *filename, gboolean
|
|||||||
GString *body;
|
GString *body;
|
||||||
GString *css;
|
GString *css;
|
||||||
GString *html;
|
GString *html;
|
||||||
gint style_max = pow(2, p_sci->send_message(doc->editor->sci, SCI_GETSTYLEBITS, 0, 0));
|
gint style_max = pow(2, scintilla_send_message(doc->editor->sci, SCI_GETSTYLEBITS, 0, 0));
|
||||||
|
|
||||||
/* first read all styles from Scintilla */
|
/* first read all styles from Scintilla */
|
||||||
for (i = 0; i < style_max; i++)
|
for (i = 0; i < style_max; i++)
|
||||||
{
|
{
|
||||||
styles[i][FORE] = ROTATE_RGB(p_sci->send_message(doc->editor->sci, SCI_STYLEGETFORE, i, 0));
|
styles[i][FORE] = ROTATE_RGB(scintilla_send_message(doc->editor->sci, SCI_STYLEGETFORE, i, 0));
|
||||||
styles[i][BACK] = ROTATE_RGB(p_sci->send_message(doc->editor->sci, SCI_STYLEGETBACK, i, 0));
|
styles[i][BACK] = ROTATE_RGB(scintilla_send_message(doc->editor->sci, SCI_STYLEGETBACK, i, 0));
|
||||||
styles[i][BOLD] = p_sci->send_message(doc->editor->sci, SCI_STYLEGETBOLD, i, 0);
|
styles[i][BOLD] = scintilla_send_message(doc->editor->sci, SCI_STYLEGETBOLD, i, 0);
|
||||||
styles[i][ITALIC] = p_sci->send_message(doc->editor->sci, SCI_STYLEGETITALIC, i, 0);
|
styles[i][ITALIC] = scintilla_send_message(doc->editor->sci, SCI_STYLEGETITALIC, i, 0);
|
||||||
styles[i][USED] = 0;
|
styles[i][USED] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -581,18 +575,19 @@ static void write_html_file(GeanyDocument *doc, const gchar *filename, gboolean
|
|||||||
font_name = pango_font_description_get_family(font_desc);
|
font_name = pango_font_description_get_family(font_desc);
|
||||||
/*font_size = pango_font_description_get_size(font_desc) / PANGO_SCALE;*/
|
/*font_size = pango_font_description_get_size(font_desc) / PANGO_SCALE;*/
|
||||||
/* take the zoom level also into account */
|
/* take the zoom level also into account */
|
||||||
font_size = p_sci->send_message(doc->editor->sci, SCI_STYLEGETSIZE, 0, 0);
|
font_size = scintilla_send_message(doc->editor->sci, SCI_STYLEGETSIZE, 0, 0);
|
||||||
if (use_zoom)
|
if (use_zoom)
|
||||||
font_size += p_sci->send_message(doc->editor->sci, SCI_GETZOOM, 0, 0);
|
font_size += scintilla_send_message(doc->editor->sci, SCI_GETZOOM, 0, 0);
|
||||||
|
|
||||||
/* read the document and write the HTML body */
|
/* read the document and write the HTML body */
|
||||||
body = g_string_new("");
|
body = g_string_new("");
|
||||||
for (i = 0; i < p_sci->get_length(doc->editor->sci); i++)
|
doc_len = sci_get_length(doc->editor->sci);
|
||||||
|
for (i = 0; i < doc_len; i++)
|
||||||
{
|
{
|
||||||
style = p_sci->get_style_at(doc->editor->sci, i);
|
style = sci_get_style_at(doc->editor->sci, i);
|
||||||
c = p_sci->get_char_at(doc->editor->sci, i);
|
c = sci_get_char_at(doc->editor->sci, i);
|
||||||
/* p_sci->get_char_at() takes care of index boundaries and return 0 if i is too high */
|
/* sci_get_char_at() takes care of index boundaries and return 0 if i is too high */
|
||||||
c_next = p_sci->get_char_at(doc->editor->sci, i + 1);
|
c_next = sci_get_char_at(doc->editor->sci, i + 1);
|
||||||
|
|
||||||
if ((style != old_style || ! span_open) && ! isspace(c))
|
if ((style != old_style || ! span_open) && ! isspace(c))
|
||||||
{
|
{
|
||||||
@ -627,7 +622,7 @@ static void write_html_file(GeanyDocument *doc, const gchar *filename, gboolean
|
|||||||
case '\t':
|
case '\t':
|
||||||
{
|
{
|
||||||
gint j;
|
gint j;
|
||||||
gint tab_width = p_sci->get_tab_width(editor->sci);
|
gint tab_width = sci_get_tab_width(editor->sci);
|
||||||
gint tab_stop = tab_width - (column % tab_width);
|
gint tab_stop = tab_width - (column % tab_width);
|
||||||
|
|
||||||
column += tab_stop - 1; /* -1 because we add 1 at the end of the loop */
|
column += tab_stop - 1; /* -1 because we add 1 at the end of the loop */
|
||||||
@ -685,15 +680,16 @@ static void write_html_file(GeanyDocument *doc, const gchar *filename, gboolean
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
date = get_date(DATE_TYPE_HTML);
|
||||||
/* write all */
|
/* write all */
|
||||||
html = g_string_new(TEMPLATE_HTML);
|
html = g_string_new(TEMPLATE_HTML);
|
||||||
p_utils->string_replace_all(html, "{export_date}", get_date(DATE_TYPE_HTML));
|
utils_string_replace_all(html, "{export_date}", date);
|
||||||
p_utils->string_replace_all(html, "{export_content}", body->str);
|
utils_string_replace_all(html, "{export_content}", body->str);
|
||||||
p_utils->string_replace_all(html, "{export_styles}", css->str);
|
utils_string_replace_all(html, "{export_styles}", css->str);
|
||||||
if (doc->file_name == NULL)
|
if (doc->file_name == NULL)
|
||||||
p_utils->string_replace_all(html, "{export_filename}", GEANY_STRING_UNTITLED);
|
utils_string_replace_all(html, "{export_filename}", GEANY_STRING_UNTITLED);
|
||||||
else
|
else
|
||||||
p_utils->string_replace_all(html, "{export_filename}", doc->file_name);
|
utils_string_replace_all(html, "{export_filename}", doc->file_name);
|
||||||
|
|
||||||
write_data(filename, html->str);
|
write_data(filename, html->str);
|
||||||
|
|
||||||
@ -701,6 +697,7 @@ static void write_html_file(GeanyDocument *doc, const gchar *filename, gboolean
|
|||||||
g_string_free(body, TRUE);
|
g_string_free(body, TRUE);
|
||||||
g_string_free(css, TRUE);
|
g_string_free(css, TRUE);
|
||||||
g_string_free(html, TRUE);
|
g_string_free(html, TRUE);
|
||||||
|
g_free(date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -731,8 +728,8 @@ void plugin_init(GeanyData *data)
|
|||||||
G_CALLBACK(on_menu_create_latex_activate), NULL);
|
G_CALLBACK(on_menu_create_latex_activate), NULL);
|
||||||
|
|
||||||
/* disable menu_item when there are no documents open */
|
/* disable menu_item when there are no documents open */
|
||||||
plugin_fields->menu_item = menu_export;
|
ui_add_document_sensitive(menu_export);
|
||||||
plugin_fields->flags = PLUGIN_IS_DOCUMENT_SENSITIVE;
|
main_menu_item = menu_export;
|
||||||
|
|
||||||
gtk_widget_show_all(menu_export);
|
gtk_widget_show_all(menu_export);
|
||||||
}
|
}
|
||||||
@ -740,5 +737,5 @@ void plugin_init(GeanyData *data)
|
|||||||
|
|
||||||
void plugin_cleanup(void)
|
void plugin_cleanup(void)
|
||||||
{
|
{
|
||||||
gtk_widget_destroy(plugin_fields->menu_item);
|
gtk_widget_destroy(main_menu_item);
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* filebrowser.c - this file is part of Geany, a fast and lightweight IDE
|
* filebrowser.c - this file is part of Geany, a fast and lightweight IDE
|
||||||
*
|
*
|
||||||
* Copyright 2007-2008 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
* Copyright 2007-2009 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||||
* Copyright 2007-2008 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
* Copyright 2007-2009 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -38,15 +38,14 @@
|
|||||||
#include "ui_utils.h"
|
#include "ui_utils.h"
|
||||||
|
|
||||||
#include "plugindata.h"
|
#include "plugindata.h"
|
||||||
#include "pluginmacros.h"
|
#include "geanyfunctions.h"
|
||||||
|
|
||||||
|
|
||||||
PluginFields *plugin_fields;
|
|
||||||
GeanyData *geany_data;
|
GeanyData *geany_data;
|
||||||
GeanyFunctions *geany_functions;
|
GeanyFunctions *geany_functions;
|
||||||
|
|
||||||
|
|
||||||
PLUGIN_VERSION_CHECK(69)
|
PLUGIN_VERSION_CHECK(131)
|
||||||
|
|
||||||
PLUGIN_SET_INFO(_("File Browser"), _("Adds a file browser tab to the sidebar."), VERSION,
|
PLUGIN_SET_INFO(_("File Browser"), _("Adds a file browser tab to the sidebar."), VERSION,
|
||||||
_("The Geany developer team"))
|
_("The Geany developer team"))
|
||||||
@ -67,9 +66,12 @@ enum
|
|||||||
{
|
{
|
||||||
FILEVIEW_COLUMN_ICON = 0,
|
FILEVIEW_COLUMN_ICON = 0,
|
||||||
FILEVIEW_COLUMN_NAME,
|
FILEVIEW_COLUMN_NAME,
|
||||||
|
FILEVIEW_COLUMN_FILENAME, /* the full filename, including path for display as tooltip */
|
||||||
FILEVIEW_N_COLUMNS
|
FILEVIEW_N_COLUMNS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static gboolean fb_set_project_base_path = FALSE;
|
||||||
|
static gboolean fb_follow_path = FALSE;
|
||||||
static gboolean show_hidden_files = FALSE;
|
static gboolean show_hidden_files = FALSE;
|
||||||
static gboolean hide_object_files = TRUE;
|
static gboolean hide_object_files = TRUE;
|
||||||
|
|
||||||
@ -86,6 +88,8 @@ static gchar *open_cmd; /* in locale-encoding */
|
|||||||
static gchar *config_file;
|
static gchar *config_file;
|
||||||
static gchar *filter = NULL;
|
static gchar *filter = NULL;
|
||||||
|
|
||||||
|
static gint page_number = 0;
|
||||||
|
|
||||||
static struct
|
static struct
|
||||||
{
|
{
|
||||||
GtkWidget *open;
|
GtkWidget *open;
|
||||||
@ -94,6 +98,18 @@ static struct
|
|||||||
} popup_items;
|
} popup_items;
|
||||||
|
|
||||||
|
|
||||||
|
static void document_activate_cb(GObject *obj, GeanyDocument *doc, gpointer data);
|
||||||
|
static void project_change_cb(GObject *obj, GKeyFile *config, gpointer data);
|
||||||
|
|
||||||
|
PluginCallback plugin_callbacks[] =
|
||||||
|
{
|
||||||
|
{ "document-activate", (GCallback) &document_activate_cb, TRUE, NULL },
|
||||||
|
{ "project-open", (GCallback) &project_change_cb, TRUE, NULL },
|
||||||
|
{ "project-save", (GCallback) &project_change_cb, TRUE, NULL },
|
||||||
|
{ NULL, NULL, FALSE, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/* Returns: whether name should be hidden. */
|
/* Returns: whether name should be hidden. */
|
||||||
static gboolean check_hidden(const gchar *base_name)
|
static gboolean check_hidden(const gchar *base_name)
|
||||||
{
|
{
|
||||||
@ -112,13 +128,14 @@ static gboolean check_hidden(const gchar *base_name)
|
|||||||
if (hide_object_files)
|
if (hide_object_files)
|
||||||
{
|
{
|
||||||
const gchar *exts[] = {".o", ".obj", ".so", ".dll", ".a", ".lib"};
|
const gchar *exts[] = {".o", ".obj", ".so", ".dll", ".a", ".lib"};
|
||||||
guint i;
|
guint i, exts_len;
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS(exts); i++)
|
exts_len = G_N_ELEMENTS(exts);
|
||||||
|
for (i = 0; i < exts_len; i++)
|
||||||
{
|
{
|
||||||
const gchar *ext = exts[i];
|
const gchar *ext = exts[i];
|
||||||
|
|
||||||
if (p_utils->str_equal(&base_name[len - strlen(ext)], ext))
|
if (g_str_has_suffix(base_name, ext))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -132,7 +149,7 @@ static gboolean check_filtered(const gchar *base_name)
|
|||||||
if (filter == NULL)
|
if (filter == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (! p_utils->str_equal(base_name, "*") && ! g_pattern_match_simple(filter, base_name))
|
if (! utils_str_equal(base_name, "*") && ! g_pattern_match_simple(filter, base_name))
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -145,7 +162,7 @@ static gboolean check_filtered(const gchar *base_name)
|
|||||||
static void add_item(const gchar *name)
|
static void add_item(const gchar *name)
|
||||||
{
|
{
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
gchar *fname, *utf8_name;
|
gchar *fname, *utf8_name, *utf8_fullname, *sep;
|
||||||
gboolean dir;
|
gboolean dir;
|
||||||
|
|
||||||
if (! show_hidden_files && check_hidden(name))
|
if (! show_hidden_files && check_hidden(name))
|
||||||
@ -154,8 +171,10 @@ static void add_item(const gchar *name)
|
|||||||
if (check_filtered(name))
|
if (check_filtered(name))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fname = g_strconcat(current_dir, G_DIR_SEPARATOR_S, name, NULL);
|
sep = (utils_str_equal(current_dir, "/")) ? "" : G_DIR_SEPARATOR_S;
|
||||||
|
fname = g_strconcat(current_dir, sep, name, NULL);
|
||||||
dir = g_file_test(fname, G_FILE_TEST_IS_DIR);
|
dir = g_file_test(fname, G_FILE_TEST_IS_DIR);
|
||||||
|
utf8_fullname = utils_get_locale_from_utf8(fname);
|
||||||
g_free(fname);
|
g_free(fname);
|
||||||
|
|
||||||
if (dir)
|
if (dir)
|
||||||
@ -172,12 +191,15 @@ static void add_item(const gchar *name)
|
|||||||
else
|
else
|
||||||
gtk_list_store_append(file_store, &iter);
|
gtk_list_store_append(file_store, &iter);
|
||||||
|
|
||||||
utf8_name = p_utils->get_utf8_from_locale(name);
|
utf8_name = utils_get_utf8_from_locale(name);
|
||||||
|
|
||||||
gtk_list_store_set(file_store, &iter,
|
gtk_list_store_set(file_store, &iter,
|
||||||
FILEVIEW_COLUMN_ICON, (dir) ? GTK_STOCK_DIRECTORY : GTK_STOCK_FILE,
|
FILEVIEW_COLUMN_ICON, (dir) ? GTK_STOCK_DIRECTORY : GTK_STOCK_FILE,
|
||||||
FILEVIEW_COLUMN_NAME, utf8_name, -1);
|
FILEVIEW_COLUMN_NAME, utf8_name,
|
||||||
|
FILEVIEW_COLUMN_FILENAME, utf8_fullname,
|
||||||
|
-1);
|
||||||
g_free(utf8_name);
|
g_free(utf8_name);
|
||||||
|
g_free(utf8_fullname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -185,15 +207,23 @@ static void add_item(const gchar *name)
|
|||||||
static void add_top_level_entry(void)
|
static void add_top_level_entry(void)
|
||||||
{
|
{
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
|
gchar *utf8_dir;
|
||||||
|
|
||||||
if (! NZV(g_path_skip_root(current_dir)))
|
if (! NZV(g_path_skip_root(current_dir)))
|
||||||
return; /* ignore 'C:\' or '/' */
|
return; /* ignore 'C:\' or '/' */
|
||||||
|
|
||||||
|
utf8_dir = g_path_get_dirname(current_dir);
|
||||||
|
setptr(utf8_dir, utils_get_utf8_from_locale(utf8_dir));
|
||||||
|
|
||||||
gtk_list_store_prepend(file_store, &iter);
|
gtk_list_store_prepend(file_store, &iter);
|
||||||
last_dir_iter = gtk_tree_iter_copy(&iter);
|
last_dir_iter = gtk_tree_iter_copy(&iter);
|
||||||
|
|
||||||
gtk_list_store_set(file_store, &iter,
|
gtk_list_store_set(file_store, &iter,
|
||||||
FILEVIEW_COLUMN_ICON, GTK_STOCK_DIRECTORY, FILEVIEW_COLUMN_NAME, "..", -1);
|
FILEVIEW_COLUMN_ICON, GTK_STOCK_DIRECTORY,
|
||||||
|
FILEVIEW_COLUMN_NAME, "..",
|
||||||
|
FILEVIEW_COLUMN_FILENAME, utf8_dir,
|
||||||
|
-1);
|
||||||
|
g_free(utf8_dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -220,13 +250,13 @@ static void refresh(void)
|
|||||||
|
|
||||||
clear();
|
clear();
|
||||||
|
|
||||||
utf8_dir = p_utils->get_utf8_from_locale(current_dir);
|
utf8_dir = utils_get_utf8_from_locale(current_dir);
|
||||||
gtk_entry_set_text(GTK_ENTRY(path_entry), utf8_dir);
|
gtk_entry_set_text(GTK_ENTRY(path_entry), utf8_dir);
|
||||||
g_free(utf8_dir);
|
g_free(utf8_dir);
|
||||||
|
|
||||||
add_top_level_entry(); /* ".." item */
|
add_top_level_entry(); /* ".." item */
|
||||||
|
|
||||||
list = p_utils->get_file_list(current_dir, NULL, NULL);
|
list = utils_get_file_list(current_dir, NULL, NULL);
|
||||||
if (list != NULL)
|
if (list != NULL)
|
||||||
{
|
{
|
||||||
g_slist_foreach(list, (GFunc) add_item, NULL);
|
g_slist_foreach(list, (GFunc) add_item, NULL);
|
||||||
@ -252,7 +282,7 @@ static gchar *get_default_dir(void)
|
|||||||
if (project)
|
if (project)
|
||||||
dir = project->base_path;
|
dir = project->base_path;
|
||||||
if (NZV(dir))
|
if (NZV(dir))
|
||||||
return p_utils->get_locale_from_utf8(dir);
|
return utils_get_locale_from_utf8(dir);
|
||||||
|
|
||||||
return g_get_current_dir();
|
return g_get_current_dir();
|
||||||
}
|
}
|
||||||
@ -262,7 +292,7 @@ static void on_current_path(void)
|
|||||||
{
|
{
|
||||||
gchar *fname;
|
gchar *fname;
|
||||||
gchar *dir;
|
gchar *dir;
|
||||||
GeanyDocument *doc = p_document->get_current();
|
GeanyDocument *doc = document_get_current();
|
||||||
|
|
||||||
if (doc == NULL || doc->file_name == NULL || ! g_path_is_absolute(doc->file_name))
|
if (doc == NULL || doc->file_name == NULL || ! g_path_is_absolute(doc->file_name))
|
||||||
{
|
{
|
||||||
@ -271,7 +301,7 @@ static void on_current_path(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fname = doc->file_name;
|
fname = doc->file_name;
|
||||||
fname = p_utils->get_locale_from_utf8(fname);
|
fname = utils_get_locale_from_utf8(fname);
|
||||||
dir = g_path_get_dirname(fname);
|
dir = g_path_get_dirname(fname);
|
||||||
g_free(fname);
|
g_free(fname);
|
||||||
|
|
||||||
@ -293,7 +323,7 @@ static gboolean check_single_selection(GtkTreeSelection *treesel)
|
|||||||
if (gtk_tree_selection_count_selected_rows(treesel) == 1)
|
if (gtk_tree_selection_count_selected_rows(treesel) == 1)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
p_ui->set_statusbar(FALSE, _("Too many items selected!"));
|
ui_set_statusbar(FALSE, _("Too many items selected!"));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -315,7 +345,7 @@ static gboolean is_folder_selected(GList *selected_items)
|
|||||||
gtk_tree_model_get_iter(model, &iter, treepath);
|
gtk_tree_model_get_iter(model, &iter, treepath);
|
||||||
gtk_tree_model_get(model, &iter, FILEVIEW_COLUMN_ICON, &icon, -1);
|
gtk_tree_model_get(model, &iter, FILEVIEW_COLUMN_ICON, &icon, -1);
|
||||||
|
|
||||||
if (p_utils->str_equal(icon, GTK_STOCK_DIRECTORY))
|
if (utils_str_equal(icon, GTK_STOCK_DIRECTORY))
|
||||||
{
|
{
|
||||||
dir_found = TRUE;
|
dir_found = TRUE;
|
||||||
g_free(icon);
|
g_free(icon);
|
||||||
@ -335,17 +365,9 @@ static gchar *get_tree_path_filename(GtkTreePath *treepath)
|
|||||||
gchar *name, *fname;
|
gchar *name, *fname;
|
||||||
|
|
||||||
gtk_tree_model_get_iter(model, &iter, treepath);
|
gtk_tree_model_get_iter(model, &iter, treepath);
|
||||||
gtk_tree_model_get(model, &iter, FILEVIEW_COLUMN_NAME, &name, -1);
|
gtk_tree_model_get(model, &iter, FILEVIEW_COLUMN_FILENAME, &name, -1);
|
||||||
|
|
||||||
if (p_utils->str_equal(name, ".."))
|
fname = utils_get_locale_from_utf8(name);
|
||||||
{
|
|
||||||
fname = g_path_get_dirname(current_dir);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setptr(name, p_utils->get_locale_from_utf8(name));
|
|
||||||
fname = g_build_filename(current_dir, name, NULL);
|
|
||||||
}
|
|
||||||
g_free(name);
|
g_free(name);
|
||||||
|
|
||||||
return fname;
|
return fname;
|
||||||
@ -365,18 +387,18 @@ static void open_external(const gchar *fname, gboolean dir_found)
|
|||||||
else
|
else
|
||||||
dir = g_strdup(fname);
|
dir = g_strdup(fname);
|
||||||
|
|
||||||
p_utils->string_replace_all(cmd_str, "%f", fname);
|
utils_string_replace_all(cmd_str, "%f", fname);
|
||||||
p_utils->string_replace_all(cmd_str, "%d", dir);
|
utils_string_replace_all(cmd_str, "%d", dir);
|
||||||
|
|
||||||
cmd = g_string_free(cmd_str, FALSE);
|
cmd = g_string_free(cmd_str, FALSE);
|
||||||
locale_cmd = p_utils->get_locale_from_utf8(cmd);
|
locale_cmd = utils_get_locale_from_utf8(cmd);
|
||||||
if (! g_spawn_command_line_async(locale_cmd, &error))
|
if (! g_spawn_command_line_async(locale_cmd, &error))
|
||||||
{
|
{
|
||||||
gchar *c = strchr(cmd, ' ');
|
gchar *c = strchr(cmd, ' ');
|
||||||
|
|
||||||
if (c != NULL)
|
if (c != NULL)
|
||||||
*c = '\0';
|
*c = '\0';
|
||||||
p_ui->set_statusbar(TRUE,
|
ui_set_statusbar(TRUE,
|
||||||
_("Could not execute configured external command '%s' (%s)."),
|
_("Could not execute configured external command '%s' (%s)."),
|
||||||
cmd, error->message);
|
cmd, error->message);
|
||||||
g_error_free(error);
|
g_error_free(error);
|
||||||
@ -418,7 +440,7 @@ static void on_external_open(GtkMenuItem *menuitem, gpointer user_data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* We use p_document->open_files() as it's more efficient. */
|
/* We use document_open_files() as it's more efficient. */
|
||||||
static void open_selected_files(GList *list)
|
static void open_selected_files(GList *list)
|
||||||
{
|
{
|
||||||
GSList *files = NULL;
|
GSList *files = NULL;
|
||||||
@ -431,7 +453,7 @@ static void open_selected_files(GList *list)
|
|||||||
|
|
||||||
files = g_slist_append(files, fname);
|
files = g_slist_append(files, fname);
|
||||||
}
|
}
|
||||||
p_document->open_files(files, FALSE, NULL, NULL);
|
document_open_files(files, FALSE, NULL, NULL);
|
||||||
g_slist_foreach(files, (GFunc) g_free, NULL); /* free filenames */
|
g_slist_foreach(files, (GFunc) g_free, NULL); /* free filenames */
|
||||||
g_slist_free(files);
|
g_slist_free(files);
|
||||||
}
|
}
|
||||||
@ -502,8 +524,8 @@ static void on_find_in_files(GtkMenuItem *menuitem, gpointer user_data)
|
|||||||
g_list_foreach(list, (GFunc) gtk_tree_path_free, NULL);
|
g_list_foreach(list, (GFunc) gtk_tree_path_free, NULL);
|
||||||
g_list_free(list);
|
g_list_free(list);
|
||||||
|
|
||||||
setptr(dir, p_utils->get_utf8_from_locale(dir));
|
setptr(dir, utils_get_utf8_from_locale(dir));
|
||||||
p_search->show_find_in_files_dialog(dir);
|
search_show_find_in_files_dialog(dir);
|
||||||
g_free(dir);
|
g_free(dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -517,13 +539,13 @@ static void on_hidden_files_clicked(GtkCheckMenuItem *item)
|
|||||||
|
|
||||||
static void on_hide_sidebar(void)
|
static void on_hide_sidebar(void)
|
||||||
{
|
{
|
||||||
p_keybindings->send_command(GEANY_KEY_GROUP_VIEW, GEANY_KEYS_VIEW_SIDEBAR);
|
keybindings_send_command(GEANY_KEY_GROUP_VIEW, GEANY_KEYS_VIEW_SIDEBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static GtkWidget *create_popup_menu(void)
|
static GtkWidget *create_popup_menu(void)
|
||||||
{
|
{
|
||||||
GtkWidget *item, *menu, *image;
|
GtkWidget *item, *menu;
|
||||||
|
|
||||||
menu = gtk_menu_new();
|
menu = gtk_menu_new();
|
||||||
|
|
||||||
@ -533,19 +555,13 @@ static GtkWidget *create_popup_menu(void)
|
|||||||
g_signal_connect(item, "activate", G_CALLBACK(on_open_clicked), NULL);
|
g_signal_connect(item, "activate", G_CALLBACK(on_open_clicked), NULL);
|
||||||
popup_items.open = item;
|
popup_items.open = item;
|
||||||
|
|
||||||
image = gtk_image_new_from_stock(GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
|
item = ui_image_menu_item_new(GTK_STOCK_OPEN, _("Open _externally"));
|
||||||
gtk_widget_show(image);
|
|
||||||
item = gtk_image_menu_item_new_with_mnemonic(_("Open _externally"));
|
|
||||||
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image);
|
|
||||||
gtk_widget_show(item);
|
gtk_widget_show(item);
|
||||||
gtk_container_add(GTK_CONTAINER(menu), item);
|
gtk_container_add(GTK_CONTAINER(menu), item);
|
||||||
g_signal_connect(item, "activate", G_CALLBACK(on_external_open), NULL);
|
g_signal_connect(item, "activate", G_CALLBACK(on_external_open), NULL);
|
||||||
popup_items.open_external = item;
|
popup_items.open_external = item;
|
||||||
|
|
||||||
image = gtk_image_new_from_stock(GTK_STOCK_FIND, GTK_ICON_SIZE_MENU);
|
item = ui_image_menu_item_new(GTK_STOCK_FIND, _("_Find in Files"));
|
||||||
gtk_widget_show(image);
|
|
||||||
item = gtk_image_menu_item_new_with_mnemonic(_("_Find in Files"));
|
|
||||||
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image);
|
|
||||||
gtk_widget_show(item);
|
gtk_widget_show(item);
|
||||||
gtk_container_add(GTK_CONTAINER(menu), item);
|
gtk_container_add(GTK_CONTAINER(menu), item);
|
||||||
g_signal_connect(item, "activate", G_CALLBACK(on_find_in_files), NULL);
|
g_signal_connect(item, "activate", G_CALLBACK(on_find_in_files), NULL);
|
||||||
@ -564,9 +580,7 @@ static GtkWidget *create_popup_menu(void)
|
|||||||
gtk_widget_show(item);
|
gtk_widget_show(item);
|
||||||
gtk_container_add(GTK_CONTAINER(menu), item);
|
gtk_container_add(GTK_CONTAINER(menu), item);
|
||||||
|
|
||||||
item = gtk_image_menu_item_new_with_mnemonic(_("H_ide Sidebar"));
|
item = ui_image_menu_item_new(GTK_STOCK_CLOSE, _("H_ide Sidebar"));
|
||||||
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item),
|
|
||||||
gtk_image_new_from_stock("gtk-close", GTK_ICON_SIZE_MENU));
|
|
||||||
gtk_widget_show(item);
|
gtk_widget_show(item);
|
||||||
gtk_container_add(GTK_CONTAINER(menu), item);
|
gtk_container_add(GTK_CONTAINER(menu), item);
|
||||||
g_signal_connect(item, "activate", G_CALLBACK(on_hide_sidebar), NULL);
|
g_signal_connect(item, "activate", G_CALLBACK(on_hide_sidebar), NULL);
|
||||||
@ -575,42 +589,36 @@ static GtkWidget *create_popup_menu(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void on_tree_selection_changed(GtkTreeSelection *selection, gpointer data)
|
||||||
|
{
|
||||||
|
gboolean have_sel = (gtk_tree_selection_count_selected_rows(selection) > 0);
|
||||||
|
gboolean multi_sel = (gtk_tree_selection_count_selected_rows(selection) > 1);
|
||||||
|
|
||||||
|
if (popup_items.open != NULL)
|
||||||
|
gtk_widget_set_sensitive(popup_items.open, have_sel);
|
||||||
|
if (popup_items.open_external != NULL)
|
||||||
|
gtk_widget_set_sensitive(popup_items.open_external, have_sel);
|
||||||
|
if (popup_items.find_in_files != NULL)
|
||||||
|
gtk_widget_set_sensitive(popup_items.find_in_files, have_sel && ! multi_sel);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static gboolean on_button_press(GtkWidget *widget, GdkEventButton *event, gpointer user_data)
|
static gboolean on_button_press(GtkWidget *widget, GdkEventButton *event, gpointer user_data)
|
||||||
{
|
{
|
||||||
if (event->button == 1 && event->type == GDK_2BUTTON_PRESS)
|
if (event->button == 1 && event->type == GDK_2BUTTON_PRESS)
|
||||||
|
{
|
||||||
on_open_clicked(NULL, NULL);
|
on_open_clicked(NULL, NULL);
|
||||||
else if (event->button == 3)
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
return FALSE;
|
}
|
||||||
}
|
else if (event->button == 3)
|
||||||
|
|
||||||
|
|
||||||
static void update_popup_menu(GtkWidget *popup_menu)
|
|
||||||
{
|
|
||||||
GtkTreeSelection *treesel = gtk_tree_view_get_selection(GTK_TREE_VIEW(file_view));
|
|
||||||
gboolean have_sel = (gtk_tree_selection_count_selected_rows(treesel) > 0);
|
|
||||||
gboolean multi_sel = (gtk_tree_selection_count_selected_rows(treesel) > 1);
|
|
||||||
|
|
||||||
gtk_widget_set_sensitive(popup_items.open, have_sel);
|
|
||||||
gtk_widget_set_sensitive(popup_items.open_external, have_sel);
|
|
||||||
gtk_widget_set_sensitive(popup_items.find_in_files, have_sel && ! multi_sel);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* delay updating popup menu until the selection has been set */
|
|
||||||
static gboolean on_button_release(GtkWidget *widget, GdkEventButton *event, gpointer user_data)
|
|
||||||
{
|
|
||||||
if (event->button == 3)
|
|
||||||
{
|
{
|
||||||
static GtkWidget *popup_menu = NULL;
|
static GtkWidget *popup_menu = NULL;
|
||||||
|
|
||||||
if (popup_menu == NULL)
|
if (popup_menu == NULL)
|
||||||
popup_menu = create_popup_menu();
|
popup_menu = create_popup_menu();
|
||||||
|
|
||||||
update_popup_menu(popup_menu);
|
gtk_menu_popup(GTK_MENU(popup_menu), NULL, NULL, NULL, NULL, event->button, event->time);
|
||||||
|
/* don't return TRUE here, unless the selection won't be changed */
|
||||||
gtk_menu_popup(GTK_MENU(popup_menu), NULL, NULL, NULL, NULL,
|
|
||||||
event->button, event->time);
|
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -622,12 +630,30 @@ static gboolean on_key_press(GtkWidget *widget, GdkEventKey *event, gpointer dat
|
|||||||
|| event->keyval == GDK_ISO_Enter
|
|| event->keyval == GDK_ISO_Enter
|
||||||
|| event->keyval == GDK_KP_Enter
|
|| event->keyval == GDK_KP_Enter
|
||||||
|| event->keyval == GDK_space)
|
|| event->keyval == GDK_space)
|
||||||
|
{
|
||||||
on_open_clicked(NULL, NULL);
|
on_open_clicked(NULL, NULL);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if ((event->keyval == GDK_Up ||
|
if ((event->keyval == GDK_Up ||
|
||||||
event->keyval == GDK_KP_Up) &&
|
event->keyval == GDK_KP_Up) &&
|
||||||
(event->state & GDK_MOD1_MASK)) /* FIXME: Alt-Up doesn't seem to work! */
|
(event->state & GDK_MOD1_MASK)) /* FIXME: Alt-Up doesn't seem to work! */
|
||||||
|
{
|
||||||
on_go_up();
|
on_go_up();
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((event->keyval == GDK_F10 && event->state & GDK_SHIFT_MASK) || event->keyval == GDK_Menu)
|
||||||
|
{
|
||||||
|
GdkEventButton button_event;
|
||||||
|
|
||||||
|
button_event.time = event->time;
|
||||||
|
button_event.button = 3;
|
||||||
|
|
||||||
|
on_button_press(widget, &button_event, data);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -653,7 +679,14 @@ static void on_path_entry_activate(GtkEntry *entry, gpointer user_data)
|
|||||||
on_go_up();
|
on_go_up();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
new_dir = p_utils->get_locale_from_utf8(new_dir);
|
else if (new_dir[0] == '~')
|
||||||
|
{
|
||||||
|
GString *str = g_string_new(new_dir);
|
||||||
|
utils_string_replace_first(str, "~", g_get_home_dir());
|
||||||
|
new_dir = g_string_free(str, FALSE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
new_dir = utils_get_locale_from_utf8(new_dir);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
new_dir = g_strdup(g_get_home_dir());
|
new_dir = g_strdup(g_get_home_dir());
|
||||||
@ -684,7 +717,7 @@ static void prepare_file_view(void)
|
|||||||
GtkTreeSelection *select;
|
GtkTreeSelection *select;
|
||||||
PangoFontDescription *pfd;
|
PangoFontDescription *pfd;
|
||||||
|
|
||||||
file_store = gtk_list_store_new(FILEVIEW_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING);
|
file_store = gtk_list_store_new(FILEVIEW_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
|
||||||
|
|
||||||
gtk_tree_view_set_model(GTK_TREE_VIEW(file_view), GTK_TREE_MODEL(file_store));
|
gtk_tree_view_set_model(GTK_TREE_VIEW(file_view), GTK_TREE_MODEL(file_store));
|
||||||
g_object_unref(file_store);
|
g_object_unref(file_store);
|
||||||
@ -706,13 +739,17 @@ static void prepare_file_view(void)
|
|||||||
gtk_widget_modify_font(file_view, pfd);
|
gtk_widget_modify_font(file_view, pfd);
|
||||||
pango_font_description_free(pfd);
|
pango_font_description_free(pfd);
|
||||||
|
|
||||||
|
/* GTK 2.12 tooltips */
|
||||||
|
if (gtk_check_version(2, 12, 0) == NULL)
|
||||||
|
g_object_set(file_view, "has-tooltip", TRUE, "tooltip-column", FILEVIEW_COLUMN_FILENAME, NULL);
|
||||||
|
|
||||||
/* selection handling */
|
/* selection handling */
|
||||||
select = gtk_tree_view_get_selection(GTK_TREE_VIEW(file_view));
|
select = gtk_tree_view_get_selection(GTK_TREE_VIEW(file_view));
|
||||||
gtk_tree_selection_set_mode(select, GTK_SELECTION_MULTIPLE);
|
gtk_tree_selection_set_mode(select, GTK_SELECTION_MULTIPLE);
|
||||||
|
|
||||||
g_signal_connect(G_OBJECT(file_view), "realize", G_CALLBACK(on_current_path), NULL);
|
g_signal_connect(file_view, "realize", G_CALLBACK(on_current_path), NULL);
|
||||||
|
g_signal_connect(select, "changed", G_CALLBACK(on_tree_selection_changed), NULL);
|
||||||
g_signal_connect(file_view, "button-press-event", G_CALLBACK(on_button_press), NULL);
|
g_signal_connect(file_view, "button-press-event", G_CALLBACK(on_button_press), NULL);
|
||||||
g_signal_connect(file_view, "button-release-event", G_CALLBACK(on_button_release), NULL);
|
|
||||||
g_signal_connect(file_view, "key-press-event", G_CALLBACK(on_key_press), NULL);
|
g_signal_connect(file_view, "key-press-event", G_CALLBACK(on_key_press), NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -720,34 +757,28 @@ static void prepare_file_view(void)
|
|||||||
static GtkWidget *make_toolbar(void)
|
static GtkWidget *make_toolbar(void)
|
||||||
{
|
{
|
||||||
GtkWidget *wid, *toolbar;
|
GtkWidget *wid, *toolbar;
|
||||||
GtkTooltips *tooltips = GTK_TOOLTIPS(p_support->lookup_widget(
|
|
||||||
geany->main_widgets->window, "tooltips"));
|
|
||||||
|
|
||||||
toolbar = gtk_toolbar_new();
|
toolbar = gtk_toolbar_new();
|
||||||
gtk_toolbar_set_icon_size(GTK_TOOLBAR(toolbar), GTK_ICON_SIZE_MENU);
|
gtk_toolbar_set_icon_size(GTK_TOOLBAR(toolbar), GTK_ICON_SIZE_MENU);
|
||||||
gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS);
|
gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS);
|
||||||
|
|
||||||
wid = (GtkWidget *) gtk_tool_button_new_from_stock(GTK_STOCK_GO_UP);
|
wid = (GtkWidget *) gtk_tool_button_new_from_stock(GTK_STOCK_GO_UP);
|
||||||
gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(wid), tooltips,
|
ui_widget_set_tooltip_text(wid, _("Up"));
|
||||||
_("Up"), NULL);
|
|
||||||
g_signal_connect(wid, "clicked", G_CALLBACK(on_go_up), NULL);
|
g_signal_connect(wid, "clicked", G_CALLBACK(on_go_up), NULL);
|
||||||
gtk_container_add(GTK_CONTAINER(toolbar), wid);
|
gtk_container_add(GTK_CONTAINER(toolbar), wid);
|
||||||
|
|
||||||
wid = (GtkWidget *) gtk_tool_button_new_from_stock(GTK_STOCK_REFRESH);
|
wid = (GtkWidget *) gtk_tool_button_new_from_stock(GTK_STOCK_REFRESH);
|
||||||
gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(wid), tooltips,
|
ui_widget_set_tooltip_text(wid, _("Refresh"));
|
||||||
_("Refresh"), NULL);
|
|
||||||
g_signal_connect(wid, "clicked", G_CALLBACK(refresh), NULL);
|
g_signal_connect(wid, "clicked", G_CALLBACK(refresh), NULL);
|
||||||
gtk_container_add(GTK_CONTAINER(toolbar), wid);
|
gtk_container_add(GTK_CONTAINER(toolbar), wid);
|
||||||
|
|
||||||
wid = (GtkWidget *) gtk_tool_button_new_from_stock(GTK_STOCK_HOME);
|
wid = (GtkWidget *) gtk_tool_button_new_from_stock(GTK_STOCK_HOME);
|
||||||
gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(wid), tooltips,
|
ui_widget_set_tooltip_text(wid, _("Home"));
|
||||||
_("Home"), NULL);
|
|
||||||
g_signal_connect(wid, "clicked", G_CALLBACK(on_go_home), NULL);
|
g_signal_connect(wid, "clicked", G_CALLBACK(on_go_home), NULL);
|
||||||
gtk_container_add(GTK_CONTAINER(toolbar), wid);
|
gtk_container_add(GTK_CONTAINER(toolbar), wid);
|
||||||
|
|
||||||
wid = (GtkWidget *) gtk_tool_button_new_from_stock(GTK_STOCK_JUMP_TO);
|
wid = (GtkWidget *) gtk_tool_button_new_from_stock(GTK_STOCK_JUMP_TO);
|
||||||
gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(wid), tooltips,
|
ui_widget_set_tooltip_text(wid, _("Set path from document"));
|
||||||
_("Set path from document"), NULL);
|
|
||||||
g_signal_connect(wid, "clicked", G_CALLBACK(on_current_path), NULL);
|
g_signal_connect(wid, "clicked", G_CALLBACK(on_current_path), NULL);
|
||||||
gtk_container_add(GTK_CONTAINER(toolbar), wid);
|
gtk_container_add(GTK_CONTAINER(toolbar), wid);
|
||||||
|
|
||||||
@ -755,7 +786,7 @@ static GtkWidget *make_toolbar(void)
|
|||||||
gtk_container_add(GTK_CONTAINER(toolbar), wid);
|
gtk_container_add(GTK_CONTAINER(toolbar), wid);
|
||||||
|
|
||||||
wid = (GtkWidget *) gtk_tool_button_new_from_stock(GTK_STOCK_CLEAR);
|
wid = (GtkWidget *) gtk_tool_button_new_from_stock(GTK_STOCK_CLEAR);
|
||||||
gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(wid), tooltips, _("Clear the filter"), NULL);
|
ui_widget_set_tooltip_text(wid, _("Clear the filter"));
|
||||||
g_signal_connect(wid, "clicked", G_CALLBACK(on_clear_filter), NULL);
|
g_signal_connect(wid, "clicked", G_CALLBACK(on_clear_filter), NULL);
|
||||||
gtk_container_add(GTK_CONTAINER(toolbar), wid);
|
gtk_container_add(GTK_CONTAINER(toolbar), wid);
|
||||||
|
|
||||||
@ -790,7 +821,7 @@ static gboolean completion_match_func(GtkEntryCompletion *completion, const gcha
|
|||||||
gtk_tree_model_get(GTK_TREE_MODEL(file_store), iter,
|
gtk_tree_model_get(GTK_TREE_MODEL(file_store), iter,
|
||||||
FILEVIEW_COLUMN_ICON, &icon, FILEVIEW_COLUMN_NAME, &str, -1);
|
FILEVIEW_COLUMN_ICON, &icon, FILEVIEW_COLUMN_NAME, &str, -1);
|
||||||
|
|
||||||
if (str != NULL && icon != NULL && p_utils->str_equal(icon, GTK_STOCK_DIRECTORY) &&
|
if (str != NULL && icon != NULL && utils_str_equal(icon, GTK_STOCK_DIRECTORY) &&
|
||||||
! g_str_has_suffix(key, G_DIR_SEPARATOR_S))
|
! g_str_has_suffix(key, G_DIR_SEPARATOR_S))
|
||||||
{
|
{
|
||||||
/* key is something like "/tmp/te" and str is a filename like "test",
|
/* key is something like "/tmp/te" and str is a filename like "test",
|
||||||
@ -873,13 +904,71 @@ static void load_settings(void)
|
|||||||
CHECK_READ_SETTING(show_hidden_files, error, tmp);
|
CHECK_READ_SETTING(show_hidden_files, error, tmp);
|
||||||
tmp = g_key_file_get_boolean(config, "filebrowser", "hide_object_files", &error);
|
tmp = g_key_file_get_boolean(config, "filebrowser", "hide_object_files", &error);
|
||||||
CHECK_READ_SETTING(hide_object_files, error, tmp);
|
CHECK_READ_SETTING(hide_object_files, error, tmp);
|
||||||
|
tmp = g_key_file_get_boolean(config, "filebrowser", "fb_follow_path", &error);
|
||||||
|
CHECK_READ_SETTING(fb_follow_path, error, tmp);
|
||||||
|
tmp = g_key_file_get_boolean(config, "filebrowser", "fb_set_project_base_path", &error);
|
||||||
|
CHECK_READ_SETTING(fb_set_project_base_path, error, tmp);
|
||||||
|
|
||||||
g_key_file_free(config);
|
g_key_file_free(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void project_change_cb(G_GNUC_UNUSED GObject *obj, G_GNUC_UNUSED GKeyFile *config,
|
||||||
|
G_GNUC_UNUSED gpointer data)
|
||||||
|
{
|
||||||
|
gchar *new_dir;
|
||||||
|
GeanyProject *project = geany->app->project;
|
||||||
|
|
||||||
|
if (! fb_set_project_base_path || project == NULL || ! NZV(project->base_path))
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* TODO this is a copy of project_get_base_path(), add it to the plugin API */
|
||||||
|
if (g_path_is_absolute(project->base_path))
|
||||||
|
new_dir = g_strdup(project->base_path);
|
||||||
|
else
|
||||||
|
{ /* build base_path out of project file name's dir and base_path */
|
||||||
|
gchar *dir = g_path_get_dirname(project->file_name);
|
||||||
|
|
||||||
|
new_dir = g_strconcat(dir, G_DIR_SEPARATOR_S, project->base_path, NULL);
|
||||||
|
g_free(dir);
|
||||||
|
}
|
||||||
|
/* get it into locale encoding */
|
||||||
|
setptr(new_dir, utils_get_locale_from_utf8(new_dir));
|
||||||
|
|
||||||
|
if (! utils_str_equal(current_dir, new_dir))
|
||||||
|
{
|
||||||
|
setptr(current_dir, new_dir);
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
g_free(new_dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void document_activate_cb(G_GNUC_UNUSED GObject *obj, GeanyDocument *doc,
|
||||||
|
G_GNUC_UNUSED gpointer data)
|
||||||
|
{
|
||||||
|
gchar *new_dir;
|
||||||
|
|
||||||
|
if (! fb_follow_path || doc->file_name == NULL || ! g_path_is_absolute(doc->file_name))
|
||||||
|
return;
|
||||||
|
|
||||||
|
new_dir = g_path_get_dirname(doc->file_name);
|
||||||
|
setptr(new_dir, utils_get_locale_from_utf8(new_dir));
|
||||||
|
|
||||||
|
if (! utils_str_equal(current_dir, new_dir))
|
||||||
|
{
|
||||||
|
setptr(current_dir, new_dir);
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
g_free(new_dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void kb_activate(guint key_id)
|
static void kb_activate(guint key_id)
|
||||||
{
|
{
|
||||||
|
gtk_notebook_set_current_page(GTK_NOTEBOOK(geany->main_widgets->sidebar_notebook), page_number);
|
||||||
switch (key_id)
|
switch (key_id)
|
||||||
{
|
{
|
||||||
case KB_FOCUS_FILE_LIST:
|
case KB_FOCUS_FILE_LIST:
|
||||||
@ -913,6 +1002,8 @@ void plugin_init(GeanyData *data)
|
|||||||
prepare_file_view();
|
prepare_file_view();
|
||||||
completion_create();
|
completion_create();
|
||||||
|
|
||||||
|
popup_items.open = popup_items.open_external = popup_items.find_in_files = NULL;
|
||||||
|
|
||||||
scrollwin = gtk_scrolled_window_new(NULL, NULL);
|
scrollwin = gtk_scrolled_window_new(NULL, NULL);
|
||||||
gtk_scrolled_window_set_policy(
|
gtk_scrolled_window_set_policy(
|
||||||
GTK_SCROLLED_WINDOW(scrollwin),
|
GTK_SCROLLED_WINDOW(scrollwin),
|
||||||
@ -921,15 +1012,15 @@ void plugin_init(GeanyData *data)
|
|||||||
gtk_container_add(GTK_CONTAINER(file_view_vbox), scrollwin);
|
gtk_container_add(GTK_CONTAINER(file_view_vbox), scrollwin);
|
||||||
|
|
||||||
gtk_widget_show_all(file_view_vbox);
|
gtk_widget_show_all(file_view_vbox);
|
||||||
gtk_notebook_append_page(GTK_NOTEBOOK(geany->main_widgets->sidebar_notebook), file_view_vbox,
|
page_number = gtk_notebook_append_page(GTK_NOTEBOOK(geany->main_widgets->sidebar_notebook),
|
||||||
gtk_label_new(_("Files")));
|
file_view_vbox, gtk_label_new(_("Files")));
|
||||||
|
|
||||||
load_settings();
|
load_settings();
|
||||||
|
|
||||||
/* setup keybindings */
|
/* setup keybindings */
|
||||||
p_keybindings->set_item(plugin_key_group, KB_FOCUS_FILE_LIST, kb_activate,
|
keybindings_set_item(plugin_key_group, KB_FOCUS_FILE_LIST, kb_activate,
|
||||||
0, 0, "focus_file_list", _("Focus File List"), NULL);
|
0, 0, "focus_file_list", _("Focus File List"), NULL);
|
||||||
p_keybindings->set_item(plugin_key_group, KB_FOCUS_PATH_ENTRY, kb_activate,
|
keybindings_set_item(plugin_key_group, KB_FOCUS_PATH_ENTRY, kb_activate,
|
||||||
0, 0, "focus_path_entry", _("Focus Path Entry"), NULL);
|
0, 0, "focus_path_entry", _("Focus Path Entry"), NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -939,6 +1030,8 @@ static struct
|
|||||||
GtkWidget *open_cmd_entry;
|
GtkWidget *open_cmd_entry;
|
||||||
GtkWidget *show_hidden_checkbox;
|
GtkWidget *show_hidden_checkbox;
|
||||||
GtkWidget *hide_objects_checkbox;
|
GtkWidget *hide_objects_checkbox;
|
||||||
|
GtkWidget *follow_path_checkbox;
|
||||||
|
GtkWidget *set_project_base_path_checkbox;
|
||||||
}
|
}
|
||||||
pref_widgets;
|
pref_widgets;
|
||||||
|
|
||||||
@ -955,23 +1048,29 @@ on_configure_response(GtkDialog *dialog, gint response, gpointer user_data)
|
|||||||
open_cmd = g_strdup(gtk_entry_get_text(GTK_ENTRY(pref_widgets.open_cmd_entry)));
|
open_cmd = g_strdup(gtk_entry_get_text(GTK_ENTRY(pref_widgets.open_cmd_entry)));
|
||||||
show_hidden_files = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pref_widgets.show_hidden_checkbox));
|
show_hidden_files = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pref_widgets.show_hidden_checkbox));
|
||||||
hide_object_files = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pref_widgets.hide_objects_checkbox));
|
hide_object_files = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pref_widgets.hide_objects_checkbox));
|
||||||
|
fb_follow_path = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pref_widgets.follow_path_checkbox));
|
||||||
|
fb_set_project_base_path = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
|
||||||
|
pref_widgets.set_project_base_path_checkbox));
|
||||||
|
|
||||||
g_key_file_load_from_file(config, config_file, G_KEY_FILE_NONE, NULL);
|
g_key_file_load_from_file(config, config_file, G_KEY_FILE_NONE, NULL);
|
||||||
|
|
||||||
g_key_file_set_string(config, "filebrowser", "open_command", open_cmd);
|
g_key_file_set_string(config, "filebrowser", "open_command", open_cmd);
|
||||||
g_key_file_set_boolean(config, "filebrowser", "show_hidden_files", show_hidden_files);
|
g_key_file_set_boolean(config, "filebrowser", "show_hidden_files", show_hidden_files);
|
||||||
g_key_file_set_boolean(config, "filebrowser", "hide_object_files", hide_object_files);
|
g_key_file_set_boolean(config, "filebrowser", "hide_object_files", hide_object_files);
|
||||||
|
g_key_file_set_boolean(config, "filebrowser", "fb_follow_path", fb_follow_path);
|
||||||
|
g_key_file_set_boolean(config, "filebrowser", "fb_set_project_base_path",
|
||||||
|
fb_set_project_base_path);
|
||||||
|
|
||||||
if (! g_file_test(config_dir, G_FILE_TEST_IS_DIR) && p_utils->mkdir(config_dir, TRUE) != 0)
|
if (! g_file_test(config_dir, G_FILE_TEST_IS_DIR) && utils_mkdir(config_dir, TRUE) != 0)
|
||||||
{
|
{
|
||||||
p_dialogs->show_msgbox(GTK_MESSAGE_ERROR,
|
dialogs_show_msgbox(GTK_MESSAGE_ERROR,
|
||||||
_("Plugin configuration directory could not be created."));
|
_("Plugin configuration directory could not be created."));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* write config to file */
|
/* write config to file */
|
||||||
data = g_key_file_to_data(config, NULL, NULL);
|
data = g_key_file_to_data(config, NULL, NULL);
|
||||||
p_utils->write_file(config_file, data);
|
utils_write_file(config_file, data);
|
||||||
g_free(data);
|
g_free(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -986,8 +1085,7 @@ on_configure_response(GtkDialog *dialog, gint response, gpointer user_data)
|
|||||||
|
|
||||||
GtkWidget *plugin_configure(GtkDialog *dialog)
|
GtkWidget *plugin_configure(GtkDialog *dialog)
|
||||||
{
|
{
|
||||||
GtkWidget *label, *entry, *checkbox_of, *checkbox_hf, *vbox;
|
GtkWidget *label, *entry, *checkbox_of, *checkbox_hf, *checkbox_fp, *checkbox_pb, *vbox;
|
||||||
GtkTooltips *tooltips = gtk_tooltips_new();
|
|
||||||
|
|
||||||
vbox = gtk_vbox_new(FALSE, 6);
|
vbox = gtk_vbox_new(FALSE, 6);
|
||||||
|
|
||||||
@ -999,11 +1097,10 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
|
|||||||
gtk_widget_show(entry);
|
gtk_widget_show(entry);
|
||||||
if (open_cmd != NULL)
|
if (open_cmd != NULL)
|
||||||
gtk_entry_set_text(GTK_ENTRY(entry), open_cmd);
|
gtk_entry_set_text(GTK_ENTRY(entry), open_cmd);
|
||||||
gtk_tooltips_set_tip(tooltips, entry,
|
ui_widget_set_tooltip_text(entry,
|
||||||
_("The command to execute when using \"Open with\". You can use %f and %d wildcards.\n"
|
_("The command to execute when using \"Open with\". You can use %f and %d wildcards.\n"
|
||||||
"%f will be replaced with the filename including full path\n"
|
"%f will be replaced with the filename including full path\n"
|
||||||
"%d will be replaced with the path name of the selected file without the filename"),
|
"%d will be replaced with the path name of the selected file without the filename"));
|
||||||
NULL);
|
|
||||||
gtk_container_add(GTK_CONTAINER(vbox), entry);
|
gtk_container_add(GTK_CONTAINER(vbox), entry);
|
||||||
pref_widgets.open_cmd_entry = entry;
|
pref_widgets.open_cmd_entry = entry;
|
||||||
|
|
||||||
@ -1016,13 +1113,26 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
|
|||||||
checkbox_of = gtk_check_button_new_with_label(_("Hide object files"));
|
checkbox_of = gtk_check_button_new_with_label(_("Hide object files"));
|
||||||
gtk_button_set_focus_on_click(GTK_BUTTON(checkbox_of), FALSE);
|
gtk_button_set_focus_on_click(GTK_BUTTON(checkbox_of), FALSE);
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbox_of), hide_object_files);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbox_of), hide_object_files);
|
||||||
gtk_tooltips_set_tip(tooltips, checkbox_of,
|
ui_widget_set_tooltip_text(checkbox_of,
|
||||||
_("Don't show generated object files in the file browser, this includes "
|
_("Don't show generated object files in the file browser, this includes "
|
||||||
"*.o, *.obj. *.so, *.dll, *.a, *.lib"),
|
"*.o, *.obj. *.so, *.dll, *.a, *.lib"));
|
||||||
NULL);
|
|
||||||
gtk_box_pack_start(GTK_BOX(vbox), checkbox_of, FALSE, FALSE, 5);
|
gtk_box_pack_start(GTK_BOX(vbox), checkbox_of, FALSE, FALSE, 5);
|
||||||
pref_widgets.hide_objects_checkbox = checkbox_of;
|
pref_widgets.hide_objects_checkbox = checkbox_of;
|
||||||
|
|
||||||
|
checkbox_fp = gtk_check_button_new_with_label(_("Follow the path of the current file"));
|
||||||
|
gtk_button_set_focus_on_click(GTK_BUTTON(checkbox_fp), FALSE);
|
||||||
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbox_fp), fb_follow_path);
|
||||||
|
gtk_box_pack_start(GTK_BOX(vbox), checkbox_fp, FALSE, FALSE, 5);
|
||||||
|
pref_widgets.follow_path_checkbox = checkbox_fp;
|
||||||
|
|
||||||
|
checkbox_pb = gtk_check_button_new_with_label(_("Set the project's base directory"));
|
||||||
|
gtk_button_set_focus_on_click(GTK_BUTTON(checkbox_pb), FALSE);
|
||||||
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbox_pb), fb_set_project_base_path);
|
||||||
|
ui_widget_set_tooltip_text(checkbox_pb,
|
||||||
|
_("Change the directory to the base directory of the currently opened project"));
|
||||||
|
gtk_box_pack_start(GTK_BOX(vbox), checkbox_pb, FALSE, FALSE, 5);
|
||||||
|
pref_widgets.set_project_base_path_checkbox = checkbox_pb;
|
||||||
|
|
||||||
gtk_widget_show_all(vbox);
|
gtk_widget_show_all(vbox);
|
||||||
|
|
||||||
g_signal_connect(dialog, "response", G_CALLBACK(on_configure_response), NULL);
|
g_signal_connect(dialog, "response", G_CALLBACK(on_configure_response), NULL);
|
||||||
|
260
plugins/geanyfunctions.h
Normal file
@ -0,0 +1,260 @@
|
|||||||
|
/* This file is generated automatically by genapi.py - do not edit.
|
||||||
|
*
|
||||||
|
* @file geanyfunctions.h @ref geany_functions wrappers.
|
||||||
|
* This allows the use of normal API function names in plugins.
|
||||||
|
* You need to declare the @ref geany_functions symbol yourself.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GEANY_FUNCTIONS_H
|
||||||
|
#define GEANY_FUNCTIONS_H
|
||||||
|
|
||||||
|
#define plugin_add_toolbar_item \
|
||||||
|
geany_functions->p_plugin->add_toolbar_item
|
||||||
|
#define plugin_module_make_resident \
|
||||||
|
geany_functions->p_plugin->module_make_resident
|
||||||
|
#define document_new_file \
|
||||||
|
geany_functions->p_document->new_file
|
||||||
|
#define document_get_current \
|
||||||
|
geany_functions->p_document->get_current
|
||||||
|
#define document_get_from_page \
|
||||||
|
geany_functions->p_document->get_from_page
|
||||||
|
#define document_find_by_filename \
|
||||||
|
geany_functions->p_document->find_by_filename
|
||||||
|
#define document_find_by_real_path \
|
||||||
|
geany_functions->p_document->find_by_real_path
|
||||||
|
#define document_save_file \
|
||||||
|
geany_functions->p_document->save_file
|
||||||
|
#define document_open_file \
|
||||||
|
geany_functions->p_document->open_file
|
||||||
|
#define document_open_files \
|
||||||
|
geany_functions->p_document->open_files
|
||||||
|
#define document_remove_page \
|
||||||
|
geany_functions->p_document->remove_page
|
||||||
|
#define document_reload_file \
|
||||||
|
geany_functions->p_document->reload_file
|
||||||
|
#define document_set_encoding \
|
||||||
|
geany_functions->p_document->set_encoding
|
||||||
|
#define document_set_text_changed \
|
||||||
|
geany_functions->p_document->set_text_changed
|
||||||
|
#define document_set_filetype \
|
||||||
|
geany_functions->p_document->set_filetype
|
||||||
|
#define document_close \
|
||||||
|
geany_functions->p_document->close
|
||||||
|
#define document_index \
|
||||||
|
geany_functions->p_document->index
|
||||||
|
#define document_save_file_as \
|
||||||
|
geany_functions->p_document->save_file_as
|
||||||
|
#define document_rename_file \
|
||||||
|
geany_functions->p_document->rename_file
|
||||||
|
#define document_get_status_color \
|
||||||
|
geany_functions->p_document->get_status_color
|
||||||
|
#define editor_get_indent_prefs \
|
||||||
|
geany_functions->p_editor->get_indent_prefs
|
||||||
|
#define editor_create_widget \
|
||||||
|
geany_functions->p_editor->create_widget
|
||||||
|
#define editor_indicator_set_on_range \
|
||||||
|
geany_functions->p_editor->indicator_set_on_range
|
||||||
|
#define editor_indicator_set_on_line \
|
||||||
|
geany_functions->p_editor->indicator_set_on_line
|
||||||
|
#define editor_indicator_clear \
|
||||||
|
geany_functions->p_editor->indicator_clear
|
||||||
|
#define editor_set_indent_type \
|
||||||
|
geany_functions->p_editor->set_indent_type
|
||||||
|
#define editor_get_word_at_pos \
|
||||||
|
geany_functions->p_editor->get_word_at_pos
|
||||||
|
#define scintilla_send_message \
|
||||||
|
geany_functions->p_scintilla->send_message
|
||||||
|
#define scintilla_new \
|
||||||
|
geany_functions->p_scintilla->new
|
||||||
|
#define sci_send_command \
|
||||||
|
geany_functions->p_sci->send_command
|
||||||
|
#define sci_start_undo_action \
|
||||||
|
geany_functions->p_sci->start_undo_action
|
||||||
|
#define sci_end_undo_action \
|
||||||
|
geany_functions->p_sci->end_undo_action
|
||||||
|
#define sci_set_text \
|
||||||
|
geany_functions->p_sci->set_text
|
||||||
|
#define sci_insert_text \
|
||||||
|
geany_functions->p_sci->insert_text
|
||||||
|
#define sci_get_text \
|
||||||
|
geany_functions->p_sci->get_text
|
||||||
|
#define sci_get_length \
|
||||||
|
geany_functions->p_sci->get_length
|
||||||
|
#define sci_get_current_position \
|
||||||
|
geany_functions->p_sci->get_current_position
|
||||||
|
#define sci_set_current_position \
|
||||||
|
geany_functions->p_sci->set_current_position
|
||||||
|
#define sci_get_col_from_position \
|
||||||
|
geany_functions->p_sci->get_col_from_position
|
||||||
|
#define sci_get_line_from_position \
|
||||||
|
geany_functions->p_sci->get_line_from_position
|
||||||
|
#define sci_get_position_from_line \
|
||||||
|
geany_functions->p_sci->get_position_from_line
|
||||||
|
#define sci_replace_sel \
|
||||||
|
geany_functions->p_sci->replace_sel
|
||||||
|
#define sci_get_selected_text \
|
||||||
|
geany_functions->p_sci->get_selected_text
|
||||||
|
#define sci_get_selected_text_length \
|
||||||
|
geany_functions->p_sci->get_selected_text_length
|
||||||
|
#define sci_get_selection_start \
|
||||||
|
geany_functions->p_sci->get_selection_start
|
||||||
|
#define sci_get_selection_end \
|
||||||
|
geany_functions->p_sci->get_selection_end
|
||||||
|
#define sci_get_selection_mode \
|
||||||
|
geany_functions->p_sci->get_selection_mode
|
||||||
|
#define sci_set_selection_mode \
|
||||||
|
geany_functions->p_sci->set_selection_mode
|
||||||
|
#define sci_set_selection_start \
|
||||||
|
geany_functions->p_sci->set_selection_start
|
||||||
|
#define sci_set_selection_end \
|
||||||
|
geany_functions->p_sci->set_selection_end
|
||||||
|
#define sci_get_text_range \
|
||||||
|
geany_functions->p_sci->get_text_range
|
||||||
|
#define sci_get_line \
|
||||||
|
geany_functions->p_sci->get_line
|
||||||
|
#define sci_get_line_length \
|
||||||
|
geany_functions->p_sci->get_line_length
|
||||||
|
#define sci_get_line_count \
|
||||||
|
geany_functions->p_sci->get_line_count
|
||||||
|
#define sci_get_line_is_visible \
|
||||||
|
geany_functions->p_sci->get_line_is_visible
|
||||||
|
#define sci_ensure_line_is_visible \
|
||||||
|
geany_functions->p_sci->ensure_line_is_visible
|
||||||
|
#define sci_scroll_caret \
|
||||||
|
geany_functions->p_sci->scroll_caret
|
||||||
|
#define sci_find_matching_brace \
|
||||||
|
geany_functions->p_sci->find_matching_brace
|
||||||
|
#define sci_get_style_at \
|
||||||
|
geany_functions->p_sci->get_style_at
|
||||||
|
#define sci_get_char_at \
|
||||||
|
geany_functions->p_sci->get_char_at
|
||||||
|
#define sci_get_current_line \
|
||||||
|
geany_functions->p_sci->get_current_line
|
||||||
|
#define sci_has_selection \
|
||||||
|
geany_functions->p_sci->has_selection
|
||||||
|
#define sci_get_tab_width \
|
||||||
|
geany_functions->p_sci->get_tab_width
|
||||||
|
#define sci_indicator_clear \
|
||||||
|
geany_functions->p_sci->indicator_clear
|
||||||
|
#define sci_indicator_set \
|
||||||
|
geany_functions->p_sci->indicator_set
|
||||||
|
#define templates_get_template_fileheader \
|
||||||
|
geany_functions->p_templates->get_template_fileheader
|
||||||
|
#define utils_str_equal \
|
||||||
|
geany_functions->p_utils->str_equal
|
||||||
|
#define utils_string_replace_all \
|
||||||
|
geany_functions->p_utils->string_replace_all
|
||||||
|
#define utils_get_file_list \
|
||||||
|
geany_functions->p_utils->get_file_list
|
||||||
|
#define utils_write_file \
|
||||||
|
geany_functions->p_utils->write_file
|
||||||
|
#define utils_get_locale_from_utf8 \
|
||||||
|
geany_functions->p_utils->get_locale_from_utf8
|
||||||
|
#define utils_get_utf8_from_locale \
|
||||||
|
geany_functions->p_utils->get_utf8_from_locale
|
||||||
|
#define utils_remove_ext_from_filename \
|
||||||
|
geany_functions->p_utils->remove_ext_from_filename
|
||||||
|
#define utils_mkdir \
|
||||||
|
geany_functions->p_utils->mkdir
|
||||||
|
#define utils_get_setting_boolean \
|
||||||
|
geany_functions->p_utils->get_setting_boolean
|
||||||
|
#define utils_get_setting_integer \
|
||||||
|
geany_functions->p_utils->get_setting_integer
|
||||||
|
#define utils_get_setting_string \
|
||||||
|
geany_functions->p_utils->get_setting_string
|
||||||
|
#define utils_spawn_sync \
|
||||||
|
geany_functions->p_utils->spawn_sync
|
||||||
|
#define utils_spawn_async \
|
||||||
|
geany_functions->p_utils->spawn_async
|
||||||
|
#define utils_str_casecmp \
|
||||||
|
geany_functions->p_utils->str_casecmp
|
||||||
|
#define utils_get_date_time \
|
||||||
|
geany_functions->p_utils->get_date_time
|
||||||
|
#define utils_open_browser \
|
||||||
|
geany_functions->p_utils->open_browser
|
||||||
|
#define utils_string_replace_first \
|
||||||
|
geany_functions->p_utils->string_replace_first
|
||||||
|
#define ui_dialog_vbox_new \
|
||||||
|
geany_functions->p_ui->dialog_vbox_new
|
||||||
|
#define ui_frame_new_with_alignment \
|
||||||
|
geany_functions->p_ui->frame_new_with_alignment
|
||||||
|
#define ui_set_statusbar \
|
||||||
|
geany_functions->p_ui->set_statusbar
|
||||||
|
#define ui_table_add_row \
|
||||||
|
geany_functions->p_ui->table_add_row
|
||||||
|
#define ui_path_box_new \
|
||||||
|
geany_functions->p_ui->path_box_new
|
||||||
|
#define ui_button_new_with_image \
|
||||||
|
geany_functions->p_ui->button_new_with_image
|
||||||
|
#define ui_add_document_sensitive \
|
||||||
|
geany_functions->p_ui->add_document_sensitive
|
||||||
|
#define ui_widget_set_tooltip_text \
|
||||||
|
geany_functions->p_ui->widget_set_tooltip_text
|
||||||
|
#define ui_image_menu_item_new \
|
||||||
|
geany_functions->p_ui->image_menu_item_new
|
||||||
|
#define ui_lookup_widget \
|
||||||
|
geany_functions->p_ui->lookup_widget
|
||||||
|
#define ui_progress_bar_start \
|
||||||
|
geany_functions->p_ui->progress_bar_start
|
||||||
|
#define ui_progress_bar_stop \
|
||||||
|
geany_functions->p_ui->progress_bar_stop
|
||||||
|
#define ui_entry_add_clear_icon \
|
||||||
|
geany_functions->p_ui->entry_add_clear_icon
|
||||||
|
#define dialogs_show_question \
|
||||||
|
geany_functions->p_dialogs->show_question
|
||||||
|
#define dialogs_show_msgbox \
|
||||||
|
geany_functions->p_dialogs->show_msgbox
|
||||||
|
#define dialogs_show_save_as \
|
||||||
|
geany_functions->p_dialogs->show_save_as
|
||||||
|
#define dialogs_show_input_numeric \
|
||||||
|
geany_functions->p_dialogs->show_input_numeric
|
||||||
|
#define msgwin_status_add \
|
||||||
|
geany_functions->p_msgwin->status_add
|
||||||
|
#define msgwin_compiler_add \
|
||||||
|
geany_functions->p_msgwin->compiler_add
|
||||||
|
#define msgwin_msg_add \
|
||||||
|
geany_functions->p_msgwin->msg_add
|
||||||
|
#define msgwin_clear_tab \
|
||||||
|
geany_functions->p_msgwin->clear_tab
|
||||||
|
#define msgwin_switch_tab \
|
||||||
|
geany_functions->p_msgwin->switch_tab
|
||||||
|
#define encodings_convert_to_utf8 \
|
||||||
|
geany_functions->p_encodings->convert_to_utf8
|
||||||
|
#define encodings_convert_to_utf8_from_charset \
|
||||||
|
geany_functions->p_encodings->convert_to_utf8_from_charset
|
||||||
|
#define encodings_get_charset_from_index \
|
||||||
|
geany_functions->p_encodings->get_charset_from_index
|
||||||
|
#define keybindings_send_command \
|
||||||
|
geany_functions->p_keybindings->send_command
|
||||||
|
#define keybindings_set_item \
|
||||||
|
geany_functions->p_keybindings->set_item
|
||||||
|
#define tm_get_real_path \
|
||||||
|
geany_functions->p_tm->get_real_path
|
||||||
|
#define tm_source_file_new \
|
||||||
|
geany_functions->p_tm->source_file_new
|
||||||
|
#define tm_workspace_add_object \
|
||||||
|
geany_functions->p_tm->workspace_add_object
|
||||||
|
#define tm_source_file_update \
|
||||||
|
geany_functions->p_tm->source_file_update
|
||||||
|
#define tm_work_object_free \
|
||||||
|
geany_functions->p_tm->work_object_free
|
||||||
|
#define tm_workspace_remove_object \
|
||||||
|
geany_functions->p_tm->workspace_remove_object
|
||||||
|
#define search_show_find_in_files_dialog \
|
||||||
|
geany_functions->p_search->show_find_in_files_dialog
|
||||||
|
#define highlighting_get_style \
|
||||||
|
geany_functions->p_highlighting->get_style
|
||||||
|
#define filetypes_detect_from_file \
|
||||||
|
geany_functions->p_filetypes->detect_from_file
|
||||||
|
#define filetypes_lookup_by_name \
|
||||||
|
geany_functions->p_filetypes->lookup_by_name
|
||||||
|
#define filetypes_index \
|
||||||
|
geany_functions->p_filetypes->index
|
||||||
|
#define navqueue_goto_line \
|
||||||
|
geany_functions->p_navqueue->goto_line
|
||||||
|
#define main_reload_configuration \
|
||||||
|
geany_functions->p_main->reload_configuration
|
||||||
|
#define main_locale_init \
|
||||||
|
geany_functions->p_main->locale_init
|
||||||
|
|
||||||
|
#endif
|
79
plugins/genapi.py
Executable file
@ -0,0 +1,79 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# genapi.py - this file is part of Geany, a fast and lightweight IDE
|
||||||
|
#
|
||||||
|
# Copyright 2008-2009 Nick Treleaven <nick.treleaven<at>btinternet.com>
|
||||||
|
# Copyright 2008-2009 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
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# 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)
|
||||||
|
|
||||||
|
r"""
|
||||||
|
Creates macros for each plugin API function pointer, e.g.:
|
||||||
|
|
||||||
|
#define plugin_add_toolbar_item \
|
||||||
|
p_plugin->add_toolbar_item
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
import re, sys
|
||||||
|
|
||||||
|
def get_function_names():
|
||||||
|
names = []
|
||||||
|
try:
|
||||||
|
f = open('../src/plugins.c')
|
||||||
|
while 1:
|
||||||
|
l = f.readline()
|
||||||
|
if l == "":
|
||||||
|
break;
|
||||||
|
m = re.match("^\t&([a-z][a-z0-9_]+)", l)
|
||||||
|
if m:
|
||||||
|
s = m.group(1)
|
||||||
|
if not s.endswith('_funcs'):
|
||||||
|
names.append(s)
|
||||||
|
f.close
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
return names
|
||||||
|
|
||||||
|
def get_api_tuple(str):
|
||||||
|
m = re.match("^([a-z]+)_([a-z][a-z0-9_]+)$", str)
|
||||||
|
return 'p_' + m.group(1), m.group(2)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
outfile = 'geanyfunctions.h'
|
||||||
|
|
||||||
|
fnames = get_function_names()
|
||||||
|
if not fnames:
|
||||||
|
sys.exit("No function names read!")
|
||||||
|
|
||||||
|
f = open(outfile, 'w')
|
||||||
|
print >>f, '/* This file is generated automatically by genapi.py - do not edit.\n *\n' +\
|
||||||
|
' * @file %s @ref geany_functions wrappers.\n' % (outfile) +\
|
||||||
|
' * This allows the use of normal API function names in plugins.\n' +\
|
||||||
|
' * You need to declare the @ref geany_functions symbol yourself.\n */\n'
|
||||||
|
print >>f, '#ifndef GEANY_FUNCTIONS_H'
|
||||||
|
print >>f, '#define GEANY_FUNCTIONS_H\n'
|
||||||
|
for fname in fnames:
|
||||||
|
ptr, name = get_api_tuple(fname)
|
||||||
|
print >>f, '#define %s \\\n\tgeany_functions->%s->%s' % (fname, ptr, name)
|
||||||
|
print >>f, '\n#endif'
|
||||||
|
f.close
|
||||||
|
|
||||||
|
if not '-q' in sys.argv:
|
||||||
|
print 'Generated ' + outfile
|
@ -1,8 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* htmlchars.c - this file is part of Geany, a fast and lightweight IDE
|
* htmlchars.c - this file is part of Geany, a fast and lightweight IDE
|
||||||
*
|
*
|
||||||
* Copyright 2006-2008 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
* Copyright 2009 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
* Copyright 2007-2008 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
* Copyright 2006-2009 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||||
|
* Copyright 2007-2009 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -32,15 +33,14 @@
|
|||||||
#include "keybindings.h"
|
#include "keybindings.h"
|
||||||
#include "ui_utils.h"
|
#include "ui_utils.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "pluginmacros.h"
|
#include "geanyfunctions.h"
|
||||||
|
|
||||||
|
|
||||||
PluginFields *plugin_fields;
|
|
||||||
GeanyData *geany_data;
|
GeanyData *geany_data;
|
||||||
GeanyFunctions *geany_functions;
|
GeanyFunctions *geany_functions;
|
||||||
|
|
||||||
|
|
||||||
PLUGIN_VERSION_CHECK(69)
|
PLUGIN_VERSION_CHECK(GEANY_API_VERSION)
|
||||||
|
|
||||||
PLUGIN_SET_INFO(_("HTML Characters"), _("Inserts HTML character entities like '&'."), VERSION,
|
PLUGIN_SET_INFO(_("HTML Characters"), _("Inserts HTML character entities like '&'."), VERSION,
|
||||||
_("The Geany developer team"))
|
_("The Geany developer team"))
|
||||||
@ -50,6 +50,8 @@ PLUGIN_SET_INFO(_("HTML Characters"), _("Inserts HTML character entities like '&
|
|||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
KB_INSERT_HTML_CHARS,
|
KB_INSERT_HTML_CHARS,
|
||||||
|
KB_REPLACE_HTML_ENTITIES,
|
||||||
|
KB_HTMLTOGGLE_ACTIVE,
|
||||||
KB_COUNT
|
KB_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -63,10 +65,305 @@ enum
|
|||||||
N_COLUMNS
|
N_COLUMNS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static GtkWidget *main_menu_item = NULL;
|
||||||
|
static GtkWidget *main_menu = NULL;
|
||||||
|
static GtkWidget *main_menu_submenu = NULL;
|
||||||
|
static GtkWidget *menu_bulk_replace = NULL;
|
||||||
static GtkWidget *sc_dialog = NULL;
|
static GtkWidget *sc_dialog = NULL;
|
||||||
static GtkTreeStore *sc_store = NULL;
|
static GtkTreeStore *sc_store = NULL;
|
||||||
static GtkTreeView *sc_tree = NULL;
|
static GtkTreeView *sc_tree = NULL;
|
||||||
|
static GtkWidget *menu_htmltoggle = NULL;
|
||||||
|
static gboolean plugin_active = FALSE;
|
||||||
|
|
||||||
|
const gchar *chars[][2] ={
|
||||||
|
{ N_("HTML characters"), NULL },
|
||||||
|
{ "\"", """ },
|
||||||
|
{ "&", "&" },
|
||||||
|
{ "<", "<" },
|
||||||
|
{ ">", ">" },
|
||||||
|
|
||||||
|
{ N_("ISO 8859-1 characters"), NULL },
|
||||||
|
{ " ", " " },
|
||||||
|
{ "¡", "¡" },
|
||||||
|
{ "¢", "¢" },
|
||||||
|
{ "£", "£" },
|
||||||
|
{ "¤", "¤" },
|
||||||
|
{ "¥", "¥" },
|
||||||
|
{ "¦", "¦" },
|
||||||
|
{ "§", "§" },
|
||||||
|
{ "¨", "¨" },
|
||||||
|
{ "©", "©" },
|
||||||
|
{ "®", "®" },
|
||||||
|
{ "«", "«" },
|
||||||
|
{ "»", "»" },
|
||||||
|
{ "¬", "¬" },
|
||||||
|
{ " ", "­" },
|
||||||
|
{ "¯", "¯" },
|
||||||
|
{ "°", "°" },
|
||||||
|
{ "±", "±" },
|
||||||
|
{ "¹", "¹" },
|
||||||
|
{ "²", "²" },
|
||||||
|
{ "³", "³" },
|
||||||
|
{ "¼", "¼" },
|
||||||
|
{ "½", "½" },
|
||||||
|
{ "¾", "¾" },
|
||||||
|
{ "×", "×" },
|
||||||
|
{ "÷", "÷" },
|
||||||
|
{ "´", "´" },
|
||||||
|
{ "µ", "µ" },
|
||||||
|
{ "¶", "¶" },
|
||||||
|
{ "·", "·" },
|
||||||
|
{ "¸", "¸" },
|
||||||
|
{ "ª", "ª" },
|
||||||
|
{ "º", "º" },
|
||||||
|
{ "¿", "¿" },
|
||||||
|
{ "À", "À" },
|
||||||
|
{ "Á", "Á" },
|
||||||
|
{ "Â", "Â" },
|
||||||
|
{ "Ã", "Ã" },
|
||||||
|
{ "Ä", "Ä" },
|
||||||
|
{ "Å", "Å" },
|
||||||
|
{ "Æ", "Æ" },
|
||||||
|
{ "Ç", "Ç" },
|
||||||
|
{ "È", "È" },
|
||||||
|
{ "É", "É" },
|
||||||
|
{ "Ê", "Ê" },
|
||||||
|
{ "Ë", "Ë" },
|
||||||
|
{ "Ì", "Ì" },
|
||||||
|
{ "Í", "Í" },
|
||||||
|
{ "Î", "Î" },
|
||||||
|
{ "Ï", "Ï" },
|
||||||
|
{ "Ð", "Ð" },
|
||||||
|
{ "Ñ", "Ñ" },
|
||||||
|
{ "Ò", "Ò" },
|
||||||
|
{ "Ó", "Ó" },
|
||||||
|
{ "Ô", "Ô" },
|
||||||
|
{ "Õ", "Õ" },
|
||||||
|
{ "Ö", "Ö" },
|
||||||
|
{ "Ø", "Ø" },
|
||||||
|
{ "Ù", "Ù" },
|
||||||
|
{ "Ú", "Ú" },
|
||||||
|
{ "Û", "Û" },
|
||||||
|
{ "Ü", "Ü" },
|
||||||
|
{ "Ý", "Ý" },
|
||||||
|
{ "Þ", "Þ" },
|
||||||
|
{ "ß", "ß" },
|
||||||
|
{ "à", "à" },
|
||||||
|
{ "á", "á" },
|
||||||
|
{ "â", "â" },
|
||||||
|
{ "ã", "ã" },
|
||||||
|
{ "ä", "ä" },
|
||||||
|
{ "å", "å" },
|
||||||
|
{ "æ", "æ" },
|
||||||
|
{ "ç", "ç" },
|
||||||
|
{ "è", "è" },
|
||||||
|
{ "é", "é" },
|
||||||
|
{ "ê", "ê" },
|
||||||
|
{ "ë", "ë" },
|
||||||
|
{ "ì", "ì" },
|
||||||
|
{ "í", "í" },
|
||||||
|
{ "î", "î" },
|
||||||
|
{ "ï", "ï" },
|
||||||
|
{ "ð", "ð" },
|
||||||
|
{ "ñ", "ñ" },
|
||||||
|
{ "ò", "ò" },
|
||||||
|
{ "ó", "ó" },
|
||||||
|
{ "ô", "ô" },
|
||||||
|
{ "õ", "õ" },
|
||||||
|
{ "ö", "ö" },
|
||||||
|
{ "ø", "ø" },
|
||||||
|
{ "ù", "ù" },
|
||||||
|
{ "ú", "ú" },
|
||||||
|
{ "û", "û" },
|
||||||
|
{ "ü", "ü" },
|
||||||
|
{ "ý", "ý" },
|
||||||
|
{ "þ", "þ" },
|
||||||
|
{ "ÿ", "ÿ" },
|
||||||
|
|
||||||
|
{ N_("Greek characters"), NULL },
|
||||||
|
{ "Α", "Α" },
|
||||||
|
{ "α", "α" },
|
||||||
|
{ "Β", "Β" },
|
||||||
|
{ "β", "β" },
|
||||||
|
{ "Γ", "Γ" },
|
||||||
|
{ "γ", "γ" },
|
||||||
|
{ "Δ", "Δ" },
|
||||||
|
{ "δ", "Δ" },
|
||||||
|
{ "δ", "δ" },
|
||||||
|
{ "Ε", "Ε" },
|
||||||
|
{ "ε", "ε" },
|
||||||
|
{ "Ζ", "Ζ" },
|
||||||
|
{ "ζ", "ζ" },
|
||||||
|
{ "Η", "Η" },
|
||||||
|
{ "η", "η" },
|
||||||
|
{ "Θ", "Θ" },
|
||||||
|
{ "θ", "θ" },
|
||||||
|
{ "Ι", "Ι" },
|
||||||
|
{ "ι", "ι" },
|
||||||
|
{ "Κ", "Κ" },
|
||||||
|
{ "κ", "κ" },
|
||||||
|
{ "Λ", "Λ" },
|
||||||
|
{ "λ", "λ" },
|
||||||
|
{ "Μ", "Μ" },
|
||||||
|
{ "μ", "μ" },
|
||||||
|
{ "Ν", "Ν" },
|
||||||
|
{ "ν", "ν" },
|
||||||
|
{ "Ξ", "Ξ" },
|
||||||
|
{ "ξ", "ξ" },
|
||||||
|
{ "Ο", "Ο" },
|
||||||
|
{ "ο", "ο" },
|
||||||
|
{ "Π", "Π" },
|
||||||
|
{ "π", "π" },
|
||||||
|
{ "Ρ", "Ρ" },
|
||||||
|
{ "ρ", "ρ" },
|
||||||
|
{ "Σ", "Σ" },
|
||||||
|
{ "ς", "ς" },
|
||||||
|
{ "σ", "σ" },
|
||||||
|
{ "Τ", "Τ" },
|
||||||
|
{ "τ", "τ" },
|
||||||
|
{ "Υ", "Υ" },
|
||||||
|
{ "υ", "υ" },
|
||||||
|
{ "Φ", "Φ" },
|
||||||
|
{ "φ", "φ" },
|
||||||
|
{ "Χ", "Χ" },
|
||||||
|
{ "χ", "χ" },
|
||||||
|
{ "Ψ", "Ψ" },
|
||||||
|
{ "ψ", "ψ" },
|
||||||
|
{ "Ω", "Ω" },
|
||||||
|
{ "ω", "ω" },
|
||||||
|
{ "ϑ", "ϑ" },
|
||||||
|
{ "ϒ", "ϒ" },
|
||||||
|
{ "ϖ", "ϖ" },
|
||||||
|
|
||||||
|
{ N_("Mathematical characters"), NULL },
|
||||||
|
{ "∀", "∀" },
|
||||||
|
{ "∂", "∂" },
|
||||||
|
{ "∃", "∃" },
|
||||||
|
{ "∅", "∅" },
|
||||||
|
{ "∇", "∇" },
|
||||||
|
{ "∈", "∈" },
|
||||||
|
{ "∉", "∉" },
|
||||||
|
{ "∋", "∋" },
|
||||||
|
{ "∏", "∏" },
|
||||||
|
{ "∑", "∑" },
|
||||||
|
{ "−", "−" },
|
||||||
|
{ "∗", "∗" },
|
||||||
|
{ "√", "√" },
|
||||||
|
{ "∝", "∝" },
|
||||||
|
{ "∞", "∞" },
|
||||||
|
{ "∠", "∠" },
|
||||||
|
{ "∧", "∧" },
|
||||||
|
{ "∨", "∨" },
|
||||||
|
{ "∩", "∩" },
|
||||||
|
{ "∪", "∪" },
|
||||||
|
{ "∫", "∫" },
|
||||||
|
{ "∴", "∴" },
|
||||||
|
{ "∼", "∼" },
|
||||||
|
{ "≅", "≅" },
|
||||||
|
{ "≈", "≈" },
|
||||||
|
{ "≠", "≠" },
|
||||||
|
{ "≡", "≡" },
|
||||||
|
{ "≤", "≤" },
|
||||||
|
{ "≥", "≥" },
|
||||||
|
{ "⊂", "⊂" },
|
||||||
|
{ "⊃", "⊃" },
|
||||||
|
{ "⊄", "⊄" },
|
||||||
|
{ "⊆", "⊆" },
|
||||||
|
{ "⊇", "⊇" },
|
||||||
|
{ "⊕", "⊕" },
|
||||||
|
{ "⊗", "⊗" },
|
||||||
|
{ "⊥", "⊥" },
|
||||||
|
{ "⋅", "⋅" },
|
||||||
|
{ "◊", "◊" },
|
||||||
|
|
||||||
|
{ N_("Technical characters"), NULL },
|
||||||
|
{ "⌈", "⌈" },
|
||||||
|
{ "⌉", "⌉" },
|
||||||
|
{ "⌊", "⌊" },
|
||||||
|
{ "⌋", "⌋" },
|
||||||
|
{ "〈", "⟨" },
|
||||||
|
{ "〉", "⟩" },
|
||||||
|
|
||||||
|
{ N_("Arrow characters"), NULL },
|
||||||
|
{ "←", "←" },
|
||||||
|
{ "↑", "↑" },
|
||||||
|
{ "→", "→" },
|
||||||
|
{ "↓", "↓" },
|
||||||
|
{ "↔", "↔" },
|
||||||
|
{ "↵", "↵" },
|
||||||
|
{ "⇐", "⇐" },
|
||||||
|
{ "⇑", "⇑" },
|
||||||
|
{ "⇒", "⇒" },
|
||||||
|
{ "⇓", "⇓" },
|
||||||
|
{ "⇔", "⇔" },
|
||||||
|
|
||||||
|
{ N_("Punctuation characters"), NULL },
|
||||||
|
{ "–", "–" },
|
||||||
|
{ "—", "—" },
|
||||||
|
{ "‘", "‘" },
|
||||||
|
{ "’", "’" },
|
||||||
|
{ "‚", "‚" },
|
||||||
|
{ "“", "“" },
|
||||||
|
{ "”", "”" },
|
||||||
|
{ "„", "„" },
|
||||||
|
{ "†", "†" },
|
||||||
|
{ "‡", "‡" },
|
||||||
|
{ "…", "…" },
|
||||||
|
{ "‰", "‰" },
|
||||||
|
{ "‹", "‹" },
|
||||||
|
{ "›", "›" },
|
||||||
|
|
||||||
|
{ N_("Miscellaneous characters"), NULL },
|
||||||
|
{ "•", "•" },
|
||||||
|
{ "′", "′" },
|
||||||
|
{ "″", "″" },
|
||||||
|
{ "‾", "‾" },
|
||||||
|
{ "⁄", "⁄" },
|
||||||
|
{ "℘", "℘" },
|
||||||
|
{ "ℑ", "ℑ" },
|
||||||
|
{ "ℜ", "ℜ" },
|
||||||
|
{ "™", "™" },
|
||||||
|
{ "€", "€" },
|
||||||
|
{ "ℵ", "ℵ" },
|
||||||
|
{ "♠", "♠" },
|
||||||
|
{ "♣", "♣" },
|
||||||
|
{ "♥", "♥" },
|
||||||
|
{ "♦", "♦" },
|
||||||
|
{ "Œ", "Œ" },
|
||||||
|
{ "œ", "œ" },
|
||||||
|
{ "Š", "Š" },
|
||||||
|
{ "š", "š" },
|
||||||
|
{ "Ÿ", "Ÿ" },
|
||||||
|
{ "ƒ", "ƒ" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static gboolean ht_editor_notify_cb(GObject *object, GeanyEditor *editor,
|
||||||
|
SCNotification *nt, gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
PluginCallback plugin_callbacks[] =
|
||||||
|
{
|
||||||
|
{ "editor-notify", (GCallback) &ht_editor_notify_cb, FALSE, NULL },
|
||||||
|
{ NULL, NULL, FALSE, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* Functions to toggle the status of plugin */
|
||||||
|
void set_status(gboolean new_status)
|
||||||
|
{
|
||||||
|
/* No more function at the moment.*/
|
||||||
|
if (plugin_active != new_status)
|
||||||
|
plugin_active = new_status;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void toggle_status(G_GNUC_UNUSED GtkMenuItem * menuitem)
|
||||||
|
{
|
||||||
|
if (plugin_active == TRUE)
|
||||||
|
set_status(FALSE);
|
||||||
|
else
|
||||||
|
set_status(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void sc_on_tools_show_dialog_insert_special_chars_response
|
static void sc_on_tools_show_dialog_insert_special_chars_response
|
||||||
(GtkDialog *dialog, gint response, gpointer user_data);
|
(GtkDialog *dialog, gint response, gpointer user_data);
|
||||||
@ -76,6 +373,74 @@ static void sc_fill_store(GtkTreeStore *store);
|
|||||||
static gboolean sc_insert(GtkTreeModel *model, GtkTreeIter *iter);
|
static gboolean sc_insert(GtkTreeModel *model, GtkTreeIter *iter);
|
||||||
|
|
||||||
|
|
||||||
|
/* Function takes over value of key which was pressed and returns
|
||||||
|
* HTML/SGML entity if any */
|
||||||
|
const gchar *get_entity(gchar *letter)
|
||||||
|
{
|
||||||
|
guint i, len;
|
||||||
|
|
||||||
|
len = G_N_ELEMENTS(chars);
|
||||||
|
|
||||||
|
/* Ignore tags marking caracters as well as spaces*/
|
||||||
|
for (i = 7; i < len; i++)
|
||||||
|
{
|
||||||
|
if (utils_str_equal(chars[i][0], letter) &&
|
||||||
|
!utils_str_equal(" ", letter))
|
||||||
|
{
|
||||||
|
return chars[i][1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if the char is not in the list */
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static gboolean ht_editor_notify_cb(GObject *object, GeanyEditor *editor,
|
||||||
|
SCNotification *nt, gpointer data)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail(editor != NULL, FALSE);
|
||||||
|
|
||||||
|
if (plugin_active != TRUE)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (nt->nmhdr.code == SCN_CHARADDED)
|
||||||
|
{
|
||||||
|
gchar buf[7];
|
||||||
|
gint len;
|
||||||
|
|
||||||
|
len = g_unichar_to_utf8(nt->ch, buf);
|
||||||
|
if (len > 0)
|
||||||
|
{
|
||||||
|
const gchar *entity;
|
||||||
|
buf[len] = '\0';
|
||||||
|
entity = get_entity(buf);
|
||||||
|
|
||||||
|
if (entity != NULL)
|
||||||
|
{
|
||||||
|
gint pos = sci_get_current_position(editor->sci);
|
||||||
|
|
||||||
|
sci_set_selection_start(editor->sci, pos - len);
|
||||||
|
sci_set_selection_end(editor->sci, pos);
|
||||||
|
|
||||||
|
sci_replace_sel(editor->sci, entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Called when keys were pressed */
|
||||||
|
static void kbhtmltoggle_toggle(G_GNUC_UNUSED guint key_id)
|
||||||
|
{
|
||||||
|
if (plugin_active == TRUE)
|
||||||
|
set_status(FALSE);
|
||||||
|
else
|
||||||
|
set_status(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
static void tools_show_dialog_insert_special_chars(void)
|
static void tools_show_dialog_insert_special_chars(void)
|
||||||
{
|
{
|
||||||
if (sc_dialog == NULL)
|
if (sc_dialog == NULL)
|
||||||
@ -89,7 +454,7 @@ static void tools_show_dialog_insert_special_chars(void)
|
|||||||
_("Special Characters"), GTK_WINDOW(geany->main_widgets->window),
|
_("Special Characters"), GTK_WINDOW(geany->main_widgets->window),
|
||||||
GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||||
_("_Insert"), GTK_RESPONSE_OK, NULL);
|
_("_Insert"), GTK_RESPONSE_OK, NULL);
|
||||||
vbox = p_ui->dialog_vbox_new(GTK_DIALOG(sc_dialog));
|
vbox = ui_dialog_vbox_new(GTK_DIALOG(sc_dialog));
|
||||||
gtk_box_set_spacing(GTK_BOX(vbox), 6);
|
gtk_box_set_spacing(GTK_BOX(vbox), 6);
|
||||||
gtk_widget_set_name(sc_dialog, "GeanyDialog");
|
gtk_widget_set_name(sc_dialog, "GeanyDialog");
|
||||||
|
|
||||||
@ -151,272 +516,10 @@ static void sc_fill_store(GtkTreeStore *store)
|
|||||||
{
|
{
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
GtkTreeIter *parent_iter = NULL;
|
GtkTreeIter *parent_iter = NULL;
|
||||||
guint i;
|
guint i, len;
|
||||||
|
|
||||||
gchar *chars[][2] =
|
len = G_N_ELEMENTS(chars);
|
||||||
{
|
for (i = 0; i < len; i++)
|
||||||
{ _("HTML characters"), NULL },
|
|
||||||
{ "\"", """ },
|
|
||||||
{ "&", "&" },
|
|
||||||
{ "<", "<" },
|
|
||||||
{ ">", ">" },
|
|
||||||
|
|
||||||
{ _("ISO 8859-1 characters"), NULL },
|
|
||||||
{ " ", " " },
|
|
||||||
{ "¡", "¡" },
|
|
||||||
{ "¢", "¢" },
|
|
||||||
{ "£", "£" },
|
|
||||||
{ "¤", "¤" },
|
|
||||||
{ "¥", "¥" },
|
|
||||||
{ "¦", "¦" },
|
|
||||||
{ "§", "§" },
|
|
||||||
{ "¨", "¨" },
|
|
||||||
{ "©", "©" },
|
|
||||||
{ "®", "®" },
|
|
||||||
{ "«", "«" },
|
|
||||||
{ "»", "»" },
|
|
||||||
{ "¬", "¬" },
|
|
||||||
{ " ", "­" },
|
|
||||||
{ "¯", "¯" },
|
|
||||||
{ "°", "°" },
|
|
||||||
{ "±", "±" },
|
|
||||||
{ "¹", "¹" },
|
|
||||||
{ "²", "²" },
|
|
||||||
{ "³", "³" },
|
|
||||||
{ "¼", "¼" },
|
|
||||||
{ "½", "½" },
|
|
||||||
{ "¾", "¾" },
|
|
||||||
{ "×", "×" },
|
|
||||||
{ "÷", "÷" },
|
|
||||||
{ "´", "´" },
|
|
||||||
{ "µ", "µ" },
|
|
||||||
{ "¶", "¶" },
|
|
||||||
{ "·", "·" },
|
|
||||||
{ "¸", "¸" },
|
|
||||||
{ "ª", "ª" },
|
|
||||||
{ "º", "º" },
|
|
||||||
{ "¿", "¿" },
|
|
||||||
{ "À", "À" },
|
|
||||||
{ "Á", "Á" },
|
|
||||||
{ "Â", "Â" },
|
|
||||||
{ "Ã", "Ã" },
|
|
||||||
{ "Ä", "Ä" },
|
|
||||||
{ "Å", "Å" },
|
|
||||||
{ "Æ", "Æ" },
|
|
||||||
{ "Ç", "Ç" },
|
|
||||||
{ "È", "È" },
|
|
||||||
{ "É", "É" },
|
|
||||||
{ "Ê", "Ê" },
|
|
||||||
{ "Ë", "Ë" },
|
|
||||||
{ "Ì", "Ì" },
|
|
||||||
{ "Í", "Í" },
|
|
||||||
{ "Î", "Î" },
|
|
||||||
{ "Ï", "Ï" },
|
|
||||||
{ "Ð", "Ð" },
|
|
||||||
{ "Ñ", "Ñ" },
|
|
||||||
{ "Ò", "Ò" },
|
|
||||||
{ "Ó", "Ó" },
|
|
||||||
{ "Ô", "Ô" },
|
|
||||||
{ "Õ", "Õ" },
|
|
||||||
{ "Ö", "Ö" },
|
|
||||||
{ "Ø", "Ø" },
|
|
||||||
{ "Ù", "Ù" },
|
|
||||||
{ "Ú", "Ú" },
|
|
||||||
{ "Û", "Û" },
|
|
||||||
{ "Ü", "Ü" },
|
|
||||||
{ "Ý", "Ý" },
|
|
||||||
{ "Þ", "Þ" },
|
|
||||||
{ "ß", "ß" },
|
|
||||||
{ "à", "à" },
|
|
||||||
{ "á", "á" },
|
|
||||||
{ "â", "â" },
|
|
||||||
{ "ã", "ã" },
|
|
||||||
{ "ä", "ä" },
|
|
||||||
{ "å", "å" },
|
|
||||||
{ "æ", "æ" },
|
|
||||||
{ "ç", "ç" },
|
|
||||||
{ "è", "è" },
|
|
||||||
{ "é", "é" },
|
|
||||||
{ "ê", "ê" },
|
|
||||||
{ "ë", "ë" },
|
|
||||||
{ "ì", "ì" },
|
|
||||||
{ "í", "í" },
|
|
||||||
{ "î", "î" },
|
|
||||||
{ "ï", "ï" },
|
|
||||||
{ "ð", "ð" },
|
|
||||||
{ "ñ", "ñ" },
|
|
||||||
{ "ò", "ò" },
|
|
||||||
{ "ó", "ó" },
|
|
||||||
{ "ô", "ô" },
|
|
||||||
{ "õ", "õ" },
|
|
||||||
{ "ö", "ö" },
|
|
||||||
{ "ø", "ø" },
|
|
||||||
{ "ù", "ù" },
|
|
||||||
{ "ú", "ú" },
|
|
||||||
{ "û", "û" },
|
|
||||||
{ "ü", "ü" },
|
|
||||||
{ "ý", "ý" },
|
|
||||||
{ "þ", "þ" },
|
|
||||||
{ "ÿ", "ÿ" },
|
|
||||||
|
|
||||||
{ _("Greek characters"), NULL },
|
|
||||||
{ "Α", "Α" },
|
|
||||||
{ "α", "α" },
|
|
||||||
{ "Β", "Β" },
|
|
||||||
{ "β", "β" },
|
|
||||||
{ "Γ", "Γ" },
|
|
||||||
{ "γ", "γ" },
|
|
||||||
{ "Δ", "Δ" },
|
|
||||||
{ "δ", "Δ" },
|
|
||||||
{ "δ", "δ" },
|
|
||||||
{ "Ε", "Ε" },
|
|
||||||
{ "ε", "ε" },
|
|
||||||
{ "Ζ", "Ζ" },
|
|
||||||
{ "ζ", "ζ" },
|
|
||||||
{ "Η", "Η" },
|
|
||||||
{ "η", "η" },
|
|
||||||
{ "Θ", "Θ" },
|
|
||||||
{ "θ", "θ" },
|
|
||||||
{ "Ι", "Ι" },
|
|
||||||
{ "ι", "ι" },
|
|
||||||
{ "Κ", "Κ" },
|
|
||||||
{ "κ", "κ" },
|
|
||||||
{ "Λ", "Λ" },
|
|
||||||
{ "λ", "λ" },
|
|
||||||
{ "Μ", "Μ" },
|
|
||||||
{ "μ", "μ" },
|
|
||||||
{ "Ν", "Ν" },
|
|
||||||
{ "ν", "ν" },
|
|
||||||
{ "Ξ", "Ξ" },
|
|
||||||
{ "ξ", "ξ" },
|
|
||||||
{ "Ο", "Ο" },
|
|
||||||
{ "ο", "ο" },
|
|
||||||
{ "Π", "Π" },
|
|
||||||
{ "π", "π" },
|
|
||||||
{ "Ρ", "Ρ" },
|
|
||||||
{ "ρ", "ρ" },
|
|
||||||
{ "Σ", "Σ" },
|
|
||||||
{ "ς", "ς" },
|
|
||||||
{ "σ", "σ" },
|
|
||||||
{ "Τ", "Τ" },
|
|
||||||
{ "τ", "τ" },
|
|
||||||
{ "Υ", "Υ" },
|
|
||||||
{ "υ", "υ" },
|
|
||||||
{ "Φ", "Φ" },
|
|
||||||
{ "φ", "φ" },
|
|
||||||
{ "Χ", "Χ" },
|
|
||||||
{ "χ", "χ" },
|
|
||||||
{ "Ψ", "Ψ" },
|
|
||||||
{ "ψ", "ψ" },
|
|
||||||
{ "Ω", "Ω" },
|
|
||||||
{ "ω", "ω" },
|
|
||||||
{ "ϑ", "ϑ" },
|
|
||||||
{ "ϒ", "ϒ" },
|
|
||||||
{ "ϖ", "ϖ" },
|
|
||||||
|
|
||||||
{ _("Mathematical characters"), NULL },
|
|
||||||
{ "∀", "∀" },
|
|
||||||
{ "∂", "∂" },
|
|
||||||
{ "∃", "∃" },
|
|
||||||
{ "∅", "∅" },
|
|
||||||
{ "∇", "∇" },
|
|
||||||
{ "∈", "∈" },
|
|
||||||
{ "∉", "∉" },
|
|
||||||
{ "∋", "∋" },
|
|
||||||
{ "∏", "∏" },
|
|
||||||
{ "∑", "∑" },
|
|
||||||
{ "−", "−" },
|
|
||||||
{ "∗", "∗" },
|
|
||||||
{ "√", "√" },
|
|
||||||
{ "∝", "∝" },
|
|
||||||
{ "∞", "∞" },
|
|
||||||
{ "∠", "∠" },
|
|
||||||
{ "∧", "∧" },
|
|
||||||
{ "∨", "∨" },
|
|
||||||
{ "∩", "∩" },
|
|
||||||
{ "∪", "∪" },
|
|
||||||
{ "∫", "∫" },
|
|
||||||
{ "∴", "∴" },
|
|
||||||
{ "∼", "∼" },
|
|
||||||
{ "≅", "≅" },
|
|
||||||
{ "≈", "≈" },
|
|
||||||
{ "≠", "≠" },
|
|
||||||
{ "≡", "≡" },
|
|
||||||
{ "≤", "≤" },
|
|
||||||
{ "≥", "≥" },
|
|
||||||
{ "⊂", "⊂" },
|
|
||||||
{ "⊃", "⊃" },
|
|
||||||
{ "⊄", "⊄" },
|
|
||||||
{ "⊆", "⊆" },
|
|
||||||
{ "⊇", "⊇" },
|
|
||||||
{ "⊕", "⊕" },
|
|
||||||
{ "⊗", "⊗" },
|
|
||||||
{ "⊥", "⊥" },
|
|
||||||
{ "⋅", "⋅" },
|
|
||||||
{ "◊", "◊" },
|
|
||||||
|
|
||||||
{ _("Technical characters"), NULL },
|
|
||||||
{ "⌈", "⌈" },
|
|
||||||
{ "⌉", "⌉" },
|
|
||||||
{ "⌊", "⌊" },
|
|
||||||
{ "⌋", "⌋" },
|
|
||||||
{ "〈", "⟨" },
|
|
||||||
{ "〉", "⟩" },
|
|
||||||
|
|
||||||
{ _("Arrow characters"), NULL },
|
|
||||||
{ "←", "←" },
|
|
||||||
{ "↑", "↑" },
|
|
||||||
{ "→", "→" },
|
|
||||||
{ "↓", "↓" },
|
|
||||||
{ "↔", "↔" },
|
|
||||||
{ "↵", "↵" },
|
|
||||||
{ "⇐", "⇐" },
|
|
||||||
{ "⇑", "⇑" },
|
|
||||||
{ "⇒", "⇒" },
|
|
||||||
{ "⇓", "⇓" },
|
|
||||||
{ "⇔", "⇔" },
|
|
||||||
|
|
||||||
{ _("Punctuation characters"), NULL },
|
|
||||||
{ "–", "–" },
|
|
||||||
{ "—", "—" },
|
|
||||||
{ "‘", "‘" },
|
|
||||||
{ "’", "’" },
|
|
||||||
{ "‚", "‚" },
|
|
||||||
{ "“", "“" },
|
|
||||||
{ "”", "”" },
|
|
||||||
{ "„", "„" },
|
|
||||||
{ "†", "†" },
|
|
||||||
{ "‡", "‡" },
|
|
||||||
{ "…", "…" },
|
|
||||||
{ "‰", "‰" },
|
|
||||||
{ "‹", "‹" },
|
|
||||||
{ "›", "›" },
|
|
||||||
|
|
||||||
{ _("Miscellaneous characters"), NULL },
|
|
||||||
{ "•", "•" },
|
|
||||||
{ "′", "′" },
|
|
||||||
{ "″", "″" },
|
|
||||||
{ "‾", "‾" },
|
|
||||||
{ "⁄", "⁄" },
|
|
||||||
{ "℘", "℘" },
|
|
||||||
{ "ℑ", "ℑ" },
|
|
||||||
{ "ℜ", "ℜ" },
|
|
||||||
{ "™", "™" },
|
|
||||||
{ "€", "€" },
|
|
||||||
{ "ℵ", "ℵ" },
|
|
||||||
{ "♠", "♠" },
|
|
||||||
{ "♣", "♣" },
|
|
||||||
{ "♥", "♥" },
|
|
||||||
{ "♦", "♦" },
|
|
||||||
{ "Œ", "Œ" },
|
|
||||||
{ "œ", "œ" },
|
|
||||||
{ "Š", "Š" },
|
|
||||||
{ "š", "š" },
|
|
||||||
{ "Ÿ", "Ÿ" },
|
|
||||||
{ "ƒ", "ƒ" },
|
|
||||||
};
|
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS(chars); i++)
|
|
||||||
{
|
{
|
||||||
if (chars[i][1] == NULL)
|
if (chars[i][1] == NULL)
|
||||||
{ /* add a category */
|
{ /* add a category */
|
||||||
@ -434,23 +537,22 @@ static void sc_fill_store(GtkTreeStore *store)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* just inserts the HTML_NAME coloumn of the selected row at current position
|
/* just inserts the HTML_NAME coloumn of the selected row at current position
|
||||||
* returns only TRUE if a valid selection(i.e. no category) could be found */
|
* returns only TRUE if a valid selection(i.e. no category) could be found */
|
||||||
static gboolean sc_insert(GtkTreeModel *model, GtkTreeIter *iter)
|
static gboolean sc_insert(GtkTreeModel *model, GtkTreeIter *iter)
|
||||||
{
|
{
|
||||||
GeanyDocument *doc = p_document->get_current();
|
GeanyDocument *doc = document_get_current();
|
||||||
gboolean result = FALSE;
|
gboolean result = FALSE;
|
||||||
|
|
||||||
if (doc != NULL)
|
if (doc != NULL)
|
||||||
{
|
{
|
||||||
gchar *str;
|
gchar *str;
|
||||||
gint pos = p_sci->get_current_position(doc->editor->sci);
|
gint pos = sci_get_current_position(doc->editor->sci);
|
||||||
|
|
||||||
gtk_tree_model_get(model, iter, COLUMN_HTML_NAME, &str, -1);
|
gtk_tree_model_get(model, iter, COLUMN_HTML_NAME, &str, -1);
|
||||||
if (NZV(str))
|
if (NZV(str))
|
||||||
{
|
{
|
||||||
p_sci->insert_text(doc->editor->sci, pos, str);
|
sci_insert_text(doc->editor->sci, pos, str);
|
||||||
g_free(str);
|
g_free(str);
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
}
|
}
|
||||||
@ -504,47 +606,141 @@ static void sc_on_tree_row_activated(GtkTreeView *treeview, GtkTreePath *path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Callback when the menu item is clicked */
|
static void replace_special_character()
|
||||||
|
{
|
||||||
|
GeanyDocument *doc = NULL;
|
||||||
|
doc = document_get_current();
|
||||||
|
|
||||||
|
if (doc != NULL && sci_has_selection(doc->editor->sci))
|
||||||
|
{
|
||||||
|
gint selection_len = sci_get_selected_text_length(doc->editor->sci);
|
||||||
|
gchar *selection = g_malloc(selection_len + 1);
|
||||||
|
GString *replacement = g_string_new(NULL);
|
||||||
|
gint i;
|
||||||
|
gchar *new = NULL;
|
||||||
|
const gchar *entity = NULL;
|
||||||
|
gchar buf[7];
|
||||||
|
gint len;
|
||||||
|
|
||||||
|
sci_get_selected_text(doc->editor->sci, selection);
|
||||||
|
|
||||||
|
selection_len = sci_get_selected_text_length(doc->editor->sci) - 1;
|
||||||
|
for (i = 0; i < selection_len; i++)
|
||||||
|
{
|
||||||
|
len = g_unichar_to_utf8(g_utf8_get_char(selection + i), buf);
|
||||||
|
i = len - 1 + i;
|
||||||
|
|
||||||
|
buf[len] = '\0';
|
||||||
|
entity = get_entity(buf);
|
||||||
|
|
||||||
|
if (entity != NULL)
|
||||||
|
{
|
||||||
|
replacement = g_string_append(replacement, entity);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
replacement = g_string_append(replacement, buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
new = g_string_free(replacement, FALSE);
|
||||||
|
sci_replace_sel(doc->editor->sci, new);
|
||||||
|
g_free(selection);
|
||||||
|
g_free(new);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Callback for special chars menu */
|
||||||
static void
|
static void
|
||||||
item_activate(GtkMenuItem *menuitem, gpointer gdata)
|
item_activate(GtkMenuItem *menuitem, gpointer gdata)
|
||||||
{
|
{
|
||||||
tools_show_dialog_insert_special_chars();
|
tools_show_dialog_insert_special_chars();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void kb_activate(G_GNUC_UNUSED guint key_id)
|
static void kb_activate(G_GNUC_UNUSED guint key_id)
|
||||||
{
|
{
|
||||||
item_activate(NULL, NULL);
|
item_activate(NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Callback for bulk replacement of selected text */
|
||||||
|
static void
|
||||||
|
replace_special_character_activated(GtkMenuItem *menuitem, gpointer gdata)
|
||||||
|
{
|
||||||
|
replace_special_character();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void kb_special_chars_replacement(G_GNUC_UNUSED guint key_id)
|
||||||
|
{
|
||||||
|
replace_special_character();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Called by Geany to initialize the plugin */
|
/* Called by Geany to initialize the plugin */
|
||||||
void plugin_init(GeanyData *data)
|
void plugin_init(GeanyData *data)
|
||||||
{
|
{
|
||||||
GtkWidget *demo_item;
|
GtkWidget *menu_item;
|
||||||
const gchar *menu_text = _("_Insert Special HTML Characters");
|
const gchar *menu_text = _("_Insert Special HTML Characters");
|
||||||
gchar *kb_label = _("Insert Special HTML Characters");
|
|
||||||
|
|
||||||
/* Add an item to the Tools menu */
|
/* Add an item to the Tools menu for html chars dialog*/
|
||||||
demo_item = gtk_menu_item_new_with_mnemonic(menu_text);
|
menu_item = gtk_menu_item_new_with_mnemonic(menu_text);
|
||||||
gtk_widget_show(demo_item);
|
gtk_widget_show(menu_item);
|
||||||
gtk_container_add(GTK_CONTAINER(geany->main_widgets->tools_menu), demo_item);
|
gtk_container_add(GTK_CONTAINER(geany->main_widgets->tools_menu), menu_item);
|
||||||
g_signal_connect(demo_item, "activate", G_CALLBACK(item_activate), NULL);
|
g_signal_connect(menu_item, "activate", G_CALLBACK(item_activate), NULL);
|
||||||
|
|
||||||
/* disable menu_item when there are no documents open */
|
/* disable menu_item when there are no documents open */
|
||||||
plugin_fields->menu_item = demo_item;
|
ui_add_document_sensitive(menu_item);
|
||||||
plugin_fields->flags = PLUGIN_IS_DOCUMENT_SENSITIVE;
|
|
||||||
|
/* Add menuitem for html replacement functions*/
|
||||||
|
main_menu = gtk_menu_item_new_with_mnemonic(_("HTML Replacement"));
|
||||||
|
gtk_widget_show_all(main_menu);
|
||||||
|
gtk_container_add(GTK_CONTAINER(geany->main_widgets->tools_menu), main_menu);
|
||||||
|
|
||||||
|
main_menu_submenu = gtk_menu_new();
|
||||||
|
gtk_menu_item_set_submenu(GTK_MENU_ITEM(main_menu), main_menu_submenu);
|
||||||
|
|
||||||
|
menu_htmltoggle = gtk_check_menu_item_new_with_mnemonic(_("_HTMLToggle"));
|
||||||
|
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(menu_htmltoggle),
|
||||||
|
plugin_active);
|
||||||
|
gtk_container_add(GTK_CONTAINER(main_menu_submenu), menu_htmltoggle);
|
||||||
|
|
||||||
|
g_signal_connect((gpointer) menu_htmltoggle, "activate",
|
||||||
|
G_CALLBACK(toggle_status), NULL);
|
||||||
|
|
||||||
|
menu_bulk_replace = gtk_menu_item_new_with_mnemonic(
|
||||||
|
_("Bulk replacement of special chars"));
|
||||||
|
g_signal_connect((gpointer) menu_bulk_replace, "activate",
|
||||||
|
G_CALLBACK(replace_special_character_activated), NULL);
|
||||||
|
|
||||||
|
gtk_container_add(GTK_CONTAINER(main_menu_submenu), menu_bulk_replace);
|
||||||
|
|
||||||
|
ui_add_document_sensitive(main_menu);
|
||||||
|
gtk_widget_show(menu_bulk_replace);
|
||||||
|
gtk_widget_show(menu_htmltoggle);
|
||||||
|
|
||||||
|
main_menu_item = menu_item;
|
||||||
|
|
||||||
/* setup keybindings */
|
/* setup keybindings */
|
||||||
p_keybindings->set_item(plugin_key_group, KB_INSERT_HTML_CHARS, kb_activate,
|
keybindings_set_item(plugin_key_group, KB_INSERT_HTML_CHARS,
|
||||||
0, 0, "insert_html_chars", kb_label, demo_item);
|
kb_activate, 0, 0, "insert_html_chars",
|
||||||
|
_("Insert Special HTML Characters"), menu_item);
|
||||||
|
keybindings_set_item(plugin_key_group, KB_REPLACE_HTML_ENTITIES,
|
||||||
|
kb_special_chars_replacement, 0, 0, "replace_special_characters",
|
||||||
|
_("Replace special characters"), NULL);
|
||||||
|
keybindings_set_item(plugin_key_group, KB_HTMLTOGGLE_ACTIVE,
|
||||||
|
kbhtmltoggle_toggle, 0, 0, "htmltoogle_toggle_plugin_status",
|
||||||
|
_("Toggle plugin status"), menu_htmltoggle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Destroy widgets */
|
/* Destroy widgets */
|
||||||
void plugin_cleanup(void)
|
void plugin_cleanup(void)
|
||||||
{
|
{
|
||||||
gtk_widget_destroy(plugin_fields->menu_item);
|
gtk_widget_destroy(main_menu_item);
|
||||||
|
gtk_widget_destroy(main_menu);
|
||||||
|
|
||||||
if (sc_dialog != NULL)
|
if (sc_dialog != NULL)
|
||||||
gtk_widget_destroy(sc_dialog);
|
gtk_widget_destroy(sc_dialog);
|
||||||
|
@ -54,11 +54,13 @@ plugins: \
|
|||||||
demoplugin.dll \
|
demoplugin.dll \
|
||||||
classbuilder.dll \
|
classbuilder.dll \
|
||||||
export.dll \
|
export.dll \
|
||||||
splitwindow.dll \
|
|
||||||
vcdiff.dll \
|
vcdiff.dll \
|
||||||
saveactions.dll \
|
saveactions.dll \
|
||||||
filebrowser.dll
|
filebrowser.dll
|
||||||
|
|
||||||
|
# Split Window is broken on Windows
|
||||||
|
# splitwindow.dll
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-$(RM) deps.mak *.o *.dll
|
-$(RM) deps.mak *.o *.dll
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* pluginmacros.h - this file is part of Geany, a fast and lightweight IDE
|
* pluginmacros.h - this file is part of Geany, a fast and lightweight IDE
|
||||||
*
|
*
|
||||||
* Copyright 2007-2008 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
* Copyright 2007-2009 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||||
* Copyright 2007-2008 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
* Copyright 2007-2009 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -23,7 +23,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/** @file pluginmacros.h
|
/** @file pluginmacros.h
|
||||||
* Useful macros to avoid typing @c geany_data-> or @c geany_functions-> so often.
|
* @deprecated Use geanyfunctions.h instead.
|
||||||
|
* Macros to avoid typing @c geany_functions-> so often.
|
||||||
*
|
*
|
||||||
* @section function_macros Function Macros
|
* @section function_macros Function Macros
|
||||||
* These macros are named the same as the first word in the core function name,
|
* These macros are named the same as the first word in the core function name,
|
||||||
@ -36,9 +37,8 @@
|
|||||||
#define PLUGINMACROS_H
|
#define PLUGINMACROS_H
|
||||||
|
|
||||||
/* common items */
|
/* common items */
|
||||||
#define geany geany_data /**< Simple macro for @c geany_data that reduces typing. */
|
#define documents_array geany_data->documents_array /**< @deprecated Use @c geany->documents_array->len and document_index() instead. */
|
||||||
#define documents_array geany_data->documents_array /**< Allows use of @c documents[] macro */
|
#define filetypes_array geany_data->filetypes_array /**< @deprecated Use @c geany->filetypes_array->len and filetypes_index() instead. */
|
||||||
#define filetypes_array geany_data->filetypes_array /**< Allows use of @c filetypes[] macro */
|
|
||||||
|
|
||||||
|
|
||||||
/* function group macros */
|
/* function group macros */
|
||||||
@ -52,6 +52,7 @@
|
|||||||
#define p_main geany_functions->p_main /**< See main.h */
|
#define p_main geany_functions->p_main /**< See main.h */
|
||||||
#define p_msgwindow geany_functions->p_msgwindow /**< See msgwindow.h */
|
#define p_msgwindow geany_functions->p_msgwindow /**< See msgwindow.h */
|
||||||
#define p_navqueue geany_functions->p_navqueue /**< See navqueue.h */
|
#define p_navqueue geany_functions->p_navqueue /**< See navqueue.h */
|
||||||
|
#define p_plugin geany_functions->p_plugin /**< See plugins.c */
|
||||||
#define p_sci geany_functions->p_sci /**< See sciwrappers.h */
|
#define p_sci geany_functions->p_sci /**< See sciwrappers.h */
|
||||||
#define p_search geany_functions->p_search /**< See search.h */
|
#define p_search geany_functions->p_search /**< See search.h */
|
||||||
#define p_support geany_functions->p_support /**< See support.h */
|
#define p_support geany_functions->p_support /**< See support.h */
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* saveactions.c - this file is part of Geany, a fast and lightweight IDE
|
* saveactions.c - this file is part of Geany, a fast and lightweight IDE
|
||||||
*
|
*
|
||||||
* Copyright 2007-2008 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
* Copyright 2007-2009 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||||
* Copyright 2007-2008 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
* Copyright 2007-2009 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -31,14 +31,13 @@
|
|||||||
#include "filetypes.h"
|
#include "filetypes.h"
|
||||||
|
|
||||||
#include "plugindata.h"
|
#include "plugindata.h"
|
||||||
#include "pluginmacros.h"
|
#include "geanyfunctions.h"
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <glib/gstdio.h>
|
#include <glib/gstdio.h>
|
||||||
|
|
||||||
|
|
||||||
PluginFields *plugin_fields;
|
|
||||||
GeanyData *geany_data;
|
GeanyData *geany_data;
|
||||||
GeanyFunctions *geany_functions;
|
GeanyFunctions *geany_functions;
|
||||||
|
|
||||||
@ -103,7 +102,7 @@ static gboolean backupcopy_set_backup_dir(const gchar *utf8_dir)
|
|||||||
if (! NZV(utf8_dir))
|
if (! NZV(utf8_dir))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
tmp = p_utils->get_locale_from_utf8(utf8_dir);
|
tmp = utils_get_locale_from_utf8(utf8_dir);
|
||||||
|
|
||||||
if (! g_path_is_absolute(tmp) ||
|
if (! g_path_is_absolute(tmp) ||
|
||||||
! g_file_test(tmp, G_FILE_TEST_EXISTS) ||
|
! g_file_test(tmp, G_FILE_TEST_EXISTS) ||
|
||||||
@ -172,10 +171,10 @@ static gchar *backupcopy_create_dir_parts(const gchar *filename)
|
|||||||
result = backupcopy_skip_root(cp); /* skip leading slash/backslash and c:\ */
|
result = backupcopy_skip_root(cp); /* skip leading slash/backslash and c:\ */
|
||||||
target_dir = g_build_filename(backupcopy_backup_dir, result, NULL);
|
target_dir = g_build_filename(backupcopy_backup_dir, result, NULL);
|
||||||
|
|
||||||
error = p_utils->mkdir(target_dir, TRUE);
|
error = utils_mkdir(target_dir, TRUE);
|
||||||
if (error != 0)
|
if (error != 0)
|
||||||
{
|
{
|
||||||
p_ui->set_statusbar(FALSE, _("Backup Copy: Directory could not be created (%s)."),
|
ui_set_statusbar(FALSE, _("Backup Copy: Directory could not be created (%s)."),
|
||||||
g_strerror(error));
|
g_strerror(error));
|
||||||
|
|
||||||
result = g_strdup(""); /* return an empty string in case of an error */
|
result = g_strdup(""); /* return an empty string in case of an error */
|
||||||
@ -197,26 +196,23 @@ static void backupcopy_document_save_cb(GObject *obj, GeanyDocument *doc, gpoint
|
|||||||
gchar *locale_filename_dst;
|
gchar *locale_filename_dst;
|
||||||
gchar *basename_src;
|
gchar *basename_src;
|
||||||
gchar *dir_parts_src;
|
gchar *dir_parts_src;
|
||||||
gchar stamp[512];
|
gchar *stamp;
|
||||||
time_t t = time(NULL);
|
|
||||||
struct tm *now;
|
|
||||||
|
|
||||||
if (! enable_backupcopy)
|
if (! enable_backupcopy)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
now = localtime(&t);
|
locale_filename_src = utils_get_locale_from_utf8(doc->file_name);
|
||||||
locale_filename_src = p_utils->get_locale_from_utf8(doc->file_name);
|
|
||||||
|
|
||||||
if ((src = g_fopen(locale_filename_src, "r")) == NULL)
|
if ((src = g_fopen(locale_filename_src, "r")) == NULL)
|
||||||
{
|
{
|
||||||
/* it's unlikely that this happens */
|
/* it's unlikely that this happens */
|
||||||
p_ui->set_statusbar(FALSE, _("Backup Copy: File could not be read (%s)."),
|
ui_set_statusbar(FALSE, _("Backup Copy: File could not be read (%s)."),
|
||||||
g_strerror(errno));
|
g_strerror(errno));
|
||||||
g_free(locale_filename_src);
|
g_free(locale_filename_src);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
strftime(stamp, sizeof(stamp), backupcopy_time_fmt, now);
|
stamp = utils_get_date_time(backupcopy_time_fmt, NULL);
|
||||||
basename_src = g_path_get_basename(locale_filename_src);
|
basename_src = g_path_get_basename(locale_filename_src);
|
||||||
dir_parts_src = backupcopy_create_dir_parts(locale_filename_src);
|
dir_parts_src = backupcopy_create_dir_parts(locale_filename_src);
|
||||||
locale_filename_dst = g_strconcat(
|
locale_filename_dst = g_strconcat(
|
||||||
@ -228,10 +224,11 @@ static void backupcopy_document_save_cb(GObject *obj, GeanyDocument *doc, gpoint
|
|||||||
|
|
||||||
if ((dst = g_fopen(locale_filename_dst, "wb")) == NULL)
|
if ((dst = g_fopen(locale_filename_dst, "wb")) == NULL)
|
||||||
{
|
{
|
||||||
p_ui->set_statusbar(FALSE, _("Backup Copy: File could not be saved (%s)."),
|
ui_set_statusbar(FALSE, _("Backup Copy: File could not be saved (%s)."),
|
||||||
g_strerror(errno));
|
g_strerror(errno));
|
||||||
g_free(locale_filename_src);
|
g_free(locale_filename_src);
|
||||||
g_free(locale_filename_dst);
|
g_free(locale_filename_dst);
|
||||||
|
g_free(stamp);
|
||||||
fclose(src);
|
fclose(src);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -245,6 +242,7 @@ static void backupcopy_document_save_cb(GObject *obj, GeanyDocument *doc, gpoint
|
|||||||
fclose(dst);
|
fclose(dst);
|
||||||
g_free(locale_filename_src);
|
g_free(locale_filename_src);
|
||||||
g_free(locale_filename_dst);
|
g_free(locale_filename_dst);
|
||||||
|
g_free(stamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -254,12 +252,17 @@ static void instantsave_document_new_cb(GObject *obj, GeanyDocument *doc, gpoint
|
|||||||
{
|
{
|
||||||
gchar *new_filename;
|
gchar *new_filename;
|
||||||
gint fd;
|
gint fd;
|
||||||
GeanyFiletype *ft = p_filetypes->lookup_by_name(instantsave_default_ft);
|
GeanyFiletype *ft = doc->file_type;
|
||||||
|
|
||||||
fd = g_file_open_tmp("gis_XXXXXX", &new_filename, NULL);
|
fd = g_file_open_tmp("gis_XXXXXX", &new_filename, NULL);
|
||||||
if (fd != -1)
|
if (fd != -1)
|
||||||
close(fd); /* close the returned file descriptor as we only need the filename */
|
close(fd); /* close the returned file descriptor as we only need the filename */
|
||||||
|
|
||||||
|
if (ft == NULL)
|
||||||
|
/* ft is NULL when a new file without template was opened, so use the
|
||||||
|
* configured default file type */
|
||||||
|
ft = filetypes_lookup_by_name(instantsave_default_ft);
|
||||||
|
|
||||||
if (ft != NULL)
|
if (ft != NULL)
|
||||||
/* add the filetype's default extension to the new filename */
|
/* add the filetype's default extension to the new filename */
|
||||||
setptr(new_filename, g_strconcat(new_filename, ".", ft->extension, NULL));
|
setptr(new_filename, g_strconcat(new_filename, ".", ft->extension, NULL));
|
||||||
@ -267,10 +270,10 @@ static void instantsave_document_new_cb(GObject *obj, GeanyDocument *doc, gpoint
|
|||||||
doc->file_name = new_filename;
|
doc->file_name = new_filename;
|
||||||
|
|
||||||
if (FILETYPE_ID(doc->file_type) == GEANY_FILETYPES_NONE)
|
if (FILETYPE_ID(doc->file_type) == GEANY_FILETYPES_NONE)
|
||||||
p_document->set_filetype(doc, p_filetypes->lookup_by_name(instantsave_default_ft));
|
document_set_filetype(doc, filetypes_lookup_by_name(instantsave_default_ft));
|
||||||
|
|
||||||
/* force saving the file to enable all the related actions(tab name, filetype, etc.) */
|
/* force saving the file to enable all the related actions(tab name, filetype, etc.) */
|
||||||
p_document->save_file(doc, TRUE);
|
document_save_file(doc, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -286,7 +289,7 @@ PluginCallback plugin_callbacks[] =
|
|||||||
gboolean auto_save(gpointer data)
|
gboolean auto_save(gpointer data)
|
||||||
{
|
{
|
||||||
GeanyDocument *doc;
|
GeanyDocument *doc;
|
||||||
GeanyDocument *cur_doc = p_document->get_current();
|
GeanyDocument *cur_doc = document_get_current();
|
||||||
gint i, max = gtk_notebook_get_n_pages(GTK_NOTEBOOK(geany->main_widgets->notebook));
|
gint i, max = gtk_notebook_get_n_pages(GTK_NOTEBOOK(geany->main_widgets->notebook));
|
||||||
gint saved_files = 0;
|
gint saved_files = 0;
|
||||||
|
|
||||||
@ -297,22 +300,22 @@ gboolean auto_save(gpointer data)
|
|||||||
{
|
{
|
||||||
for (i = 0; i < max; i++)
|
for (i = 0; i < max; i++)
|
||||||
{
|
{
|
||||||
doc = p_document->get_from_page(i);
|
doc = document_get_from_page(i);
|
||||||
|
|
||||||
/* skip current file to save it lastly, skip files without name */
|
/* skip current file to save it lastly, skip files without name */
|
||||||
if (doc != cur_doc && cur_doc->file_name != NULL)
|
if (doc != cur_doc && cur_doc->file_name != NULL)
|
||||||
if (p_document->save_file(doc, FALSE))
|
if (document_save_file(doc, FALSE))
|
||||||
saved_files++;
|
saved_files++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* finally save current file, do it after all other files to get correct window title and
|
/* finally save current file, do it after all other files to get correct window title and
|
||||||
* symbol list */
|
* symbol list */
|
||||||
if (cur_doc->file_name != NULL)
|
if (cur_doc->file_name != NULL)
|
||||||
if (p_document->save_file(cur_doc, FALSE))
|
if (document_save_file(cur_doc, FALSE))
|
||||||
saved_files++;
|
saved_files++;
|
||||||
|
|
||||||
if (saved_files > 0 && autosave_print_msg)
|
if (saved_files > 0 && autosave_print_msg)
|
||||||
p_ui->set_statusbar(FALSE, ngettext(
|
ui_set_statusbar(FALSE, ngettext(
|
||||||
"Autosave: Saved %d file automatically.",
|
"Autosave: Saved %d file automatically.",
|
||||||
"Autosave: Saved %d files automatically.", saved_files),
|
"Autosave: Saved %d files automatically.", saved_files),
|
||||||
saved_files);
|
saved_files);
|
||||||
@ -342,27 +345,27 @@ void plugin_init(GeanyData *data)
|
|||||||
|
|
||||||
g_key_file_load_from_file(config, config_file, G_KEY_FILE_NONE, NULL);
|
g_key_file_load_from_file(config, config_file, G_KEY_FILE_NONE, NULL);
|
||||||
|
|
||||||
enable_autosave = p_utils->get_setting_boolean(
|
enable_autosave = utils_get_setting_boolean(
|
||||||
config, "saveactions", "enable_autosave", FALSE);
|
config, "saveactions", "enable_autosave", FALSE);
|
||||||
enable_instantsave = p_utils->get_setting_boolean(
|
enable_instantsave = utils_get_setting_boolean(
|
||||||
config, "saveactions", "enable_instantsave", FALSE);
|
config, "saveactions", "enable_instantsave", FALSE);
|
||||||
enable_backupcopy = p_utils->get_setting_boolean(
|
enable_backupcopy = utils_get_setting_boolean(
|
||||||
config, "saveactions", "enable_backupcopy", FALSE);
|
config, "saveactions", "enable_backupcopy", FALSE);
|
||||||
|
|
||||||
instantsave_default_ft = p_utils->get_setting_string(config, "instantsave", "default_ft",
|
instantsave_default_ft = utils_get_setting_string(config, "instantsave", "default_ft",
|
||||||
filetypes[GEANY_FILETYPES_NONE]->name);
|
filetypes_index(GEANY_FILETYPES_NONE)->name);
|
||||||
|
|
||||||
autosave_src_id = G_MAXUINT; /* mark as invalid */
|
autosave_src_id = G_MAXUINT; /* mark as invalid */
|
||||||
autosave_interval = p_utils->get_setting_integer(config, "autosave", "interval", 300);
|
autosave_interval = utils_get_setting_integer(config, "autosave", "interval", 300);
|
||||||
autosave_print_msg = p_utils->get_setting_boolean(config, "autosave", "print_messages", FALSE);
|
autosave_print_msg = utils_get_setting_boolean(config, "autosave", "print_messages", FALSE);
|
||||||
autosave_save_all = p_utils->get_setting_boolean(config, "autosave", "save_all", FALSE);
|
autosave_save_all = utils_get_setting_boolean(config, "autosave", "save_all", FALSE);
|
||||||
if (enable_autosave)
|
if (enable_autosave)
|
||||||
autosave_set_timeout();
|
autosave_set_timeout();
|
||||||
|
|
||||||
backupcopy_dir_levels = p_utils->get_setting_integer(config, "backupcopy", "dir_levels", 0);
|
backupcopy_dir_levels = utils_get_setting_integer(config, "backupcopy", "dir_levels", 0);
|
||||||
backupcopy_time_fmt = p_utils->get_setting_string(
|
backupcopy_time_fmt = utils_get_setting_string(
|
||||||
config, "backupcopy", "time_fmt", "%Y-%m-%d-%H-%M-%S");
|
config, "backupcopy", "time_fmt", "%Y-%m-%d-%H-%M-%S");
|
||||||
tmp = p_utils->get_setting_string(config, "backupcopy", "backup_dir", g_get_tmp_dir());
|
tmp = utils_get_setting_string(config, "backupcopy", "backup_dir", g_get_tmp_dir());
|
||||||
backupcopy_set_backup_dir(tmp);
|
backupcopy_set_backup_dir(tmp);
|
||||||
|
|
||||||
g_key_file_free(config);
|
g_key_file_free(config);
|
||||||
@ -387,7 +390,7 @@ static void backupcopy_dir_button_clicked_cb(GtkButton *button, gpointer item)
|
|||||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||||
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL);
|
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL);
|
||||||
|
|
||||||
text = p_utils->get_locale_from_utf8(gtk_entry_get_text(GTK_ENTRY(item)));
|
text = utils_get_locale_from_utf8(gtk_entry_get_text(GTK_ENTRY(item)));
|
||||||
if (NZV(text))
|
if (NZV(text))
|
||||||
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), text);
|
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), text);
|
||||||
|
|
||||||
@ -397,7 +400,7 @@ static void backupcopy_dir_button_clicked_cb(GtkButton *button, gpointer item)
|
|||||||
gchar *utf8_filename, *tmp;
|
gchar *utf8_filename, *tmp;
|
||||||
|
|
||||||
tmp = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
|
tmp = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
|
||||||
utf8_filename = p_utils->get_utf8_from_locale(tmp);
|
utf8_filename = utils_get_utf8_from_locale(tmp);
|
||||||
|
|
||||||
gtk_entry_set_text(GTK_ENTRY(item), utf8_filename);
|
gtk_entry_set_text(GTK_ENTRY(item), utf8_filename);
|
||||||
|
|
||||||
@ -452,7 +455,8 @@ static void configure_response_cb(GtkDialog *dialog, gint response, G_GNUC_UNUSE
|
|||||||
g_key_file_set_boolean(config, "autosave", "save_all", autosave_save_all);
|
g_key_file_set_boolean(config, "autosave", "save_all", autosave_save_all);
|
||||||
g_key_file_set_integer(config, "autosave", "interval", autosave_interval);
|
g_key_file_set_integer(config, "autosave", "interval", autosave_interval);
|
||||||
|
|
||||||
g_key_file_set_string(config, "instantsave", "default_ft", instantsave_default_ft);
|
if (instantsave_default_ft != NULL)
|
||||||
|
g_key_file_set_string(config, "instantsave", "default_ft", instantsave_default_ft);
|
||||||
|
|
||||||
g_key_file_set_integer(config, "backupcopy", "dir_levels", backupcopy_dir_levels);
|
g_key_file_set_integer(config, "backupcopy", "dir_levels", backupcopy_dir_levels);
|
||||||
g_key_file_set_string(config, "backupcopy", "time_fmt", text_time);
|
g_key_file_set_string(config, "backupcopy", "time_fmt", text_time);
|
||||||
@ -463,21 +467,21 @@ static void configure_response_cb(GtkDialog *dialog, gint response, G_GNUC_UNUSE
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
p_dialogs->show_msgbox(GTK_MESSAGE_ERROR,
|
dialogs_show_msgbox(GTK_MESSAGE_ERROR,
|
||||||
_("Backup directory does not exist or is not writable."));
|
_("Backup directory does not exist or is not writable."));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (! g_file_test(config_dir, G_FILE_TEST_IS_DIR) && p_utils->mkdir(config_dir, TRUE) != 0)
|
if (! g_file_test(config_dir, G_FILE_TEST_IS_DIR) && utils_mkdir(config_dir, TRUE) != 0)
|
||||||
{
|
{
|
||||||
p_dialogs->show_msgbox(GTK_MESSAGE_ERROR,
|
dialogs_show_msgbox(GTK_MESSAGE_ERROR,
|
||||||
_("Plugin configuration directory could not be created."));
|
_("Plugin configuration directory could not be created."));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* write config to file */
|
/* write config to file */
|
||||||
str = g_key_file_to_data(config, NULL, NULL);
|
str = g_key_file_to_data(config, NULL, NULL);
|
||||||
p_utils->write_file(config_file, str);
|
utils_write_file(config_file, str);
|
||||||
g_free(str);
|
g_free(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -620,11 +624,13 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
|
|||||||
gtk_box_pack_start(GTK_BOX(inner_vbox), label, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(inner_vbox), label, FALSE, FALSE, 0);
|
||||||
|
|
||||||
pref_widgets.instantsave_ft_combo = combo = gtk_combo_box_new_text();
|
pref_widgets.instantsave_ft_combo = combo = gtk_combo_box_new_text();
|
||||||
for (i = 0; i < filetypes_array->len; i++)
|
for (i = 0; i < geany->filetypes_array->len; i++)
|
||||||
{
|
{
|
||||||
gtk_combo_box_append_text(GTK_COMBO_BOX(combo), filetypes[i]->name);
|
GeanyFiletype *ft = filetypes_index(i);
|
||||||
|
|
||||||
if (p_utils->str_equal(filetypes[i]->name, instantsave_default_ft))
|
gtk_combo_box_append_text(GTK_COMBO_BOX(combo), ft->name);
|
||||||
|
|
||||||
|
if (utils_str_equal(ft->name, instantsave_default_ft))
|
||||||
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), i);
|
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), i);
|
||||||
}
|
}
|
||||||
gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(combo), 3);
|
gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(combo), 3);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* splitwindow.c - this file is part of Geany, a fast and lightweight IDE
|
* splitwindow.c - this file is part of Geany, a fast and lightweight IDE
|
||||||
*
|
*
|
||||||
* Copyright 2008 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
* Copyright 2008-2009 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||||
* Copyright 2008 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
* Copyright 2008-2009 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -25,7 +25,7 @@
|
|||||||
/* Split Window plugin. */
|
/* Split Window plugin. */
|
||||||
|
|
||||||
#include "geany.h"
|
#include "geany.h"
|
||||||
#include <glib/gi18n.h>
|
#include "support.h"
|
||||||
#include "Scintilla.h"
|
#include "Scintilla.h"
|
||||||
#include "ScintillaWidget.h"
|
#include "ScintillaWidget.h"
|
||||||
#include "SciLexer.h"
|
#include "SciLexer.h"
|
||||||
@ -34,22 +34,35 @@
|
|||||||
#include "document.h"
|
#include "document.h"
|
||||||
#include "editor.h"
|
#include "editor.h"
|
||||||
#include "plugindata.h"
|
#include "plugindata.h"
|
||||||
#include "pluginmacros.h"
|
#include "keybindings.h"
|
||||||
|
#include "geanyfunctions.h"
|
||||||
|
|
||||||
|
|
||||||
PLUGIN_VERSION_CHECK(76)
|
PLUGIN_VERSION_CHECK(GEANY_API_VERSION)
|
||||||
PLUGIN_SET_INFO(_("Split Window"), _("Splits the editor view into two windows."),
|
PLUGIN_SET_INFO(_("Split Window"), _("Splits the editor view into two windows."),
|
||||||
"0.1", _("The Geany developer team"))
|
"0.1", _("The Geany developer team"))
|
||||||
|
|
||||||
|
|
||||||
GeanyData *geany_data;
|
GeanyData *geany_data;
|
||||||
GeanyFunctions *geany_functions;
|
GeanyFunctions *geany_functions;
|
||||||
PluginFields *plugin_fields;
|
|
||||||
|
|
||||||
|
/* Keybinding(s) */
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
KB_SPLIT_HORIZONTAL,
|
||||||
|
KB_SPLIT_VERTICAL,
|
||||||
|
KB_SPLIT_UNSPLIT,
|
||||||
|
KB_COUNT
|
||||||
|
};
|
||||||
|
|
||||||
|
PLUGIN_KEY_GROUP(split_window, KB_COUNT);
|
||||||
|
|
||||||
|
|
||||||
enum State
|
enum State
|
||||||
{
|
{
|
||||||
STATE_SPLIT_HORIZONTAL,
|
STATE_SPLIT_HORIZONTAL,
|
||||||
/* STATE_SPLIT_VERTICAL, */
|
STATE_SPLIT_VERTICAL,
|
||||||
STATE_UNSPLIT,
|
STATE_UNSPLIT,
|
||||||
STATE_COUNT
|
STATE_COUNT
|
||||||
};
|
};
|
||||||
@ -58,6 +71,7 @@ static struct
|
|||||||
{
|
{
|
||||||
GtkWidget *main;
|
GtkWidget *main;
|
||||||
GtkWidget *horizontal;
|
GtkWidget *horizontal;
|
||||||
|
GtkWidget *vertical;
|
||||||
GtkWidget *unsplit;
|
GtkWidget *unsplit;
|
||||||
}
|
}
|
||||||
menu_items;
|
menu_items;
|
||||||
@ -82,7 +96,7 @@ static void on_unsplit(GtkMenuItem *menuitem, gpointer user_data);
|
|||||||
|
|
||||||
static gint sci_get_value(ScintillaObject *sci, gint message_id, gint param)
|
static gint sci_get_value(ScintillaObject *sci, gint message_id, gint param)
|
||||||
{
|
{
|
||||||
return p_sci->send_message(sci, message_id, param, 0);
|
return scintilla_send_message(sci, message_id, param, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -95,13 +109,13 @@ static void set_styles(ScintillaObject *oldsci, ScintillaObject *newsci)
|
|||||||
gint val;
|
gint val;
|
||||||
|
|
||||||
val = sci_get_value(oldsci, SCI_STYLEGETFORE, style_id);
|
val = sci_get_value(oldsci, SCI_STYLEGETFORE, style_id);
|
||||||
p_sci->send_message(newsci, SCI_STYLESETFORE, style_id, val);
|
scintilla_send_message(newsci, SCI_STYLESETFORE, style_id, val);
|
||||||
val = sci_get_value(oldsci, SCI_STYLEGETBACK, style_id);
|
val = sci_get_value(oldsci, SCI_STYLEGETBACK, style_id);
|
||||||
p_sci->send_message(newsci, SCI_STYLESETBACK, style_id, val);
|
scintilla_send_message(newsci, SCI_STYLESETBACK, style_id, val);
|
||||||
val = sci_get_value(oldsci, SCI_STYLEGETBOLD, style_id);
|
val = sci_get_value(oldsci, SCI_STYLEGETBOLD, style_id);
|
||||||
p_sci->send_message(newsci, SCI_STYLESETBOLD, style_id, val);
|
scintilla_send_message(newsci, SCI_STYLESETBOLD, style_id, val);
|
||||||
val = sci_get_value(oldsci, SCI_STYLEGETITALIC, style_id);
|
val = sci_get_value(oldsci, SCI_STYLEGETITALIC, style_id);
|
||||||
p_sci->send_message(newsci, SCI_STYLESETITALIC, style_id, val);
|
scintilla_send_message(newsci, SCI_STYLESETITALIC, style_id, val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,8 +123,8 @@ static void set_styles(ScintillaObject *oldsci, ScintillaObject *newsci)
|
|||||||
static void sci_set_font(ScintillaObject *sci, gint style, const gchar *font,
|
static void sci_set_font(ScintillaObject *sci, gint style, const gchar *font,
|
||||||
gint size)
|
gint size)
|
||||||
{
|
{
|
||||||
p_sci->send_message(sci, SCI_STYLESETFONT, style, (sptr_t) font);
|
scintilla_send_message(sci, SCI_STYLESETFONT, style, (sptr_t) font);
|
||||||
p_sci->send_message(sci, SCI_STYLESETSIZE, style, size);
|
scintilla_send_message(sci, SCI_STYLESETSIZE, style, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -120,7 +134,7 @@ static void update_font(ScintillaObject *current, ScintillaObject *sci)
|
|||||||
gint size;
|
gint size;
|
||||||
gchar font_name[1024]; /* should be big enough */
|
gchar font_name[1024]; /* should be big enough */
|
||||||
|
|
||||||
p_sci->send_message(current, SCI_STYLEGETFONT, 0, (sptr_t)font_name);
|
scintilla_send_message(current, SCI_STYLEGETFONT, 0, (sptr_t)font_name);
|
||||||
size = sci_get_value(current, SCI_STYLEGETSIZE, 0);
|
size = sci_get_value(current, SCI_STYLEGETSIZE, 0);
|
||||||
|
|
||||||
for (style_id = 0; style_id <= 127; style_id++)
|
for (style_id = 0; style_id <= 127; style_id++)
|
||||||
@ -141,16 +155,16 @@ static void set_line_numbers(ScintillaObject * sci, gboolean set, gint extra_wid
|
|||||||
if (set)
|
if (set)
|
||||||
{
|
{
|
||||||
gchar tmp_str[15];
|
gchar tmp_str[15];
|
||||||
gint len = p_sci->send_message(sci, SCI_GETLINECOUNT, 0, 0);
|
gint len = scintilla_send_message(sci, SCI_GETLINECOUNT, 0, 0);
|
||||||
gint width;
|
gint width;
|
||||||
g_snprintf(tmp_str, 15, "_%d%d", len, extra_width);
|
g_snprintf(tmp_str, 15, "_%d%d", len, extra_width);
|
||||||
width = p_sci->send_message(sci, SCI_TEXTWIDTH, STYLE_LINENUMBER, (sptr_t) tmp_str);
|
width = scintilla_send_message(sci, SCI_TEXTWIDTH, STYLE_LINENUMBER, (sptr_t) tmp_str);
|
||||||
p_sci->send_message(sci, SCI_SETMARGINWIDTHN, 0, width);
|
scintilla_send_message(sci, SCI_SETMARGINWIDTHN, 0, width);
|
||||||
p_sci->send_message(sci, SCI_SETMARGINSENSITIVEN, 0, FALSE); /* use default behaviour */
|
scintilla_send_message(sci, SCI_SETMARGINSENSITIVEN, 0, FALSE); /* use default behaviour */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
p_sci->send_message(sci, SCI_SETMARGINWIDTHN, 0, 0 );
|
scintilla_send_message(sci, SCI_SETMARGINWIDTHN, 0, 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,20 +176,20 @@ static void sync_to_current(ScintillaObject *sci, ScintillaObject *current)
|
|||||||
gint pos;
|
gint pos;
|
||||||
|
|
||||||
/* set the new sci widget to view the existing Scintilla document */
|
/* set the new sci widget to view the existing Scintilla document */
|
||||||
sdoc = (gpointer) p_sci->send_message(current, SCI_GETDOCPOINTER, 0, 0);
|
sdoc = (gpointer) scintilla_send_message(current, SCI_GETDOCPOINTER, 0, 0);
|
||||||
p_sci->send_message(sci, SCI_SETDOCPOINTER, 0, GPOINTER_TO_INT(sdoc));
|
scintilla_send_message(sci, SCI_SETDOCPOINTER, 0, (sptr_t) sdoc);
|
||||||
|
|
||||||
update_font(current, sci);
|
update_font(current, sci);
|
||||||
lexer = p_sci->send_message(current, SCI_GETLEXER, 0, 0);
|
lexer = scintilla_send_message(current, SCI_GETLEXER, 0, 0);
|
||||||
p_sci->send_message(sci, SCI_SETLEXER, lexer, 0);
|
scintilla_send_message(sci, SCI_SETLEXER, lexer, 0);
|
||||||
set_styles(current, sci);
|
set_styles(current, sci);
|
||||||
|
|
||||||
pos = p_sci->get_current_position(current);
|
pos = sci_get_current_position(current);
|
||||||
p_sci->set_current_position(sci, pos, TRUE);
|
sci_set_current_position(sci, pos, TRUE);
|
||||||
|
|
||||||
/* override some defaults */
|
/* override some defaults */
|
||||||
set_line_numbers(sci, TRUE, 0);
|
set_line_numbers(sci, TRUE, 0);
|
||||||
p_sci->send_message(sci, SCI_SETMARGINWIDTHN, 1, 0 ); /* hide marker margin */
|
scintilla_send_message(sci, SCI_SETMARGINWIDTHN, 1, 0 ); /* hide marker margin */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -188,7 +202,7 @@ static void set_editor(EditWindow *editwin, GeanyEditor *editor)
|
|||||||
if (editwin->sci != NULL)
|
if (editwin->sci != NULL)
|
||||||
gtk_widget_destroy(GTK_WIDGET(editwin->sci));
|
gtk_widget_destroy(GTK_WIDGET(editwin->sci));
|
||||||
|
|
||||||
editwin->sci = p_editor->create_widget(editor);
|
editwin->sci = editor_create_widget(editor);
|
||||||
gtk_widget_show(GTK_WIDGET(editwin->sci));
|
gtk_widget_show(GTK_WIDGET(editwin->sci));
|
||||||
gtk_container_add(GTK_CONTAINER(editwin->vbox), GTK_WIDGET(editwin->sci));
|
gtk_container_add(GTK_CONTAINER(editwin->vbox), GTK_WIDGET(editwin->sci));
|
||||||
|
|
||||||
@ -201,7 +215,9 @@ static void set_editor(EditWindow *editwin, GeanyEditor *editor)
|
|||||||
static void set_state(enum State id)
|
static void set_state(enum State id)
|
||||||
{
|
{
|
||||||
gtk_widget_set_sensitive(menu_items.horizontal,
|
gtk_widget_set_sensitive(menu_items.horizontal,
|
||||||
id != STATE_SPLIT_HORIZONTAL);
|
(id != STATE_SPLIT_HORIZONTAL) && (id != STATE_SPLIT_VERTICAL));
|
||||||
|
gtk_widget_set_sensitive(menu_items.vertical,
|
||||||
|
(id != STATE_SPLIT_HORIZONTAL) && (id != STATE_SPLIT_VERTICAL));
|
||||||
gtk_widget_set_sensitive(menu_items.unsplit,
|
gtk_widget_set_sensitive(menu_items.unsplit,
|
||||||
id != STATE_UNSPLIT);
|
id != STATE_UNSPLIT);
|
||||||
|
|
||||||
@ -212,12 +228,10 @@ static void set_state(enum State id)
|
|||||||
static GtkWidget *create_tool_button(const gchar *label, const gchar *stock_id)
|
static GtkWidget *create_tool_button(const gchar *label, const gchar *stock_id)
|
||||||
{
|
{
|
||||||
GtkToolItem *item;
|
GtkToolItem *item;
|
||||||
GtkTooltips *tooltips = GTK_TOOLTIPS(p_support->lookup_widget(
|
|
||||||
geany->main_widgets->window, "tooltips"));
|
|
||||||
|
|
||||||
item = gtk_tool_button_new(NULL, label);
|
item = gtk_tool_button_new(NULL, label);
|
||||||
gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(item), stock_id);
|
gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(item), stock_id);
|
||||||
gtk_tool_item_set_tooltip(item, tooltips, label, NULL);
|
ui_widget_set_tooltip_text(GTK_WIDGET(item), label);
|
||||||
|
|
||||||
return GTK_WIDGET(item);
|
return GTK_WIDGET(item);
|
||||||
}
|
}
|
||||||
@ -225,7 +239,7 @@ static GtkWidget *create_tool_button(const gchar *label, const gchar *stock_id)
|
|||||||
|
|
||||||
static void on_refresh(void)
|
static void on_refresh(void)
|
||||||
{
|
{
|
||||||
GeanyDocument *doc = p_document->get_current();
|
GeanyDocument *doc = document_get_current();
|
||||||
|
|
||||||
g_return_if_fail(doc);
|
g_return_if_fail(doc);
|
||||||
g_return_if_fail(edit_window.sci);
|
g_return_if_fail(edit_window.sci);
|
||||||
@ -276,25 +290,26 @@ static GtkWidget *create_toolbar(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void on_split_view(GtkMenuItem *menuitem, gpointer user_data)
|
static void split_view(gboolean horizontal)
|
||||||
{
|
{
|
||||||
GtkWidget *notebook = geany_data->main_widgets->notebook;
|
GtkWidget *notebook = geany_data->main_widgets->notebook;
|
||||||
GtkWidget *parent = gtk_widget_get_parent(notebook);
|
GtkWidget *parent = gtk_widget_get_parent(notebook);
|
||||||
GtkWidget *pane, *toolbar, *box;
|
GtkWidget *pane, *toolbar, *box;
|
||||||
GeanyDocument *doc = p_document->get_current();
|
GeanyDocument *doc = document_get_current();
|
||||||
gint width = notebook->allocation.width / 2;
|
gint width = notebook->allocation.width / 2;
|
||||||
|
gint height = notebook->allocation.height / 2;
|
||||||
set_state(STATE_SPLIT_HORIZONTAL);
|
|
||||||
|
|
||||||
g_return_if_fail(doc);
|
g_return_if_fail(doc);
|
||||||
g_return_if_fail(edit_window.editor == NULL);
|
g_return_if_fail(edit_window.editor == NULL);
|
||||||
|
|
||||||
|
set_state(horizontal ? STATE_SPLIT_HORIZONTAL : STATE_SPLIT_VERTICAL);
|
||||||
|
|
||||||
/* temporarily put document notebook in main vbox (scintilla widgets must stay
|
/* temporarily put document notebook in main vbox (scintilla widgets must stay
|
||||||
* in a visible parent window, otherwise there are X selection and scrollbar issues) */
|
* in a visible parent window, otherwise there are X selection and scrollbar issues) */
|
||||||
gtk_widget_reparent(notebook,
|
gtk_widget_reparent(notebook,
|
||||||
p_support->lookup_widget(geany->main_widgets->window, "vbox1"));
|
ui_lookup_widget(geany->main_widgets->window, "vbox1"));
|
||||||
|
|
||||||
pane = gtk_hpaned_new();
|
pane = horizontal ? gtk_hpaned_new() : gtk_vpaned_new();
|
||||||
gtk_container_add(GTK_CONTAINER(parent), pane);
|
gtk_container_add(GTK_CONTAINER(parent), pane);
|
||||||
gtk_widget_reparent(notebook, pane);
|
gtk_widget_reparent(notebook, pane);
|
||||||
|
|
||||||
@ -306,11 +321,30 @@ static void on_split_view(GtkMenuItem *menuitem, gpointer user_data)
|
|||||||
|
|
||||||
set_editor(&edit_window, doc->editor);
|
set_editor(&edit_window, doc->editor);
|
||||||
|
|
||||||
gtk_paned_set_position(GTK_PANED(pane), width);
|
if (horizontal)
|
||||||
|
{
|
||||||
|
gtk_paned_set_position(GTK_PANED(pane), width);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gtk_paned_set_position(GTK_PANED(pane), height);
|
||||||
|
}
|
||||||
gtk_widget_show_all(pane);
|
gtk_widget_show_all(pane);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void on_split_horizontally(GtkMenuItem *menuitem, gpointer user_data)
|
||||||
|
{
|
||||||
|
split_view(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void on_split_vertically(GtkMenuItem *menuitem, gpointer user_data)
|
||||||
|
{
|
||||||
|
split_view(FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void on_unsplit(GtkMenuItem *menuitem, gpointer user_data)
|
static void on_unsplit(GtkMenuItem *menuitem, gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkWidget *notebook = geany_data->main_widgets->notebook;
|
GtkWidget *notebook = geany_data->main_widgets->notebook;
|
||||||
@ -324,7 +358,7 @@ static void on_unsplit(GtkMenuItem *menuitem, gpointer user_data)
|
|||||||
/* temporarily put document notebook in main vbox (scintilla widgets must stay
|
/* temporarily put document notebook in main vbox (scintilla widgets must stay
|
||||||
* in a visible parent window, otherwise there are X selection and scrollbar issues) */
|
* in a visible parent window, otherwise there are X selection and scrollbar issues) */
|
||||||
gtk_widget_reparent(notebook,
|
gtk_widget_reparent(notebook,
|
||||||
p_support->lookup_widget(geany->main_widgets->window, "vbox1"));
|
ui_lookup_widget(geany->main_widgets->window, "vbox1"));
|
||||||
|
|
||||||
gtk_widget_destroy(pane);
|
gtk_widget_destroy(pane);
|
||||||
edit_window.editor = NULL;
|
edit_window.editor = NULL;
|
||||||
@ -333,21 +367,45 @@ static void on_unsplit(GtkMenuItem *menuitem, gpointer user_data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void kb_activate(guint key_id)
|
||||||
|
{
|
||||||
|
switch (key_id)
|
||||||
|
{
|
||||||
|
case KB_SPLIT_HORIZONTAL:
|
||||||
|
if (plugin_state == STATE_UNSPLIT)
|
||||||
|
split_view(TRUE);
|
||||||
|
break;
|
||||||
|
case KB_SPLIT_VERTICAL:
|
||||||
|
if (plugin_state == STATE_UNSPLIT)
|
||||||
|
split_view(FALSE);
|
||||||
|
break;
|
||||||
|
case KB_SPLIT_UNSPLIT:
|
||||||
|
if (plugin_state != STATE_UNSPLIT)
|
||||||
|
on_unsplit(NULL, NULL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void plugin_init(GeanyData *data)
|
void plugin_init(GeanyData *data)
|
||||||
{
|
{
|
||||||
GtkWidget *item, *menu;
|
GtkWidget *item, *menu;
|
||||||
|
|
||||||
menu_items.main = item = gtk_menu_item_new_with_mnemonic(_("_Split Window"));
|
menu_items.main = item = gtk_menu_item_new_with_mnemonic(_("_Split Window"));
|
||||||
gtk_menu_append(geany_data->main_widgets->tools_menu, menu_items.main);
|
gtk_menu_append(geany_data->main_widgets->tools_menu, item);
|
||||||
plugin_fields->menu_item = item;
|
ui_add_document_sensitive(item);
|
||||||
plugin_fields->flags = PLUGIN_IS_DOCUMENT_SENSITIVE;
|
|
||||||
|
|
||||||
menu = gtk_menu_new();
|
menu = gtk_menu_new();
|
||||||
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_items.main), menu);
|
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_items.main), menu);
|
||||||
|
|
||||||
menu_items.horizontal = item =
|
menu_items.horizontal = item =
|
||||||
gtk_menu_item_new_with_mnemonic(_("_Horizontally"));
|
gtk_menu_item_new_with_mnemonic(_("_Horizontally"));
|
||||||
g_signal_connect(item, "activate", G_CALLBACK(on_split_view), NULL);
|
g_signal_connect(item, "activate", G_CALLBACK(on_split_horizontally), NULL);
|
||||||
|
gtk_menu_append(menu, item);
|
||||||
|
|
||||||
|
menu_items.vertical = item =
|
||||||
|
gtk_menu_item_new_with_mnemonic(_("_Vertically"));
|
||||||
|
g_signal_connect(item, "activate", G_CALLBACK(on_split_vertically), NULL);
|
||||||
gtk_menu_append(menu, item);
|
gtk_menu_append(menu, item);
|
||||||
|
|
||||||
menu_items.unsplit = item =
|
menu_items.unsplit = item =
|
||||||
@ -358,6 +416,14 @@ void plugin_init(GeanyData *data)
|
|||||||
gtk_widget_show_all(menu_items.main);
|
gtk_widget_show_all(menu_items.main);
|
||||||
|
|
||||||
set_state(STATE_UNSPLIT);
|
set_state(STATE_UNSPLIT);
|
||||||
|
|
||||||
|
/* setup keybindings */
|
||||||
|
keybindings_set_item(plugin_key_group, KB_SPLIT_HORIZONTAL, kb_activate,
|
||||||
|
0, 0, "split_horizontal", _("Split Horizontally"), menu_items.horizontal);
|
||||||
|
keybindings_set_item(plugin_key_group, KB_SPLIT_VERTICAL, kb_activate,
|
||||||
|
0, 0, "split_vertical", _("Split Vertically"), menu_items.vertical);
|
||||||
|
keybindings_set_item(plugin_key_group, KB_SPLIT_UNSPLIT, kb_activate,
|
||||||
|
0, 0, "split_unsplit", _("Unsplit"), menu_items.unsplit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -385,7 +451,7 @@ PluginCallback plugin_callbacks[] =
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void plugin_cleanup()
|
void plugin_cleanup(void)
|
||||||
{
|
{
|
||||||
if (plugin_state != STATE_UNSPLIT)
|
if (plugin_state != STATE_UNSPLIT)
|
||||||
on_unsplit(NULL, NULL);
|
on_unsplit(NULL, NULL);
|
||||||
|
547
plugins/vcdiff.c
@ -1,547 +0,0 @@
|
|||||||
/*
|
|
||||||
* vcdiff.c - this file is part of Geany, a fast and lightweight IDE
|
|
||||||
*
|
|
||||||
* Copyright 2007-2008 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
|
||||||
* Copyright 2007-2008 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
|
||||||
* Copyright 2007-2008 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
|
||||||
* Copyright 2007-2008 Yura Siamashka <yurand2(at)gmail(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
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Version Diff plugin */
|
|
||||||
/* This small plugin uses svn/git/etc. to generate a diff against the current
|
|
||||||
* version inside version control.
|
|
||||||
* Which VC program to use is detected by looking for a version control subdirectory,
|
|
||||||
* e.g. ".svn". */
|
|
||||||
|
|
||||||
#include "geany.h"
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "support.h"
|
|
||||||
#include "plugindata.h"
|
|
||||||
#include "document.h"
|
|
||||||
#include "editor.h"
|
|
||||||
#include "filetypes.h"
|
|
||||||
#include "utils.h"
|
|
||||||
#include "project.h"
|
|
||||||
#include "ui_utils.h"
|
|
||||||
#include "pluginmacros.h"
|
|
||||||
|
|
||||||
#define project geany->app->project
|
|
||||||
|
|
||||||
|
|
||||||
PluginFields *plugin_fields;
|
|
||||||
GeanyData *geany_data;
|
|
||||||
GeanyFunctions *geany_functions;
|
|
||||||
|
|
||||||
|
|
||||||
PLUGIN_VERSION_CHECK(69)
|
|
||||||
|
|
||||||
PLUGIN_SET_INFO(_("Version Diff"), _("Creates a patch of a file against version control."), VERSION,
|
|
||||||
_("The Geany developer team"))
|
|
||||||
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
VC_COMMAND_DIFF_FILE,
|
|
||||||
VC_COMMAND_DIFF_DIR,
|
|
||||||
VC_COMMAND_DIFF_PROJECT
|
|
||||||
};
|
|
||||||
|
|
||||||
/* The addresses of these strings act as enums, their contents are not used. */
|
|
||||||
static const gchar DIRNAME[] = "*DIRNAME*";
|
|
||||||
static const gchar FILENAME[] = "*FILENAME*";
|
|
||||||
static const gchar BASE_FILENAME[] = "*BASE_FILENAME*";
|
|
||||||
|
|
||||||
|
|
||||||
static const gchar* SVN_CMD_DIFF_FILE[] = {"svn", "diff", "--non-interactive", FILENAME, NULL};
|
|
||||||
static const gchar* SVN_CMD_DIFF_DIR[] = {"svn", "diff", "--non-interactive", DIRNAME, NULL};
|
|
||||||
static const gchar* SVN_CMD_DIFF_PROJECT[] = {"svn", "diff", "--non-interactive", DIRNAME, NULL};
|
|
||||||
|
|
||||||
static void* SVN_COMMANDS[] = { SVN_CMD_DIFF_FILE, SVN_CMD_DIFF_DIR, SVN_CMD_DIFF_PROJECT };
|
|
||||||
|
|
||||||
|
|
||||||
static const gchar* CVS_CMD_DIFF_FILE[] = {"cvs", "diff", "-u", BASE_FILENAME, NULL};
|
|
||||||
static const gchar* CVS_CMD_DIFF_DIR[] = {"cvs", "diff", "-u",NULL};
|
|
||||||
static const gchar* CVS_CMD_DIFF_PROJECT[] = {"cvs", "diff", "-u", NULL};
|
|
||||||
|
|
||||||
static void* CVS_COMMANDS[] = { CVS_CMD_DIFF_FILE, CVS_CMD_DIFF_DIR, CVS_CMD_DIFF_PROJECT };
|
|
||||||
|
|
||||||
|
|
||||||
static const gchar* GIT_CMD_DIFF_FILE[] = {"git", "diff", "HEAD", "--", BASE_FILENAME, NULL};
|
|
||||||
static const gchar* GIT_CMD_DIFF_DIR[] = {"git", "diff", "HEAD", NULL};
|
|
||||||
static const gchar* GIT_CMD_DIFF_PROJECT[] = {"git", "diff", "HEAD", NULL};
|
|
||||||
|
|
||||||
static const gchar* GIT_ENV_DIFF_FILE[] = {"PAGER=cat", NULL};
|
|
||||||
static const gchar* GIT_ENV_DIFF_DIR[] = {"PAGER=cat", NULL};
|
|
||||||
static const gchar* GIT_ENV_DIFF_PROJECT[] = {"PAGER=cat", NULL};
|
|
||||||
|
|
||||||
static void* GIT_COMMANDS[] = { GIT_CMD_DIFF_FILE, GIT_CMD_DIFF_DIR, GIT_CMD_DIFF_PROJECT };
|
|
||||||
static void* GIT_ENV[] = { GIT_ENV_DIFF_FILE, GIT_ENV_DIFF_DIR, GIT_ENV_DIFF_PROJECT };
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct VC_RECORD
|
|
||||||
{
|
|
||||||
void** commands;
|
|
||||||
void** envs;
|
|
||||||
const gchar *program;
|
|
||||||
const gchar *subdir; /* version control subdirectory, e.g. ".svn" */
|
|
||||||
gboolean check_parents; /* check parent dirs to find subdir */
|
|
||||||
} VC_RECORD;
|
|
||||||
|
|
||||||
|
|
||||||
static void *NO_ENV[] = {NULL, NULL, NULL};
|
|
||||||
|
|
||||||
/* Adding another VC system should be as easy as adding another entry in this array. */
|
|
||||||
static VC_RECORD VC[] = {
|
|
||||||
{SVN_COMMANDS, NO_ENV, "svn", ".svn", FALSE},
|
|
||||||
{CVS_COMMANDS, NO_ENV, "cvs", "CVS", FALSE},
|
|
||||||
{GIT_COMMANDS, GIT_ENV, "git", ".git", TRUE},
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static gboolean find_subdir(const gchar* filename, const gchar *subdir)
|
|
||||||
{
|
|
||||||
gboolean ret = FALSE;
|
|
||||||
gchar *base;
|
|
||||||
gchar *gitdir;
|
|
||||||
gchar *base_prev = g_strdup(":");
|
|
||||||
|
|
||||||
if (g_file_test(filename, G_FILE_TEST_IS_DIR))
|
|
||||||
base = g_strdup(filename);
|
|
||||||
else
|
|
||||||
base = g_path_get_dirname(filename);
|
|
||||||
|
|
||||||
while (strcmp(base, base_prev) != 0)
|
|
||||||
{
|
|
||||||
gitdir = g_build_path("/", base, subdir, NULL);
|
|
||||||
ret = g_file_test(gitdir, G_FILE_TEST_IS_DIR);
|
|
||||||
g_free(gitdir);
|
|
||||||
if (ret)
|
|
||||||
break;
|
|
||||||
g_free(base_prev);
|
|
||||||
base_prev = base;
|
|
||||||
base = g_path_get_dirname(base);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_free(base);
|
|
||||||
g_free(base_prev);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static gboolean check_filename(const gchar* filename, VC_RECORD *vc)
|
|
||||||
{
|
|
||||||
gboolean ret;
|
|
||||||
gchar *base;
|
|
||||||
gchar *dir;
|
|
||||||
gchar *path;
|
|
||||||
|
|
||||||
if (! filename)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
path = g_find_program_in_path(vc->program);
|
|
||||||
if (!path)
|
|
||||||
return FALSE;
|
|
||||||
g_free(path);
|
|
||||||
|
|
||||||
if (vc->check_parents)
|
|
||||||
return find_subdir(filename, vc->subdir);
|
|
||||||
|
|
||||||
if (g_file_test(filename, G_FILE_TEST_IS_DIR))
|
|
||||||
base = g_strdup(filename);
|
|
||||||
else
|
|
||||||
base = g_path_get_dirname(filename);
|
|
||||||
dir = g_build_path("/", base, vc->subdir, NULL);
|
|
||||||
|
|
||||||
ret = g_file_test(dir, G_FILE_TEST_IS_DIR);
|
|
||||||
|
|
||||||
g_free(base);
|
|
||||||
g_free(dir);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void* find_cmd_env(gint cmd_type, gboolean cmd, const gchar* filename)
|
|
||||||
{
|
|
||||||
guint i;
|
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS(VC); i++)
|
|
||||||
{
|
|
||||||
if (check_filename(filename, &VC[i]))
|
|
||||||
{
|
|
||||||
if (cmd)
|
|
||||||
return VC[i].commands[cmd_type];
|
|
||||||
else
|
|
||||||
return VC[i].envs[cmd_type];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void* get_cmd_env(gint cmd_type, gboolean cmd, const gchar* filename, int *size)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
gint len = 0;
|
|
||||||
gchar** argv;
|
|
||||||
gchar** ret;
|
|
||||||
gchar* dir;
|
|
||||||
gchar* base_filename;
|
|
||||||
|
|
||||||
argv = find_cmd_env(cmd_type, cmd, filename);
|
|
||||||
if (!argv)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
if (g_file_test(filename, G_FILE_TEST_IS_DIR))
|
|
||||||
{
|
|
||||||
dir = g_strdup(filename);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dir = g_path_get_dirname(filename);
|
|
||||||
}
|
|
||||||
base_filename = g_path_get_basename(filename);
|
|
||||||
|
|
||||||
while(1)
|
|
||||||
{
|
|
||||||
if (argv[len] == NULL)
|
|
||||||
break;
|
|
||||||
len++;
|
|
||||||
}
|
|
||||||
ret = g_malloc(sizeof(gchar*) * (len+1));
|
|
||||||
memset(ret, 0, sizeof(gchar*) * (len+1));
|
|
||||||
for (i = 0; i < len; i++)
|
|
||||||
{
|
|
||||||
if (argv[i] == DIRNAME)
|
|
||||||
{
|
|
||||||
ret[i] = g_strdup(dir);
|
|
||||||
}
|
|
||||||
else if (argv[i] == FILENAME)
|
|
||||||
{
|
|
||||||
ret[i] = g_strdup(filename);
|
|
||||||
}
|
|
||||||
else if (argv[i] == BASE_FILENAME)
|
|
||||||
{
|
|
||||||
ret[i] = g_strdup(base_filename);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ret[i] = g_strdup(argv[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
*size = len;
|
|
||||||
|
|
||||||
g_free(dir);
|
|
||||||
g_free(base_filename);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* utf8_name_prefix can have a path. */
|
|
||||||
static void show_output(const gchar *std_output, const gchar *utf8_name_prefix,
|
|
||||||
const gchar *force_encoding)
|
|
||||||
{
|
|
||||||
gchar *text, *detect_enc = NULL;
|
|
||||||
gint page;
|
|
||||||
GeanyDocument *doc;
|
|
||||||
GtkNotebook *book;
|
|
||||||
gchar *filename;
|
|
||||||
|
|
||||||
filename = g_path_get_basename(utf8_name_prefix);
|
|
||||||
setptr(filename, g_strconcat(filename, ".vc.diff", NULL));
|
|
||||||
|
|
||||||
/* need to convert input text from the encoding of the original file into
|
|
||||||
* UTF-8 because internally Geany always needs UTF-8 */
|
|
||||||
if (force_encoding)
|
|
||||||
{
|
|
||||||
text = p_encodings->convert_to_utf8_from_charset(
|
|
||||||
std_output, (gsize)-1, force_encoding, TRUE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
text = p_encodings->convert_to_utf8(std_output, (gsize)-1, &detect_enc);
|
|
||||||
}
|
|
||||||
if (text)
|
|
||||||
{
|
|
||||||
doc = p_document->find_by_filename(filename);
|
|
||||||
if (doc == NULL)
|
|
||||||
{
|
|
||||||
GeanyFiletype *ft = p_filetypes->lookup_by_name("Diff");
|
|
||||||
doc = p_document->new_file(filename, ft, text);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
p_sci->set_text(doc->editor->sci, text);
|
|
||||||
book = GTK_NOTEBOOK(geany->main_widgets->notebook);
|
|
||||||
page = gtk_notebook_page_num(book, GTK_WIDGET(doc->editor->sci));
|
|
||||||
gtk_notebook_set_current_page(book, page);
|
|
||||||
p_document->set_text_changed(doc, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
p_document->set_encoding(doc,
|
|
||||||
force_encoding ? force_encoding : detect_enc);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
p_ui->set_statusbar(FALSE, _("Input conversion of the diff output failed."));
|
|
||||||
}
|
|
||||||
g_free(text);
|
|
||||||
g_free(detect_enc);
|
|
||||||
g_free(filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static gchar *make_diff(const gchar *filename, gint cmd)
|
|
||||||
{
|
|
||||||
gchar *std_output = NULL;
|
|
||||||
gchar *std_error = NULL;
|
|
||||||
gchar *text = NULL;
|
|
||||||
gchar *dir;
|
|
||||||
gint argc = 0;
|
|
||||||
gchar **env = get_cmd_env(cmd, FALSE, filename, &argc);
|
|
||||||
gchar **argv = get_cmd_env(cmd, TRUE, filename, &argc);
|
|
||||||
gint exit_code = 0;
|
|
||||||
GError *error = NULL;
|
|
||||||
|
|
||||||
if (! argv)
|
|
||||||
{
|
|
||||||
if (env)
|
|
||||||
g_strfreev(env);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_file_test(filename, G_FILE_TEST_IS_DIR))
|
|
||||||
{
|
|
||||||
dir = g_strdup(filename);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dir = g_path_get_dirname(filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (p_utils->spawn_sync(dir, argv, env, G_SPAWN_SEARCH_PATH, NULL, NULL,
|
|
||||||
&std_output, &std_error, &exit_code, &error))
|
|
||||||
{
|
|
||||||
/* CVS dump stuff to stderr when diff nested dirs */
|
|
||||||
if (strcmp(argv[0], "cvs") != 0 && NZV(std_error))
|
|
||||||
{
|
|
||||||
p_dialogs->show_msgbox(1,
|
|
||||||
_("%s exited with an error: \n%s."), argv[0], g_strstrip(std_error));
|
|
||||||
}
|
|
||||||
else if (NZV(std_output))
|
|
||||||
{
|
|
||||||
text = std_output;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
p_ui->set_statusbar(FALSE, _("No changes were made."));
|
|
||||||
}
|
|
||||||
/* win32_spawn() returns sometimes TRUE but error is set anyway, has to be fixed */
|
|
||||||
if (error != NULL)
|
|
||||||
{
|
|
||||||
g_error_free(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
gchar *msg;
|
|
||||||
|
|
||||||
if (error != NULL)
|
|
||||||
{
|
|
||||||
msg = g_strdup(error->message);
|
|
||||||
g_error_free(error);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{ /* if we don't have an exact error message, print at least the failing command */
|
|
||||||
msg = g_strdup_printf(_("unknown error while trying to spawn a process for %s"),
|
|
||||||
argv[0]);
|
|
||||||
}
|
|
||||||
p_ui->set_statusbar(FALSE, _("An error occurred (%s)."), msg);
|
|
||||||
g_free(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_free(dir);
|
|
||||||
g_free(std_error);
|
|
||||||
g_strfreev(env);
|
|
||||||
g_strfreev(argv);
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Make a diff from the current directory */
|
|
||||||
static void vcdirectory_activated(GtkMenuItem *menuitem, gpointer gdata)
|
|
||||||
{
|
|
||||||
GeanyDocument *doc;
|
|
||||||
gchar *base_name = NULL;
|
|
||||||
gchar *locale_filename = NULL;
|
|
||||||
gchar *text;
|
|
||||||
|
|
||||||
doc = p_document->get_current();
|
|
||||||
|
|
||||||
g_return_if_fail(doc != NULL && doc->file_name != NULL);
|
|
||||||
|
|
||||||
if (doc->changed)
|
|
||||||
{
|
|
||||||
p_document->save_file(doc, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
locale_filename = p_utils->get_locale_from_utf8(doc->file_name);
|
|
||||||
base_name = g_path_get_dirname(locale_filename);
|
|
||||||
|
|
||||||
text = make_diff(base_name, VC_COMMAND_DIFF_DIR);
|
|
||||||
if (text)
|
|
||||||
{
|
|
||||||
setptr(base_name, p_utils->get_utf8_from_locale(base_name));
|
|
||||||
show_output(text, base_name, NULL);
|
|
||||||
g_free(text);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_free(base_name);
|
|
||||||
g_free(locale_filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Callback if menu item for the current project was activated */
|
|
||||||
static void vcproject_activated(GtkMenuItem *menuitem, gpointer gdata)
|
|
||||||
{
|
|
||||||
GeanyDocument *doc;
|
|
||||||
gchar *locale_filename = NULL;
|
|
||||||
gchar *text;
|
|
||||||
|
|
||||||
doc = p_document->get_current();
|
|
||||||
|
|
||||||
g_return_if_fail(project != NULL && NZV(project->base_path));
|
|
||||||
|
|
||||||
if (doc != NULL && doc->changed && doc->file_name != NULL)
|
|
||||||
{
|
|
||||||
p_document->save_file(doc, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
locale_filename = p_utils->get_locale_from_utf8(project->base_path);
|
|
||||||
text = make_diff(locale_filename, VC_COMMAND_DIFF_PROJECT);
|
|
||||||
if (text)
|
|
||||||
{
|
|
||||||
show_output(text, project->name, NULL);
|
|
||||||
g_free(text);
|
|
||||||
}
|
|
||||||
g_free(locale_filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Callback if menu item for a single file was activated */
|
|
||||||
static void vcfile_activated(GtkMenuItem *menuitem, gpointer gdata)
|
|
||||||
{
|
|
||||||
GeanyDocument *doc;
|
|
||||||
gchar *locale_filename, *text;
|
|
||||||
|
|
||||||
doc = p_document->get_current();
|
|
||||||
|
|
||||||
g_return_if_fail(doc != NULL && doc->file_name != NULL);
|
|
||||||
|
|
||||||
if (doc->changed)
|
|
||||||
{
|
|
||||||
p_document->save_file(doc, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
locale_filename = p_utils->get_locale_from_utf8(doc->file_name);
|
|
||||||
|
|
||||||
text = make_diff(locale_filename, VC_COMMAND_DIFF_FILE);
|
|
||||||
if (text)
|
|
||||||
{
|
|
||||||
show_output(text, doc->file_name, doc->encoding);
|
|
||||||
g_free(text);
|
|
||||||
}
|
|
||||||
g_free(locale_filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static GtkWidget *menu_vcdiff_file = NULL;
|
|
||||||
static GtkWidget *menu_vcdiff_dir = NULL;
|
|
||||||
static GtkWidget *menu_vcdiff_project = NULL;
|
|
||||||
|
|
||||||
static void update_menu_items(void)
|
|
||||||
{
|
|
||||||
GeanyDocument *doc;
|
|
||||||
gboolean have_file;
|
|
||||||
gboolean have_vc = FALSE;
|
|
||||||
|
|
||||||
doc = p_document->get_current();
|
|
||||||
have_file = doc && doc->file_name && g_path_is_absolute(doc->file_name);
|
|
||||||
if (find_cmd_env(VC_COMMAND_DIFF_FILE, TRUE, doc->file_name))
|
|
||||||
have_vc = TRUE;
|
|
||||||
|
|
||||||
gtk_widget_set_sensitive(menu_vcdiff_file, have_vc && have_file);
|
|
||||||
gtk_widget_set_sensitive(menu_vcdiff_dir, have_vc && have_file);
|
|
||||||
gtk_widget_set_sensitive(menu_vcdiff_project,
|
|
||||||
project != NULL && NZV(project->base_path));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Called by Geany to initialize the plugin */
|
|
||||||
void plugin_init(GeanyData *data)
|
|
||||||
{
|
|
||||||
GtkWidget *menu_vcdiff = NULL;
|
|
||||||
GtkWidget *menu_vcdiff_menu = NULL;
|
|
||||||
GtkTooltips *tooltips = NULL;
|
|
||||||
|
|
||||||
tooltips = gtk_tooltips_new();
|
|
||||||
|
|
||||||
menu_vcdiff = gtk_image_menu_item_new_with_mnemonic(_("_Version Diff"));
|
|
||||||
gtk_container_add(GTK_CONTAINER(geany->main_widgets->tools_menu), menu_vcdiff);
|
|
||||||
|
|
||||||
g_signal_connect(menu_vcdiff, "activate", G_CALLBACK(update_menu_items), NULL);
|
|
||||||
|
|
||||||
menu_vcdiff_menu = gtk_menu_new ();
|
|
||||||
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_vcdiff), menu_vcdiff_menu);
|
|
||||||
|
|
||||||
/* Single file */
|
|
||||||
menu_vcdiff_file = gtk_menu_item_new_with_mnemonic(_("From Current _File"));
|
|
||||||
gtk_container_add(GTK_CONTAINER (menu_vcdiff_menu), menu_vcdiff_file);
|
|
||||||
gtk_tooltips_set_tip (tooltips, menu_vcdiff_file,
|
|
||||||
_("Make a diff from the current active file"), NULL);
|
|
||||||
|
|
||||||
g_signal_connect(menu_vcdiff_file, "activate", G_CALLBACK(vcfile_activated), NULL);
|
|
||||||
|
|
||||||
/* Directory */
|
|
||||||
menu_vcdiff_dir = gtk_menu_item_new_with_mnemonic(_("From Current _Directory"));
|
|
||||||
gtk_container_add(GTK_CONTAINER (menu_vcdiff_menu), menu_vcdiff_dir);
|
|
||||||
gtk_tooltips_set_tip (tooltips, menu_vcdiff_dir,
|
|
||||||
_("Make a diff from the directory of the current active file"), NULL);
|
|
||||||
|
|
||||||
g_signal_connect(menu_vcdiff_dir, "activate", G_CALLBACK(vcdirectory_activated), NULL);
|
|
||||||
|
|
||||||
/* Project */
|
|
||||||
menu_vcdiff_project = gtk_menu_item_new_with_mnemonic(_("From Current _Project"));
|
|
||||||
gtk_container_add(GTK_CONTAINER (menu_vcdiff_menu), menu_vcdiff_project);
|
|
||||||
gtk_tooltips_set_tip (tooltips, menu_vcdiff_project,
|
|
||||||
_("Make a diff from the current project's base path"), NULL);
|
|
||||||
|
|
||||||
g_signal_connect(menu_vcdiff_project, "activate", G_CALLBACK(vcproject_activated), NULL);
|
|
||||||
|
|
||||||
gtk_widget_show_all(menu_vcdiff);
|
|
||||||
|
|
||||||
plugin_fields->menu_item = menu_vcdiff;
|
|
||||||
plugin_fields->flags = PLUGIN_IS_DOCUMENT_SENSITIVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Called by Geany before unloading the plugin. */
|
|
||||||
void plugin_cleanup(void)
|
|
||||||
{
|
|
||||||
/* remove the menu item added in plugin_init() */
|
|
||||||
gtk_widget_destroy(plugin_fields->menu_item);
|
|
||||||
}
|
|
254
po/ChangeLog
@ -1,3 +1,252 @@
|
|||||||
|
2009-03-17 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* ru.po: Update of Russian translation. Thanks to John Wehin.
|
||||||
|
|
||||||
|
|
||||||
|
2009-03-07 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* tr.po: Update of Turkish translation. Thanks to Gürkan Gür.
|
||||||
|
|
||||||
|
|
||||||
|
2009-03-04 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* fi.po: Update of Finnish translation. Thanks to Jari Rahkonen.
|
||||||
|
|
||||||
|
|
||||||
|
2009-03-03 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* de.po: Minor update of German translation.
|
||||||
|
* es.po: Another update of Spanish translation.
|
||||||
|
* fi.po: Update of Finnish translation. Thanks to Jari Rahkonen.
|
||||||
|
|
||||||
|
|
||||||
|
2009-03-02 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* es.po: Update of Spanish translation. Thanks to Antonio Jiménez
|
||||||
|
González.
|
||||||
|
|
||||||
|
|
||||||
|
2009-02-27 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* es.po: Update of Spanish translation. Thanks to Antonio Jiménez
|
||||||
|
González.
|
||||||
|
|
||||||
|
|
||||||
|
2009-02-13 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* de.po: Revisit of German translation.
|
||||||
|
|
||||||
|
|
||||||
|
2009-02-10 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* zh_CN.po: Update of simply Chinese translation
|
||||||
|
(Thanks to Dormouse Young).
|
||||||
|
|
||||||
|
|
||||||
|
2009-02-08 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* ca.po: Update of Catalan translation (Thanks to Toni Garcia-Navarro)
|
||||||
|
* hu.po: Update of Hungarian translation (Thanks to Gabor Kmetyko)
|
||||||
|
|
||||||
|
|
||||||
|
2009-02-07 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* sv.po: Update of Swedish translation (Thanks to Tony Mattsson).
|
||||||
|
|
||||||
|
|
||||||
|
2009-02-06 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||||
|
|
||||||
|
* de.po: Minor update of German translation, mainly remove full stops
|
||||||
|
in tooltips.
|
||||||
|
|
||||||
|
|
||||||
|
2009-02-05 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* en_GB.po: Update British English translation (Thanks to Jeff Bailes)
|
||||||
|
* ja.po: Update of Japanese translation (Thanks to Chikahiro Masami).
|
||||||
|
|
||||||
|
|
||||||
|
2009-02-03 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* vi.po: Update of Vietnamese translation. Thanks to Clytie Siddall for
|
||||||
|
providing the update.
|
||||||
|
* pt_BR.po: Update of Brasilian Portuguese translation
|
||||||
|
(Thanks to Adrovane Marques Kade).
|
||||||
|
|
||||||
|
|
||||||
|
2009-02-02 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* cs.po: Update of Czech translation. Thanks to Karel Kolman for
|
||||||
|
providing.
|
||||||
|
|
||||||
|
|
||||||
|
2009-02-01 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* ja.po: Update of Japanese translation (Thanks to Chikahiro Masami).
|
||||||
|
* tr.po: Update of Turkish translation. Thanks to Gürkan Gür.
|
||||||
|
* *.po, geany.pot: Update for string freeze in preparing of Geany
|
||||||
|
0.15 release.
|
||||||
|
* de.po: Fix of a minor translation issue. Thanks to Chikahiro Masami
|
||||||
|
for reporting. Also update of translation provided by Dominic Hopf.
|
||||||
|
|
||||||
|
|
||||||
|
2009-01-26 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* cs.po: Update of Czech translation. Thanks to Karel Kolman for
|
||||||
|
providing.
|
||||||
|
|
||||||
|
|
||||||
|
2009-01-21 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* cs.po: Fix of a little spelling mistake. Thanks to Karel Kolman for
|
||||||
|
reporting.
|
||||||
|
|
||||||
|
|
||||||
|
2009-01-16 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* de.po: Minor update of German translation
|
||||||
|
|
||||||
|
|
||||||
|
2009-01-09 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||||
|
|
||||||
|
* de.po: Fix a couple of bad mnemonics in the Find dialogs.
|
||||||
|
|
||||||
|
|
||||||
|
2009-01-01 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* de.po: Minor update of German translation
|
||||||
|
|
||||||
|
|
||||||
|
2008-12-31 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* tr.po: Update of Turkish translation. Thanks to Gürkan Gür.
|
||||||
|
|
||||||
|
|
||||||
|
2008-12-15 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* tr.po: Update of Turkish translation. Thanks to Gürkan Gür.
|
||||||
|
|
||||||
|
|
||||||
|
2008-12-13 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* de.po: Update of German translation.
|
||||||
|
|
||||||
|
|
||||||
|
2008-12-04 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||||
|
|
||||||
|
* de.po:
|
||||||
|
Major update of the German translation making it more consistent.
|
||||||
|
Fix some typos and improve serveral phrases.
|
||||||
|
Apply some of the guidelines at http://i18n.xfce.org/wiki/team_de.
|
||||||
|
|
||||||
|
|
||||||
|
2008-11-30 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* bg.po: Update of Bulgarian translation. Thanks to Atanas Beloborodov.
|
||||||
|
|
||||||
|
|
||||||
|
2008-11-24 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* tr.po: Little update of Turkish translation
|
||||||
|
|
||||||
|
|
||||||
|
2008-11-22 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* ru.po: Update of Russian translation. Thanks to Andrew Drynov for
|
||||||
|
supporting update.
|
||||||
|
|
||||||
|
|
||||||
|
2008-11-21 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* de.po: Update of German translation.
|
||||||
|
|
||||||
|
|
||||||
|
2008-11-19 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* sv.po: Update of Swedish translation (Thanks to Tony Mattsson).
|
||||||
|
|
||||||
|
|
||||||
|
2008-11-06 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* hu.po: Corrected a little typo in Hungarian translation. Thanks to
|
||||||
|
Gabor Kmetyko for input.
|
||||||
|
|
||||||
|
|
||||||
|
2008-11-03 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* fr.po: Little update of French translation. Removes a fuzzy string.
|
||||||
|
Thanks to Roland Baudin for input.
|
||||||
|
|
||||||
|
|
||||||
|
2008-10-31 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* fr.po: Little update of French translation. Closes #2210060.
|
||||||
|
Thanks to Colomban Wendling for reporting.
|
||||||
|
|
||||||
|
|
||||||
|
2008-10-29 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* de.po: Little update of German translation
|
||||||
|
|
||||||
|
|
||||||
|
2008-10-24 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* fr.po: Update of French translation. Thanks to Roland Baudin.
|
||||||
|
|
||||||
|
|
||||||
|
2008-10-20 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* it.po: Update of Italian translation (Thanks M. Baldinelli).
|
||||||
|
* pt_BR.po: Update of Brasilian Portuguese translation
|
||||||
|
(Thanks to Adrovane Marques Kade).
|
||||||
|
|
||||||
|
|
||||||
|
2008-10-18 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||||
|
|
||||||
|
* de.po: Final update of German translation, thanks to Dominic Hopf.
|
||||||
|
|
||||||
|
|
||||||
|
2008-10-17 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* hu.po: Update of Hungarian translation (Thanks to Gabor Kmetyko)
|
||||||
|
|
||||||
|
|
||||||
|
2008-10-16 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* ca.po: Update of Catalan translation (Thanks to Toni Garcia-Navarro)
|
||||||
|
|
||||||
|
|
||||||
|
2008-10-15 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* ro.po: Update of Romanian translation (Thanks to Alex Eftimie).
|
||||||
|
|
||||||
|
|
||||||
|
2008-10-14 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* ko.po: Converted file to UTF-8.
|
||||||
|
* tr.po: Little update of Turkish translation
|
||||||
|
* zh_CN.po: Update of Simplified Chinese translation by
|
||||||
|
Dormouse Young (thanks).
|
||||||
|
|
||||||
|
|
||||||
|
2008-10-13 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* de.po: Little update of German translation.
|
||||||
|
* ko.po, LINGUAS: Added Korean translation. Thanks to netkiss for
|
||||||
|
translation.
|
||||||
|
* sv.po: Update of Swedish translation (Thanks to Tony Mattsson).
|
||||||
|
* tr.po: Update of Turkish translation. Removed a fuzzy string since
|
||||||
|
there is no different plural form. Thanks to Gürkan Gür for sending
|
||||||
|
the hint.
|
||||||
|
|
||||||
|
|
||||||
|
2008-10-12 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
|
* en_GB.po: Update British English translation (Thanks to Jeff Bailes)
|
||||||
|
* *.po: Update of all po files to add missed string for singular form
|
||||||
|
of some terms.
|
||||||
|
|
||||||
|
|
||||||
2008-10-09 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
2008-10-09 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
* tr.po: Update of Turkish translation. Thanks to Gürkan Gür.
|
* tr.po: Update of Turkish translation. Thanks to Gürkan Gür.
|
||||||
@ -111,6 +360,11 @@
|
|||||||
* sv.po: Update of Swedish translation (Thanks to Tony Mattsson).
|
* sv.po: Update of Swedish translation (Thanks to Tony Mattsson).
|
||||||
|
|
||||||
|
|
||||||
|
2008-04-19 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||||
|
|
||||||
|
* New release: Geany 0.14
|
||||||
|
|
||||||
|
|
||||||
2008-04-18 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
2008-04-18 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
|
||||||
* ja.po: Update of Japanese translation (Thanks to Chikahiro Masami).
|
* ja.po: Update of Japanese translation (Thanks to Chikahiro Masami).
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
# set of available languages (in alphabetic order)
|
# set of available languages (in alphabetic order)
|
||||||
be bg ca cs de el en_GB es fi fr hu it ja nl pl pt_BR ro ru sv tr uk vi zh_CN zh_TW
|
be bg ca cs de el en_GB es fi fr hu it ja ko nl pl pt_BR ro ru sv tr uk vi zh_CN zh_TW
|
||||||
|
@ -10,6 +10,8 @@ src/editor.c
|
|||||||
src/encodings.c
|
src/encodings.c
|
||||||
src/filetypes.c
|
src/filetypes.c
|
||||||
src/geany.h
|
src/geany.h
|
||||||
|
src/geanymenubuttonaction.c
|
||||||
|
src/geanyentryaction.c
|
||||||
src/highlighting.c
|
src/highlighting.c
|
||||||
src/images.c
|
src/images.c
|
||||||
src/interface.c
|
src/interface.c
|
||||||
@ -24,12 +26,13 @@ src/plugins.c
|
|||||||
src/prefs.c
|
src/prefs.c
|
||||||
src/printing.c
|
src/printing.c
|
||||||
src/project.c
|
src/project.c
|
||||||
|
src/queue.c
|
||||||
src/sciwrappers.c
|
src/sciwrappers.c
|
||||||
src/search.c
|
src/search.c
|
||||||
src/socket.c
|
src/socket.c
|
||||||
src/support.c
|
|
||||||
src/symbols.c
|
src/symbols.c
|
||||||
src/templates.c
|
src/templates.c
|
||||||
|
src/toolbar.c
|
||||||
src/tools.c
|
src/tools.c
|
||||||
src/treeviews.c
|
src/treeviews.c
|
||||||
src/ui_utils.c
|
src/ui_utils.c
|
||||||
@ -39,7 +42,6 @@ src/win32.c
|
|||||||
plugins/classbuilder.c
|
plugins/classbuilder.c
|
||||||
plugins/htmlchars.c
|
plugins/htmlchars.c
|
||||||
plugins/export.c
|
plugins/export.c
|
||||||
plugins/vcdiff.c
|
|
||||||
plugins/filebrowser.c
|
plugins/filebrowser.c
|
||||||
plugins/saveactions.c
|
plugins/saveactions.c
|
||||||
plugins/splitwindow.c
|
plugins/splitwindow.c
|
||||||
|