Commit graph

1701 commits

Author SHA1 Message Date
Sebastian Ramacher
63a4152f93 Be more explicit about render jobs
Manage render jobs explicitly. This will help with situations where still have
an aborted request in the queue but a new render job has been requested.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-07 12:36:21 +01:00
Sebastian Ramacher
11de9b606b Fix a type and add some consts
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-07 03:56:29 +01:00
Sebastian Ramacher
1a34fb0257 Add some debug output for signals
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-07 03:29:38 +01:00
Sebastian Ramacher
3abf46a164 request and aborted need to be volatile
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-07 03:18:44 +01:00
Sebastian Ramacher
f093046d9c Reduce the amount of code a bit
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-07 03:00:10 +01:00
Sebastian Ramacher
903dae55e0 Get the correct adjustment
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-05 02:29:20 +01:00
Sebastian Ramacher
403d867ca4 Some CS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-05 02:23:52 +01:00
Sebastian Ramacher
08d799a1f8 Set viewport info early and set correct page size the first time
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-05 02:22:30 +01:00
Sebastian Ramacher
c51a7bdda1 Fix up header
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-05 01:07:05 +01:00
Sebastian Ramacher
dd81a0bcc8 Update dependencies 2013-11-04 20:59:06 +01:00
Sebastian Ramacher
234008e209 Change default GTK+ version to 3 2013-11-04 20:56:39 +01:00
Sebastian Ramacher
594e816aa8 Add Bugs section to README
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-04 20:55:54 +01:00
Sebastian Ramacher
2981996ecc Remove note about broken GTK+3 support
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-04 20:10:17 +01:00
Sebastian Ramacher
11bd96201a Run update-po
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-04 19:58:20 +01:00
Sebastian Ramacher
cc0ad0ad64 Make a string translatable 2013-11-04 19:57:23 +01:00
Sebastian Ramacher
2ec8675bec Update translations 2013-11-04 19:55:57 +01:00
Moritz Lipp
8103f6b8d8 Merge branch 'develop' of pwmt.org:zathura into develop 2013-11-04 17:44:37 +01:00
Sebastian Ramacher
b3fdb8c05e Document return value if an error occurs
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-04 15:38:13 +01:00
Moritz Lipp
5fed4db579 Merge branch 'develop' of pwmt.org:zathura into develop 2013-11-02 23:01:12 +01:00
Sebastian Ramacher
0b54230811 Run update-po for new translatable strings
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-01 14:11:40 +01:00
Sebastian Ramacher
a91108b078 Translate fields in cmd_info
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-01 14:06:56 +01:00
Sebastian Ramacher
a85074614d Fix typo in cmd_info (Closes: #353)
Thanks to tharvik for the patch.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-01 14:01:49 +01:00
Moritz Lipp
9e85c2f7c8 Reduce the scope of val_list 2013-10-31 16:43:44 +01:00
Sebastian Ramacher
7b8f5d17cb Implement image-selected event for GTK+3
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-10-31 14:53:51 +01:00
Sebastian Ramacher
3575157cb2 Connect the correct callback
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-10-31 14:39:32 +01:00
Moritz Lipp
73e0754d58 Resolve implicit declaration of render_all 2013-10-31 08:49:25 +01:00
Sebastian Ramacher
7d7fe1d864 Workaround printing quality issues
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-10-31 05:42:47 +01:00
Sebastian Ramacher
1241afbe89 Merge branch 'feature/redo-page-refresh' into develop
Conflicts:
	links.c
2013-10-31 04:35:30 +01:00
Abdo Roig-Maranges
9f201f4a1f need to set the page number before the position
In the case we want to automatically set the position by by passing -1
to position_set, we better tell it the page before.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-10-31 01:02:03 +01:00
Sebastian Ramacher
f10d847a95 CS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-10-30 03:35:56 +01:00
Sebastian Ramacher
e99be0fcce CS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-10-30 03:29:45 +01:00
Sebastian Ramacher
5c49792cb8 CS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-10-30 03:27:10 +01:00
Abdo Roig-Maranges
459b8ba3fc after a set_scale we need a render_all
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-10-27 02:49:46 +02:00
Sebastian Ramacher
0c0c3b8903 Redo version checks and add check for GTK
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-10-26 19:02:55 +02:00
Abdó Roig-Maranges
117a32c3d4 pkg-config is not happy with --atleast-version
Hi,

It seems that pkg-config complains when using --atleast-version together with
--cflags or --libs. I attach a patch.

Abdó.

From d01e128e7b4c2decb4d3a05e23b9b12cfda62879 Mon Sep 17 00:00:00 2001
From: Abdo Roig-Maranges <abdo.roig@gmail.com>
Date: Sat, 26 Oct 2013 16:51:39 +0200
Subject: [PATCH] pkg-config complains about --atleast-version

pkg-config spits out

  Ignoring incompatible output option "--atleast-version"

when using --atleast-version together with --cflags or --libs.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-10-26 18:29:05 +02:00
Abdo Roig-Maranges
e02806b6e2 get rid of the hide_inputbar hack
We no longer need to hide the inputbar to get the right jump position,
since now showing or hiding the inputbar does not change the position
stored in the document object.

Wen the adjustments get resized, the changed_callback resets the value
from what is stored in the document object, effectively recentering the
position to the middle of the viewport.
2013-10-26 17:13:57 +02:00
Abdo Roig-Maranges
84736dc89b remove zathura->global.update_page_number global hack
The callbacks are no longer aware of it anyways
2013-10-26 17:13:57 +02:00
Abdo Roig-Maranges
9367d646d9 get rid of tracking adjustments
They are not used anywere, and do not seem to become useful anymore in
the light of the new separation of document and view.
2013-10-26 17:13:56 +02:00
Abdo Roig-Maranges
860c748889 remove delayed versions of page_set and position_set
We don't need the anymore since the new page_set and position_set are
already 'delayed'.
2013-10-26 17:13:56 +02:00
Abdo Roig-Maranges
ab9338cb33 get rid of a couple of static variables to remember adjustment.
Now the document object remembers it! and refresh_view is the one who
restores the position.
2013-10-26 17:13:56 +02:00
Abdo Roig-Maranges
e51a3265b6 use the new document functions in sc_scroll
This way we get rid of page_calculate_offset that involves explicit GTK
calls. Also, we can make use of page_number_to_position to align page
and viewport as desired.

I've also tried to make the code for this function a bit more readable.
2013-10-26 17:13:56 +02:00
Abdo Roig-Maranges
ace0836a19 use the new document functions in sc_search
This way we can get rid of explicit GTK calls to the adjustment
2013-10-26 17:13:56 +02:00
Abdo Roig-Maranges
efc7d23f92 use the new document functions in link evaluation
We now use the data available on the document object to compute the
exact positioning of the link target.

This way we get rid of page_calculate_offset, which uses explicit GTK
calls.
2013-10-26 17:13:56 +02:00
Abdo Roig-Maranges
4a75efd4f2 use the new document functions for the jumplist
And get rid of explicit gtk calls to the adjustment
2013-10-26 17:13:56 +02:00
Abdo Roig-Maranges
6ca81e3716 use the new document functions for marks, bookmarks and initialization
We get the position data from the document object instead of the gtk
adjustment itself.
2013-10-26 17:13:56 +02:00
Abdo Roig-Maranges
f94d43d2e6 replace some page_set with refresh_view
page_set changes page and aligns the page according to settings. In
those cases we do not want to change the position, only refresh.
2013-10-26 17:13:56 +02:00
Abdo Roig-Maranges
1171bffb6b replace delayed versions of page_set and position_set
The new page_set and position_set behave as delayed, but with the
immediate availability of the new positions through the document
object. We no longer need to keep delayed and non-delayed versions!
2013-10-26 17:13:56 +02:00
Abdo Roig-Maranges
018e026e62 disable adjustment callbacks in index mode
Otherwise the document object gets updated with wrong position values,
because the adjustment belong to the index, not the document view.
2013-10-26 17:13:56 +02:00
Abdo Roig-Maranges
3634636227 adapt view_adjustment callbacks to new document/view separation
The adjustment callbacks act as an interface between position data in
the document object, and the adjustments.

We remove the horizontal centering code, as now it is done by
position_set. Those callbacks should not change the position read from
the document object in any way.

Also, we split the adjustment_value_changed callback into a vertical and
an horizontal version. Previously a single callback was reused for both,
horizontal and vertical. That lead to a subtle problem when coming out
of index mode. What happened was the following:

  1. horizontal adjustment bounds change coming out of index mode. This
     triggers an hadjustment changed signal.

  2. the hadjustment_changed callback handles it, and resets the
     hadjustment value, as the bound may have changed. This triggers a
     value_changed event.

  3. the value_changed callback handles the event, and captures the
     position for *BOTH*, horizontal and vertical adjustments, saving
     them to the document object.

  1..3 is repeated for the vertical adjustment.

  Now, if in 3. the horizontal adjustment bounds were not yet updated
  after the index mode, we got ourselves at the wrong vertical position.

This race condition is avoided now because both value_changed callbacks
*ONLY* handle their own direction, either vertical or horizontal, not
 both.
2013-10-26 17:13:56 +02:00
Abdo Roig-Maranges
c4245600c9 move adjustment code from sc_adjust_window to adjust_view
This new function adjust_view is in charge of recomputing the scale
according to adjustment settings and trigger a render_all.

adjust_view contains the old sc_adjust_window code, slightly simplified
thanks to the availability of the document_get_viewport_size.

Then it is used by sc_adjust_window, document_open and the
cb_view_resized callback. Makes slightly more sense this way than
calling the shortcut sc_adjust_window directly.
2013-10-26 17:13:56 +02:00