mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-12 16:50:19 +00:00
Various fixes for mingw
This commit is contained in:
@@ -142,7 +142,7 @@ fe_args (int argc, char *argv[])
|
||||
{
|
||||
if (strstr (error->message, "--help-all") != NULL)
|
||||
{
|
||||
buffer = g_strdup_printf (g_option_context_get_help (context, FALSE, NULL));
|
||||
buffer = g_option_context_get_help (context, FALSE, NULL);
|
||||
gtk_init (&argc, &argv);
|
||||
create_msg_dialog ("Long Help", buffer);
|
||||
g_free (buffer);
|
||||
@@ -150,7 +150,7 @@ fe_args (int argc, char *argv[])
|
||||
}
|
||||
else if (strstr (error->message, "--help") != NULL || strstr (error->message, "-?") != NULL)
|
||||
{
|
||||
buffer = g_strdup_printf (g_option_context_get_help (context, TRUE, NULL));
|
||||
buffer = g_option_context_get_help (context, TRUE, NULL);
|
||||
gtk_init (&argc, &argv);
|
||||
create_msg_dialog ("Help", buffer);
|
||||
g_free (buffer);
|
||||
|
||||
@@ -51,6 +51,15 @@ if get_option('with-libnotify')
|
||||
hexchat_gtk_sources += 'notifications/notification-libnotify.c'
|
||||
hexchat_gtk_deps += dependency('libnotify')
|
||||
elif false # TODO HAVE_GTK_MAC
|
||||
elif host_machine.system() == 'windows'
|
||||
hexchat_gtk_sources += 'notifications/notification-windows.c'
|
||||
|
||||
# TODO: mingw doesn't have these headers or libs
|
||||
# add_languages('cpp')
|
||||
# shared_module('hcnotifications-winrt',
|
||||
# sources: 'notifications/notification-winrt.cpp'
|
||||
#)
|
||||
|
||||
else
|
||||
hexchat_gtk_sources += 'notifications/notification-dummy.c'
|
||||
endif
|
||||
@@ -80,5 +89,6 @@ executable('hexchat',
|
||||
dependencies: hexchat_gtk_deps,
|
||||
c_args: hexchat_gtk_cflags,
|
||||
link_args: hexchat_gtk_ldflags,
|
||||
install: true
|
||||
install: true,
|
||||
gui_app: true,
|
||||
)
|
||||
|
||||
@@ -16,12 +16,11 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <gmodule.h>
|
||||
|
||||
#include "hexchat.h"
|
||||
#include "plugin.h"
|
||||
|
||||
#include <Windows.h>
|
||||
#include <gmodule.h>
|
||||
#include <windows.h>
|
||||
|
||||
void (*winrt_notification_backend_show) (const char *title, const char *text) = NULL;
|
||||
int (*winrt_notification_backend_init) (const char **error) = NULL;
|
||||
|
||||
@@ -465,6 +465,7 @@ tray_make_item (GtkWidget *menu, char *label, void *callback, void *userdata)
|
||||
return item;
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
static void
|
||||
tray_toggle_cb (GtkCheckMenuItem *item, unsigned int *setting)
|
||||
{
|
||||
@@ -476,6 +477,7 @@ blink_item (unsigned int *setting, GtkWidget *menu, char *label)
|
||||
{
|
||||
menu_toggle_item (label, menu, tray_toggle_cb, setting, *setting);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
tray_menu_destroy (GtkWidget *menu, gpointer userdata)
|
||||
@@ -586,7 +588,7 @@ tray_menu_cb (GtkWidget *widget, guint button, guint time, gpointer userdata)
|
||||
g_signal_connect (G_OBJECT (menu), "enter-notify-event",
|
||||
G_CALLBACK (tray_menu_enter_cb), NULL);
|
||||
|
||||
tray_menu_timer = g_timeout_add (500, tray_check_hide, menu);
|
||||
tray_menu_timer = g_timeout_add (500, (GSourceFunc)tray_check_hide, menu);
|
||||
#endif
|
||||
|
||||
gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL,
|
||||
|
||||
Reference in New Issue
Block a user