166 Commits

Author SHA1 Message Date
Colomban Wendling
87c6cefc19 Remove dead assignment
`entries_modified` global is only used by on_name_entry_changed() and
on_entries_changed(), both of which are only ever called from
project_new() scope -- which already initializes this variable.
2014-08-12 16:17:39 +02:00
Colomban Wendling
0b2b647a6d Remove an unnecessary dynamic allocation 2014-08-12 14:39:53 +02:00
Nick Treleaven
e1988964c1 Fix Windows build 2014-08-01 12:05:30 +01:00
Colomban Wendling
47e9e6c000 Ask whether to overwrite the project file when creating a new project 2014-07-04 17:54:07 +02:00
Colomban Wendling
7f7f66978b Add tooltips to explain the purpose of the New Project dialog fields 2014-07-04 17:53:24 +02:00
Colomban Wendling
11b50493fc Use ui_button_new_with_image() to build image buttons 2014-07-04 17:50:37 +02:00
Matthew Brush
4efcbab332 Include what you use
This is a mega-commit - because most of it had to be done in one go
otherwise some commits would fail to compile - that attempts to fix a
few problems with Geany's includes as well as various other related
cleanups. After this change it's easier to use includes and there's
little worry about which order things are included in or who includes
what.

Overview of changes:

* Include config.h at the start of each source file if HAVE_CONFIG_H
  is defined (and never in headers).
* Go through each source file and make the includes section generally
  like this:
  - Always config.h first as above
  - Then if the file has a header with the same name, include that
  - Then include in alphabetical order each other internal/geany header.
  - Then include standard headers
  - Then include non-standard system headers
  - Then include GLib/GTK+ related stuff
* Doing as above makes it easier to find implicit header include
  dependencies and it exposed quite a few weird problems with includes
  or forward declarations, fix those.
* Make geany.h contain not much besides some defines.
  - Add a little header file "app.h" for GeanyApp and move it there
  - Move "app" global to new "app.h" file
  - Move "ignore_callback" global to "callbacks.h"
  - Move "geany_object" global to "geanyobject.h"
* Add an include in "geany.h" for "app.h" since GeanyApp used to be
  defined there and some plugins included this header to access
  GeanyApp.
* Include "gtkcompat.h" everywhere instead of gtk/gtk.h so that
  everywhere sees the same definitions (not a problem in practice AFAIK
  so this could be changed back if better that way.
* Remove forward declarations from previous commits as some people
  apparently consider this bad style, despite that it reduces inter-
  header dependencies.

TODO:
* As always, to test on win32
* As always, to test with not Autotools
* Test plugins better, both builtin and geany-plugins, likely API/ABI bump
* Test with various defines/flags that may change what is included
* win32.[ch] not really touched since I couldn't test
2014-05-21 15:37:19 -07:00
Matthew Brush
23d9cad7dc Start to make it easier to compile the core in isolation
This is for work on making the files scannable by GObject-Introspection
but is still useful otherwise (even fixes a FIXME in the comments). I
made this by using a simple GNU Make file and trying to compile the
sources each on their own without all the build system infrastructure.

* Add keybindingsprivate.h file to hold private GeanyKeyGroup structure
and remove it from the GEANY_PRIVATE guard in keybindings.h.
* Move private members that were guarded by GEANY_PRIVATE from
GeanyFiletypes to GeanyFiletypesPrivate and remove guarded build.h
include.
* Move private members that were guarded by GEANY_PRIVATE from
GeanyProject to GeanyProjectPrivate.
2014-05-21 12:17:59 -07:00
Nick Treleaven
0998f1c19c Make code more readable by renaming poorly named macros NZV and NVL
Closes #159
2013-08-14 21:54:20 -07:00
Matthew Brush
e0245df568 Make "Create" button default for New Project dialog
So it activates when you press the enter/return key in one of the
entries.
2013-04-26 14:56:55 -07:00
Nick Treleaven
c9f68df683 Fix cancelling Project Close when showing the unsaved changes dialog 2012-11-21 13:34:35 +00:00
Colomban Wendling
c1a7b1b475 Fix various packing issue affecting GTK3 but compatible with GTK2 2012-09-28 18:06:58 +02:00
Colomban Wendling
5ada77df70 Don't use deprecated gtk_box_pack_start_defaults() 2012-09-13 16:34:18 +02:00
Colomban Wendling
d80bc7ce56 Update FSF address
Closes #3557875.
2012-08-24 19:25:57 +02:00
Matthew Brush
e62bec43fc Use g_build_filename() instead of g_strconcat() for paths 2012-08-09 18:21:43 -07:00
Colomban Wendling
1c2c455b1d Update copyright information 2012-06-18 01:15:04 +02:00
Jiří Techet
ca9dca94f8 Drop 'already' from the message in project close confirmation dialog
Suppose you have project A open and want to open project B. Then the message
saying "The 'A' project is already open" displays. This is slightly confusing
and feels like if you were trying to re-open project A even though you
are opening different project. The message without 'already' looks clearer
in this context.
2012-02-20 00:20:14 +01:00
Jiří Techet
8e2f7db298 Modify project dialog signals
Rename project-dialog-create signal to project-dialog-open because now
the dialog exists all the time and the signal name is misleading. Add
project-dialog-close signal to indicate that project dialog has been closed
and plugins can remove their tabs when needed.

In addition, bump plugin API and ABI version.
2012-02-20 00:20:03 +01:00
Nick Treleaven
b287553e4a Use 'SETPTR' instead of 'setptr'
This makes it clearer we're using a macro.
2012-01-25 16:26:16 +00:00
Nick Treleaven
21cd7bb213 Add Project overrides for 'Saving files' checkbox options 2012-01-19 18:17:12 +00:00
Nick Treleaven
8a928956a4 Fix project dialog recreation (oops)
Remove memset - rely on static data to be zeroed.
2012-01-09 16:43:14 +00:00
Nick Treleaven
fa3b07bcff Fix missing initializers warning on = {0} 2012-01-09 15:56:59 +00:00
Matthew Brush
31bc70d0f3 Fix one-off leak by allocating PropertyDialogElements on the stack
Also prevents following a whole code path for nothing, by only calling
create_properties_dialog() once per run.
2012-01-08 11:48:54 -08:00
Matthew Brush
6968a1a957 Make it so project properties form errors can be corrected (oops)
Was broken during last commit.
2012-01-08 11:34:27 -08:00
Matthew Brush
c85b89afdd Port more of the Project properties dialog to Glade
Fixes issue where dialog was being destroyed and would not show 2nd time.
2012-01-08 11:24:21 -08:00
Colomban Wendling
0aea05d10d Fix various integer signedness and minor styling issues
Most noteworthy change is that all build commands IDs and groups are
now unsigned everywhere negative values aren't explicitly handled with
a special meaning.  This should not change anything in behavior, only
makes clear the index won't underflow.
2011-12-18 00:32:22 +01:00
Matthew Brush
0a16ec7520 Merge branch 'master' into gtkbuilder
Conflicts:
	src/interface.c
	src/vte.c
2011-11-06 23:44:24 -08:00
Colomban Wendling
36ebb1f2b7 Use canonical macros for stock items rather than plain strings
This makes the code more readable, potentially more future-proof (if
the actual string changes) and better style (catches possible typos at
build-time).
2011-10-30 22:01:49 +01:00
Matthew Brush
6099e8d3df Rename duplicate widgets in project dialog 2011-10-22 11:58:09 -07:00
Matthew Brush
72e856947e Rework GtkBuilder code to behave more like old Glade 2 code
* Put back ui_hookup_widget and ui_lookup_widget functions
* Put back lookup_widget code in stash.c
* Emulate old create_*() functions from interface.[ch].
* Hookup all the GtkBuilder widget's to their top widgets like Glade 2
  generated code would've done.
* Misc changes to accomodate the above.
2011-10-19 00:44:35 -07:00
Matthew Brush
af093c2ddf Remove interface.c/h files and put code into ui_utils.c/h. 2011-10-10 15:20:15 -07:00
Matthew Brush
cfedadae27 Remove lingering Glade 2 create_*() functions.
Add interface.h includes in prefs.c, project.c, stash.c and ui_utils.c.
2011-10-10 13:56:37 -07:00
Colomban Wendling
d06e9f4575 Remove $Id$ and $Date$ SVN keywords 2011-10-09 22:57:35 +02:00
Colomban Wendling
5d606ce351 Deprecate ui_widget_set_tooltip_text() in favor of gtk_widget_set_tooltip_text()
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5840 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-06-13 18:41:50 +00:00
Enrico Tröger
3ed484ead9 Focus the editor widget after loading project session files.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5829 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-06-02 21:16:43 +00:00
Colomban Wendling
8da9119bbb Fix project patterns and make them visible
Project patterns support was almost present but deactivated by default
because they were not used for anything. Enable them and change the
pattern separator to space similarly to the find in files dialog.

Based on a patch by Jiří Techet, thanks.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5752 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-30 21:50:22 +00:00
Colomban Wendling
4c7ad1f113 Add possibility to detect the indentation width from the file content
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5631 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-26 17:25:24 +00:00
Colomban Wendling
7698bf60a7 Improve usage of G_(UN)?LIKELY()
G_(UN)?LIKELY() should be only used on whole conditional expressions,
and only if the branching is very highly predictable, not if it is only
more probable.

These macros should be used with care because a wrong prediction may
be a lot worst than what a good prediction can give.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5625 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-24 22:00:18 +00:00
Enrico Tröger
bf4067f910 Rename utils_is_file_writeable() into utils_is_file_writable().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5539 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-02-06 16:47:18 +00:00
Enrico Tröger
426dbff4b6 Add a warning if writing the project file fails on close.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5538 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-02-06 16:36:04 +00:00
Enrico Tröger
277e2c2cdf Improve error checking when trying to write project files (patch by Colomban Wendling, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5537 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-02-06 16:32:49 +00:00
Enrico Tröger
6ac2623208 Update copyright information.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5528 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-01-19 19:39:09 +00:00
Nick Treleaven
ff6354d833 Remove unnecessary 'global' from long line editor pref field names.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5432 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-23 17:36:29 +00:00
Nick Treleaven
63df228c08 Remove unnecessary gpointer casts.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5415 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-18 16:25:11 +00:00
Nick Treleaven
cb262580b3 Fix saving project indent prefs straight after using project
properties.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5302 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-18 14:16:08 +00:00
Nick Treleaven
3d9bac808d Add plugin signals project-dialog-create and
project-dialog-confirmed so plugins can append a Project Properties
notebook tab (patch by Jiří Techet, thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5235 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-16 15:14:09 +00:00
Nick Treleaven
9add067c04 Remove the "Set build working directories" button from the project
properties dialog (patch by Jiří Techet, thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5194 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-08-24 12:07:28 +00:00
Nick Treleaven
d59fcdd506 Make the Properties dialog filename a label and put it first (patch
by Jiří Techet, thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5193 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-08-24 11:41:56 +00:00
Nick Treleaven
598e7c91e2 Show the Project Properties build tab when choosing 'Set Build
Commands' for now to prevent confusion with non-project commands.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5094 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-07-07 12:04:28 +00:00
Enrico Tröger
48064120f8 Small improvements to speed up quit process with many open documents.
Avoid calling gtk_notebook_remove_page() on exit as it takes a lot of time.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4921 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-16 17:43:24 +00:00