Commit Graph

109 Commits

Author SHA1 Message Date
Riccardo Magliocchetti
068c04fb06 Bump gtk+ version to 2.18
2.18 is the version available in RHEL 6 released in 2010.

Change-Id: I4cd4fc89f6b51e6f58ca72b8182f80316b1f4f88
Reviewed-on: https://gerrit.libreoffice.org/19330
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-10-14 08:09:40 +00:00
Miklos Vajna
27fa10fa53 gtktiledviewer: drop tiles on set-part event
When changePart() is called, we have two type of actions:

- the ones we want to execute only in case the part was changed by the
  user (and not programatically -- e.g. because the request came from
  the widget)
- the ones we want to execute all the time

Resetting the view (so the tile buffer drops all the tiles) is something
we want to do all the time, that's one of the needed things when the
set-part event is emitted.

Change-Id: Ic6bfbe460dc5a3fd8834f3b1ef93436fc9d3ad84
2015-10-12 14:24:58 +02:00
Miklos Vajna
23ac7f2fb5 lokdocview: log paintTile() arguments
Change-Id: I8015c8030c1c7f53ae1de053fe268a33464834ad
2015-10-06 12:03:34 +02:00
Miklos Vajna
aa3f607f80 gtktiledviewer: make it possible to trigger SearchItem.Command
Change-Id: I210da07802bae1f2f2948976bc0faf90e93152b4
2015-10-05 12:05:00 +02:00
Miklos Vajna
22d342a82f lokdocview: handle LOK_CALLBACK_SEARCH_RESULT_COUNT
Change-Id: I0d1b641654e0de65169e19bb5843ea11b43a90a3
2015-10-05 12:05:00 +02:00
Miklos Vajna
af29b2b57c gtktiledviewer: fix leftover import progressbar in createView()
Change-Id: Ia71e80c521cdc6a8e4df52e51e063a44a0dd53df
2015-09-21 07:30:26 +02:00
Miklos Vajna
43b2103f93 gtktiledviewer: don't crash on opening non-existing files
Change-Id: Ic48adaf038e8fbcc86a94b5e351d2f963fcfcd16
2015-09-21 07:30:26 +02:00
Miklos Vajna
855e1bac1d gtktiledviewer: add setupWidgetAndCreateWindow() to avoid copy&paste
Change-Id: Ibbbaaa1c148cfd4578ad37e0f99b62ab885a1a83
2015-09-21 07:30:19 +02:00
Miklos Vajna
c1d7214531 gtktiledviewer: set up a new GtkWindow for a new view
Change-Id: I9dcb5871c231a49bcd65a1187df6c3c81f92bd55
2015-09-21 07:30:19 +02:00
Miklos Vajna
8d8a8e1a2e gtktiledviewer: factor out setupDocView() from main()
Change-Id: Iac803f03267859c11f0f9090346b09b90c115b76
2015-09-21 07:30:18 +02:00
Miklos Vajna
2b69ce33ed gtktiledviewer: factor out createWindow() from main()
Change-Id: Ib7ccd2192247805205b65e5e8da67bcc826f4d31
2015-09-21 07:30:18 +02:00
Miklos Vajna
d51e3f7877 gtktiledviewer: allow findbar in multiple windows
With this, all previously global data is now stored per-window in the
g_aWindows map.

Change-Id: I45b4449ee7d516106ea0b039d1af97db49edf759
2015-09-21 07:30:17 +02:00
Miklos Vajna
d8bf31e129 gtktiledviewer: allow part selector in multiple windows
Change-Id: Ib31fca3d8b4119704fb1a5c3cee885e7c239c247
2015-09-21 07:30:16 +02:00
Miklos Vajna
bec8a1b74f gtktiledviwer: tool item registration is per-window
Change-Id: I11a6cda7b9b8949c48c201c4bd467b49f2f43ca5
2015-09-21 07:30:16 +02:00
Miklos Vajna
91d67ec9a5 gtktiledviwer: allow GtkToolItems in multiple windows
Change-Id: I6c19a9bdd34163d12047929170e5cfa7bb9a5820
2015-09-21 07:30:15 +02:00
Miklos Vajna
36fa8d443a gtktiledviewer: allow multiple status bars
Change-Id: I84c4102937deee662814c41607ee8de380a067f2
2015-09-21 07:30:15 +02:00
Miklos Vajna
f6ef6af23d gtktiledviewer: allow multiple DocView instances
Change-Id: I4e8a08d71a94445e8fd30563867a2741cad862e5
2015-09-21 07:30:15 +02:00
Miklos Vajna
20df29e660 gtktiledviewer: these globals can be static
Change-Id: Ife0a4bb1102f6135e297dc69ba5b52b89a5dd9dd
2015-09-21 07:30:14 +02:00
Miklos Vajna
179a0d0ea0 gtktiledviewer: add button tooltips
Change-Id: Ifad67adf80761118bbbfb110cbadd493214fee93
2015-09-21 07:30:12 +02:00
Miklos Vajna
655c7877a0 lok::Document: add createView()
Change-Id: Ic871ec41992b611b10958799b2dc12375a91efe4
2015-09-21 07:30:12 +02:00
Miklos Vajna
88c51cd55d LOK: don't use unstable API unconditionally when including the GTK header
Change-Id: I679ddfdadbf4746d3fba64d3d5157ec070b4f6dd
2015-09-11 15:05:32 +02:00
Pranav Kant
a9b266aeea gtktiledviewer: Jump to cursor position when it changes
Change-Id: If50ac0bd21e59b0e0639aa353513451e88ae2a9f
2015-08-17 11:49:34 +02:00
Jan Holesovsky
512b782cf4 LOK: Implement parts for Writer too.
In Writer, the meaning of 'parts' is a bit different than in Calc or Impress.
In Writer, the parts mean pages, and the document does not give a completely
different view, the cursor just jumps to the given page.

It is up to the client to follow the cursor appropriately to have the desired
effect.

Change-Id: I56b3264e0340cd639bdabfa92b74b52bd1f391a5
2015-08-01 02:23:32 +02:00
Pranav Kant
cb94e003c0 gtktiledviewer: Fill whole statusbar with progressbar
We don't have anything yet to put in statusbar. Let progressbar
fill the whole width of statusbar for now.

Change-Id: I4cd8745e997a0d2b917bc5baf358b097174d0df9
2015-07-28 15:04:13 +02:00
Pranav Kant
da129b682f lokdocview: Emit load-changed signal showing load progress
Change-Id: I69b4c05d12c0c0b2ca6b7d1ad76ed74cc1f4346a
2015-07-28 15:04:13 +02:00
Pranav Kant
645f005434 lokdocview: Call open_document in another thread
This is to keep the widget responsive during document load.

Change-Id: I81acaffc75ca7deddd6cc2de6abae22d009d40cd
2015-07-28 15:04:13 +02:00
Mihai Varga
ed9d6ef1e6 gtktiledviewer: method for resetting all tiles
[ Miklos Vajna: The point of the change is that without this, part switching in
Calc does not work, as Calc does not invalidate everything after a part switch
(unlike Impress), and we suppose the right fix for this is to let the clients
throw away the tiles, rather than letting Calc send out invalidations, too. ]

Change-Id: Id368b955c54efb87ecf3d59278ddb5cdbb2e7856
Reviewed-on: https://gerrit.libreoffice.org/17267
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-07-22 07:43:04 +00:00
Caolán McNamara
48abc97220 g_assert_nonnull was not declared
Change-Id: Ie98c37d4bdaa365ac27e8620fb5bbecbb0faccdf
2015-06-29 13:31:56 +01:00
Pranav Kant
a482d3289f gtktiledviewer: Don't continue on widget init failure
Change-Id: I5916357903fad5878d29bc31f21af45816a45ec5
2015-06-29 13:33:36 +02:00
Pranav Kant
da49b83398 lokdocview: Remove superfluous *_post_key()
Instead directly let LOKDocView handle the input.

Change-Id: I260a460df23c3e2e5c78d8b363bb864ae5c63dab
2015-06-29 13:33:35 +02:00
Pranav Kant
9d2fa92147 lokdocview: Don't handle hyperlink clicks
Instead emit the signal 'hyperlink-clicked', and let the
application decide how it wants to handle the hyperlink clicks.

Change-Id: Ief72bbd16727e140cacf28b852ad43952c02f7ae
2015-06-29 13:33:35 +02:00
Andrea Gelmini
69c88a32aa Fix typos
Change-Id: Ifd126a535f18db79a18aaec61b76cdf26ab33dff
Reviewed-on: https://gerrit.libreoffice.org/16522
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-06-28 12:28:31 +00:00
Pranav Kant
a2aaf911e2 lokdocview: Use GInitable
The construction of LokDocView widget can fail because it
involves initializing the lok context via lok_init.

Having lok_init calls in constructed virtual method is a bad idea
since it assumes that construction will never fail. So, implement
GInitable for this class, and move the object initialization from
constructed to initable.

Change-Id: Idf18a054cf8ef2e946392458ec52cb0107bd7454
2015-06-22 12:33:24 +02:00
Miklos Vajna
f403cecdae gtktiledviewer: do HTML copying if possible
Change-Id: I24e7b18442cb08814a73dd33b368b368039a11e4
2015-06-22 09:10:54 +02:00
Miklos Vajna
af7cbebd8e LOK: return used format in Document::getTextSelection()
This allows requesting text/html, with falling back to plain text if
necessary.

Change-Id: Ie6d4e0e173311ba018553043b6a869abf193bf6f
Reviewed-on: https://gerrit.libreoffice.org/16377
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2015-06-19 18:00:53 +00:00
Miklos Vajna
437210d58f gtktiledviewer: add copy button
Change-Id: I56ed5047da118eac01d7dea150597133215278e2
2015-06-18 09:18:18 +02:00
Pranav Kant
3061e486f9 lokdocview: Restructure this GObject class
This is a big messy commit restructuring the whole class to follow most
common practices followed by standard GObject classes, so that it can
keep gobject-introspection happy; hence, allowing this widget to be used
from other languages.

Change-Id: I10c34dad402d1ec586958b2db21ff44412c36cea
2015-06-16 11:18:07 +02:00
Pranav Kant
101b616c7a gtktiledviewer: Replace deprecated Gtk functions
Change-Id: I354aa987f8e732945fb552d855a3416c782bb508
2015-06-15 12:09:58 +02:00
Pranav Kant
0bb2ae2d00 lokdocview, gtktiledviewer: Remove gtk version checks
We already have the global ENABLE_GTK3 guard for RHEL5 baseline.

Change-Id: Id814a4063861a1e750952b44686ed24864c0394f
2015-06-15 12:09:58 +02:00
Pranav Kant
256a9cef8b lokdocview: Port to gtk3; 'expose-event' -> 'draw'
Change-Id: I8d2541f5cbd2b908c2b0dc52cccf9b936bbc307a
2015-06-15 12:09:58 +02:00
Pranav Kant
9b3679301f lokdocview, gtktiledviewer: Port to gtk3
Change-Id: I57f2d7b9383790e5c34fc517a905dd537519598f
2015-06-15 12:09:58 +02:00
Miklos Vajna
e6c37fdee5 Fix RHEL5 build
Change-Id: I9a71ee85d2d28aed5bd3f4d1f6e91261a9228d04
2015-06-12 15:45:40 +02:00
Pranav Kant
7a9dc7fd35 lokdocview: Create LOK context inside of lok_doc_view_new
Change-Id: I675192d6bd6d10e6c7974a5de6f488f9a087ac32
2015-06-12 15:20:52 +02:00
Pranav Kant
8d0b34c3a6 lokdocview: Change parent class to GtkDrawingArea
It is not the job of the widget to provide the scroll bars.

Change-Id: Iafc5724ed5b21717d711bb8f7e1a076dd1288b76
2015-06-12 15:20:52 +02:00
Pranav Kant
c8caa803b4 lokdocview: Lets follow the GObject naming convention
If we are mentioning this type as DocView, we should break it at each
capital letter.

Change-Id: I76c7eea455281e541b2196a03778018aa127cebe
2015-06-09 10:44:23 +02:00
Miklos Vajna
3c9fb58981 gtktiledviewer: use SearchItem.SearchStartPoint*
Change-Id: If0219eda3a2ca3b97c37bea70e35d47e49d38e02
2015-05-28 17:37:18 +02:00
Miklos Vajna
c7ecbbbb6a lokdocview: fix not updated part selector when search changes part
Change-Id: I337eed47c56dbbbebda4d7fe716eab6177936dc0
2015-05-27 11:48:53 +02:00
Miklos Vajna
5d9c2f2115 libreofficekit: fix Linux baseline build
Change-Id: Ib0a076d78aacfec5e0625d7592ae24815e600ad6
2015-05-23 11:08:27 +01:00
Miklos Vajna
2807bcc186 gtktiledviewer: avoid a number of pointless re-rendering on startup
Change-Id: Ia7f63a6fa7505da50e6580ea009975e06a0cb65c
2015-05-22 13:56:53 +01:00
Miklos Vajna
39321c5ffa LOK: remove unused LOK_PARTMODE_EMBEDDEDOBJ
Change-Id: I8cbb5b7a134fb84bd2c363b06f06f7f40964521f
2015-05-22 12:33:22 +01:00