summary refs log tree commit diff stats
path: root/src/fe-gtk/banlist.c
AgeCommit message (Collapse)Author
2013-07-02Don't use G_VALUE_INIT since it was introduced in glib 2.30, and our minimumDiogo Sousa
requirement is glib 2.28. This was giving a compilation error in FreeBSD 9.1, since it uses glib 2.28.
2013-06-04Add copy option to right click in banlistTingPing
Closes #626
2013-04-02Only include top level includes from GTK+, GLib and GDK-PixBufBerke Viktor
2013-04-02fix strptime on bsdTingPing
2013-04-02Missing includeTingPing
#492
2013-04-01use proper table sizeTingPing
2013-03-31Last oneTingPing
2013-03-31Add missing includeTingPing
2013-03-24Fix datesort problem after new column in banlistRichardHitt
2013-03-24WhitespaceTingPing
2013-03-24Translate type column entries tooTingPing
2013-03-24Add type column to banlistTingPing
2013-03-24Translate banlist checkboxesTingPing
Closes #465
2013-03-20Redesign the Ban List window. Closes Issues #303, #342, #427RichardHitt
This is a combination of 18 commits. The first commit's message is: Here is the initial banlist branch of RichardHitt/hexchat. Changed files are only src/fe-gtk/{banlist.c,fe-gtk.h}. This version works and contains my first efforts at selective sensitization of radio buttons and control buttons. From this point I intend to undertake a stepwise redesign. Step 1 will be to make the existing banlist code work for multiple simultaneous banlist windows (for different channels, obviously). It will be a hackathon with the only goal of getting it working. Step 2 will be the objectization and alpha-stage tidying-up of all the terrible looking stuff I will have done in Step 1. This is the 2nd commit message: Here's the post-Step-1 commit. It works for multiple banlist windows. Note particularly what I've done to banlist.h. Note that for many functions in banlist.c the argument is now a banlist_info *, rather than a session *. Note in banlist.c the initialization of array modes[] which contains driving information for the checkboxes. Of course those checkboxes aren't yet implemented. Maybe in Step 2 I will change to checkboxes from radio buttons; but definitely I will change to letting modes[] drive processing. This is the 3rd commit message: Converted to checkboxes. Much additional work. Note that the infrastructure for Auto-invite is not yet present in the hexchat tree. I'm nearly done with banlist, I think! This is the 4th commit message: Fleshed out 'invite'. Tagged masks uniformly, e.g. (b) (e) (I). General cleanup, nearly at the point of beta quality. This is the 5th commit message: Added fourth mode type: quiet. Did lots and lots of cleanup. Beta-ready? This is the 6th commit message: Get the banlist timestamps properly sortable. This is the 7th commit message: Redesign the supports_foo() routines. Now they're responsible for setting the flags in ->capable, ->readable, ->writeable. This is the 8th commit message: Deleted a couple of RBH comments. This is the 9th commit message: Now the ESC key will close the banlist window. This is the 10th commit message: Fix the fe-text occurrence of fe_add_ban_list(). This is the 11th commit message: Fixed also fe_ban_list_end() and removed fe_is_banwindow(). This is the 12th commit message: Use old-style initialization for array of structures modes[] This is the 13th commit message: Oops, incomplete regression of modes[] initialization. This fixes. This is the 14th commit message: Fixed strptime buy implementing a special version here. Fixed column width concerns by setting resizable and autosize. This is the 15th commit message: Get rid of testing line. This is the 16th commit message: Changed to gtkutil_destroy_on_esc () This is the 17th commit message: Remove no-longer-used functnion This is the 18th commit message: Minor cleanups to banlist.c, banlist.h Please enter the commit message for your changes. Lines starting with '#' will be ignored, and an empty message aborts the commit. Author: RichardHitt <rbh00@netcom.com> Committer: Richard Hitt <rbh00@f17.rbh00.pacbell.net> Not currently on any branch. Changes to be committed: (use "git reset HEAD <file>..." to unstage) modified: src/common/fe.h modified: src/common/hexchat.h modified: src/common/inbound.c modified: src/common/modes.c modified: src/common/proto-irc.c modified: src/common/server.c modified: src/fe-gtk/banlist.c modified: src/fe-gtk/banlist.h modified: src/fe-gtk/fe-gtk.c modified: src/fe-gtk/fe-gtk.h modified: src/fe-gtk/maingui.c modified: src/fe-text/fe-text.c
2012-12-23fix incorrect FSF addressDan Mashal
2012-10-24A lot more rebrandingBerke Viktor
2012-07-12Some more rebrandingBerke Viktor
2011-12-11initial patches for linux compatibilityBerke Viktor
2011-07-27remove odd ifdefberkeviktor@aol.com
2011-02-28add wdk changes to named branchberkeviktor@aol.com
2011-02-24add xchat r1489berkeviktor@aol.com
n> */ //static int DEBUG=0; static char *VERSION="0.0.6"; #include <windows.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <ctype.h> #include <math.h> #include "xchat-plugin.h" static xchat_plugin *ph; #include "functions.c" #include "mp3Info.c" #include "oggInfo.c" #include "theme.c" static int print_themes (char *word[], char *word_eol[], void *userdata){ printThemes(); return XCHAT_EAT_ALL; } static int mpc_themeReload(char *word[], char *word_eol[], void *userdata){ themeInit(); loadThemes(); return XCHAT_EAT_ALL; } static int mpc_tell(char *word[], char *word_eol[], void *userdata){ char *tTitle, *zero, *oggLine, *line; struct tagInfo info; HWND hwnd = FindWindow("MediaPlayerClassicW",NULL); if (hwnd==0) {xchat_command(ph, randomLine(notRunTheme));return XCHAT_EAT_ALL;} tTitle=(char*)malloc(sizeof(char)*1024); GetWindowText(hwnd, tTitle, 1024); zero=strstr(tTitle," - Media Player Classic"); if (zero!=NULL) zero[0]=0; else xchat_print(ph,"pattern not found"); if ((tTitle[1]==':')&&(tTitle[2]=='\\')){ //xchat_print(ph,"seams to be full path"); if (endsWith(tTitle,".mp3")==1){ //xchat_print(ph,"seams to be a mp3 file"); info = readHeader(tTitle); if ((info.artist!=NULL)&&(strcmp(info.artist,"")!=0)){ char *mode=MODES[info.mode]; //xchat_printf(ph,"mode: %s\n",mode); char *mp3Line=randomLine(mp3Theme); mp3Line=replace(mp3Line,"%art",info.artist); mp3Line=replace(mp3Line,"%tit",info.title); mp3Line=replace(mp3Line,"%alb",info.album); mp3Line=replace(mp3Line,"%com",info.comment); mp3Line=replace(mp3Line,"%gen",info.genre); //mp3Line=replace(mp3Line,"%time",pos); //mp3Line=replace(mp3Line,"%length",len); //mp3Line=replace(mp3Line,"%ver",waVers); //mp3Line=intReplace(mp3Line,"%br",br); //mp3Line=intReplace(mp3Line,"%frq",frq); mp3Line=intReplace(mp3Line,"%br",info.bitrate); mp3Line=intReplace(mp3Line,"%frq",info.freq); mp3Line=replace(mp3Line,"%mode",mode); //mp3Line=replace(mp3Line,"%size",size); //mp3Line=intReplace(mp3Line,"%perc",perc); //mp3Line=replace(mp3Line,"%plTitle",title); mp3Line=replace(mp3Line,"%file",tTitle); xchat_command(ph, mp3Line); return XCHAT_EAT_ALL; } } if (endsWith(tTitle,".ogg")==1){ xchat_printf(ph,"Ogg detected\n"); info = getOggHeader(tTitle); if (info.artist!=NULL){ char *cbr; if (info.cbr==1) cbr="CBR"; else cbr="VBR"; oggLine=randomLine(oggTheme); //if (cue==1) oggLine=cueLine; //xchat_printf(ph,"ogg-line: %s\n",oggLine); oggLine=replace(oggLine,"%art",info.artist); oggLine=replace(oggLine,"%tit",info.title); oggLine=replace(oggLine,"%alb",info.album); oggLine=replace(oggLine,"%com",info.comment); oggLine=replace(oggLine,"%gen",info.genre); //oggLine=replace(oggLine,"%time",pos); //oggLine=replace(oggLine,"%length",len); //oggLine=replace(oggLine,"%ver",waVers); oggLine=intReplace(oggLine,"%chan",info.mode); oggLine=replace(oggLine,"%cbr",cbr); oggLine=intReplace(oggLine,"%br",info.bitrate/1000);//br); oggLine=intReplace(oggLine,"%frq",info.freq); //oggLine=replace(oggLine,"%size",size); //oggLine=intReplace(oggLine,"%perc",perc); //oggLine=replace(oggLine,"%plTitle",title); oggLine=replace(oggLine,"%file",tTitle); xchat_command(ph, oggLine); return XCHAT_EAT_ALL; } } } line=randomLine(titleTheme); line=replace(line,"%title", tTitle); xchat_command(ph,line); return XCHAT_EAT_ALL; } int xchat_plugin_init(xchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg){ ph = plugin_handle; *plugin_name = "mpcInfo"; *plugin_desc = "Information-Script for Media Player Classic"; *plugin_version=VERSION; xchat_hook_command(ph, "mpc", XCHAT_PRI_NORM, mpc_tell,"no help text", 0); xchat_hook_command(ph, "mpc_themes", XCHAT_PRI_NORM, print_themes,"no help text", 0); xchat_hook_command(ph, "mpc_reloadthemes", XCHAT_PRI_NORM, mpc_themeReload,"no help text", 0); xchat_command (ph, "MENU -ietc\\music.png ADD \"Window/Display Current Song (MPC)\" \"MPC\""); themeInit(); loadThemes(); xchat_printf(ph, "%s %s plugin loaded\n",*plugin_name, VERSION); return 1; } int xchat_plugin_deinit (void) { xchat_command (ph, "MENU DEL \"Window/Display Current Song (MPC)\""); xchat_print (ph, "mpcInfo plugin unloaded\n"); return 1; }