1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
15 #include "gtv-signal-handlers.hxx"
21 #include <boost/property_tree/json_parser.hpp>
23 #define UI_FILE_NAME "gtv.ui"
25 // Wrapper with custom deleter to use for Gtk objects
27 using GtvGtkWrapper
= std::unique_ptr
<T
, void(*)(T
*)>;
31 void userPromptDialog(GtkWindow
* pWindow
, const std::string
& aTitle
, std::map
<std::string
, std::string
>& aEntries
);
33 void clipboardSetHtml(GtkClipboard
* pClipboard
, const char* pSelection
);
35 /// Generate an author string for multiple views.
36 std::string
getNextAuthor();
38 GtkWidget
* createCommentBox(const boost::property_tree::ptree
& aComment
);
40 std::string
getDirPath(const std::string
& filePath
);
43 std::vector
<T
> split(const std::string
& aPayload
, const std::string
& aDelim
, const int nItems
)
47 if (!aPayload
.empty())
49 gchar
** ppCoordinates
= g_strsplit(aPayload
.c_str(), aDelim
.c_str(), nItems
);
50 gchar
** ppCoordinate
= ppCoordinates
;
53 std::stringstream
strstream(*ppCoordinate
);
59 g_strfreev(ppCoordinates
);
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */