summaryrefslogtreecommitdiffstats
path: root/gtk
Commit message (Collapse)AuthorAgeFilesLines
* add isMobileApp util function to reduce ifdefsJaume Pujantell2024-03-201-1/+2
| | | | | | | | Removed all MOBILEAPP preprocessor conditionals from Util.hpp/.cpp Added isMobileApp function to help remove further conditionals. Signed-off-by: Jaume Pujantell <jaume.pujantell@collabora.com> Change-Id: I038a4db47ec2a2c7bb10f5696df5571b13bd9a61
* nearly pure re-factor: split out code into its own modules.Michael Meeks2024-03-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | StateRecorder.hpp split from ChildSession.cpp KitWebSocketHandler.[ch]pp split from Kit.cpp. ThreadPool.hpp split from RenderTiles.hpp Expose headers for KitSocketPoll and Document at the same time. Not clear we need the DocumentManagerInterface anymore. Conditionally compile out Document::createSession for unittest dependency breaking, and avoid Rlimit::handleSetrlimitCommand likewise. Make makePropertyValue a private method of Kit.cpp. clang-format new files. Change-Id: I47a1d6afe20165f156b477a931b94c916cff4b9d Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
* wsd: move ClientRequestDispatcher to own fileAshod Nakashian2024-02-211-0/+1
| | | | | | | | | | | | | | | | | | This moves ClientRequestDispatcher and all its direct exclusive dependencies to its own file and adjusts formatting. No functional changes were performed, although namespaces were restored and other minor changes were done for consistency. The resulting file is still rather large at around 2000 lines, but that makes COOLWSD.cpp smaller by about 30% now. Change-Id: I59bcd997ad08702ce7029c6791095e75ad9b23b0 Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
* extract some functions to extra files for in process modeJaume Pujantell2023-12-181-1/+2
| | | | | | | | Extract some functions from ForKit.cpp and COOLWSD.cpp to new files so we can do a kit in process mode without using ifdef directives. Signed-off-by: Jaume Pujantell <jaume.pujantell@collabora.com> Change-Id: I7529f8f46a8026318244666b27d1ce72ed5ad4ca
* Actually use the safer (escaped) string we constructTor Lillqvist2023-01-061-3/+2
| | | | | | | | | | Also, no reason to append a null byte to it. Don't know why this worked even when not escaping "dangerous" characters. Does Webkit have a more relaxed lexical analyser? Signed-off-by: Tor Lillqvist <tml@collabora.com> Change-Id: Idfedcbf11a9ee565b954ba972e7e3bc9b804a122
* Put all Zotero logic to browserAndras Timar2022-12-121-2/+1
| | | | | Signed-off-by: Andras Timar <andras.timar@collabora.com> Change-Id: Ib1b071b96322511b7f319ff6b851e902b3556fbb
* Need Zotero.cpp here, tooTor Lillqvist2022-12-011-1/+2
| | | | | Signed-off-by: Tor Lillqvist <tml@collabora.com> Change-Id: Ic0aaf8c944fa10ec370a0b733d1f5c881ea349ce
* Enable developer console for webkit debugging.Gökay Şatır2022-11-291-0/+11
| | | | | Signed-off-by: Gökay Şatır <gokaysatir@collabora.com> Change-Id: I544abda3744fc5415a4dfd935e0df864c5765ca3
* The gtk app needs PNG_LIBSTor Lillqvist2022-11-291-1/+1
| | | | | Signed-off-by: Tor Lillqvist <tml@collabora.com> Change-Id: I075e69a385ec508d72a5d6e4b775dd932bca5184
* Make the gtk app work againTor Lillqvist2022-11-241-2/+1
| | | | | | | | Apparently using a debug=true query parameter breaks tile rendering. So let's not use that then. Now tiles show up. Signed-off-by: Tor Lillqvist <tml@collabora.com> Change-Id: Ia458a6bdf35b956bf2570801d132211f600513f6
* Seems that the lang and userinterfacemode query parameters are neededTor Lillqvist2022-11-241-0/+2
| | | | | | | | Now some UI stuff shows up on the cool page. No document tiles yet, though. Signed-off-by: Tor Lillqvist <tml@collabora.com> Change-Id: I5cc33cc8df3a700ee752a3ad437cdb3aabfbca86
* It seems that the gtk app takes a pathname, not a file: URITor Lillqvist2022-11-241-1/+1
| | | | | Signed-off-by: Tor Lillqvist <tml@collabora.com> Change-Id: Id0764d3097f2b9f0a4ba1b699b63e026749f802b
* Probably must check for arbitrary binary data here, too, like in the iOS appTor Lillqvist2022-11-241-1/+1
| | | | | Signed-off-by: Tor Lillqvist <tml@collabora.com> Change-Id: Ic6834f5f5b57035831778305ece9228d14bed930
* Make the gtk app build againTor Lillqvist2022-11-244-3/+14
| | | | | Signed-off-by: Tor Lillqvist <tml@collabora.com> Change-Id: I000fdcc059c39cf3c0c4a9ec066f4039c653cb70
* gtk: mobile: don't cleanup log when failingAshod Nakashian2022-08-021-1/+1
| | | | | Change-Id: Ibd8d3d65f5fffc0abbc410e3f265c3eea0af6c40 Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
* wsd: always use Util::forcedExit to properly cleanupAshod Nakashian2022-08-021-1/+2
| | | | | | | | | | | We need to flush and shutdown logging before exiting, so we can't use _exit/_Exit directly. In addition, with profiling (e.g. code-coverage) we must flush the profile data, lest it's all for naught. Change-Id: I726c5a2f4e699c17dd0d7d5b1c86d856e0118b3c Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
* rename: remaining lool->cool changesAndras Timar2021-11-183-18/+18
| | | | | Signed-off-by: Andras Timar <andras.timar@collabora.com> Change-Id: Ib7d4e804bebe52dead8d53b0e0bbaed0f08bf3d0
* mobile: rename 'lool' -> 'cool'Henry Castro2021-11-171-4/+4
| | | | | Change-Id: Icea136704eaf13c6da0ec455a9e6207b57e2a7f6 Signed-off-by: Henry Castro <hcastro@collabora.com>
* gtk: rename loleaflet -> browserHenry Castro2021-11-101-1/+1
| | | | | Change-Id: Ib46a667f6add8b52600074d10db459e69b836d04 Signed-off-by: Henry Castro <hcastro@collabora.com>
* rename loleaflet.html -> cool.htmlHenry Castro2021-11-101-1/+1
| | | | | Change-Id: Iaa28f1269f8192755ec323396ae4ff054529f412 Signed-off-by: Henry Castro <hcastro@collabora.com>
* gtk: always include config.h firstAshod Nakashian2021-06-191-0/+2
| | | | | Change-Id: I8e1f57e5dd2935d9b22d906acbb75e28f84016f5 Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
* fix license headersAndras Timar2020-10-012-4/+0
| | | | Change-Id: I8623770b32d278a45357dc7f757fabfadd2b4af7
* Fix gtk fake mobile application buildJan-Marek Glogowski2020-07-141-1/+5
| | | | | | | | | | | | | | | | Just adds the missing source files to the automake file. Still it seems unmaintained since a year and doesn't look that mobile at all (from my expectations), but it still works AFAI can tell. While at it add the mobile binary to .gitignore. Change-Id: I7db21041c6848f94fcb4058c730385b077048a9c Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98553 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
* wsd: cleanup realpath callAshod Nakashian2020-07-061-1/+1
| | | | | | | | | | The new utility is safer and more readable. Change-Id: I3a86675378d458cb004e5534dbf2b401936d0e57 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98183 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
* gtk: fix typoMiklos Vajna2019-04-231-1/+1
| | | | Change-Id: Ib8bcf8b578f1d926f26a0ebae15cfa36e5d922d2
* gtkapp: Drop this warning, clang complains about it.Jan Holesovsky2019-04-191-1/+1
| | | | Change-Id: I4f6f27f28d55a6529eb89732a8562e6e27d376af
* EditsTor Lillqvist2019-04-191-3/+4
|
* Need -DGTKAPP hereTor Lillqvist2019-04-191-0/+1
|
* Revert "android: Various fixes to make the sending from the core to JS..."Jan Holesovsky2019-02-201-3/+3
| | | | | | | | | Lets leave this optimization for later, this is incomplete, and does not fix the problem which it was originally supposed to address. This reverts commit bce922e8fd50b5344b083aedfe04ed072661795b. Change-Id: I5d2ee19058261c7612d36014181f509604c8acde
* android: Various fixes to make the sending from the core to JS working.Jan Holesovsky2019-02-191-3/+3
| | | | Change-Id: Idc22ccbae1effac9e2db5293703a768e033fd7e9
* android: #if(n)def MOBILEAPP -> #if (!)MOBILEAPP for better reliability.Jan Holesovsky2019-02-121-1/+1
| | | | Change-Id: I5f9c9420b6c83601db1c8fdba4ae5a10b17b2107
* cleanup and simplify.Michael Meeks2018-11-021-65/+18
| | | | Change-Id: If90f8ccef4f223ae783363e9fc3a3e9fed644c24
* gtk: compile with older WebKit JS interface too.Michael Meeks2018-11-011-14/+48
| | | | Change-Id: I62ce96932b77ea8051cfb2862cb4f617d2804c1d
* Disable SSL when configuring for mobile.Michael Meeks2018-11-011-1/+1
| | | | Change-Id: Ia337cde9f183849088d3712dd339f21b7d290fd7
* Take path to document to edit on the command lineTor Lillqvist2018-10-261-3/+7
| | | | | | Sure, could add more and more options to specify what LibreOffice installation to run against, etc, like gtktiledviewer. That is not a priority though, this is just a very basic testbed for now.
* SCNR: Avoid forward declarations, just move the functions before their useTor Lillqvist2018-10-261-14/+11
|
* hello-world.odt does not exist out of the boxTor Lillqvist2018-10-251-0/+2
| | | | | Need to copy from hello.odt, like the Makefile.am does when you 'make run'.
* Fix some memory management fooTor Lillqvist2018-10-251-4/+10
|
* Minor improvementsTor Lillqvist2018-10-231-3/+4
|
* TypoTor Lillqvist2018-10-171-1/+1
|
* Add gtk/READMETor Lillqvist2018-10-171-0/+19
|
* Attempt to fix the thread problems in the GTK+ testbed appTor Lillqvist2018-10-171-11/+24
| | | | | | | | | | | Use g_idle_add() to make the webkit_web_view_run_javascript() call run on the GTK+ thread. Correspondingly, need to use a separate short-lived thread to do the fakeSocketWrite() calls from handle_lool_message(), so that the GTK+ main loop is ready to run the added lambda. Or something like that. Now it gets a bit further, doesn't crash, but just sudddenly exits before showing the document even.
* More work on the GTK+ testbed appTor Lillqvist2018-10-171-15/+202
| | | | | | | | | | | | | | Add plumbing to send messages from the Online code to the JavaScript code, and vice versa. Similar to what is done for iOS. Sadly, it crashes. Multi-thread issues. Not surprisingly, it crashes when I call webkit_web_view_run_javascript() in another thread than the one where the GTK+ and other Webkit calls were done. I need to come up with some clever way to do everything from the same thread. (On iOS, I use dispatch_async(dispatch_get_main_queue(),...) to schedule a block (i.e., a lambda expression) to be run in the main thread.)
* Build the GTK+ testbed app using autofooTor Lillqvist2018-10-174-37/+41
| | | | | Rename the gtk/gtk.h file to gtk/gtk.hpp to not have it confused with the actual GTK+ <gtk/gtk.h>.
* Forgot to commit this fileTor Lillqvist2018-10-171-0/+12
| | | | Change-Id: I6650583931f3c09a8c3d75c38a2e0dbceae5853d
* Add handlers for messages from JSTor Lillqvist2018-10-171-0/+41
| | | | Change-Id: Ifa3acfd09e10dbee4ecf43bec5735263e3655790
* Start on a gtk+-based workalike to the iOS appTor Lillqvist2018-10-172-0/+143
The idea is that it would work sufficiently identically, so that even people without a Mac and without an iOS device could participate in development of the non-iOS-specific bits, like the JavaScript, or the online MOBILEAPP-specific plumbing. Which would be great. No, this doesn't do anything sane yet. It does compile the same online C++ files as the iOS app, though. (Some minor tweaks were needed in a couple of them to silence gcc warnings.) There is a plain Makefile, but I should change to using autofoo, too. Eventually, this will need to be built in a separate tree from a normal online, just like when using the --enable-iosapp configure switch. (But for now, doesn't matter.) Change-Id: I13e4d921acb99d802d2f9da4b0df4a237ca60ad6