diff options
author | Raúl Porcel <armin76@gentoo.org> | 2008-11-27 20:49:59 +0000 |
---|---|---|
committer | Raúl Porcel <armin76@gentoo.org> | 2008-11-27 20:49:59 +0000 |
commit | 5e59c04aae1a0d9290a7a36cf6a2777b6b571239 (patch) | |
tree | db9ee1057b4366e7109490f7e0acf3d88ac17cc5 /net-irc/xchat/files | |
parent | Add a blocker on iproute2 #248092 by Diego E. Pettenò. (diff) | |
download | gentoo-2-5e59c04aae1a0d9290a7a36cf6a2777b6b571239.tar.gz gentoo-2-5e59c04aae1a0d9290a7a36cf6a2777b6b571239.tar.bz2 gentoo-2-5e59c04aae1a0d9290a7a36cf6a2777b6b571239.zip |
Don't use included libsexy, bug #246138, make shm pixmaps optional, bug #241902
(Portage version: 2.1.6_rc2/cvs/Linux 2.6.26-gentoo-r2 i686)
Diffstat (limited to 'net-irc/xchat/files')
-rw-r--r-- | net-irc/xchat/files/xc284-fix-scrollbfdleak.diff | 14 | ||||
-rw-r--r-- | net-irc/xchat/files/xc284-improvescrollback.diff | 28 | ||||
-rw-r--r-- | net-irc/xchat/files/xc284-scrollbmkdir.diff | 33 | ||||
-rw-r--r-- | net-irc/xchat/files/xchat-2.8.6-shm-pixmaps.patch | 106 | ||||
-rw-r--r-- | net-irc/xchat/files/xchat-fix-uk_UA-locale.diff | 12 |
5 files changed, 106 insertions, 87 deletions
diff --git a/net-irc/xchat/files/xc284-fix-scrollbfdleak.diff b/net-irc/xchat/files/xc284-fix-scrollbfdleak.diff deleted file mode 100644 index a5dbf2aade4f..000000000000 --- a/net-irc/xchat/files/xc284-fix-scrollbfdleak.diff +++ /dev/null @@ -1,14 +0,0 @@ -# -# Scrollback shrinking code forgets to close(). -# ---- xchat-2.8.4/src/common/text.c 2007-06-13 19:59:56.000000000 +1000 -+++ xchat-2.8.4p1/src/common/text.c 2007-11-02 23:52:57.000000000 +1100 -@@ -141,6 +146,7 @@ - } - - *len = st.st_size; -+ close (fh); - return buf; - } - - diff --git a/net-irc/xchat/files/xc284-improvescrollback.diff b/net-irc/xchat/files/xc284-improvescrollback.diff deleted file mode 100644 index 4bada74e4af1..000000000000 --- a/net-irc/xchat/files/xc284-improvescrollback.diff +++ /dev/null @@ -1,28 +0,0 @@ -# -# 1) Stops scrollback files growing too large by fixing the file-shrink code. -# 2) Puts a "Display scrollback from previous session" into the Setup GUI -# (logging section) so people can turn this off without typing commands. -# ---- xchat-2.8.4/src/common/text.c 29 Jul 2007 05:02:36 -0000 1.90 -+++ xchat-2.8.4p1/src/common/text.c 26 Sep 2007 07:29:55 -0000 -@@ -285,6 +285,8 @@ - } - } - -+ sess->scrollwritten = lines; -+ - if (lines) - { - text = ctime (&stamp); ---- xchat-2.8.4/src/fe-gtk/setup.c 9 Sep 2007 04:57:07 -0000 1.100 -+++ xchat-2.8.4p1/src/fe-gtk/setup.c 26 Sep 2007 07:29:57 -0000 -@@ -382,7 +382,8 @@ - static const setting logging_settings[] = - { - {ST_HEADER, N_("Logging"),0,0,0}, -- {ST_TOGGLE, N_("Enable logging of conversations"), P_OFFINTNL(logging), 0, 0, 2}, -+ {ST_TOGGLE, N_("Display scrollback from previous session"), P_OFFINTNL(text_replay), 0, 0, 0}, -+ {ST_TOGGLE, N_("Enable logging of conversations"), P_OFFINTNL(logging), 0, 0, 2}, - {ST_ENTRY, N_("Log filename:"), P_OFFSETNL(logmask), 0, 0, sizeof prefs.logmask}, - {ST_LABEL, N_("%s=Server %c=Channel %n=Network.")}, - diff --git a/net-irc/xchat/files/xc284-scrollbmkdir.diff b/net-irc/xchat/files/xc284-scrollbmkdir.diff deleted file mode 100644 index e2caa28083a9..000000000000 --- a/net-irc/xchat/files/xc284-scrollbmkdir.diff +++ /dev/null @@ -1,33 +0,0 @@ -# -# Fix creation of ~/.xchat2/scrollback/ paths. -# ---- xchat-2.8.4/src/common/text.c 15 Jun 2007 03:53:42 -0000 1.89 -+++ xchat-2.8.4p1/src/common/text.c 8 Jul 2007 08:59:02 -0000 -@@ -49,20 +49,25 @@ - - - static void mkdir_p (char *dir); -+static char *log_create_filename (char *channame); - - - static char * - scrollback_get_filename (session *sess, char *buf, int max) - { -- char *net; -+ char *net, *chan; - - net = server_get_network (sess->server, FALSE); - if (!net) - return NULL; - -- snprintf (buf, max, "%s/scrollback/%s/%s.txt", get_xdir_fs (), net, sess->channel); -+ snprintf (buf, max, "%s/scrollback/%s/%s.txt", get_xdir_fs (), net, ""); - mkdir_p (buf); - -+ chan = log_create_filename (sess->channel); -+ snprintf (buf, max, "%s/scrollback/%s/%s.txt", get_xdir_fs (), net, chan); -+ free (chan); -+ - return buf; - } - diff --git a/net-irc/xchat/files/xchat-2.8.6-shm-pixmaps.patch b/net-irc/xchat/files/xchat-2.8.6-shm-pixmaps.patch new file mode 100644 index 000000000000..68f7fbe0b65e --- /dev/null +++ b/net-irc/xchat/files/xchat-2.8.6-shm-pixmaps.patch @@ -0,0 +1,106 @@ +diff -ruN xchat-2.8.6.orig/src/fe-gtk/xtext.c xchat-2.8.6/src/fe-gtk/xtext.c +--- xchat-2.8.6.orig/src/fe-gtk/xtext.c 2008-02-24 06:04:30.000000000 +0100 ++++ xchat-2.8.6/src/fe-gtk/xtext.c 2008-10-14 11:04:57.000000000 +0200 +@@ -1350,6 +1350,22 @@ + } + } + ++#ifdef USE_SHM ++static int ++have_shm_pixmaps(Display *dpy) ++{ ++ static int checked = 0, major, minor; ++ static Bool have = FALSE; ++ ++ if (!checked) { ++ XShmQueryVersion(dpy, &major, &minor, &have); ++ checked = 1; ++ } ++ ++ return have; ++} ++#endif ++ + static void + gtk_xtext_paint (GtkWidget *widget, GdkRectangle *area) + { +@@ -1366,8 +1382,12 @@ + { + xtext->last_win_x = x; + xtext->last_win_y = y; +-#if !defined(USE_SHM) && !defined(WIN32) ++#ifndef WIN32 ++#ifdef USE_SHM ++ if (xtext->shaded && !have_shm_pixmaps(GDK_WINDOW_XDISPLAY (xtext->draw_buf))) ++#else + if (xtext->shaded) ++#endif + { + xtext->recycle = TRUE; + gtk_xtext_load_trans (xtext); +@@ -3559,6 +3579,11 @@ + GC tgc; + Display *xdisplay = GDK_WINDOW_XDISPLAY (xtext->draw_buf); + ++#ifdef USE_SHM ++ int shm_pixmaps; ++ shm_pixmaps = have_shm_pixmaps(xdisplay); ++#endif ++ + XGetGeometry (xdisplay, p, &root, &dummy, &dummy, &width, &height, + &dummy, &depth); + +@@ -3576,18 +3601,20 @@ + XFreeGC (xdisplay, tgc); + + #ifdef USE_SHM +- ximg = get_image (xtext, xdisplay, &xtext->shminfo, 0, 0, w, h, depth, tmp); +-#else +- ximg = XGetImage (xdisplay, tmp, 0, 0, w, h, -1, ZPixmap); ++ if (shm_pixmaps) ++ ximg = get_image (xtext, xdisplay, &xtext->shminfo, 0, 0, w, h, depth, tmp); ++ else + #endif ++ ximg = XGetImage (xdisplay, tmp, 0, 0, w, h, -1, ZPixmap); + XFreePixmap (xdisplay, tmp); + } else + { + #ifdef USE_SHM +- ximg = get_image (xtext, xdisplay, &xtext->shminfo, x, y, w, h, depth, p); +-#else +- ximg = XGetImage (xdisplay, p, x, y, w, h, -1, ZPixmap); ++ if (shm_pixmaps) ++ ximg = get_image (xtext, xdisplay, &xtext->shminfo, x, y, w, h, depth, p); ++ else + #endif ++ ximg = XGetImage (xdisplay, p, x, y, w, h, -1, ZPixmap); + } + + if (!ximg) +@@ -3612,7 +3639,7 @@ + else + { + #ifdef USE_SHM +- if (xtext->shm) ++ if (xtext->shm && shm_pixmaps) + { + #if (GTK_MAJOR_VERSION == 2) && (GTK_MINOR_VERSION == 0) + shaded_pix = gdk_pixmap_foreign_new ( +@@ -3630,7 +3657,7 @@ + } + + #ifdef USE_SHM +- if (!xtext->shm) ++ if (!xtext->shm || !shm_pixmaps) + #endif + XPutImage (xdisplay, GDK_WINDOW_XWINDOW (shaded_pix), + GDK_GC_XGC (xtext->fgc), ximg, 0, 0, 0, 0, w, h); +@@ -3650,7 +3677,7 @@ + if (xtext->pixmap) + { + #ifdef USE_SHM +- if (xtext->shm) ++ if (xtext->shm && have_shm_pixmaps(GDK_WINDOW_XDISPLAY (xtext->draw_buf))) + { + XFreePixmap (GDK_WINDOW_XDISPLAY (xtext->pixmap), + GDK_WINDOW_XWINDOW (xtext->pixmap)); diff --git a/net-irc/xchat/files/xchat-fix-uk_UA-locale.diff b/net-irc/xchat/files/xchat-fix-uk_UA-locale.diff deleted file mode 100644 index c17319b46720..000000000000 --- a/net-irc/xchat/files/xchat-fix-uk_UA-locale.diff +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur xchat-2.8.4.orig/src/fe-gtk/fe-gtk.c xchat-2.8.4/src/fe-gtk/fe-gtk.c ---- xchat-2.8.4.orig/src/fe-gtk/fe-gtk.c 2008-02-06 11:56:52.000000000 +0000 -+++ xchat-2.8.4/src/fe-gtk/fe-gtk.c 2008-02-06 11:57:26.000000000 +0000 -@@ -717,7 +717,7 @@ - struct session *sess; - float per; - char tbuf[64]; -- char tip[64]; -+ char tip[100]; - - per = (float) serv->sendq_len / 1024.0; - if (per > 1.0) |