Commit Graph

243 Commits

Author SHA1 Message Date
Moritz Lipp
48183d6717 Correct the given scale value 2014-10-27 11:55:21 +01:00
Sebastian Ramacher
42c1780aef CS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2014-10-26 21:32:20 +01:00
Lingzhu Xiang
3e61e14fe3 Do not refresh if the zoom level does not change 2014-10-26 08:17:47 -04:00
Moritz Lipp
cea37334ce Additional check for event null pointer in sc_zoom 2014-10-23 12:48:34 +02:00
Moritz Lipp
9712257b62 Pass event to sc_mouse_zoom to prevent SIGSEGV 2014-10-23 12:39:20 +02:00
Moritz Lipp
44480523ac Pass actual event instead of NULL pointer to sc_scroll 2014-10-21 18:03:24 +02:00
Sebastian Ramacher
3f5568f631 Get rid of page_widget_alignment
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2014-09-27 02:19:38 +02:00
Sebastian Ramacher
d0bb3b8983 Test your commits before you push
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2014-08-21 00:33:01 +02:00
Sebastian Ramacher
fdff7076b7 Use event.x and event.y
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2014-08-20 23:54:52 +02:00
Sebastian Ramacher
7a997ef88f Merge remote-tracking branch 'projedi/smooth-scroll' into develop 2014-08-20 23:45:31 +02:00
Alexander Shabalin
82b6fac0a4 Implement smooth scroll and smooth zoom 2014-07-06 02:08:36 +04:00
Maxime Chéramy
6518472d89 Fix scroll down and up in double-page mode. 2014-07-05 20:28:18 +02:00
Sebastian Ramacher
8f61583af7 Style index mode with CSS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2014-04-26 23:32:38 +02:00
Sebastian Ramacher
70f8e20e19 Use the actual mode in mode toggle calls 2014-02-14 12:11:12 +01:00
Sebastian Ramacher
806b69a1fe Disable a mode_set call that hasn't been doing anything for ages
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2014-02-14 12:09:47 +01:00
Sebastian Ramacher
a85decc8cc Only copy selected text in normal and fullscreen mode
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2014-02-14 11:46:17 +01:00
Abdo Roig-Maranges
633889f291 align highlighted rectangles correctly
Align center of the rectangle with the center of the viewport, vor both
keyword searches and synctex forward search.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2014-01-17 16:39:55 +01:00
Abdo Roig-Maranges
1a8e211a3b properly scale and rotate rectangle
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2014-01-17 16:38:11 +01:00
Sebastian Ramacher
8d2e331b1a Fix up some types
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2014-01-10 18:53:21 +01:00
Sebastian Ramacher
bacdc19d23 Implement G and gg for index mode
Closes: #52

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2014-01-10 17:46:22 +01:00
Sebastian Ramacher
f504da0dd1 Implement TOGGLE for sc_navigate_index
Closes: #396

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2014-01-10 14:52:51 +01:00
Sebastian Ramacher
5bdbebab7d Merge branch 'develop' into feature/presentation-mode
Conflicts:
	config.c
2014-01-09 17:16:56 +01:00
Sebastian Ramacher
40fe7cdd9e Some typos
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2014-01-07 03:43:38 +01:00
Sebastian Neuser
aeaa900a94 Preserve horizontal position when scrolling to PAGE_TOP/BOTTOM 2014-01-01 19:28:20 +01:00
Sebastian Neuser
e8bc7b1e49 Implement shortcuts for scrolling to page top/bottom 2013-12-17 17:47:20 +01:00
Sebastian Ramacher
5a932e014c No need for padding anymore
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-29 18:05:40 +01:00
Sebastian Ramacher
064db00287 Half / full page scroll need to respect the view port size
They are not using the page size from the document.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-29 17:24:28 +01:00
Sebastian Ramacher
6788776bae Bail out early if we get TOP or BOTTOM 2013-11-29 17:08:01 +01:00
Sebastian Ramacher
6ee0f265a3 CS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-11-29 15:57:40 +01:00
Moritz Lipp
7f82bec71b Replace fullscreen mode with presentation mode 2013-11-25 23:10:35 +01:00
Sebastian Ramacher
f10d847a95 CS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-10-30 03:35:56 +01: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
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
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
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
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
Abdo Roig-Maranges
a0a64832d9 move zathura_get_document_size to document.c
It makes more sense, plus now the document knows about the page layout
and can do the computation.
2013-10-26 16:02:23 +02:00
Marwan Tanager
ed27f8b88e Minor cleanup
Since we 'continue' the loop if num_search_results is 0, there is no need for
the second check.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-10-26 15:12:33 +02:00
Marwan Tanager
cba5d8df77 Fix issue 345 (http://bugs.pwmt.org/issue345)
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-10-26 01:20:57 +02:00
Sebastian Ramacher
834bc8f4c9 CS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-10-26 01:16:19 +02:00
Abdo Roig-Maranges
3629e3acd2 fix gtk_widget_get_requisition deprecation warning in GTK3
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-10-26 01:12:49 +02:00
Moritz Lipp
f3ef76f909 Initialize x_clipboard_text with NULL 2013-10-07 09:02:38 +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
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
Moritz Lipp
71a332ede8 Fix return with no value 2013-07-26 09:04:08 +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