180 Commits

Author SHA1 Message Date
Enrico Tröger
1672c377fe Fix possible memory leak and add time_t argument in utils_get_date_time() to pass a time pointer to use.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2049 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-11-17 13:09:19 +00:00
Enrico Tröger
11dcb382f4 Remove utils_get_date() and add format argument to utils_get_date_time().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2040 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-11-11 09:03:01 +00:00
Enrico Tröger
b0109e93ca Remove unused unnecessary function utils_btoa().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2034 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-11-08 12:46:43 +00:00
Enrico Tröger
7cc8825ef1 Fix crashes on Windows when configuration directory could not be created. Fix problems when configuration directory path contains special characters.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2015 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-11-04 15:48:14 +00:00
Nick Treleaven
031ba827a5 Fix possible conflict of 'tmp' variable name in setptr macro.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1914 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-09-27 15:09:54 +00:00
Nick Treleaven
274058eb7a Neaten up the plugin API:
Make document_open_file() now wrap document_open_file_full(),
without the idx for reloading or pos arguments.
Replace str_replace() with string_replace_all() in the plugin API.
Add utils_string_replace_all(), taking a GString argument.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1868 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-09-11 15:21:11 +00:00
Enrico Tröger
d390522727 Remove convert to lower-/upper-case keybindings.
Add toggle case keybinding and change shortcut to Ctrl-Alt-U.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1860 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-09-07 19:01:55 +00:00
Nick Treleaven
ef1399e000 Rename MyApp -> GeanyApp.
Move most GeanyApp fields into:
GeanyPrefs for (most) Preferences dialog fields;
UIPrefs for non-Prefs dialog visual settings;
UIWidgets for less commonly used widgets such as menuitems and
dialogs;
GeanyStatus for various states the application can be in.
Move some GeanyApp fields into EditorPrefs (and one into each of
CommandLineOptions and SidebarTreeviews).
Add plugin API prefs field.
Move disabling build widgets on Windows to build_init().
Make build callbacks static.
Add treeviews_init() to prepare popup menus and open files treeview.
Replace treeviews_find_node() with treeviews_select_openfiles_item().
Make utils_isbrace() and utils_is_opening_brace() take an
'include_angles' argument (to separate from editor_prefs).
Make 'Goto matching brace' keybinding include <> angle brackets.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1815 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-08-23 11:34:06 +00:00
Nick Treleaven
767b70dbb3 Move Color Chooser and Word Count tools to tools.c.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1751 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-27 11:28:17 +00:00
Enrico Tröger
a7975ccc93 Extend icon search path to get symbol list icons working when using a non-standard installation prefix.
Query default icon theme only once to improve startup speed.
Store the line number separately in the tree store.
Remove utils_get_local_tag().	       


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1731 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-22 14:38:47 +00:00
Nick Treleaven
3ecd31d9fd Add ui_table_add_row() for easily adding widgets to a GtkTable, and
use it in project_new().
Group 'generic' functions related to GTK+ together at the top of
ui_utils.h.
Make sure G_GNUC_NULL_TERMINATED is defined in geany.h.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1702 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-13 15:54:16 +00:00
Nick Treleaven
66bdb5d9fb Add comment for utils_free_pointers() warning not to use it if any
pointers may be NULL.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1658 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-04 11:14:05 +00:00
Nick Treleaven
4193196248 Move MyApp::pref_editor_* to editor.h, using editor_prefs struct.
Move INDENT_* enums to editor.h.
Move utils_get_whitespace() to editor.c.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1587 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-05-29 16:30:54 +00:00
Nick Treleaven
b7e499529d Add setptr() macro to free data and reassign to the same pointer.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1567 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-05-24 16:00:48 +00:00
Nick Treleaven
163890a33e Move search_get_file_list() to utils.c.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1520 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-05-11 11:42:00 +00:00
Nick Treleaven
561bfc46aa Add NZV() macro for checking a char* points to a non-empty string.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1493 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-04-30 16:16:15 +00:00
Nick Treleaven
6ebf6aa2f5 Add G_GNUC_NULL_TERMINATED to ensure variable arglists are NULL
terminated (for GLib >= 2.8).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1475 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-04-23 15:52:44 +00:00
Enrico Tröger
b187533760 Use Ctrl+Shift+Space always for showing calltips because Alt+Space is used often by window managers (not only under Windows).
Added keybinding for inserting alternative whitespace characters.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1422 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-03-25 20:51:45 +00:00
Nick Treleaven
82836d4c7d Make New Project dialog create parent directories of the chosen base
path if necessary.
Prevent warnings when setting open dialog directory to a path whose
parent directory doesn't exist.
Add create_parent_dirs argument for utils_mkdir().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1382 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-03-10 17:26:03 +00:00
Enrico Tröger
926437688f Set IO channels for custom commands to blocking mode (thanks to Jeff Pohlmeyer).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1353 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-03-01 21:45:43 +00:00
Nick Treleaven
d39c458655 Add *.rej as a Diff filename pattern.
Add utils_strv_new() to duplicate a va_list of strings.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1263 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-02-08 16:26:45 +00:00
Enrico Tröger
55f054d234 Added properties dialog (still far away from state ready).
Added file_patterns field.
Added utils_mkdir().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1200 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-01-17 23:44:08 +00:00
Enrico Tröger
7b61ad934d Updated copyright information.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1188 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-01-14 17:36:42 +00:00
Enrico Tröger
2b0740a5fa Added sci_set_use_tabs().
Fixed mem leak in sci_cb_auto_forif().
Moved free_pointers() to utils.c.
Applied patch from Jeff Pohlmeyer to add an option for using spaces or tabulators when inserting some whitespace.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1186 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-01-14 17:09:17 +00:00
Nick Treleaven
6044ff1f50 Move utils_compare_symbol(), GeanySymbol, recreate_tag_list()
to symbols.c.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1179 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-01-13 13:25:05 +00:00
Nick Treleaven
af369cf776 Fix memory leak when using utils_scan_unicode_bom().
Prevent invalid memory read in utils_scan_unicode_bom() when text
length is < 4.
Move utils_scan_unicode_bom(), utils_is_unicode_charset() to
encodings.c.
Read the BOM length in handle_bom().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1167 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-01-07 16:22:41 +00:00
Nick Treleaven
055f70da67 Force a file changed check when attempting to open an already open
file.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1119 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-12-18 13:04:18 +00:00
Enrico Tröger
37c230845a Revert the last change to utils_str_equal() and use it again because g_str_equal() is not NULL-safe.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1059 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-12-07 16:09:45 +00:00
Enrico Tröger
c461da68f1 Removed utils_str_equal() and use g_str_equal() from GLib because it does exactly the same.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1056 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-12-06 20:44:32 +00:00
Nick Treleaven
bd1137d9e9 Rename utils_strcmp() utils_str_equal() (to avoid return value
confusion with strcmp()).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@978 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-11-08 16:21:46 +00:00
Nick Treleaven
67ce2f51b0 Move utils_get_tag_list() to symbols.c, make utils_find_tm_tag()
static.
Move symbols_get_global_keywords() to get_global_typenames() in
highlighting.c.
Add symbols_find_tags_as_string(), symbols_get_tag_list(),
symbols_get_macro_list(), symbols_find_in_workspace() from various
tag-related existing code.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@976 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-11-08 11:42:05 +00:00
Enrico Tröger
60bb784493 Moved utils_convert_to_utf8() and utils_convert_to_utf8_from_charset() to encodings.c.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@931 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-10-25 14:48:07 +00:00
Enrico Tröger
09d7f30aec Convert tag names to UTF-8 before showing them in the sidebar.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@794 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-09-06 17:31:53 +00:00
Nick Treleaven
a63fc1e40e Moved UI related utils from utils.c to ui_utils.c
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@790 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-09-05 14:24:47 +00:00
Nick Treleaven
0bd427bd05 Remove filetypes.h and Scintilla includes from geany.h; Add VALID_DOC_IDX macro
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@751 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-08-20 20:39:59 +00:00
Enrico Tröger
312579d70a Added menu items to insert configurable date/time strings.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@744 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-08-19 12:56:30 +00:00
Nick Treleaven
7ebb187b26 Store build information instead of using app->cur_idx; Assume C-like warning messages when running make when the current file is a Makefile; Moved some msgwin setup and cleanup code to msgwindow.c; Moved utils_parse_compiler_error_line to msgwindow.c
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@714 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-08-14 15:02:52 +00:00
Nick Treleaven
921060f7fb Add wrappers for converting between utf8 and locale encoding
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@707 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-08-12 21:36:55 +00:00
Nick Treleaven
795fc85083 Move recent file item to the top when it is clicked on
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@680 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-08-07 14:53:58 +00:00
Nick Treleaven
c6fa1febba Wrap calltip and prevent it obscuring the current line
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@666 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-08-03 13:27:30 +00:00
Nick Treleaven
35003deb31 Added Auto indentation and Line wrapping options to Preferences dialog; Split up Miscellaneous items into Display and Features; Renamed Change Selection and Run toolbutton.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@654 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-08-01 10:06:28 +00:00
Enrico Tröger
31c17438cb Removed unused colour parsing functions.
Let the colour chooser pick the colour under the cursor.
Fixed bug in parsing strings containing hex values, modified the styles to keep the syntax highlighting consistent.
Removed startup warning.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@641 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-07-27 20:57:13 +00:00
Enrico Tröger
4e122c97b7 Removed macro GEANY_WIN32, use G_OS_WIN32 instead.
Introduced global variables for PACKAGE_DATA_DIR and  PACKAGE_LOCALE_DIR, removed macro DOCDIR (these changes are important for the Windows port).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@639 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-07-26 17:02:16 +00:00
Enrico Tröger
ab05f39d24 Renamed document element unicode_bom in has_bom.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@611 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-07-23 15:45:05 +00:00
Enrico Tröger
0ba2c566da Oops, forgot these files.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@601 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-07-22 02:06:30 +00:00
Enrico Tröger
978a6fee93 Added menu item View->Show Sidebar and improved code around it.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@598 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-07-21 11:41:33 +00:00
Enrico Tröger
8b09a2935d Improved replacing escape sequences in Find and Replace dialog (thanks to Stefan Oltmanns).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@586 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-07-19 11:30:59 +00:00
Enrico Tröger
6516c31a6a Moved document related functions from utils.c to document.c.
Keep cursor position when replacing tabs by spaces.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@572 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-07-17 10:42:26 +00:00
Enrico Tröger
1b122c6bc6 Fixed wrong charset detection on UTF-8 (and maybe other) systems.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@554 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-07-14 10:48:02 +00:00
Nick Treleaven
1c8d62ed5d Added basic Find in files search functionality.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@551 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-07-13 14:30:44 +00:00