Commit Graph

1733 Commits

Author SHA1 Message Date
Sebastian Ramacher
5df5357fb0 Finish moving of the page cache
Add two more signals to ZathuraRenderRequest to notify pages if they are cached
or not. This allows us to move some logic away from
cb_view_vadjutment_value_changed to more appropriate places.

ZathuraPageWidget will now release the surface if
* it gets the signal that the page is no longer cached and the page is
  invisible,
* the page is not cached and the render request is aborted.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-10-19 17:45:12 +02:00
Sebastian Ramacher
e7cd4e5f8c Move page cache to ZathuraRenderer
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-10-18 20:00:04 +02:00
Sebastian Ramacher
2c9e34fa8a Merge branch 'feature/renderer-take-2' into develop 2013-10-18 16:12:50 +02:00
Moritz Lipp
f3ef76f909 Initialize x_clipboard_text with NULL 2013-10-07 09:02:38 +02:00
Moritz Lipp
d423ff7305 Allow numbers for quickmarks 2013-09-14 23:43:39 +02:00
Sebastian Ramacher
4e010616e8 It's clipboard
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-09-13 00:01:55 +02:00
Sebastian Ramacher
9d70da690c Add Keywords
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-09-12 19:55:51 +02:00
Sebastian Ramacher
fef9d8f27e Update list of possible arguments
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-09-01 18:23:21 +02:00
Sebastian Ramacher
2ad2b9e0c4 Use signals for selected images and text
The page widget shouldn't have to care what should be done with selected images
and text.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-31 13:12:41 +02:00
Sebastian Ramacher
d48f1e023b Use primary selection as before
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-31 12:32:12 +02:00
Marwan Tanager
d09cd5c62c Make the X clipboard buffer configurable
This patch adds a new configuration setting, selection-clipboard, which allows
us to choose between the PRIMARY selection, and the CLIPBOARD selection, for
determining which X clipboard to use for storing mouse-selected data. It has
only two valid values: "primary" and "clipboard", with "clipboard" being set as
the it's default value.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-31 12:30:12 +02:00
Sebastian Ramacher
7127a46033 Fix deprecated gdk thread function calls
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-30 19:25:24 +02:00
Sebastian Ramacher
16fbefa5cf Abort requests if the page becomes invisible
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-30 18:59:47 +02:00
Sebastian Ramacher
a9f044c951 Set recolor info initially
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-30 18:55:42 +02:00
Sebastian Ramacher
07005886f8 Sort requests based on last view time again
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-30 17:50:34 +02:00
Sebastian Ramacher
8d53833d81 Move recolor code into separate function
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-30 16:10:44 +02:00
Sebastian Ramacher
8a9bd7f512 We don't need zathura
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-30 15:43:43 +02:00
Sebastian Ramacher
7d5863ae1d Clean up includes
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-30 15:05:00 +02:00
Sebastian Ramacher
08a87f679e Mark the request as done in the signal emitter
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-30 13:52:58 +02:00
Sebastian Ramacher
9e77b26a3d Don't loop
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-30 13:25:59 +02:00
Sebastian Ramacher
35bd419e49 Emit signal from main context
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-30 13:25:22 +02:00
Sebastian Ramacher
e733e032ce Add a callback for the signal
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-30 12:59:27 +02:00
Sebastian Ramacher
70cebde1f6 Merge branch 'develop' into feature/renderer-take-2 2013-08-30 12:45:41 +02:00
Sebastian Ramacher
b02d3d4b8f Move recolor state to the renderer
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-24 00:07:32 +02:00
Sebastian Ramacher
72573199fe Merge branch 'develop' of pwmt.org:zathura into develop 2013-08-22 22:27:16 +02:00
Sebastian Ramacher
b460c711a0 Save some forks
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-22 22:26:52 +02:00
Sebastian Ramacher
10115db62f Rewrite render thread as request based system
ZathuraRenderer is a thread pool rendering the pages. Every page widget holds a
ZathuraRenderRequest instance to request its page to be rendered. This object
can also be used to abort the request in case the page is not visible anymore.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-21 18:32:18 +02:00
Moritz Lipp
0afc0e5382 Merge tag '0.2.4' into develop
Version 0.2.4
2013-08-15 00:44:59 +02:00
Moritz Lipp
e5f36e4018 Merge branch 'release/0.2.4' 2013-08-15 00:44:52 +02:00
Moritz Lipp
3978dc30b4 Version 0.2.4 2013-08-15 00:44:50 +02:00
Sebastian Ramacher
eabc306ec8 Run update-po
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-15 00:37:57 +02:00
Sebastian Ramacher
033833c50d Document that workaround
And a remainder that we want to drop this once we don't support GTK+2 anymore.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-14 23:39:34 +02:00
Marawan Tanager
c5e593d3c5 Don't hide the inputbar in case of incremental search
Hiding the inputbar immediately before jumping breaks incremental search, as
Guillaume Duranceau stated in an earlier mail.

This patch makes an exception for the case of incremental search, at the cost
of a slight displacement when jumping back (^o) after ending the incremental
search (pressing the ESC key). The rest of the jump cases are unaffected.

This should makes things usable for now, until we move to GTK3 (link to it by
default) which has a new widget that suits this problem nicely (GtkOverlay), as
demonstrated by an earlier patch by Abdo Roig-Maranges which is now included on
the develop branch in girara repo as commit
70fd1cf354ee1300d4a9bdab9e939d5cc975979e, but is compiled only with GTK3.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-08-14 23:35:43 +02:00
Sebastian Ramacher
b5237680f2 Don't store surface for invisible and uncached pages
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-07-27 16:25:20 +02:00
Sebastian Ramacher
f98514d5ed Increase reference in zathura_page_widget_update_surface
and always destroy in render.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-07-27 01:34:42 +02:00
Guillaume Duranceau
c6140296cd Update page number on mouse scroll
When scrolling a document by holding the middle mouse button, page
number was not updated.
2013-07-27 01:19:25 +02:00
Guillaume Duranceau
12f7b393a6 new window-title-page option
When set to 'true', this option displays the page number in the title of
a zathura window.
2013-07-27 01:18:46 +02:00
Sebastian Ramacher
03ea66c6ff Replace tabs with spaces
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-07-26 16:13:41 +02:00
Moritz Lipp
d699424cbe Add missing field initializer 2013-07-26 09:10:47 +02:00
Moritz Lipp
71a332ede8 Fix return with no value 2013-07-26 09:04:08 +02:00
Sebastian Ramacher
2ad8571f41 Add missing includes
Also fix other compiler warnings.

Closes: #332

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-07-25 21:57:39 +02:00
Abdó Roig-Maranges
f3229a6a5a Initialize bisect state when opening document
Otherwise, when opening a document at page 1, and no jumps are added,
bisect does not understand it has to initialize the bisect range, and
does not move from page 1.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-07-07 17:43:30 +02:00
Moritz Lipp
2b6fa0cfe6 Fix missing else in if condition 2013-07-07 00:40:32 +02:00
Abdo Roig-Maranges
7cdd1e7719 refresh horizontal position in page_set
After page_set cb_view_hadjustment_changed must be called so that when
zoom-center is enabled, the page is recentered.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-07-07 00:14:56 +02:00
Abdó Roig-Maranges
7f42ccbdad Improve bisect setup
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-07-07 00:12:45 +02:00
Sebastian Ramacher
65da0ffa50 Decouple bisect from jumplist
Move some bisect state to zathura_t and manipulate the jumplist that much.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-07-07 00:03:52 +02:00
Marwan Tanager
a0c8f4c4ce Fix a memory leak
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-06-30 18:36:12 +02:00
Marwan Tanager
486698d9fb Logical error fix and cleanup for zathura_jumplist_reset_current
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-06-30 18:36:12 +02:00
Sebastian Ramacher
3cf8fba779 Add a note that I want this to go away
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-06-29 11:45:07 +02:00
Marwan Tanager
99b32ae109 Make the jumplist persistent on a per-file basis
This patch implements two new ZathuraDatabaseInterface functions, save_jumplist
and load_jumplist, for both the plain and sqlite backends (along with some
cleanups).

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-06-29 11:35:29 +02:00