Compare commits
No commits in common. "f7807cada2c65649be65fad844027f7f0dfbe6d2" and "baf2dc8ccd660dfaa70a385a65b5e2bfc3d03ed6" have entirely different histories.
f7807cada2
...
baf2dc8ccd
@ -224,7 +224,7 @@ set (logdiag_LIBS ${GTK3_LIBRARIES} ${Lua_LIBRARIES} m)
|
|||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
find_package (LibIntl REQUIRED)
|
find_package (LibIntl REQUIRED)
|
||||||
list (APPEND logdiag_LIBS ${LIBINTL_LIBRARIES} shell32)
|
list (APPEND logdiag_LIBS ${LIBINTL_LIBRARIES})
|
||||||
endif (WIN32)
|
endif (WIN32)
|
||||||
|
|
||||||
# Build the library
|
# Build the library
|
||||||
|
@ -13,11 +13,6 @@
|
|||||||
|
|
||||||
#include "ld-window-main.h"
|
#include "ld-window-main.h"
|
||||||
|
|
||||||
#ifdef G_OS_WIN32
|
|
||||||
#include <gdk/gdkwin32.h>
|
|
||||||
#include <shellapi.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
struct _LdWindowMainPrivate
|
struct _LdWindowMainPrivate
|
||||||
{
|
{
|
||||||
@ -1055,37 +1050,10 @@ on_action_user_guide (GtkAction *action, LdWindowMain *self)
|
|||||||
g_object_unref (file);
|
g_object_unref (file);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
|
||||||
on_action_about_activate_link (GtkAboutDialog *dialog, gchar *uri,
|
|
||||||
LdWindowMain *self)
|
|
||||||
{
|
|
||||||
GdkWindow *window;
|
|
||||||
|
|
||||||
window = gtk_widget_get_window (GTK_WIDGET (self));
|
|
||||||
|
|
||||||
#ifdef G_OS_WIN32
|
|
||||||
/* gtk_show_uri() on Windows XP fails, due to trying to establish
|
|
||||||
* an SSL connection, so let's first try to not do that on Windows.
|
|
||||||
* `cmd.exe /c start "" ...` would pop up a command line window,
|
|
||||||
* so use SHELL32.DLL directly. rundll does not cover this.
|
|
||||||
* There doesn't seem to be anything better directly in GIO/GLib.
|
|
||||||
*
|
|
||||||
* When we fail here, we fall back to normal processing.
|
|
||||||
*/
|
|
||||||
if ((INT_PTR) ShellExecute (gdk_win32_window_get_handle (window),
|
|
||||||
"open", uri, NULL, NULL, SW_SHOWNORMAL) > 32)
|
|
||||||
return TRUE;
|
|
||||||
#endif /* G_OS_WIN32 */
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
on_action_about (GtkAction *action, LdWindowMain *self)
|
on_action_about (GtkAction *action, LdWindowMain *self)
|
||||||
{
|
{
|
||||||
GtkWidget *about_dialog;
|
gtk_show_about_dialog (GTK_WINDOW (self),
|
||||||
|
|
||||||
about_dialog = g_object_new (GTK_TYPE_ABOUT_DIALOG,
|
|
||||||
"program-name", PROJECT_NAME,
|
"program-name", PROJECT_NAME,
|
||||||
"logo-icon-name", PROJECT_NAME,
|
"logo-icon-name", PROJECT_NAME,
|
||||||
"version", PROJECT_VERSION,
|
"version", PROJECT_VERSION,
|
||||||
@ -1093,15 +1061,6 @@ on_action_about (GtkAction *action, LdWindowMain *self)
|
|||||||
"copyright", "Copyright 2010 - 2021 Přemysl Eric Janouch",
|
"copyright", "Copyright 2010 - 2021 Přemysl Eric Janouch",
|
||||||
"website", PROJECT_URL,
|
"website", PROJECT_URL,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
g_signal_connect (about_dialog, "activate-link",
|
|
||||||
G_CALLBACK (on_action_about_activate_link), self);
|
|
||||||
|
|
||||||
gtk_window_set_transient_for (GTK_WINDOW (about_dialog), GTK_WINDOW (self));
|
|
||||||
gtk_window_set_modal (GTK_WINDOW (about_dialog), TRUE);
|
|
||||||
gtk_window_set_destroy_with_parent (GTK_WINDOW (about_dialog), TRUE);
|
|
||||||
gtk_dialog_run (GTK_DIALOG (about_dialog));
|
|
||||||
gtk_widget_destroy (about_dialog);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -161,11 +161,6 @@ main (int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef OPTION_NOINSTALL
|
|
||||||
gtk_icon_theme_prepend_search_path (gtk_icon_theme_get_default (),
|
|
||||||
PROJECT_SHARE_DIR "icons");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
gtk_window_set_default_icon_name (PROJECT_NAME);
|
gtk_window_set_default_icon_name (PROJECT_NAME);
|
||||||
|
|
||||||
if (files)
|
if (files)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user