diff options
author | Marinus Schraal <foser@gentoo.org> | 2002-12-02 18:39:52 +0000 |
---|---|---|
committer | Marinus Schraal <foser@gentoo.org> | 2002-12-02 18:39:52 +0000 |
commit | 7d2c5c17383d0f166d09ad4d6555dc3f92060a62 (patch) | |
tree | 1779d8e2f982a1154bff5f3f942dd0c2b23e7986 /net-irc | |
parent | repoman fix (diff) | |
download | historical-7d2c5c17383d0f166d09ad4d6555dc3f92060a62.tar.gz historical-7d2c5c17383d0f166d09ad4d6555dc3f92060a62.tar.bz2 historical-7d2c5c17383d0f166d09ad4d6555dc3f92060a62.zip |
add patches
Diffstat (limited to 'net-irc')
-rw-r--r-- | net-irc/xchat/files/xchat-1.9.5-fastdialogswitch.patch | 226 | ||||
-rw-r--r-- | net-irc/xchat/files/xchat-1.9.5-private-logging.patch | 17 |
2 files changed, 243 insertions, 0 deletions
diff --git a/net-irc/xchat/files/xchat-1.9.5-fastdialogswitch.patch b/net-irc/xchat/files/xchat-1.9.5-fastdialogswitch.patch new file mode 100644 index 000000000000..e42f4dfc4b00 --- /dev/null +++ b/net-irc/xchat/files/xchat-1.9.5-fastdialogswitch.patch @@ -0,0 +1,226 @@ +diff -ru --exclude=po --exclude=intl --exclude=Makefile.in xchat-1.9.5/src/fe-gtk/maingui.c xchat-1.9.6/src/fe-gtk/maingui.c +--- xchat-1.9.5/src/fe-gtk/maingui.c 2002-11-17 17:58:04.000000000 +1100 ++++ xchat-1.9.6/src/fe-gtk/maingui.c 2002-11-17 22:17:55.000000000 +1100 +@@ -345,32 +345,6 @@ + userlist_show (sess); + userlist_set_value (sess->gui->user_tree, sess->res->old_ul_value); + +- switch (sess->type) +- { +- case SESS_DIALOG: +- /* show the dialog buttons */ +- gtk_widget_show (gui->dialogbutton_box); +- /* hide the chan-mode buttons */ +- gtk_widget_hide (gui->topicbutton_box); +- /* hide the userlist */ +- gtk_widget_hide (gui->user_box); +- break; +- case SESS_SERVER: +- gtk_widget_show (gui->topicbutton_box); +- /* hide the dialog buttons */ +- gtk_widget_hide (gui->dialogbutton_box); +- /* hide the userlist */ +- gtk_widget_hide (gui->user_box); +- break; +- default: +- /* hide the dialog buttons */ +- gtk_widget_hide (gui->dialogbutton_box); +- gtk_widget_show (gui->topicbutton_box); +- /* show the userlist */ +- if (!prefs.hideuserlist) +- gtk_widget_show (gui->user_box); +- } +- + ul_tag = 0; + return 0; + } +@@ -382,9 +356,10 @@ + { + session_gui *gui = sess->gui; + restore_gui *res = sess->res; +- int i; ++ int i, vis, render = TRUE; ++ ++ vis = GTK_WIDGET_VISIBLE (gui->user_box); + +-#if 0 + switch (sess->type) + { + case SESS_DIALOG: +@@ -410,12 +385,18 @@ + if (!prefs.hideuserlist) + gtk_widget_show (gui->user_box); + } +-#endif + + /* move to THE irc tab */ + if (gui->is_tab) + gtk_notebook_set_current_page (GTK_NOTEBOOK (gui->note_book), 0); +- gtk_xtext_buffer_show (GTK_XTEXT (gui->xtext), res->buffer); ++ ++ /* userlist CHANGED? Let the pending exposure draw the xtext */ ++ if (vis && !GTK_WIDGET_VISIBLE (gui->user_box)) ++ render = FALSE; ++ if (!vis && GTK_WIDGET_VISIBLE (gui->user_box)) ++ render = FALSE; ++ ++ gtk_xtext_buffer_show (GTK_XTEXT (gui->xtext), res->buffer, render); + GTK_XTEXT (gui->xtext)->color_paste = sess->color_paste; + + if (gui->is_tab) +@@ -1802,7 +1783,7 @@ + if (sess->res->buffer == NULL) + { + sess->res->buffer = gtk_xtext_buffer_new (GTK_XTEXT (sess->gui->xtext)); +- gtk_xtext_buffer_show (GTK_XTEXT (sess->gui->xtext), sess->res->buffer); ++ gtk_xtext_buffer_show (GTK_XTEXT (sess->gui->xtext), sess->res->buffer, TRUE); + sess->res->user_model = userlist_create_model (); + } + +diff -ru --exclude=po --exclude=intl --exclude=Makefile.in xchat-1.9.5/src/fe-gtk/xtext.c xchat-1.9.6/src/fe-gtk/xtext.c +--- xchat-1.9.5/src/fe-gtk/xtext.c 2002-11-17 15:06:11.000000000 +1100 ++++ xchat-1.9.6/src/fe-gtk/xtext.c 2002-11-18 14:40:43.000000000 +1100 +@@ -1011,13 +1011,23 @@ + { + GtkXText *xtext = GTK_XTEXT (widget); + int height_only = FALSE; ++ int do_trans = TRUE; + +- if (allocation->width == widget->allocation.width) ++ if (allocation->width == xtext->buffer->window_width) + height_only = TRUE; + ++ if (allocation->x == widget->allocation.x && ++ allocation->y == widget->allocation.y && xtext->avoid_trans) ++ do_trans = FALSE; ++ ++ xtext->avoid_trans = FALSE; ++ + widget->allocation = *allocation; + if (GTK_WIDGET_REALIZED (widget)) + { ++ xtext->buffer->window_width = allocation->width; ++ xtext->buffer->window_height = allocation->height; ++ + gdk_window_move_resize (widget->window, allocation->x, allocation->y, + allocation->width, allocation->height); + if (!height_only) +@@ -1028,7 +1038,7 @@ + gtk_xtext_adjustment_set (xtext->buffer, FALSE); + } + #ifdef USE_XLIB +- if (xtext->transparent && xtext->shaded) ++ if (do_trans && xtext->transparent && xtext->shaded) + { + gtk_xtext_free_trans (xtext); + gtk_xtext_load_trans (xtext); +@@ -3502,13 +3512,8 @@ + unsigned char *str; + int indent, taken, len; + int win_width; +- GtkXText *xtext = buf->xtext; + +- if (!GTK_WIDGET_REALIZED (xtext)) +- return 1; +- +- gdk_drawable_get_size (GTK_WIDGET (xtext)->window, &win_width, NULL); +- win_width -= MARGIN; ++ win_width = buf->window_width - MARGIN; + + if (ent->str_width + ent->indent < win_width) + return 1; +@@ -3519,7 +3524,7 @@ + + do + { +- len = find_next_wrap (xtext, ent, str, win_width, indent); ++ len = find_next_wrap (buf->xtext, ent, str, win_width, indent); + indent = buf->indent; + taken++; + str += len; +@@ -4169,7 +4174,7 @@ + } + + void +-gtk_xtext_buffer_show (GtkXText *xtext, xtext_buffer *buf) ++gtk_xtext_buffer_show (GtkXText *xtext, xtext_buffer *buf, int render) + { + int w, h; + +@@ -4185,14 +4190,6 @@ + + gdk_drawable_get_size (GTK_WIDGET (xtext)->window, &w, &h); + +- if (xtext->buffer) +- { +- /* record the win size, so we can calc_lines() if the +- * window size changes while this buffer isn't active */ +- xtext->buffer->window_width = w; +- xtext->buffer->window_height = h; +- } +- + /* now change to the new buffer */ + xtext->buffer = buf; + xtext->adj->value = buf->old_value; +@@ -4206,21 +4203,30 @@ + xtext->adj->value = xtext->adj->upper - xtext->adj->page_size; + } + +- /* did the window change size since this buffer was last shown? */ +- if (buf->window_width != w) ++ if (render) + { +- gtk_xtext_calc_lines (buf, FALSE); +- if (buf->scrollbar_down) +- gtk_adjustment_set_value (xtext->adj, xtext->adj->upper - +- xtext->adj->page_size); +- } else if (buf->window_height != h) ++ /* did the window change size since this buffer was last shown? */ ++ if (buf->window_width != w) ++ { ++ buf->window_width = w; ++ gtk_xtext_calc_lines (buf, FALSE); ++ if (buf->scrollbar_down) ++ gtk_adjustment_set_value (xtext->adj, xtext->adj->upper - ++ xtext->adj->page_size); ++ } else if (buf->window_height != h) ++ { ++ buf->window_height = h; ++ buf->pagetop_ent = NULL; ++ gtk_xtext_adjustment_set (buf, FALSE); ++ } ++ ++ gtk_xtext_render_page (xtext); ++ gtk_adjustment_changed (xtext->adj); ++ } else + { +- buf->pagetop_ent = NULL; +- gtk_xtext_adjustment_set (buf, FALSE); ++ /* avoid redoing the transparency */ ++ xtext->avoid_trans = TRUE; + } +- +- gtk_xtext_render_page (xtext); +- gtk_adjustment_changed (xtext->adj); + } + + xtext_buffer * +diff -ru --exclude=po --exclude=intl --exclude=Makefile.in xchat-1.9.5/src/fe-gtk/xtext.h xchat-1.9.6/src/fe-gtk/xtext.h +--- xchat-1.9.5/src/fe-gtk/xtext.h 2002-11-12 18:30:38.000000000 +1100 ++++ xchat-1.9.6/src/fe-gtk/xtext.h 2002-11-18 14:35:06.000000000 +1100 +@@ -176,6 +176,7 @@ + unsigned int in_hilight:1; + unsigned int un_hilight:1; + unsigned int recycle:1; ++ unsigned int avoid_trans:1; + }; + + struct _GtkXTextClass +@@ -216,6 +217,6 @@ + + xtext_buffer *gtk_xtext_buffer_new (GtkXText *xtext); + void gtk_xtext_buffer_free (xtext_buffer *buf); +-void gtk_xtext_buffer_show (GtkXText *xtext, xtext_buffer *buf); ++void gtk_xtext_buffer_show (GtkXText *xtext, xtext_buffer *buf, int render); + + #endif diff --git a/net-irc/xchat/files/xchat-1.9.5-private-logging.patch b/net-irc/xchat/files/xchat-1.9.5-private-logging.patch new file mode 100644 index 000000000000..894031942890 --- /dev/null +++ b/net-irc/xchat/files/xchat-1.9.5-private-logging.patch @@ -0,0 +1,17 @@ +--- xchat-1.9.5/src/common/xchat.c 2002-11-17 01:04:04.000000000 -0500 ++++ xchat-1.9.5.modified/src/common/xchat.c 2002-11-19 01:04:53.000000000 -0500 +@@ -330,9 +330,13 @@ + serv->server_session = sess; + serv->front_session = sess; + break; ++ case SESS_DIALOG: ++ sess = new_session (serv, name, type); ++ if (prefs.logging) ++ log_open (sess); ++ break; + default: + /* case SESS_CHANNEL: +- case SESS_DIALOG: + case SESS_NOTICES: + case SESS_SNOTICES:*/ + sess = new_session (serv, name, type); |