Colomban Wendling
4786796e9a
Fix build (oops, sorry)
2013-08-20 11:54:01 +02:00
Colomban Wendling
1fe7b4848e
Fix printing under Windows
...
For some reason the Scintilla widget's Pango context don't have a
resolution set on Windows, so we get an invalid one. Fix this by
correctly peek the resolution from the map if the context doesn't
have one by itself.
https://developer.gnome.org/pango/stable/pango-Cairo-Rendering.html#pango-cairo-context-get-resolution
Thanks to Matthew Brush for debugging this!
Closes #961 .
2013-08-20 11:51:45 +02: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
Colomban Wendling
d2a8a11587
Merge branch 'printing-with-scintilla'
2013-01-01 18:54:08 +01:00
Colomban Wendling
4423de1a72
Printing: fix improper margins when printing to a physical device
...
We were improperly adding the printing device margins to the area
where we print, leading to wider margins on physical outputs than
on PDF or preview outputs (which have no hard margins), as well as
wasting space and not respecting user's settings.
Closes #3580269 .
2012-11-02 21:48:49 +01:00
Colomban Wendling
9f32fdd1a4
Printing: draw the vertical separator line more accurately
...
Use the dimensions and offsets used by Scintilla to position our
separator line, since its position depends on where Scintilla drawn.
Closes #3580268 .
2012-11-02 21:48:49 +01:00
Colomban Wendling
55b8c7af3f
Printing: fix text resolution
...
Scintilla doesn't respect the context resolution, so we need to scale
its draws ourselves.
2012-11-02 21:48:48 +01:00
Nick Treleaven
00c2cc20ea
Fix gcc missing field initializer warning
2012-10-24 17:43:26 +01:00
Lex Trotman
42b3629aaf
Fix sign comparison warnings
...
GTK uses a signed page_nr parameter to callback draw_page despite
describing it as 0 based, cast it to unsigned for comparisons to
array len which is also unsigned.
2012-10-09 13:56:13 +11:00
Colomban Wendling
8f0ddfe4ef
Merge branch 'printing-with-scintilla'
...
Closes #3475444 , #2804000 and #2629121 .
2012-09-06 18:45:26 +02:00
Colomban Wendling
b82134e021
printing: Fix line number margin border position
2012-08-27 21:28:46 +02:00
Colomban Wendling
d80bc7ce56
Update FSF address
...
Closes #3557875 .
2012-08-24 19:25:57 +02:00
Colomban Wendling
4db0813a79
Rewrite GTK printing using Scintilla
...
We used to draw the pages to print ourselves, but it is a tedious and
error-prone task (and we did made mistakes) that Scintilla would do
better by itself. So, rewrite the GTK (e.g. non-external) print code
to use Scintilla's built-in capabilities of drawing the buffer's
content on the pages.
Not only this makes the code a lot simpler and shorter, but it gives a
more accurate render (proper handling of tab stops, wrapping on word
boundaries, no missing character when a wrapped line spans on multiple
pages, ...), and it is noticeably faster (around 3 times).
Additionally we now paginate properly, which fixes printing starting
after page 1 or printing non-contiguous pages (we used to always print
starting from page 1 and counting, no matter what pages were selected).
However, note that obviously the render is not the same, even though
it's quite similar.
2012-07-30 03:37:00 +02:00
Colomban Wendling
5772178d3a
printing: Avoid an useless allocation
2012-07-30 01:38:59 +02:00
Colomban Wendling
1c2c455b1d
Update copyright information
2012-06-18 01:15:04 +02: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
bd5fba7eb5
Remove extra whitespace at end of lines in all source files.
...
* Processed with rstrip-whitespace.py script added to scripts/ directory.
* Script run on all .c and .h files in src/ and plugins/ directories.
* Also remove more than one newline at the end of files.
2011-10-11 21:52:58 -07:00
Colomban Wendling
d06e9f4575
Remove $Id$ and $Date$ SVN keywords
2011-10-09 22:57:35 +02:00
Colomban Wendling
f1f7cac2fd
Fix unlikely but theoretically possible use of an uninitialized variable
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5884 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-08-06 18:33:04 +00:00
Colomban Wendling
acc1ad557c
Enable GTK printing support unconditionally
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5841 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-06-13 20:42:31 +00: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
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
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
ed96015c98
Always use white background color when printing (except for text
...
with a white foreground) to save ink (should fix #2968998 ).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5079 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-07-01 16:22:45 +00:00
Enrico Tröger
7ba4a81181
Update copyright information.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4518 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-01-01 22:55:18 +00:00
Enrico Tröger
d3c731575c
Improve printing status texts (patch by Dominic Hopf, thanks).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4430 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-11-17 22:56:46 +00:00
Enrico Tröger
a41e95b392
Enable embedded page setup properties in the (Unix) Print dialog on newer GTK versions ( closes #2870596 ).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4286 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-03 16:17:22 +00:00
Nick Treleaven
bc2b6829c5
Make ui_entry_add_clear_icon() take a GtkEntry, not GtkWidget.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4220 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-21 16:46:16 +00:00
Enrico Tröger
ba59bcd0dc
Plug a small memory leak and improve function signature of add_page_header().
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4207 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-17 18:03:18 +00:00
Enrico Tröger
08f4d7c178
Fix wrong alignment of printed pages when page headers are disabled ( closes #2856822 ).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4206 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-17 18:00:06 +00:00
Nick Treleaven
d563da620c
Rename utils_str_replace() utils_str_replace_all(), setting a
...
'gchar **haystack' argument instead of returning a new string.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4014 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-07-23 16:01:45 +00:00
Nick Treleaven
87e8f51e36
Add warning when printing and editor font is not monospaced.
...
Fix using GtkMessageType instead of gint param for
dialogs_show_msgbox*().
Add missing G_GNUC_PRINTF macro check to API dialog funcs.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3944 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-07-09 13:51:37 +00:00
Enrico Tröger
5c91e8aefd
Add utils_color_invert() and use it in highlighting.c and printing.c.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3773 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-05-08 17:00:28 +00:00
Enrico Tröger
63dc62101a
Ignore the invert syntax highlighting colours setting when printing to not print characters on a dark background ( closes #2785244 ).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3764 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-05-02 17:27:59 +00:00
Enrico Tröger
ab88bb8270
Minor string improvements (spotted by Jean-Philippe Moal, thanks).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3691 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-06 16:01:15 +00:00
Enrico Tröger
fbbe778eeb
Fix punctuation.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3621 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-05 13:03:51 +00:00
Enrico Tröger
49b5c0671c
Allow an empty value for the date format in the print settings to omit the date/time string in the print header.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3599 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-02-24 18:27:21 +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
644a9cfbff
Add a progressbar widget to the statusbar and use it to show progress when building with the Make commands, when printing and when using Find in Files.
...
Add progressbar convenience functions and ui_entry_add_clear_icon() to the plugin API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3517 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-27 20:19:43 +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
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
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
Nick Treleaven
664a1d77f0
Fix using correct display tab width when the Tabs & Spaces indent
...
type is set.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2865 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-08-08 14:33:23 +00:00
Enrico Tröger
19247c47b8
Fix compilation with GTK >= 2.10.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2864 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-08-08 07:47:06 +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
7db4bfe493
Rename GeanyEditor::scintilla to GeanyEditor::sci.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/editor-struct@2776 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-14 11:13:54 +00:00
Nick Treleaven
8dcfb7e336
Update for doc->editor->scintilla.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/editor-struct@2764 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-08 11:26: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
Enrico Tröger
2baec0ea70
Remove code that should not have been comitted. Oops.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2627 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-29 18:07:18 +00:00