From d05cfd924f0c3f9f5e2fb81f0e773af00de9a144 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Mar 25 2005 17:46:00 +0000 Subject: - Add user's away message to right click menu, if known --- diff --git a/xchat-2.4.2-nickmenu-away-msg.patch b/xchat-2.4.2-nickmenu-away-msg.patch new file mode 100644 index 0000000..f53895d --- /dev/null +++ b/xchat-2.4.2-nickmenu-away-msg.patch @@ -0,0 +1,40 @@ +Patch to add away message to nick menu, +by Christopher Aillon + +--- ../xchat-2.4.2-orig/src/fe-gtk/menu.c 2005-03-14 23:44:12.000000000 -0500 ++++ src/fe-gtk/menu.c 2005-03-21 15:18:46.000000000 -0500 +@@ -450,12 +450,13 @@ static char *str_copy = 0; /* for all p + + void + menu_nickmenu (session *sess, GdkEventButton *event, char *nick, int num_sel) + { + char buf[256]; + struct User *user; ++ struct away_msg *away; + GtkWidget *wid, *submenu, *menu = gtk_menu_new (); + + if (str_copy) + free (str_copy); + str_copy = strdup (nick); + +@@ -487,12 +488,20 @@ menu_nickmenu (session *sess, GdkEventBu + menu_quick_item (0, buf, submenu, 0, 0); + + snprintf (buf, sizeof (buf), _("Server: %s"), + user->servername ? user->servername : _("Unknown")); + menu_quick_item (0, buf, submenu, 0, 0); + ++ if (user->away) ++ { ++ away = find_away_message (current_sess->server, nick); ++ snprintf (buf, sizeof (buf), _("Away Msg: %s"), ++ away->message ? away->message : _("Unknown")); ++ menu_quick_item (0, buf, submenu, 0, 0); ++ } ++ + snprintf (buf, sizeof (buf), _("Last Msg: %s"), + user->lasttalk ? ctime (&(user->lasttalk)) : _("Unknown")); + if (user->lasttalk) + buf[strlen (buf) - 1] = 0; + wid = menu_quick_item (0, buf, submenu, 0, 0); + diff --git a/xchat.spec b/xchat.spec index ccfa3f9..95ba896 100644 --- a/xchat.spec +++ b/xchat.spec @@ -8,7 +8,7 @@ Summary: A popular and easy to use graphical IRC (chat) client Name: xchat Version: 2.4.2 -Release: 1 +Release: 2 Epoch: 1 Group: Applications/Internet License: GPL @@ -23,6 +23,7 @@ Patch19: xchat-2.0.2-freenode.patch Patch22: xchat-2.0.9-simplify-to-use-gnome-open-for-default-webbrowser.patch Patch23: xchat-2.0.9-simplify-to-use-htmlview-for-default-webbrowser.patch Patch30: xchat-2.4.2-multiline-messages.patch +Patch31: xchat-2.4.2-nickmenu-away-msg.patch BuildRequires: perl python-devel openssl-devel pkgconfig # Added for bugzilla bug #91676 - ./configure indicates these versions or @@ -50,7 +51,7 @@ System. %patch23 -p1 -b .simplify-to-use-htmlview-for-default-webbrowser %endif %patch30 -p1 -b .multiline-messages - +%patch31 -p0 -b .nickmenu-away-msg %build # Remove CVS files from source dirs so they're not installed into doc dirs. @@ -112,6 +113,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la rm -rf $RPM_BUILD_ROOT %changelog +* Fri Mar 25 2005 Christopher Aillon 1:2.4.2-2 +- Add user's away message to right click menu, if known + * Thu Mar 17 2005 Christopher Aillon 1:2.4.2-1 - Update to 2.4.2