7378 Commits

Author SHA1 Message Date
Colomban Wendling
73a1589618 Remove empty table rows in the Glade file
This avoids glade from emitting some useless placeholders.
No UI changes.
2014-05-26 18:11:58 +02:00
Colomban Wendling
e9795732b6 Merge PR#113 2014-05-26 16:45:25 +02:00
Colomban Wendling
2b9ecc2e4f Remove unused variables and avoid variable shadowing 2014-05-26 16:24:24 +02:00
Colomban Wendling
6e58ef3755 Don't use the notebook page widget for tab popup
Directly use the GeanyDocument rather than pass the notebook page
widget and get the document from that.  This makes the code more future
proof and less weird.
2014-05-26 16:21:16 +02:00
Thomas Marititz
54724ee2ad notebook: Fix crash on tab close
Since infobars notebook_tab_close_clicked_cb() wants a GeanyDocument as userdata.
show_tab_bar_popup_menu() on the other hand wants the actual GtkNotebook child.
2014-05-26 11:43:57 +02:00
Matthew Brush
8ea54993c5 Merge branch 'kugel/document-messages2'
This is an extension of the long-lived `document-messages` branch.

It is mostly adjusted according to the feedback on the mailing list.
There might existing some usability issues to be resolved, but this
is the first step towards non-modal document notifications.
2014-05-25 18:55:07 -07:00
Thomas Martitz
19e24fb5ee infobars: Dismiss the info bar when reloading via toolbar button/keybinding. 2014-05-24 19:42:46 +02:00
Thomas Martitz
b96daf6fc0 infobars: Do not use GeanyWrapLabel for now, it has problems on gtk3. 2014-05-24 16:32:58 +02:00
Thomas Martitz
100e0e1bf1 infobars: Intercept some keys when the info bar is shown to allow interacting with it using the keyboard only.
When the info bar is shown tab/shift+tab and escape are intercepted.
* tab/shift+tab change the focus to the info bar buttons which can then be
  cycled through with more tab presses
* escape closes the info bar (same as clicking cancel)

Both keys aren't needed for the document because it's read-only. Other keys,
such arrow/page up/down, remain to the document for navigating.
2014-05-24 15:05:33 +02:00
Thomas Martitz
1dc96f1e50 infobars: Cancel "reload file" dialog when spawning the "resave file" one.
When the file was deleted from disk the message that the file is newer on
disk has become out of date and irrelevent.
2014-05-24 15:05:15 +02:00
Thomas Martitz
b487d8dea3 infobars: Do not show reload and resave messages more than once since only the
last one (respectively) is significant to the user.
2014-05-24 15:05:14 +02:00
Thomas Martitz
5117940ff6 infobars: Make document read-only while infobar is shown.
This avoids accidental changes the file until the infobar is ackowledged. The
document can still be viewed and scrolled through but modifications and saving
are disabled. Of course ignoring the document by changing to another one is
also possible.
2014-05-24 15:05:14 +02:00
Matthew Brush
43bff93046 Make locate_sci_in_container() search recursively
Supports changes to the widget heirarchy in the future.
2014-05-24 15:05:14 +02:00
Matthew Brush
e469aa6acc Use document_show_message() when a file is removed from disk
The close button is removed from the dialog also since the user can easily
choose to close the document normally.

Setting default response removed since it's not working yet.
2014-05-24 15:05:08 +02:00
Matthew Brush
667c35a004 Use document_show_message() when a file is externally modified
Two other related changes are that document_set_text_changed() is used to
indicate that the buffer is different from what's on disk and also that
the 'Close' button has been removed from the dialog since the user can easily
just close the document themselves the normal way.
2014-05-24 14:47:57 +02:00
Matthew Brush
a6bbea53c8 Add new function document_show_message() 2014-05-24 14:47:57 +02:00
Matthew Brush
9f587e9c26 Pack Scintilla widgets into a GtkVBox and use it as the notebook page.
This is to allow stacking widgets such as GtkInfoBar above the Scintilla
widget in each tab.

notebook.c need to be changed because the document isn't the direct widget
anymore which was assumed for tab closing.
2014-05-24 14:46:49 +02:00
Enrico Tröger
f3ac7480c5 Re-order header includes and cleanup unused imports 2014-05-24 13:33:27 +02:00
Enrico Tröger
34de4b655e Merge pull request #276 from codebrainz/win32-includes
Re-order win32.[ch] includes a little bit to unbreak build
2014-05-24 13:15:39 +02:00
Matthew Brush
238ab56279 Re-order win32.[ch] includes a little bit to unbreak build 2014-05-24 04:01:09 -07:00
Enrico Tröger
1bacf869e0 Extend use of os.path.join() to construct platform compliant paths 2014-05-24 11:32:45 +02:00
Colomban Wendling
7d38f05121 Initial support for single-line regular expressions matching 2014-05-22 15:49:01 +02:00
Colomban Wendling
46affaf19e Update Scintilla to 3.4.2 final release
No code changes.
2014-05-22 03:34:09 +02:00
Matthew Brush
4d22aa4850 Merge branch 'header-cleanup'
Closes #272
2014-05-21 15:43:40 -07:00
Matthew Brush
50feb0e05c Improve support of compiling without gettext
* If GETTEXT_PACKAGE is not defined (ex. by build system/user) then
  define it to NULL. Most GLib gettext-functions allow passing NULL
  to use the domain set with textdomain().
* Improve the ngettext() wrapper macro.
* Improve/fix bind_textdomain_codeset() wrapper macro.
* Fix argument in bindtextdomain()
* Cast bind*textdomain*() results with (void) to get rid of compiler
  warnings when building without GETTEXT_PACKAGE defined.
2014-05-21 15:38:16 -07:00
Matthew Brush
34888d6baf Add some info about header includes to HACKING file 2014-05-21 15:38:16 -07: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
6f87aac118 Normalize use of header guards and extern "C" guards
* Always define GEANY_FOO_H to 1 in the header guards
* Always put a G_BEGIN_DECLS/G_END_DECLS guard in every header for
consistency, even private ones where it doesn't matter.
* Always include either <glib.h>, <gtk/gtk.h> or some other header
that will provide G_BEGIN_DECLS before using it. In a lot of headers
that use glib.h and gtk/gtk.h stuff anyway, this resolves an implicit
dependency they had on them being included before that header.
* Always put a comment at the #endif part of the guard so it's
easier to see what it applies to.
* Always use an underscore between the header guard identifier's words
even though the filename doesn't have one.
2014-05-21 12:18:26 -07:00
Matthew Brush
fec15c61c4 Move typedefs out of geany.h and into their own headers
This helps to avoid the requirement that geany.h be included before
using any of the changed headers.
2014-05-21 12:18:25 -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
Colomban Wendling
3d549f59e8 Fix a sign comparison warning 2014-05-21 16:13:22 +02:00
Colomban Wendling
894207d0e3 Don't use deprecated gdk_get_display() 2014-05-21 16:08:38 +02:00
Frank Lanitz
0a03e414e7 Fix a little typo on Dutch translation
Fixes a little typo on Dutch translation reported by MarioJC
2014-05-20 20:24:16 +02:00
Colomban Wendling
df5edd0032 Scintilla: fix missing redraws on GTK < 3.9.2
Also, make the recent redraw fixes depend on the GTK version Scintilla
is running against, rather than built against.  This allows for the
same build to work with both GTK < 3.9.2 or >= 3.9.2.
2014-05-19 14:31:11 +02:00
Colomban Wendling
e566435dfa Merge branch 'scintilla-update-342'
This fixes flickering under GTK >= 3.10.
2014-05-17 22:23:43 +02:00
Colomban Wendling
67329f2b98 Update for new Scintilla styles
The new C styles escapesequence and taskmarker are currently mapped
conservatively, and may benefit from a more visible mapping.
2014-05-17 22:17:44 +02:00
Colomban Wendling
9bcdd64be9 Update Scintilla to 3.4.2 pre-release 2014-05-17 22:15:57 +02:00
Colomban Wendling
f3d96ef91d Re-generate with Glade 3.8.5
3.8.5 is supposed to fix the unstable file output, hopefully making
further edits generate small diffs, not rearranging the whole file for
no good reason.

Note that this commit may introduce UI problems if the output actually
isn't equivalent, the diff making it nearly impossible to review
manually.  Keep an eye open for such problems.
2014-05-15 03:13:11 +02:00
Colomban Wendling
d8aaa59f9a Python: fix parsing of variables assigned to triple quoted strings
Fixes #262.
2014-05-12 21:52:03 +02:00
Colomban Wendling
0e5d699a13 Python: remove a redundant macro 2014-05-12 21:51:59 +02:00
Colomban Wendling
a6b1433e66 Fix modulo by zero, resulting in FPE
Fix modulo zero error resulting in floating point exception, and then
crash. This was introduced in fd6ce2da11e9f2d20cb96236753662c23feaecb4.

Closes #265.
2014-05-07 16:00:49 +02:00
Colomban Wendling
de57548a71 Fix a few unlikely corner-case leaks
Fix a few leaks that can only happen in case of programming error.

Thanks to Pavel Roschin and his cppcheck for spotting them!
2014-05-05 16:03:25 +02:00
Colomban Wendling
f366150f7a Fix return with no value within a function returning non-void (oops) 2014-05-05 14:52:05 +02:00
Colomban Wendling
435d32ad1d Fix duplicate msgids in Japanese translation (oops)
75e10f49fc8b12b5fefc719e0e15e2dfe43eeda3 broke Japanese translation
because it had been re-generated since the first recent mnemonic
changes, leading for the automatic update in that commit to create
duplicate entries.
2014-05-05 14:49:26 +02:00
Colomban Wendling
70ce9d8141 Small update of the British English translation for new and updated strings 2014-05-05 05:32:52 +02:00
Colomban Wendling
75e10f49fc Update translations for recent mnemonic and wording fixes
There is no need to require the translators to review their translation
for these changes as the mnemonics and wordings are specific to the
language.  The update here will only save translators from having to
manually check and and remove the fuzzy marks from those strings.
2014-05-05 05:09:13 +02:00
Colomban Wendling
1e405ce88e Keep exact menu item string as keybinding label
Using the exact same string avoids duplicate translation, and here only
mnemonic changes were introduced with commit
95306ac8db4fc38ad7ba7e172328cef5117efaf0.
2014-05-05 05:09:13 +02:00
Colomban Wendling
1e50962de2 Fix some conflicting mnemonics in the menus 2014-05-05 05:09:13 +02:00
Matt Copperwaite
e61bba1bc3 Reword "replace by tabs/spaces" as "replace with" 2014-05-05 05:09:13 +02:00
Matthew Brush
f94976495d Add more details about menu mnemonics 2014-05-04 12:14:31 -07:00