split dirent.h and more xtray support

This commit is contained in:
berkeviktor@aol.com
2011-01-14 06:43:56 +01:00
parent 1effb26d5f
commit e26a1c5f7a
9 changed files with 335 additions and 236 deletions

View File

@@ -103,7 +103,7 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/plugins/xdcc/xdcc.c xchat-wdk/plugi
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/cfgfiles.c xchat-wdk/src/common/cfgfiles.c
--- xchat-wdk.orig/src/common/cfgfiles.c 2010-08-07 09:14:45 +0200
+++ xchat-wdk/src/common/cfgfiles.c 2011-01-09 22:15:18 +0100
+++ xchat-wdk/src/common/cfgfiles.c 2011-01-14 05:44:35 +0100
@@ -17,7 +17,6 @@
*/
@@ -116,7 +116,7 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/cfgfiles.c xchat-wdk/src
#include "fe.h"
#include "text.h"
#include "xchatc.h"
+#include "portable.h"
+#include "wdkutil.h"
-#ifdef WIN32
-#define XCHAT_DIR "X-Chat 2"
@@ -844,12 +844,12 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/xchat.h xchat-wdk/src/co
unsigned int ctcp_time_limit; /*seconds of floods */
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/about.c xchat-wdk/src/fe-gtk/about.c
--- xchat-wdk.orig/src/fe-gtk/about.c 2010-05-16 09:43:49 +0200
+++ xchat-wdk/src/fe-gtk/about.c 2011-01-13 02:40:11 +0100
+++ xchat-wdk/src/fe-gtk/about.c 2011-01-14 05:44:48 +0100
@@ -39,6 +39,7 @@
#include "../common/xchat.h"
#include "../common/util.h"
+#include "../common/portable.h"
+#include "../common/wdkutil.h"
#include "palette.h"
#include "pixmaps.h"
#include "gtkutil.h"
@@ -1491,8 +1491,16 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/joind.c xchat-wdk/src/fe
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/maingui.c xchat-wdk/src/fe-gtk/maingui.c
--- xchat-wdk.orig/src/fe-gtk/maingui.c 2010-12-28 04:16:34 +0100
+++ xchat-wdk/src/fe-gtk/maingui.c 2010-12-28 14:57:33 +0100
@@ -214,60 +214,10 @@
+++ xchat-wdk/src/fe-gtk/maingui.c 2011-01-14 06:24:27 +0100
@@ -53,6 +53,7 @@
#include "../common/plugin.h"
#include "../common/modes.h"
#include "../common/url.h"
+#include "../common/wdkutil.h"
#include "fe-gtk.h"
#include "banlist.h"
#include "gtkutil.h"
@@ -214,60 +215,10 @@
away_list = mg_attr_list_create (&colors[COL_AWAY], FALSE);
}
@@ -1554,7 +1562,7 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/maingui.c xchat-wdk/src/
}
static void
@@ -281,18 +231,14 @@
@@ -281,18 +232,14 @@
{
set_window_urgency (win, FALSE);
}
@@ -1573,7 +1581,16 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/maingui.c xchat-wdk/src/
}
/* set a tab plain, red, light-red, or blue */
@@ -2972,11 +2918,7 @@
@@ -1334,7 +1281,7 @@
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1),
GTK_BUTTONBOX_END);
- if (minimize_button)
+ if (minimize_button && !xtray_mode ())
{
button = gtk_button_new_with_mnemonic (_("_Minimize to Tray"));
gtk_widget_show (button);
@@ -2972,11 +2919,7 @@
gtk_xtext_check_marker_visibility (GTK_XTEXT (current_sess->gui->xtext));
plugin_emit_dummy_print (current_sess, "Focus Window");
}
@@ -1585,7 +1602,7 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/maingui.c xchat-wdk/src/
return FALSE;
}
@@ -2987,11 +2929,7 @@
@@ -2987,11 +2930,7 @@
if (!sess->server->server_session)
sess->server->server_session = sess;
gtk_xtext_check_marker_visibility(GTK_XTEXT (current_sess->gui->xtext));
@@ -1653,8 +1670,8 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/palette.c xchat-wdk/src/
#include <fcntl.h>
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/plugin-tray.c xchat-wdk/src/fe-gtk/plugin-tray.c
--- xchat-wdk.orig/src/fe-gtk/plugin-tray.c 2010-11-16 09:26:23 +0100
+++ xchat-wdk/src/fe-gtk/plugin-tray.c 2011-01-11 00:16:30 +0100
@@ -1,8 +1,7 @@
+++ xchat-wdk/src/fe-gtk/plugin-tray.c 2011-01-14 05:52:36 +0100
@@ -1,14 +1,14 @@
/* Copyright (C) 2006-2007 Peter Zelezny. */
#include <string.h>
@@ -1664,7 +1681,14 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/plugin-tray.c xchat-wdk/
#include "../common/xchat.h"
#include "../common/xchatc.h"
#include "../common/inbound.h"
@@ -297,10 +296,10 @@
#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"
@@ -297,10 +297,10 @@
nets = tray_count_networks ();
chans = tray_count_channels ();
if (nets)
@@ -1677,7 +1701,7 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/plugin-tray.c xchat-wdk/
}
if (custom_icon1)
@@ -450,7 +449,7 @@
@@ -450,7 +450,7 @@
/* ph may have an invalid context now */
xchat_set_context (ph, xchat_find_context (ph, NULL, NULL));
@@ -1686,7 +1710,7 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/plugin-tray.c xchat-wdk/
tray_stop_flash ();
tray_reset_counts ();
@@ -585,11 +584,12 @@
@@ -585,11 +585,12 @@
/*gtk_menu_set_screen (GTK_MENU (menu), gtk_widget_get_screen (widget));*/
if (tray_get_window_status () == WS_HIDDEN)
@@ -1701,7 +1725,7 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/plugin-tray.c xchat-wdk/
submenu = mg_submenu (menu, _("_Blink on"));
blink_item (&prefs.input_tray_chans, submenu, _("Channel Message"));
blink_item (&prefs.input_tray_priv, submenu, _("Private Message"));
@@ -606,6 +606,7 @@
@@ -606,6 +607,7 @@
gtk_widget_set_sensitive (item, FALSE);
tray_make_item (menu, NULL, tray_menu_quit_cb, NULL);
@@ -1709,7 +1733,7 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/plugin-tray.c xchat-wdk/
mg_create_icon_item (_("_Quit"), GTK_STOCK_QUIT, menu, tray_menu_quit_cb, NULL);
menu_add_plugin_items (menu, "\x5$TRAY", NULL);
@@ -631,8 +632,8 @@
@@ -631,8 +633,8 @@
sticon = gtk_status_icon_new_from_pixbuf (ICON_NORMAL);
if (!sticon)
return;
@@ -1720,7 +1744,7 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/plugin-tray.c xchat-wdk/
g_signal_connect (G_OBJECT (sticon), "activate",
G_CALLBACK (tray_menu_restore_cb), NULL);
}
@@ -650,15 +651,15 @@
@@ -650,15 +652,15 @@
/* FIXME: hides any previous private messages */
tray_hilight_count++;
if (tray_hilight_count == 1)
@@ -1739,7 +1763,7 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/plugin-tray.c xchat-wdk/
word[1], xchat_get_info (ph, "channel"));
return XCHAT_EAT_NONE;
@@ -676,14 +677,14 @@
@@ -676,14 +678,14 @@
tray_pub_count++;
if (tray_pub_count == 1)
@@ -1757,7 +1781,7 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/plugin-tray.c xchat-wdk/
word[1], xchat_get_info (ph, "channel"));
return XCHAT_EAT_NONE;
@@ -705,14 +706,14 @@
@@ -705,14 +707,14 @@
tray_priv_count++;
if (tray_priv_count == 1)
@@ -1775,7 +1799,7 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/plugin-tray.c xchat-wdk/
from, network);
}
@@ -758,15 +759,15 @@
@@ -758,15 +760,15 @@
tray_file_count++;
if (tray_file_count == 1)
@@ -1794,6 +1818,24 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/plugin-tray.c xchat-wdk/
word[1], network);
return XCHAT_EAT_NONE;
@@ -802,7 +804,7 @@
}
else
{
- if (prefs.gui_tray)
+ if (prefs.gui_tray && !xtray_mode ())
tray_init ();
}
}
@@ -834,7 +836,7 @@
xchat_hook_print (ph, "Focus Window", -1, tray_focus_cb, NULL);
- if (prefs.gui_tray)
+ if (prefs.gui_tray && !xtray_mode ())
tray_init ();
return 1; /* return 1 for success */
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/plugingui.c xchat-wdk/src/fe-gtk/plugingui.c
--- xchat-wdk.orig/src/fe-gtk/plugingui.c 2010-05-16 05:20:22 +0200
+++ xchat-wdk/src/fe-gtk/plugingui.c 2010-12-28 14:57:33 +0100
@@ -1854,7 +1896,7 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/servlistgui.c xchat-wdk/
gtk_box_set_spacing (GTK_BOX (vbuttonbox2), 3);
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/setup.c xchat-wdk/src/fe-gtk/setup.c
--- xchat-wdk.orig/src/fe-gtk/setup.c 2008-02-08 10:04:45 +0100
+++ xchat-wdk/src/fe-gtk/setup.c 2011-01-10 06:58:17 +0100
+++ xchat-wdk/src/fe-gtk/setup.c 2011-01-14 06:37:24 +0100
@@ -109,19 +109,32 @@
N_("Give each person on IRC a different color"),0,0},
{ST_TOGGLR, N_("Indent nick names"), P_OFFINTNL(indent_nicks),
@@ -1892,7 +1934,32 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/setup.c xchat-wdk/src/fe
{ST_END, 0, 0, 0, 0, 0}
};
@@ -363,7 +376,6 @@
@@ -348,6 +361,24 @@
{ST_END, 0, 0, 0, 0, 0}
};
+static const setting alert_settings_xtray[] =
+{
+ {ST_HEADER, N_("Alerts"),0,0,0},
+
+ {ST_ALERTHEAD},
+ {ST_3OGGLE, N_("Blink task bar on:"), 0, 0, (void *)taskbarlist, 0},
+ {ST_3OGGLE, N_("Make a beep sound on:"), 0, 0, (void *)beeplist, 0},
+
+ {ST_HEADER, N_("Highlighted Messages"),0,0,0},
+ {ST_LABEL, N_("Highlighted messages are ones where your nickname is mentioned, but also:"), 0, 0, 0, 1},
+
+ {ST_ENTRY, N_("Extra words to highlight:"), P_OFFSETNL(irc_extra_hilight), 0, 0, sizeof prefs.irc_extra_hilight},
+ {ST_ENTRY, N_("Nick names not to highlight:"), P_OFFSETNL(irc_no_hilight), 0, 0, sizeof prefs.irc_no_hilight},
+ {ST_ENTRY, N_("Nick names to always highlight:"), P_OFFSETNL(irc_nick_hilight), 0, 0, sizeof prefs.irc_nick_hilight},
+ {ST_LABEL, N_("Separate multiple words with commas.\nWildcards are accepted.")},
+ {ST_END, 0, 0, 0, 0, 0}
+};
+
static const setting general_settings[] =
{
{ST_HEADER, N_("Default Messages"),0,0,0},
@@ -363,7 +394,6 @@
{ST_END, 0, 0, 0, 0, 0}
};
@@ -1900,7 +1967,7 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/setup.c xchat-wdk/src/fe
static const setting advanced_settings[] =
{
{ST_HEADER, N_("Advanced Settings"),0,0,0},
@@ -378,7 +390,6 @@
@@ -378,7 +408,6 @@
{ST_END, 0, 0, 0, 0, 0}
};
@@ -1908,7 +1975,7 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/setup.c xchat-wdk/src/fe
static const setting logging_settings[] =
{
@@ -1708,7 +1719,7 @@
@@ -1708,7 +1737,7 @@
N_("General"),
N_("Logging"),
N_("Sound"),
@@ -1917,7 +1984,20 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/setup.c xchat-wdk/src/fe
NULL,
N_("Network"),
N_("Network setup"),
@@ -1733,6 +1744,7 @@
@@ -1729,10 +1758,19 @@
setup_add_page (cata[3], book, setup_create_page (userlist_settings));
setup_add_page (cata[4], book, setup_create_page (tabs_settings));
setup_add_page (cata[5], book, setup_create_color_page ());
- setup_add_page (cata[8], book, setup_create_page (alert_settings));
+
+ if (xtray_mode ())
+ {
+ setup_add_page (cata[8], book, setup_create_page (alert_settings_xtray));
+ } else
+ {
+ setup_add_page (cata[8], book, setup_create_page (alert_settings));
+ }
+
setup_add_page (cata[9], book, setup_create_page (general_settings));
setup_add_page (cata[10], book, setup_create_page (logging_settings));
setup_add_page (cata[11], book, setup_create_sound_page ());