[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new server list window patch





On Mon, 21 Aug 2000 profeta@freemail.c3.hu wrote:

> hello, there's a patch at
> http://w3.swi.hu/lezli/xchat-1.5.6-p1.diff.gzipped [57k]
> 
>  - redesigned 'server list' window with Glade (http://glade.pn.org/)
>    * the group's channel list is inherited by all child servers which
> 	doesn't have it's own
>    * popup menu added to server tree
>    * server infos are displayed on a panel when you select a server in the
> 	tree
>    * port field in the 'edit entry' window is a spin button, now
>  - xchat now show verbose infos of X.509 certificates on SSL connect
>  - if invalid certificates are engaged, accepts self-signed certs
>  - new key action: Push input line into history
>  - GNOME emulation (fake_gnome.h), don't need so many '#ifdef USE_GNOME'
> 	and no need to regenerate C sources from Glade's XMLs if you
> 	haven't gnome-libs (only menus and stock buttons supported, yet)
> 
> unfortunately I had to split some files into more pieces because of the
> Glade, but I think it is cleaner, now. The new functions of fake_gnome.h
> are not used by the old code, but I will rewrite that also. I believe that
> it's going to be simplier and more readable.

Maybe cleaner source, but dirtier binary code :) Glade makes bloat, but
maybe I can live with it.

I don't know if I like this "gnome emulation". It looks dirty, and adds
bloat. What if gnome internals change? Pasting funtions from gnome source
just seems like a bad idea. Was this all just to keep glade happy?

Couple of problems:

1) You need stdlib.h stdio.h etc in settings-cb.c and serverlist-cb.c

serverlist-cb.c: In function `get_nick_by_button_nick_state':
serverlist-cb.c:87: warning: implicit declaration of function `fprintf'
serverlist-cb.c:87: `stderr' undeclared (first use in this function)
serverlist-cb.c:87: (Each undeclared identifier is reported only once
serverlist-cb.c:87: for each function it appears in.)
serverlist-cb.c: In function `close_server_list':
serverlist-cb.c:123: warning: implicit declaration of function `free'
serverlist-cb.c: In function `on_button_nick_clicked':
serverlist-cb.c:152: warning: implicit declaration of function `snprintf'
serverlist-cb.c: In function `connect_clicked':

remember snprintf can be defined in xchat.h (some systems don't have it).


2) serverlist-ui.c line 156 has some dead code. You can remove this and
remove create_pixmap() from support.c, but these files are auto generated,
if there an easy way to fix this in the .glade file?


I like the serverlist gui, it's real nice. I just wish it wasn't done in
glade. lookup_widget() uses a string to find widgets, I couldn't think
of a more ineffecient and slow way to do it. I guess we're lucky most
people have at least 500mhz machines and 64mb ram these days :)


-- 
Peter. <zed@linuxpower.org>

-
XChat-discuss: mailing list for XChat users
Archive:       http://mail.nl.linux.org/lists/
Posted By:     Peter <zed@linuxpower.org>