193 Commits

Author SHA1 Message Date
Enrico Tröger
d55fa1d975 Don't explicitly change the current directory of the Save As dialog so that it uses the last used directory.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3867 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-06-16 21:25:04 +00:00
Nick Treleaven
f56cad490e Remove data_ptr argument to foreach_[s]list() macros, as using
node->data is enough sometimes; this makes the macro a bit more
efficient too.
Add foreach_[s]list() macros to the plugin API docs.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3862 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-06-12 15:32:35 +00:00
Enrico Tröger
c27b3a5caa Fix broken 'Cancel' button in the Save As dialog.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3810 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-05-21 19:19:12 +00:00
Enrico Tröger
c0505685f2 Don't close the Save As dialog when saving the file didn't succeed.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3797 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-05-17 17:16:24 +00:00
Enrico Tröger
23fc3ef0d7 Remove unnecessary call to g_intern_string() to fix build with GLib 2.8 (closes #2790051).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3782 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-05-11 15:57:02 +00:00
Enrico Tröger
f1eb8dc22d Ellipsize tab labels and some status messages for very long filenames (closes #2777348).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3718 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-21 20:52:51 +00:00
Enrico Tröger
ec6542fa18 Watch the 'show-hidden' property of the file chooser widget using GObject's "notify" signal which gives accurate results and remove the hack using the "selection-changed" signal.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3714 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-19 18:14:12 +00:00
Enrico Tröger
eab512dced Hide the extra file open dialog options in an expander to make the dialog more compact by default and to provide more space for the file view.
Remove the filename field as it is also provided by GTK itself with more features like auto-completion.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3713 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-19 17:54:09 +00:00
Enrico Tröger
a95a59a42f Remove all G_LIKELY macros inside g_return_if_fail() statements as this is redundant.
Remove many other G_LIKELY/G_UNLIKELY macros which doesn't make much sense to keep the code more readable.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3708 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-15 22:47:33 +00:00
Enrico Tröger
a9dc990049 Start using G_LIKELY/G_UNLIKELY macros to gain a little more performance when building the code with gcc.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3687 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-05 21:07:40 +00:00
Nick Treleaven
26d27cbd2e Rename sorted_filetypes filetypes_by_title, and add to GeanyData
for plugin API access.
Fix order of filetypes in Save Actions Instant Save configuration
dialog.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/reorder-filetypes@3677 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-02 15:00:17 +00:00
Nick Treleaven
68928213df Use g_slist_nth_data() with sorted_filetypes list instead of
filetypes_find() as it is neater.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/reorder-filetypes@3673 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-31 15:07:27 +00:00
Nick Treleaven
4753e20394 Fix sorting filetype template menu items.
Add foreach_slist() macro.
Make sorted_filetypes list public, and include None filetype first.
Rename filetypes_foreach_sorted() to filetypes_foreach_named() to
show it doesn't include the None filetype.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/reorder-filetypes@3672 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-31 14:32:03 +00:00
Nick Treleaven
0cd1683ca6 Sort open dialog filetypes in combo boxes by title.
Add filetypes_foreach_sorted(), filetypes_find().



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/reorder-filetypes@3658 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-27 14:06:11 +00:00
Nick Treleaven
2cc65983d2 Fix setting Open dialog filetype on opening a file.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/reorder-filetypes@3641 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-20 16:33:59 +00:00
Nick Treleaven
5ddc129829 Make GEANY_FILETYPES_NONE = 0; other things are now broken, e.g.
setting Open dialog filetypes.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/reorder-filetypes@3640 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-20 16:18:32 +00:00
Enrico Tröger
efdae222c8 Set the initial directory for the Save As dialog only once on initialisation.
Add a shortcut of the project's base directory to the File Open/Save As dialogs when a project is open for faster access.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3636 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-19 17:50:23 +00:00
Enrico Tröger
4ffd7f2ed9 Add a clear icon to the used text entries all over the place (will be available with GTK >= 2.16).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3570 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-02-10 21:10:50 +00:00
Enrico Tröger
bbd58c2856 It's enough to check for GTK 2.14 at runtime, not at build time when to determine whether to show non-local folders in the file chooser dialogs.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3547 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-02-04 20:04:49 +00:00
Enrico Tröger
b2eeefc919 Add some missing @since tags to the API documentation of various functions.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3531 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-30 18:53:23 +00:00
Enrico Tröger
f72e8a3f3a Use the stock overwrite confirmation dialog provided by GTK 2.8 in the Save As dialog.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3508 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-24 19:39:35 +00:00
Enrico Tröger
ec987c83cf Improve the API docs for dialogs_show_input() a little bit.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3499 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-21 23:19:25 +00:00
Enrico Tröger
836fa1dca0 Add dialogs_show_input_numeric() to the plugins API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3497 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-21 22:49:47 +00:00
Enrico Tröger
de3d3b42fb Add document_save_file_as and document_rename_file to the plugin API.
If GIO is available, use GFileMonitor to watch for file disk changes and indicate them immediately using an orange tab label colour.
Break plugin ABI for this and the last commits.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3484 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-18 18:19:58 +00:00
Enrico Tröger
ffebb43c8e Remove tooltips from menu items.
Don't use full stops in tooltips for short sentences.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3470 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-15 19:15:41 +00:00
Enrico Tröger
39a6eb455e Update copyright information.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3446 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-04 18:30:42 +00:00
Enrico Tröger
9e25c43487 Move implementation of lookup_widget() into ui_lookup_widget().
Change uses of lookup_widget() to ui_lookup_widget().
Remove now unneeded support.c.
Use GLib gettext macros in support.h instead of own ones.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3402 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-18 21:21:53 +00:00
Enrico Tröger
120e758840 When allowing non-local locations in the File Open dialog, we should do this in the File Save dialog as well.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3396 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-17 16:28:36 +00:00
Enrico Tröger
81ffd05aa1 dd ui_widget_set_tooltip_text() as a convenience function to easily set tooltips for widgets. It uses gtk_widget_set_tooltip_text() on GTK >= 2.12 otherwise the old tooltips API.Use ui_widget_set_tooltip_text().
Use ui_widget_set_tooltip_text() in the plugins.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3250 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-18 20:14:42 +00:00
Enrico Tröger
af7aa43872 Allow showing remote locations in the file open dialog with GTK >= 2.14 since it works with Gvfs/FUSE mounts, too.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3187 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-07 14:38:13 +00:00
Enrico Tröger
c946d4ef91 Replace Goto line text entry field in the toolbar with a spin button.
Remove dialogs_show_goto_line(), use the more generic dialogs_show_input_numeric() instead.
Increase limit of the maximum line number from 99999 to 100000000.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3146 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-23 20:55:06 +00:00
Enrico Tröger
6bc86c4462 Replace gtk_widget_(un)ref() with g_object(un)ref(), patch by Colomban Wendling, thanks.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3143 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-22 15:36:45 +00:00
Nick Treleaven
c64f034284 Refactor dialogs_show_unsaved_file() with run_unsaved_dialog().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3078 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-13 16:00:53 +00:00
Enrico Tröger
6cc90b4454 Make a some labels in the File Properties dialog selectable.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3066 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-10 16:43:40 +00:00
Enrico Tröger
b82c2ee714 Set 'can_focus' property on some checkboxes in the prefs dialog which were missing it.
Enable 'focus_on_click' property on most checkboxes in the prefs dialog to ease keyboard navigation.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2915 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-01 11:11:33 +00:00
Enrico Tröger
8d67117d47 Rename "delete_event" to "delete-event".
Remove some unnecessary GObject casts in g_signal_connect() calls.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2788 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-18 13:40:48 +00:00
Nick Treleaven
5cd0520618 Use stack buffers for g_vsnprintf() instead of heap allocation.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2718 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-20 14:17:15 +00:00
Enrico Tröger
f1de93b6f7 Add dialogs_show_input_numeric().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2708 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-19 14:31:09 +00:00
Enrico Tröger
d3439f8a17 Use document pointer instead of an index to the documents array everywhere in the core code.
Pass a document pointer to the callbacks of all "document-*" signals.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/document-pointer@2692 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-15 13:35:48 +00:00
Nick Treleaven
d4748f43dd Fix segfault after Save As (oops).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2648 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-05 16:42:28 +00:00
Enrico Tröger
7c591fbebd Change preprocessor checks for sys/time.h and remove unnecessary sys/stat.h check.
Remove useless or unused configure checks.
Install THANKS file by default.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2641 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-04 15:43:52 +00:00
Enrico Tröger
85febd5fd7 Restore the previous state of main_status.quitting status when asking for reload a changed file instead of setting it to true. Oops.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2640 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-04 13:23:43 +00:00
Enrico Tröger
8a0bcccced When quitting, prevent inconsistent GUI elements when cancelling on an unsaved file.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2639 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-03 18:15:52 +00:00
Nick Treleaven
50b0a10654 Note: this breaks the plugin API for plugins using
document_find_by_filename().
Make document_find_by_filename() take only a utf8_filename argument,
and now match any documents that have a filename set but aren't saved
on disk.
Add document_find_by_realpath() to the plugin API.
Add filename argument for document_save_file_as().
Add GeanyDocument::real_path field, which if non-NULL indicates the
file once existed on disk (not just as an unsaved document filename).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2637 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-03 17:22:04 +00:00
Nick Treleaven
be0d9e8ea7 Note: this breaks the plugin API.
Replace doc_array with documents_array, a pointer array. This is
necessary to avoid breaking the ABI every time a field is added to
GeanyDocument.
Remove deprecated pluginmacros.h documents macro, to avoid a
conflict.
Replace doc_list[] macro with documents[] macro, which returns a
GeanyDocument pointer.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2624 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-29 17:00:54 +00:00
Nick Treleaven
398efbd373 Note: this commit breaks the plugin API.
Split widget fields out of GeanyApp into GeanyMainWidgets, so other
data items can be added without breaking the plugin ABI.
Add GeanyData::main_widgets, and macro.
Rename treeview_notebook sidebar_notebook in GeanyMainWidgets.
Move tools_menu from GeanyData to GeanyMainWidgets.
Move statusbar out of GeanyApp (shouldn't be used directly).
Move ignore_callback out of GeanyApp.
Rename sci_goto_line() argument unfold, like sci_goto_pos().
Make utils_goto_file_pos(), utils_goto_line(),
utils_switch_document() into static functions (they are UI-related,
so shouldn't be in utils.c).
Move utils_goto_pos() to editor.c, add mark argument.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2609 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-22 14:41:28 +00:00
Enrico Tröger
311b82ebb2 Rename document struct to GeanyDocument.
Rename filetype struct to GeanyFiletype.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2594 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-16 14:17:54 +00:00
Nick Treleaven
3a12da9daf Note: this commit breaks the plugin API (but is necessary so that in
future the ABI can stay stable when adding preferences).
Split up prefs into interface_prefs, toolbar_prefs, file_prefs,
search_prefs, tool_prefs, template_prefs, and add these to the
plugin API.
Move suppress_search_dialogs and search_use_current_word to
search_prefs, and rename accordingly.
Rename switch_msgwin_pages pref to switch_to_status.
Remove toolbar_ prefix for toolbar_prefs items.
Remove tool_ prefix for tool_prefs items.
Remove template_ prefix for template_prefs items.
Add Geany prefix for EditorPrefs.
Add Geany prefix for SearchPrefs.
Initialize search_prefs to zero in main.c.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2591 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-16 12:08:39 +00:00
Enrico Tröger
79df8d0c8d Use gtk_window_present() instead of gtk_widget_show() for Open File and Preferences dialog.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2569 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-10 08:32:30 +00:00
Nick Treleaven
00c722966c Rename GEANY_FILETYPES_ALL GEANY_FILETYPES_NONE.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2556 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-07 13:54:21 +00:00