Accessing 'prefs' from fe-gtk/tabs.c

Development of XChat itself. Talk about code, patches and other technical stuff. No feature requests!
Formal bug reports should go to http://xchat.org/cvs/#bugs instead.
This forum is for developers writing xchat code, not end-user questions.

Accessing 'prefs' fr

Postby mm » 09 Dec 2004 14:30

Hi,

One of the comments at the top of src/fe-gtk/tabs.c (Release 2.4.1) says

/* keep this code generic, don't include xchat.h! */


I was looking at the code, and wondered how would I retrieve any of the user-preferences (struct prefs) in tabs.c . From what I've found, this would involve #include of file(s) in src/common/ .

Now the query:

Would retrieval of a user preference attribute in the above way mean that the code would no longer be generic? If yes, is there any other way to achieve retrieval of a particular prefs attribute within functions of tabs.c ?

Thanks.
mm
 
Posts: 7
Joined: 09 Dec 2004 14:18

Postby mm » 12 Dec 2004 06:05

FYI.

For the patch I was working on, I found another way: added a parameter to the relevant functions in fe-gtk/tabs.c . So now fe-gtk/maingui.c passes prefs.<attribute> as a parameter to these functions. tabs.c itself doesn't need to access the prefs struct itself.

Thanks.
mm
 
Posts: 7
Joined: 09 Dec 2004 14:18


Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron