Commit graph

61 commits

Author SHA1 Message Date
Martin Měřinský
0855f6f315 Use icons relative path.
Icon paths are defined in one place only - application's embedded resources.

Signed-off-by: Martin Měřinský <mermar@centrum.cz>
2017-11-30 23:14:46 -08:00
Dirk Hohndel
fd9c905ba3 Revert "Use icons relative path."
This reverts commit b0d98f6e26.
2017-11-29 14:05:07 -08:00
Martin Měřinský
b0d98f6e26 Use icons relative path.
Icon paths are defined in one place only - application's embedded resources.

Signed-off-by: Martin Měřinský <mermar@centrum.cz>
2017-11-29 11:46:35 +01:00
Berthold Stoeger
d1d4b4edb1 Initialize Facebook page only when dialog is shown
Quick hack to avoid Facebook access on every program start. Move the initialization
of the login page from the FacebookConnectWidget constructor to the show event handler.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-10 10:04:28 -08:00
Guillaume GARDET
5d12143a6a [Facebook] Back to previous behavior when we were able to upload data,
even without album creation permission
2017-10-23 10:05:23 -04:00
Guillaume GARDET
ee1e03c774 [Facebook] add more debug when we are not able to create a new album 2017-10-23 10:05:23 -04:00
Dirk Hohndel
59bf217157 Turn off Facebook debug messages unless verbose
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-20 06:51:51 -04:00
Tomaz Canabrava
aca8fea2a9 [Facebook] Enable the send button on edit
Not when you press enter.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-02 08:54:03 -07:00
Tomaz Canabrava
527078e277 [Facebook] Use statusbar instead of popup messages
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-02 08:54:03 -07:00
Tomaz Canabrava
3e2a86cf80 [Facebook] More debug calls
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-02 08:54:03 -07:00
Tomaz Canabrava
3a564f412c [Facebook] Use correct albumName variable
and code cleanup

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-02 08:54:03 -07:00
Tomaz Canabrava
5595d9a8b0 [Facebook] Lots of debug messages
Important debug messages, don't remove.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-02 08:54:03 -07:00
Tomaz Canabrava
15c4fadde9 [Facebook] Use the nonblocking calls to post on fb
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-02 08:54:03 -07:00
Tomaz Canabrava
e662ce1cec [Facebook] Fill the info struct
This will be used to send the profile to Facebook

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-02 08:54:03 -07:00
Tomaz Canabrava
dd17c6355d [Facebook] Remove broken function
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-02 08:54:03 -07:00
Tomaz Canabrava
1d8eb0d78a [Facebook] Code organization
Create the variable near its use.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-02 08:54:03 -07:00
Tomaz Canabrava
df166247af [Facebook] Signal that the album is found
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-02 08:53:59 -07:00
Tomaz Canabrava
a2734e6aaf [Facebook] New method, grabProfilePixmap
Just some code organization

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-02 08:52:03 -07:00
Tomaz Canabrava
5778dceb52 [Facebook] Prepare the FacebookInfo struct
This will hold the information for the profile upload.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-02 08:51:53 -07:00
Tomaz Canabrava
ba8e6878a8 [Facebook] Remove dead code
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-02 08:51:19 -07:00
Dirk Hohndel
571918feaa Random whitespace cleanup
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-29 12:57:34 -07:00
Tomaz Canabrava
f159802053 [Facebook] Add hability to choose size of profile
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-29 12:57:34 -07:00
Tomaz Canabrava
9b1a949a39 [Facebook] Resize the profile before sending it
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-29 12:57:34 -07:00
Tomaz Canabrava
2db4f626ed [Facebook] Only mark as connected if user id is received
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-29 12:57:34 -07:00
Tomaz Canabrava
a6aeaf897a [Facebook] create userIdReceived slot
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-29 12:57:34 -07:00
Tomaz Canabrava
689dcf1058 [Facebook] Mem leaks
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-29 12:57:34 -07:00
Tomaz Canabrava
475dfe1194 [Facebook] Use only one Network Manager
Fixes quite a few memory leaks.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-29 12:57:28 -07:00
Dirk Hohndel
7b8832bc0b [Facebook] fewer UI freezes while accessing facebook
Use signal / slots on the networkreply instead of freezing the event
loop.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-29 12:45:28 -07:00
Tomaz Canabrava
c8c9a5dc65 [Facebook] conversion to new connect syntax
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-29 12:44:39 -07:00
Tomaz Canabrava
f6ac79296e [Facebook] Dont use deprecated feature
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-29 12:43:45 -07:00
Tomaz Canabrava
73c242b6eb [Facebook] Use unblocking call for QNetworkRequest
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-29 12:43:45 -07:00
Tomaz Canabrava
8ce4692b5c [Facebook] Use QByteArray directly
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-29 12:43:41 -07:00
Federico Masias
777cf6c3fd Change Facebook upload description to eliminate confusion
Signed-off-by: Federico Masias <fede@masias.net>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-26 23:34:38 -04:00
Tomaz Canabrava
19db825240 Facebook support: fix export dialog layout
Dialog layout was broken, now we can actually resize.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2017-09-13 09:36:22 -07:00
Tomaz Canabrava
e43a116457 Facebook support: use the new Graph Api
This is basically a one liner.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2017-09-13 09:36:09 -07:00
Stefan Fuchs
e6d884cf26 Creation of dive duration string and surface interval string
Update the function to create the dive duration string in a way that
it can be used also in info and stats tab and added some more flexibility.

Changed layout for <1h freedives to "0:05:35" (w/o units) or "5:35min"
(with units and :) or "5min 35sec" (with units with space).

Add a new function to create the surface interval string.

Completely remove old function get_time_string() and get_time_string_s().

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-05-26 15:50:52 -07:00
Dirk Hohndel
9021a44ccc Add SPDX header to desktop widgets
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-29 13:32:55 -07:00
Jan Mulder
588a83e339 Fix issue 280: Facebook without a dive selected
Accessing Facebook stuff without a dive selected (as in an empty logbook)
just SIGSEGVs. Just be more carefull.

After this fix, it is still possible to upload an "empty dive" to FB. Ok,
a little pointless, but a nice picture of the Subsurface logo is uploaded
to FB. Consider it an easter egg :-)

Fixes: #280

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-03-26 21:58:29 -07:00
Martin Měřinský
74b1f7ac5e facebook > Facebook 2017-02-21 07:03:10 -08:00
Dirk Hohndel
b2cc840ebf Facebook integration: change the menu entry to disconnect
This way the menu entry becomes the togglee it appears it was designed to be in
the first place.

This closes #129

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-01 22:24:48 -08:00
Dirk Hohndel
a63505dde9 Facebook integration: actually call the disconnect callback
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-01 22:21:47 -08:00
Dirk Hohndel
7e98016832 Facebook integration: whitespace cleanup
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-01 22:20:28 -08:00
Robert C. Helling
529a4d499b Start transition from QWebKit to QWebEngine
This removes all references to WebKit if cmake option USE_WEBKIT is enabled.
For the user manual it changes it to WebEngine (seems to work for me).

Similar for the Facebook connection (minus a reference to a cookie jar).
This I could not test at the moment, as I wrote this on a train.

Printing does not work, it is a null operation at the moment. Currently,
large parts of of the printing code are commented out as there is no direct
way to access page elements in WebEngine. It seems this needs to be done
via Javascript (with a callback invoked). There is new functionality in
WebEngine to render a view to a PDF file but this needs more work (and
probably some thoughts towards page breaks).

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2016-12-30 19:43:00 +01:00
Robert C. Helling
6504cd8c46 Reenable Facebook Postings
This is what Tomaz said should be done. Thanks!

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-24 06:18:20 +09:00
Tomaz Canabrava
12eccda523 Settings update: Fix Facebook Widget to use the SettingsObjectWrapper
Fix facebook widget to use the SettingsObjectWrapper instead
of figthing our complementary Settings each call.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-27 11:40:45 -07:00
Tomaz Canabrava
21e8b1e363 Fix compilation with the new folder architecture
A few more fixes for things that broke in commit 7be962bfc2 ("Move
subsurface-core to core and qt-mobile to mobile-widgets").

[Dirk Hohndel: slightly edited and overlap with Linus' patch removed]

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05 12:32:36 -07:00
Dirk Hohndel
7be962bfc2 Move subsurface-core to core and qt-mobile to mobile-widgets
Having subsurface-core as a directory name really messes with
autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an
autocomplete conflict and also was inconsistent with the desktop-widget
name for the directory containing the "other" UI.

And while cleaning up the resulting change in the path name for include
files, I decided to clean up those even more to make them consistent
overall.

This could have been handled in more commits, but since this requires a
make clean before the build, it seemed more sensible to do it all in one.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04 22:33:58 -07:00
Dirk Hohndel
44d715759c Silence warnings in facebook_integration.cpp
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09 21:50:37 -08:00
Tomaz Canabrava
13573915b6 Fix CMake to not add Facebook on Android
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-17 11:48:15 -08:00
Tomaz Canabrava
c71df5baa5 Don't rely on CMAKE_AUTOUIC
Some old CMakes that we use had problems with it, change to use
the qt5_wrap_ui macro that's bundled with Qt.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09 18:00:56 -08:00