make LaunchBrowser better
This commit is contained in:
@@ -13,6 +13,7 @@ find_library(GTKMM_LIBRARY gtkmm)
|
|||||||
include_directories(${GTKMM_INCLUDE_DIRS})
|
include_directories(${GTKMM_INCLUDE_DIRS})
|
||||||
|
|
||||||
find_library(GLIB_LIBRARY glib-2.0)
|
find_library(GLIB_LIBRARY glib-2.0)
|
||||||
|
find_library(GTK_LIBRARY gtk-3.0)
|
||||||
|
|
||||||
find_path(GLIBMM_INCLUDE_DIRS glibmm.h)
|
find_path(GLIBMM_INCLUDE_DIRS glibmm.h)
|
||||||
find_library(GLIBMM_LIBRARY glibmm)
|
find_library(GLIBMM_LIBRARY glibmm)
|
||||||
@@ -91,6 +92,7 @@ target_link_libraries(abaddon ${ATKMM_LIBRARY})
|
|||||||
target_link_libraries(abaddon ${CURL_LIBRARY})
|
target_link_libraries(abaddon ${CURL_LIBRARY})
|
||||||
target_link_libraries(abaddon ${CPR_LIBRARY})
|
target_link_libraries(abaddon ${CPR_LIBRARY})
|
||||||
target_link_libraries(abaddon ${ZLIB_LIBRARY})
|
target_link_libraries(abaddon ${ZLIB_LIBRARY})
|
||||||
|
target_link_libraries(abaddon ${GTK_LIBRARY})
|
||||||
if(NOT DISABLE_MBEDTLS)
|
if(NOT DISABLE_MBEDTLS)
|
||||||
target_link_libraries(abaddon ${MBEDTLS_TLS_LIBRARY})
|
target_link_libraries(abaddon ${MBEDTLS_TLS_LIBRARY})
|
||||||
target_link_libraries(abaddon ${MBEDTLS_X509_LIBRARY})
|
target_link_libraries(abaddon ${MBEDTLS_X509_LIBRARY})
|
||||||
|
@@ -39,6 +39,8 @@ for:
|
|||||||
|
|
||||||
after_build:
|
after_build:
|
||||||
- cmd: |
|
- cmd: |
|
||||||
|
copy "c:\tools\vcpkg\installed\x64-windows\tools\glib\gspawn-win64-helper.exe" "%APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION%\gspawn-win64-helper.exe"
|
||||||
|
copy "c:\tools\vcpkg\installed\x64-windows\tools\glib\gspawn-win64-helper-console.exe" "%APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION%\gspawn-win64-helper-console.exe"
|
||||||
xcopy /E /I %APPVEYOR_BUILD_FOLDER%\css "%APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION%\css\"
|
xcopy /E /I %APPVEYOR_BUILD_FOLDER%\css "%APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION%\css\"
|
||||||
xcopy /E /I %APPVEYOR_BUILD_FOLDER%\res "%APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION%\res\"
|
xcopy /E /I %APPVEYOR_BUILD_FOLDER%\res "%APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION%\res\"
|
||||||
7z a %APPVEYOR_BUILD_FOLDER%\out\abaddon.zip "%APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION%"
|
7z a %APPVEYOR_BUILD_FOLDER%\out\abaddon.zip "%APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION%"
|
||||||
|
@@ -768,8 +768,6 @@ bool ChatMessageItemContainer::OnLinkClick(GdkEventButton *ev) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatMessageItemContainer::ShowMenu(GdkEvent *event) {
|
void ChatMessageItemContainer::ShowMenu(GdkEvent *event) {
|
||||||
|
15
util.hpp
15
util.hpp
@@ -54,17 +54,10 @@ private:
|
|||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
inline void LaunchBrowser(std::string url) {
|
inline void LaunchBrowser(Glib::ustring url) {
|
||||||
#if defined(_WIN32)
|
GError *err = nullptr;
|
||||||
// wtf i love the win32 api now ???
|
if (!gtk_show_uri_on_window(nullptr, url.c_str(), GDK_CURRENT_TIME, &err))
|
||||||
ShellExecuteA(NULL, "open", url.c_str(), NULL, NULL, SW_SHOWNORMAL);
|
printf("failed to open uri: %s\n", err->message);
|
||||||
#elif defined(__APPLE__)
|
|
||||||
std::system(("open " + url).c_str());
|
|
||||||
#elif defined(__linux__)
|
|
||||||
std::system(("xdg-open " + url).c_str());
|
|
||||||
#else
|
|
||||||
printf("can't open url on this platform\n");
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void GetImageDimensions(int inw, int inh, int &outw, int &outh, int clampw = 400, int clamph = 300) {
|
inline void GetImageDimensions(int inw, int inh, int &outw, int &outh, int clampw = 400, int clamph = 300) {
|
||||||
|
Reference in New Issue
Block a user