diff options
Diffstat (limited to 'src/fe-gtk')
-rw-r--r-- | src/fe-gtk/about.c | 4 | ||||
-rw-r--r-- | src/fe-gtk/banlist.c | 4 | ||||
-rw-r--r-- | src/fe-gtk/chanlist.c | 4 | ||||
-rw-r--r-- | src/fe-gtk/editlist.c | 5 | ||||
-rw-r--r-- | src/fe-gtk/fe-gtk.c | 6 | ||||
-rw-r--r-- | src/fe-gtk/fkeys.c | 6 | ||||
-rw-r--r-- | src/fe-gtk/gtkutil.c | 4 | ||||
-rw-r--r-- | src/fe-gtk/joind.c | 4 | ||||
-rw-r--r-- | src/fe-gtk/maingui.c | 3 | ||||
-rw-r--r-- | src/fe-gtk/menu.c | 8 | ||||
-rw-r--r-- | src/fe-gtk/palette.c | 4 | ||||
-rw-r--r-- | src/fe-gtk/plugin-tray.c | 18 | ||||
-rw-r--r-- | src/fe-gtk/plugingui.c | 9 | ||||
-rw-r--r-- | src/fe-gtk/rawlog.c | 4 | ||||
-rw-r--r-- | src/fe-gtk/setup.c | 13 | ||||
-rw-r--r-- | src/fe-gtk/sexy-spell-entry.c | 11 | ||||
-rw-r--r-- | src/fe-gtk/xtext.c | 2 |
17 files changed, 92 insertions, 17 deletions
diff --git a/src/fe-gtk/about.c b/src/fe-gtk/about.c index a5772e39..41f3c09b 100644 --- a/src/fe-gtk/about.c +++ b/src/fe-gtk/about.c @@ -39,7 +39,6 @@ #include "../common/xchat.h" #include "../common/util.h" -#include "../common/wdkutil.h" #include "../common/xchatc.h" #include "palette.h" #include "pixmaps.h" @@ -71,7 +70,7 @@ menu_about (GtkWidget * wid, gpointer sess) "(C) 1998-2005 Peter Zelezny", author, buf, 0)); } -#else +#endif static GtkWidget *about = 0; @@ -171,4 +170,3 @@ menu_about (GtkWidget * wid, gpointer sess) gtk_widget_show_all (about); } -#endif diff --git a/src/fe-gtk/banlist.c b/src/fe-gtk/banlist.c index a714d186..fecb62a5 100644 --- a/src/fe-gtk/banlist.c +++ b/src/fe-gtk/banlist.c @@ -22,6 +22,10 @@ #include <fcntl.h> #include <time.h> +#ifndef WIN32 +#include <unistd.h> +#endif + #include "fe-gtk.h" #include <gtk/gtkhbox.h> diff --git a/src/fe-gtk/chanlist.c b/src/fe-gtk/chanlist.c index 6203083b..4dca935b 100644 --- a/src/fe-gtk/chanlist.c +++ b/src/fe-gtk/chanlist.c @@ -22,6 +22,10 @@ #include <fcntl.h> #include <time.h> +#ifndef WIN32 +#include <unistd.h> +#endif + #include "fe-gtk.h" #include <gtk/gtkalignment.h> diff --git a/src/fe-gtk/editlist.c b/src/fe-gtk/editlist.c index fd2d6810..d374d064 100644 --- a/src/fe-gtk/editlist.c +++ b/src/fe-gtk/editlist.c @@ -22,6 +22,11 @@ #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> + +#ifndef WIN32 +#include <unistd.h> +#endif + #include "fe-gtk.h" #include <gtk/gtkstock.h> diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c index c11f5235..88a1138c 100644 --- a/src/fe-gtk/fe-gtk.c +++ b/src/fe-gtk/fe-gtk.c @@ -31,7 +31,11 @@ #include <gtk/gtkmessagedialog.h> #include <gtk/gtkversion.h> +#ifdef WIN32 #include <gdk/gdkwin32.h> +#else +#include <unistd.h> +#endif #include "../common/xchat.h" #include "../common/fe.h" @@ -411,7 +415,7 @@ log_handler (const gchar *log_domain, { session *sess; - /* if (getenv ("XCHAT_WARNING_IGNORE")) */ + /* if (getenv ("XCHAT_WARNING_IGNORE")) this gets ignored sometimes, so simply just disable all warnings */ return; sess = find_dialog (serv_list->data, "(warnings)"); diff --git a/src/fe-gtk/fkeys.c b/src/fe-gtk/fkeys.c index 7330854a..b9690731 100644 --- a/src/fe-gtk/fkeys.c +++ b/src/fe-gtk/fkeys.c @@ -24,6 +24,10 @@ #include <fcntl.h> #include <ctype.h> +#ifndef WIN32 +#include <unistd.h> +#endif + #include "fe-gtk.h" #include <gtk/gtklabel.h> @@ -314,7 +318,7 @@ key_handle_key_press (GtkWidget *wid, GdkEventKey *evt, session *sess) key_action_tab_clean (); break; -#if defined(USE_GTKSPELL)/* && !defined(WIN32) +#if defined(USE_GTKSPELL)/* && !defined(WIN32) */ /* gtktextview has no 'activate' event, so we trap ENTER here */ case GDK_Return: case GDK_KP_Enter: diff --git a/src/fe-gtk/gtkutil.c b/src/fe-gtk/gtkutil.c index 522b44df..fe4e1737 100644 --- a/src/fe-gtk/gtkutil.c +++ b/src/fe-gtk/gtkutil.c @@ -23,6 +23,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> + #include "fe-gtk.h" #include <gtk/gtkbutton.h> @@ -50,9 +51,12 @@ #include "../common/util.h" #include "gtkutil.h" #include "pixmaps.h" + #ifdef WIN32 #include "../common/fe.h" #include "../common/thread.h" +#else +#include <unistd.h> #endif /* gtkutil.c, just some gtk wrappers */ diff --git a/src/fe-gtk/joind.c b/src/fe-gtk/joind.c index 6cd812cf..e645f0bc 100644 --- a/src/fe-gtk/joind.c +++ b/src/fe-gtk/joind.c @@ -12,6 +12,10 @@ #include <string.h> #include <stdio.h> +#ifndef WIN32 +#include <unistd.h> +#endif + #include <gtk/gtkbbox.h> #include <gtk/gtkbutton.h> #include <gtk/gtkdialog.h> diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index 74157a7f..28cf46a9 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -53,7 +53,8 @@ #include "../common/plugin.h" #include "../common/modes.h" #include "../common/url.h" -#include "../common/wdkutil.h" +#include "../common/util.h" + #include "fe-gtk.h" #include "banlist.h" #include "gtkutil.h" diff --git a/src/fe-gtk/menu.c b/src/fe-gtk/menu.c index 90c784f0..e6a5eca0 100644 --- a/src/fe-gtk/menu.c +++ b/src/fe-gtk/menu.c @@ -23,6 +23,8 @@ #ifdef WIN32 #include <windows.h> +#else +#include <unistd.h> #endif #include "fe-gtk.h" @@ -1121,6 +1123,7 @@ usermenu_update (void) } } +#if 0 static void menu_saveconf (void) { @@ -1135,6 +1138,7 @@ menu_saveconf (void) PrintText (sess, "Error saving settings.\n"); } } +#endif static void menu_newserver_window (GtkWidget * wid, gpointer none) @@ -1653,7 +1657,9 @@ static struct mymenu mymenu[] = { {N_("Userlist Popup..."), menu_ulpopup, 0, M_MENUITEM, 0, 0, 1}, {0, 0, 0, M_END, 0, 0, 0}, /* 53 */ - /* {N_("Save Settings to Disk"), menu_saveconf, GTK_STOCK_SAVE, M_MENUSTOCK, 0, 0, 1}, don't use this, a /set auto-save approach will be added instead */ +#if 0 + {N_("Save Settings to Disk"), menu_saveconf, GTK_STOCK_SAVE, M_MENUSTOCK, 0, 0, 1}, /* don't use this, a /set auto-save approach will be added instead */ +#endif {N_("_Window"), 0, 0, M_NEWMENU, 0, 0, 1}, {N_("Ban List..."), menu_banlist, 0, M_MENUITEM, 0, 0, 1}, diff --git a/src/fe-gtk/palette.c b/src/fe-gtk/palette.c index b94ac874..104700c2 100644 --- a/src/fe-gtk/palette.c +++ b/src/fe-gtk/palette.c @@ -22,6 +22,10 @@ #include <sys/stat.h> #include <fcntl.h> +#ifndef WIN32 +#include <unistd.h> +#endif + #include "fe-gtk.h" #include "palette.h" diff --git a/src/fe-gtk/plugin-tray.c b/src/fe-gtk/plugin-tray.c index 62a726a4..b9f60f8d 100644 --- a/src/fe-gtk/plugin-tray.c +++ b/src/fe-gtk/plugin-tray.c @@ -1,20 +1,23 @@ /* Copyright (C) 2006-2007 Peter Zelezny. */ #include <string.h> -#include "../../plugins/xchat-plugin.h" +#include "../common/xchat-plugin.h" #include "../common/xchat.h" #include "../common/xchatc.h" #include "../common/inbound.h" #include "../common/server.h" #include "../common/fe.h" #include "../common/util.h" -#include "../common/wdkutil.h" #include "fe-gtk.h" #include "pixmaps.h" #include "maingui.h" #include "menu.h" #include <gtk/gtk.h> +#ifndef WIN32 +#include <unistd.h> +#endif + #ifdef USE_LIBNOTIFY #include <libnotify/notify.h> #ifndef NOTIFY_CHECK_VERSION @@ -510,7 +513,7 @@ tray_menu_cb (GtkWidget *widget, guint button, guint time, gpointer userdata) tray_make_item (menu, _("_Hide Window"), tray_menu_restore_cb, NULL); tray_make_item (menu, NULL, tray_menu_quit_cb, NULL); -#if 0 +#ifndef WIN32 /* somehow this is broken on win32 */ submenu = mg_submenu (menu, _("_Blink on")); blink_item (&prefs.input_tray_chans, submenu, _("Channel Message")); blink_item (&prefs.input_tray_priv, submenu, _("Private Message")); @@ -528,6 +531,7 @@ tray_menu_cb (GtkWidget *widget, guint button, guint time, gpointer userdata) tray_make_item (menu, NULL, tray_menu_quit_cb, NULL); #endif + mg_create_icon_item (_("_Quit"), GTK_STOCK_QUIT, menu, tray_menu_quit_cb, NULL); menu_add_plugin_items (menu, "\x5$TRAY", NULL); @@ -553,8 +557,12 @@ tray_init (void) sticon = gtk_status_icon_new_from_pixbuf (ICON_NORMAL); if (!sticon) return; - /* g_signal_connect (G_OBJECT (sticon), "popup-menu", - G_CALLBACK (tray_menu_cb), sticon); */ + +#ifndef WIN32 + g_signal_connect (G_OBJECT (sticon), "popup-menu", + G_CALLBACK (tray_menu_cb), sticon); +#endif + g_signal_connect (G_OBJECT (sticon), "activate", G_CALLBACK (tray_menu_restore_cb), NULL); } diff --git a/src/fe-gtk/plugingui.c b/src/fe-gtk/plugingui.c index 0edfc62b..71d2f02e 100644 --- a/src/fe-gtk/plugingui.c +++ b/src/fe-gtk/plugingui.c @@ -35,7 +35,7 @@ #include "../common/xchat.h" #define PLUGIN_C typedef struct session xchat_context; -#include "../../plugins/xchat-plugin.h" +#include "../common/xchat-plugin.h" #include "../common/plugin.h" #include "../common/util.h" #include "../common/outbound.h" @@ -146,10 +146,13 @@ plugingui_load_cb (session *sess, char *file) void plugingui_load (void) { - gtkutil_file_req (_("Select a Plugin or Script to load"), plugingui_load_cb, - current_sess, + gtkutil_file_req (_("Select a Plugin or Script to load"), plugingui_load_cb, current_sess, +#ifdef WIN32 "Plugins and Scripts\0*.dll;*.lua;*.pl;*.py;*.tcl\0" "All files\0*.*\0\0", 0); +#else + NULL, FRF_ADDFOLDER); +#endif } static void diff --git a/src/fe-gtk/rawlog.c b/src/fe-gtk/rawlog.c index a3e1a63b..593468c1 100644 --- a/src/fe-gtk/rawlog.c +++ b/src/fe-gtk/rawlog.c @@ -21,6 +21,10 @@ #include <fcntl.h> #include <stdlib.h> +#ifndef WIN32 +#include <unistd.h> +#endif + #include "fe-gtk.h" #include <gtk/gtkbutton.h> diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index 5b242508..1f1be0b4 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -14,7 +14,6 @@ #include "../common/text.h" #include "../common/userlist.h" #include "../common/util.h" -#include "../common/wdkutil.h" #include "../common/xchatc.h" #include "fe-gtk.h" #include "gtkutil.h" @@ -111,7 +110,7 @@ static const setting textbox_settings[] = {ST_TOGGLR, N_("Indent nick names"), P_OFFINTNL(indent_nicks), N_("Make nick names right-justified"),0,0}, {ST_TOGGLE, N_("Transparent background"), P_OFFINTNL(transparent),0,0,0}, - {ST_TOGGLE, N_("Show marker line"), P_OFFINTNL(show_marker), + {ST_TOGGLR, N_("Show marker line"), P_OFFINTNL(show_marker), N_("Insert a red line after the last read text."),0,0}, {ST_HEADER, N_("Transparency Settings"), 0,0,0}, {ST_HSCALE, N_("Red:"), P_OFFINTNL(tint_red),0,0,0}, @@ -153,7 +152,11 @@ static const setting inputbox_settings[] = #if defined(USE_GTKSPELL) || defined(USE_LIBSEXY) {ST_TOGGLE, N_("Spell checking"), P_OFFINTNL(gui_input_spell),0,0,0}, {ST_ENTRY, N_("Dictionaries to use:"), P_OFFSETNL(spell_langs),0,0,sizeof prefs.spell_langs}, +#ifdef WIN32 {ST_LABEL, N_("Use language codes (as in \"share\\myspell\\dicts\").\nSeparate multiple entries with commas.")}, +#else + {ST_LABEL, N_("Use language codes. Separate multiple entries with commas.")}, +#endif #endif {ST_HEADER, N_("Nick Completion"),0,0,0}, @@ -413,6 +416,7 @@ static const setting advanced_settings[] = {ST_END, 0, 0, 0, 0, 0} }; +#ifdef WIN32 static const setting advanced_settings_oneinstance[] = { {ST_HEADER, N_("Advanced Settings"),0,0,0}, @@ -429,6 +433,7 @@ static const setting advanced_settings_oneinstance[] = {ST_END, 0, 0, 0, 0, 0} }; +#endif static const setting logging_settings[] = { @@ -1797,6 +1802,7 @@ setup_create_pages (GtkWidget *box) setup_add_page (cata[10], book, setup_create_page (logging_settings)); setup_add_page (cata[11], book, setup_create_sound_page ()); +#ifdef WIN32 if (portable_mode ()) { setup_add_page (cata[12], book, setup_create_page (advanced_settings)); @@ -1805,6 +1811,9 @@ setup_create_pages (GtkWidget *box) { setup_add_page (cata[12], book, setup_create_page (advanced_settings_oneinstance)); } +#else + setup_add_page (cata[12], book, setup_create_page (advanced_settings)); +#endif setup_add_page (cata[14], book, setup_create_page (network_settings)); setup_add_page (cata[15], book, setup_create_page (filexfer_settings)); diff --git a/src/fe-gtk/sexy-spell-entry.c b/src/fe-gtk/sexy-spell-entry.c index 8f21e977..9483f04b 100644 --- a/src/fe-gtk/sexy-spell-entry.c +++ b/src/fe-gtk/sexy-spell-entry.c @@ -33,7 +33,9 @@ #include "sexy-iso-codes.h" #include "sexy-marshal.h" +#ifdef WIN32 #include "typedef.h" +#endif #include "../common/cfgfiles.h" #include "../common/xchatc.h" @@ -141,9 +143,18 @@ initialize_enchant () GModule *enchant; gpointer funcptr; +#ifdef WIN32 enchant = g_module_open("libenchant.dll", 0); +#else + enchant = g_module_open("libenchant", 0); +#endif if (enchant == NULL) { +#ifndef WIN32 + enchant = g_module_open("libenchant.so.1", 0); + if (enchant == NULL) + return; +#endif return; } diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c index 5a83062b..3bc9b6a8 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -74,6 +74,8 @@ #ifdef WIN32 #include <windows.h> #include <gdk/gdkwin32.h> +#else +#include <unistd.h> #endif /* is delimiter */ |