[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/src externs.h,1.2,1.3 triggerdecls.h,1.2,1.3
From: |
Philip S Tellis <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/src externs.h,1.2,1.3 triggerdecls.h,1.2,1.3 Makefile.am,1.9,1.10 about.c,1.12,1.13 account.c,1.4,1.5 account.h,1.3,1.4 account_parser.y,1.2,1.3 add_contact_window.c,1.9,1.10 browser.c,1.9,1.10 browser.h,1.1.1.1,1.2 chat_room.c,1.30,1.31 chat_room.h,1.7,1.8 chat_window.c,1.22,1.23 chat_window.h,1.5,1.6 console_session.c,1.4,1.5 console_session.h,1.1.1.1,1.2 contact.h,1.2,1.3 contact_actions.c,1.5,1.6 contact_parser.y,1.4,1.5 dialog.c,1.10,1.11 dialog.h,1.4,1.5 edit_account_window.c,1.5,1.6 edit_contact_window.c,1.5,1.6 editcontacts.c,1.13,1.14 extgtktext.c,1.5,1.6 globals.h,1.5,1.6 gtk_globals.h,1.2,1.3 help_menu.c,1.1.1.1,1.2 help_menu.h,1.1.1.1,1.2 input_list.c,1.4,1.5 input_list.h,1.1.1.1,1.2 main.c,1.8,1.9 message_parse.c,1.9,1.10 plugin_api.c,1.3,1.4 plugin_api.h,1.1.1.1,1.2 prefs.c,1.14,1.15 service.c,1.3,1.4 service.h,1.3,1.4 sound.c,1.6,1.7 status.c,1.18,1.19 status.h,1.3,1.4 trigger.c,1.6,1.7 trigger.h,1.3,1.4 util.c,1.10,1.11 util.h,1.4,1.5 about.h,1.3,NONE account_parser.tab.h,1.1.1.1,NONE contact_parser.tab.h,1.1.1.1,NONE |
Date: |
Thu, 16 Jan 2003 04:51:08 -0500 |
Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv15316/src
Modified Files:
Makefile.am about.c account.c account.h account_parser.y
add_contact_window.c browser.c browser.h chat_room.c
chat_room.h chat_window.c chat_window.h console_session.c
console_session.h contact.h contact_actions.c contact_parser.y
dialog.c dialog.h edit_account_window.c edit_contact_window.c
editcontacts.c extgtktext.c globals.h gtk_globals.h
help_menu.c help_menu.h input_list.c input_list.h main.c
message_parse.c plugin_api.c plugin_api.h prefs.c service.c
service.h sound.c status.c status.h trigger.c trigger.h util.c
util.h
Added Files:
externs.h triggerdecls.h
Removed Files:
about.h account_parser.tab.h contact_parser.tab.h
Log Message:
changed code almost everywhere. removed gtk dependencies in some places,
changed gdk_input_* to eb_input_*, etc... see the ChangeLog.
Index: Makefile.am
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/Makefile.am,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Makefile.am 14 Jan 2003 12:11:53 -0000 1.9
+++ Makefile.am 16 Jan 2003 09:51:04 -0000 1.10
@@ -12,12 +12,13 @@
noinst_HEADERS = account.h service.h contact.h gtk_globals.h globals.h \
status.h info_window.h chat_window.h util.h add_contact_window.h \
- sound.h about.h dialog.h prefs.h progress_window.h away_window.h \
+ sound.h dialog.h prefs.h progress_window.h away_window.h \
message_parse.h help_menu.h chat_room.h value_pair.h log_window.h \
info_window.h log_window.h gtkspell.h trigger.h console_session.h \
gtk_eb_html.h browser.h input_list.h plugin.h plugin_api.h debug.h \
nomodule.h file_select.h extgtktext.h contact_actions.h \
- smileys.h intl.h account_parser.h contact_parser.h crash.h
+ smileys.h intl.h account_parser.h contact_parser.h crash.h \
+ externs.h triggerdecls.h
EXTRA_DIST =
@@ -53,7 +54,8 @@
@echo \#define MODULE_DIR \"${datadir}/yattm/modules\" >> defaults.h;
@echo "#endif" >> defaults.h;
@echo "#endif" >> defaults.h;
- @touch main.c status.c about.c crash.c
+
+main.c status.c about.c crash.c plugin.c prefs.c: defaults.h
account_parser.c: account_parser.y
$(YACC) $(AM_LFLAGS) $(LFLAGS) -d -p account $< && \
@@ -70,5 +72,3 @@
contact_scanner.c: contact_scanner.l
$(LEX) $(AM_LFLAGS) $(LFLAGS) -it -Pcontact $< > $@
-
-plugin.c prefs.c: defaults.h
Index: about.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/about.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- about.c 15 Jan 2003 07:54:59 -0000 1.12
+++ about.c 16 Jan 2003 09:51:04 -0000 1.13
@@ -19,12 +19,11 @@
*
*/
-#include "intl.h"
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
-#include "about.h"
+#include "intl.h"
#include "dialog.h"
#include "pixmaps/yattmlogo.xpm"
Index: account.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/account.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- account.c 5 Jan 2003 08:32:16 -0000 1.4
+++ account.c 16 Jan 2003 09:51:04 -0000 1.5
@@ -20,15 +20,20 @@
*/
#include "intl.h"
+#include <gtk/gtk.h>
+#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-
+#include "account.h"
+#include "service.h"
+#include "contact.h"
#include "globals.h"
+#include "triggerdecls.h"
#include "value_pair.h"
#include "util.h"
-
void write_account_list()
{
Index: account.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/account.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- account.h 3 Jan 2003 23:26:07 -0000 1.3
+++ account.h 16 Jan 2003 09:51:04 -0000 1.4
@@ -27,10 +27,8 @@
#ifndef __ACCOUNT_H__
#define __ACCOUNT_H__
-#include <gtk/gtk.h>
-
-/* forward declarations */
-struct contact;
+#include <glib.h>
+#include "contact.h"
#ifdef __cplusplus
extern "C" {
@@ -40,9 +38,9 @@
{
gchar name[255];
GList * members;
- GtkWidget * list_item;
- GtkWidget * tree;
- GtkWidget * label;
+ void * list_item; /* GtkWidget */
+ void * tree; /* GtkWidget */
+ void * label; /* GtkWidget */
gint contacts_online;
gint contacts_shown;
} grouplist;
@@ -52,9 +50,9 @@
gchar handle[255];
struct contact * account_contact;
void *protocol_account_data;
- GtkWidget * list_item;
- GtkWidget * status;
- GtkWidget * pix;
+ void * list_item; /* GtkWidget */
+ void * status; /* GtkWidget */
+ void * pix; /* GtkWidget */
gint icon_handler;
gboolean online;
gint status_handler;
@@ -67,7 +65,7 @@
gchar *handle;
gchar alias[255];
gboolean connected;
- GtkWidget * status_button;
+ void * status_button; /* GtkWidget */
GSList * status_menu;
void *protocol_local_account_data;
} eb_local_account;
Index: account_parser.y
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/account_parser.y,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- account_parser.y 8 Jan 2003 01:55:19 -0000 1.2
+++ account_parser.y 16 Jan 2003 09:51:04 -0000 1.3
@@ -1,12 +1,16 @@
%token ACCOUNT END_ACCOUNT
%{
- #include <stdlib.h>
- #include <string.h>
+ #include <gtk/gtk.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
- #include "globals.h"
- #include "value_pair.h"
- #include "util.h"
+ #include "globals.h"
+ #include "account.h"
+ #include "value_pair.h"
+ #include "service.h"
+ #include "util.h"
extern void save_account_info(char *service, GList *pairs);
extern int Line;
Index: add_contact_window.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/add_contact_window.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- add_contact_window.c 15 Jan 2003 07:54:59 -0000 1.9
+++ add_contact_window.c 16 Jan 2003 09:51:04 -0000 1.10
@@ -1,41 +1,43 @@
/*
- * Yattm
- *
- * Copyright (C) 1999, Torrey Searle <address@hidden>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
+* Yattm
+*
+* Copyright (C) 1999, Torrey Searle <address@hidden>
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*
+*/
#include "intl.h"
#include <string.h>
-
+#include <gtk/gtk.h>
+#include "service.h"
#include "status.h"
+#include "account.h"
+#include "contact.h"
#include "globals.h"
#include "util.h"
#include "dialog.h"
#include "add_contact_window.h"
-
#include "pixmaps/tb_preferences.xpm"
#include "pixmaps/cancel.xpm"
/*
- * This is the GUI that gets created when you click on the "Add" button
- * on the edit contacts tab, this is to add a new contact to your contact
- * list
- */
+* This is the GUI that gets created when you click on the "Add" button
+* on the edit contacts tab, this is to add a new contact to your contact
+* list
+*/
static gint window_open = 0;
static GtkWidget *add_contact_window;
@@ -59,30 +61,10 @@
}
/*
- * This function just gets a linked list of groups, this is handy
- * because we can then use it to populate the groups combo widget
- * with this information
- */
-
-GList * get_groups()
-{
- GList * node = NULL;
- GList * newlist = NULL;
- node = groups;
-
- while(node) {
- newlist = g_list_append(newlist, ((grouplist
*)node->data)->name);
- node = node->next;
- }
-
- return newlist;
-}
-
-/*
- * This function just gets a linked list of all contacts associated, this
- * with a particular group this we use it to populate the contacts combo widget
- * with this information
- */
+* This function just gets a linked list of all contacts associated, this
+* with a particular group this we use it to populate the contacts combo widget
+* with this information
+*/
static GList * get_contacts(gchar *group)
{
@@ -95,7 +77,9 @@
node = g->members;
while(node) {
- newlist = g_list_insert_sorted(newlist, ((struct contact
*)node->data)->nick, strcasecmp_glist);
+ newlist = g_list_insert_sorted(newlist,
+ ((struct contact *)node->data)->nick,
+ strcasecmp_glist);
node = node->next;
}
@@ -117,8 +101,8 @@
}
/*
- * this gets a list of all accounts associated with a contact
- */
+* this gets a list of all accounts associated with a contact
+*/
GList * get_accounts(gchar *contact)
{
@@ -193,7 +177,7 @@
if(flag == 0){
gtk_signal_handler_block(GTK_OBJECT(GTK_COMBO(contact_name)->entry),
contact_input_handler);
- gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(contact_name)->entry),
+ gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(contact_name)->entry),
gtk_entry_get_text(GTK_ENTRY(account_name)));
gtk_signal_handler_unblock(GTK_OBJECT(GTK_COMBO(contact_name)->entry),
contact_input_handler);
@@ -218,7 +202,7 @@
eb_account *ea = eb_services[service_id].sc->new_account(account);
ea->service_id = service_id;
-
+
if (eb_services[service_id].sc->check_login) {
char *buf = NULL;
char *err = eb_services[service_id].sc->check_login((char
*)account, (char *)"");
@@ -232,12 +216,12 @@
}
gl = find_grouplist_by_name(COMBO_TEXT(group_name));
con = find_contact_by_nick(COMBO_TEXT(contact_name));
-
+
if(!gl) {
add_group(COMBO_TEXT(group_name));
gl = find_grouplist_by_name(COMBO_TEXT(group_name));
}
-
+
if(!con) {
con = add_new_contact(COMBO_TEXT(group_name),
COMBO_TEXT(contact_name), ea->service_id);
}
@@ -249,8 +233,8 @@
}
/*
- * Create a Add contact window and put it on the screen
- */
+* Create a Add contact window and put it on the screen
+*/
void show_add_defined_contact_window(struct contact * cont, grouplist *grp)
{
@@ -272,65 +256,65 @@
GList *list;
GdkPixmap *icon;
GdkBitmap *mask;
-
+
add_contact_window = gtk_window_new(GTK_WINDOW_DIALOG);
gtk_window_set_position(GTK_WINDOW(add_contact_window),
GTK_WIN_POS_MOUSE);
gtk_widget_realize(add_contact_window);
gtk_container_set_border_width(GTK_CONTAINER(add_contact_window), 5);
-
+
table = gtk_table_new(2, 4, FALSE);
gtk_table_set_row_spacings(GTK_TABLE(table), 5);
gtk_table_set_row_spacings(GTK_TABLE(table), 5);
gtk_container_set_border_width(GTK_CONTAINER(table), 5);
vbox = gtk_vbox_new(FALSE, 5);
hbox = gtk_hbox_new(FALSE, 0);
-
+
/*Section for adding account*/
-
+
label = gtk_label_new(_("Account:"));
gtk_box_pack_end(GTK_BOX(hbox), label, FALSE, FALSE, 5);
gtk_widget_show(label);
- gtk_table_attach(GTK_TABLE(table), hbox, 0, 1, 0, 1,
GTK_EXPAND, GTK_EXPAND, 0, 0);
+ gtk_table_attach(GTK_TABLE(table), hbox, 0, 1, 0, 1,
GTK_EXPAND, GTK_EXPAND, 0, 0);
gtk_widget_show(hbox);
-
+
account_name = gtk_entry_new();
if (cont == NULL)
gtk_signal_connect(GTK_OBJECT(GTK_ENTRY(account_name)),
"changed",
GTK_SIGNAL_FUNC(set_con), NULL);
gtk_table_attach(GTK_TABLE(table), account_name, 1, 2, 0, 1,
GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show(account_name);
-
+
/*Section for declaring the protocol*/
hbox = gtk_hbox_new(FALSE, 0);
-
+
label = gtk_label_new(_("Protocol:"));
gtk_box_pack_end(GTK_BOX(hbox), label, FALSE, FALSE, 5);
gtk_widget_show(label);
gtk_table_attach(GTK_TABLE(table), hbox, 2, 3, 0, 1,
GTK_EXPAND, GTK_EXPAND, 0, 0);
gtk_widget_show(hbox);
-
+
/*List of Protocols*/
-
+
service_list = gtk_combo_new();
list = get_service_list();
gtk_combo_set_popdown_strings(GTK_COMBO(service_list), list );
g_list_free(list);
gtk_table_attach(GTK_TABLE(table), service_list, 3, 4, 0, 1,
GTK_EXPAND, GTK_EXPAND, 0, 0);
gtk_widget_show(service_list);
-
+
/*Section for Group declaration*/
-
+
hbox = gtk_hbox_new(FALSE, 0);
-
+
label = gtk_label_new(_("Group:"));
gtk_box_pack_end(GTK_BOX(hbox), label, FALSE, FALSE, 0);
gtk_widget_show(label);
gtk_table_attach(GTK_TABLE(table), hbox, 0, 1, 1, 2,
GTK_EXPAND, GTK_EXPAND, 0, 0);
gtk_widget_show(hbox);
-
+
/*List of available groups*/
-
+
group_name = gtk_combo_new();
list = get_groups();
gtk_combo_set_popdown_strings(GTK_COMBO(group_name), list );
@@ -352,19 +336,19 @@
GTK_SIGNAL_FUNC(dif_group), NULL);
gtk_table_attach(GTK_TABLE(table), group_name, 1, 2, 1, 2,
GTK_EXPAND, GTK_EXPAND, 0, 0);
gtk_widget_show(group_name);
-
+
/*Section for Contact Name*/
-
+
hbox = gtk_hbox_new(FALSE, 0);
-
+
label = gtk_label_new(_("Contact:"));
gtk_box_pack_end(GTK_BOX(hbox), label, FALSE, FALSE, 5);
gtk_widget_show(label);
gtk_table_attach(GTK_TABLE(table), hbox, 2, 3, 1, 2,
GTK_EXPAND, GTK_EXPAND, 0, 0);
gtk_widget_show(hbox);
-
+
/*List of available contacts*/
-
+
contact_name = gtk_combo_new();
list = get_all_contacts();
gtk_combo_set_popdown_strings(GTK_COMBO(contact_name), list );
@@ -385,10 +369,10 @@
gtk_container_add(GTK_CONTAINER(frame), table);
gtk_widget_show(table);
-
+
gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);
gtk_widget_show(frame);
-
+
/*Lets try adding a seperator*/
separator = gtk_hseparator_new();
@@ -397,83 +381,83 @@
hbox = gtk_hbox_new(FALSE, 5);
hbox2 = gtk_hbox_new(TRUE, 5);
-
+
/*Add Button*/
-
+
gtk_widget_set_usize(hbox2, 200,25);
-
+
icon = gdk_pixmap_create_from_xpm_d(add_contact_window->window,
&mask, NULL, tb_preferences_xpm);
iconwid = gtk_pixmap_new(icon, mask);
- label = gtk_label_new(_("Add"));
-
+ label = gtk_label_new(_("Add"));
+
gtk_box_pack_start(GTK_BOX(hbox), iconwid, FALSE, FALSE, 2);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2);
-
+
gtk_widget_show(iconwid);
gtk_widget_show(label);
-
+
button = gtk_button_new();
-
+
gtk_signal_connect(GTK_OBJECT(button), "clicked",
GTK_SIGNAL_FUNC(add_button_callback),
NULL);
gtk_widget_show(hbox);
-
+
gtk_container_add(GTK_CONTAINER(button), hbox);
-
+
gtk_box_pack_start(GTK_BOX(hbox2), button, TRUE, TRUE, 0);
gtk_widget_show(button);
-
+
/*Cancel Button*/
-
+
hbox = gtk_hbox_new(FALSE, 5);
icon = gdk_pixmap_create_from_xpm_d(add_contact_window->window,
&mask, NULL, cancel_xpm);
iconwid = gtk_pixmap_new(icon, mask);
label = gtk_label_new(_("Cancel"));
-
+
gtk_box_pack_start(GTK_BOX(hbox), iconwid, FALSE, FALSE, 2);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2);
-
+
gtk_widget_show(iconwid);
gtk_widget_show(label);
-
+
button = gtk_button_new();
-
+
gtk_signal_connect_object(GTK_OBJECT(button), "clicked",
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT(add_contact_window));
gtk_widget_show(hbox);
-
+
gtk_container_add(GTK_CONTAINER (button), hbox);
-
+
gtk_box_pack_start(GTK_BOX(hbox2), button, TRUE, TRUE, 0);
gtk_widget_show(button);
-
+
/*Buttons End*/
-
+
hbox = gtk_hbox_new(FALSE, 0);
table = gtk_table_new(1, 1, FALSE);
-
+
gtk_box_pack_end(GTK_BOX(hbox),hbox2, FALSE, FALSE, 0);
gtk_widget_show(hbox2);
-
+
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show(hbox);
-
+
gtk_table_attach(GTK_TABLE(table), vbox, 0, 1, 0, 1,
GTK_EXPAND, GTK_EXPAND, 0, 0);
gtk_widget_show(vbox);
-
+
gtk_container_add(GTK_CONTAINER(add_contact_window), table);
gtk_widget_show(table);
-
+
gtk_window_set_title(GTK_WINDOW(add_contact_window), _("Yattm -
Add Contact"));
gtk_widget_grab_focus(account_name);
eb_icon(add_contact_window->window);
gtk_widget_show(add_contact_window);
-
+
gtk_signal_connect(GTK_OBJECT(add_contact_window), "destroy",
GTK_SIGNAL_FUNC(destroy), NULL);
-
+
window_open = 1;
}
}
Index: browser.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/browser.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- browser.c 15 Jan 2003 10:02:01 -0000 1.9
+++ browser.c 16 Jan 2003 09:51:04 -0000 1.10
@@ -68,7 +68,7 @@
esc_url[0]='"'; j=1;
if (url[0]=='\'' || url[0]=='"')
i++;
- for (i; i< strlen(url) && j < 1023; i++,j++) {
+ for (; i< strlen(url) && j < 1023; i++,j++) {
switch(url[i]) {
case '$':
case '\'':
Index: browser.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/browser.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- browser.h 23 Dec 2002 22:05:30 -0000 1.1.1.1
+++ browser.h 16 Jan 2003 09:51:04 -0000 1.2
@@ -1,15 +1,24 @@
-#include <gtk/gtk.h>
-
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __MINGW32__
+
+#ifdef __IN_PLUGIN__
+#define extern __declspec(dllimport)
+#endif
+
+#include <gdk/gdk.h>
void open_url(GdkWindow *w, char *url);
void open_url_nw(GdkWindow *w, char *url);
+
+#ifdef __IN_PLUGIN__
+#define extern extern
+#endif
+
#else
-void open_url(GtkWidget *w, char *url);
-void open_url_nw(GtkWidget *w, char *url);
+void open_url(void *w, char *url);
+void open_url_nw(void *w, char *url);
#endif
#ifdef __cplusplus
Index: chat_room.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/chat_room.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- chat_room.c 15 Jan 2003 17:23:32 -0000 1.30
+++ chat_room.c 16 Jan 2003 09:51:04 -0000 1.31
@@ -86,7 +86,7 @@
static void send_typing_status(eb_chat_room *cr)
{
time_t now=time(NULL);
- GList *others;
+ /*GList *others;*/
if(!iGetLocalPref("do_send_typing_notify"))
return;
@@ -105,7 +105,7 @@
eb_chat_room_update_window_title(cr, FALSE);
if (!iGetLocalPref("do_multi_line"))
- return;
+ return FALSE;
if (event->keyval == GDK_Return)
{
Index: chat_room.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/chat_room.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- chat_room.h 13 Jan 2003 07:23:27 -0000 1.7
+++ chat_room.h 16 Jan 2003 09:51:04 -0000 1.8
@@ -19,11 +19,12 @@
*
*/
-#ifndef __CHAT_ROOM_H__
-#define __CHAT_ROOM_H__
-
+#include <gtk/gtk.h>
#include "account.h"
+#include <time.h>
+#ifndef __CHAT_ROOM_H__
+#define __CHAT_ROOM_H__
typedef struct _eb_chat_room_buddy
{
@@ -33,14 +34,14 @@
typedef struct _eb_chat_room
{
- gboolean connected; //are we currently in this chat room
- gchar id[255]; //who are we?
+ gboolean connected; /* are we currently in this chat room */
+ gchar id[255]; /* who are we? */
int service_id;
- gchar room_name[1024]; //what is this chat room called
+ gchar room_name[1024]; /* what is this chat room called */
GtkWidget * window;
GtkWidget * conversation;
GtkWidget * entry;
- GtkWidget * online; // CList of online folks
+ GtkWidget * online; /* CList of online folks */
GtkWidget *smiley_button;
GtkWidget *smiley_window;
GtkWidget * status_label;
@@ -48,9 +49,9 @@
GList * history;
GList * hist_pos;
int this_msg_in_history;
- GList * fellows; //who is in the chat room
- eb_local_account * chat_room_account; //who are we talking as?
- void *protocol_local_chat_room_data; // For protocol-specific storage
+ GList * fellows; /* who is in the chat room */
+ eb_local_account * chat_room_account; /* who are we talking as? */
+ void *protocol_local_chat_room_data; /* For protocol-specific storage */
/* sound stuff */
gboolean sound_enabled;
@@ -83,6 +84,8 @@
void eb_chat_room_buddy_leave( eb_chat_room * room, gchar * handle );
gboolean eb_chat_room_buddy_connected( eb_chat_room * room, gchar * user );
void open_join_chat_window();
+eb_chat_room * find_chat_room_by_id( gchar * id );
+eb_chat_room * find_chat_room_by_name( gchar * name, gint service_id );
char* next_chatroom_name();
void eb_chat_room_display_status (eb_account *remote, char *message);
Index: chat_window.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/chat_window.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- chat_window.c 13 Jan 2003 11:33:27 -0000 1.22
+++ chat_window.c 16 Jan 2003 09:51:04 -0000 1.23
@@ -32,25 +32,29 @@
#include "intl.h"
#include <string.h>
+#include <time.h>
+#include <stdio.h>
#include <stdlib.h>
+#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include <ctype.h>
#include <assert.h>
#include "chat_window.h"
#include "util.h"
+#include "gtkspell.h"
#include "add_contact_window.h"
#include "sound.h"
#include "dialog.h"
-#include "globals.h"
+#include "gtk_globals.h"
#include "status.h"
#include "away_window.h"
#include "message_parse.h"
+#include "extgtktext.h"
#include "gtk_eb_html.h"
#include "plugin.h"
#include "contact_actions.h"
#include "smileys.h"
-#include "prefs.h"
#ifdef HAVE_ISPELL
#include "gtkspell.h"
#endif
@@ -176,7 +180,7 @@
}
}
}
- *(ptr_recoded_text + strlen(ptr_src_text)) = '\0'; // just in case :)
+ *(ptr_recoded_text + strlen(ptr_src_text)) = '\0'; /* just in case
:) */
iconv_close(conv_desc);
return recoded_text;
@@ -374,8 +378,8 @@
*/
if (gtk_notebook_get_number_pages(GTK_NOTEBOOK(notebook)) == 0) {
- // we just delete the last conversation, no point in having the window
- // around... note that this also causes end_conversation to be called...
+ /* we just delete the last conversation, no point in having the window */
+ /* around... note that this also causes end_conversation to be called...
*/
gtk_widget_destroy(window);
}
}
@@ -502,7 +506,7 @@
eb_update_window_title(data, FALSE);
- // Outbound filters here - Meredydd
+ /* Outbound filters here - Meredydd */
filter_walk=outgoing_message_filters;
eb_debug(DBG_CORE, "Starting to run outgoing filters\n");
@@ -517,14 +521,14 @@
text=ifilter(data->local_user, data->preferred, data->contact, text);
- if(text==NULL) { return; } // Urgh, no cleanup, but it does it on
strlen(text)==0 too
+ if(text==NULL) { return; } /* Urgh, no cleanup, but it does it on
strlen(text)==0 too */
filter_walk=g_list_next(filter_walk);
}
eb_debug(DBG_CORE, "Finished outgoing filters\n");
- // end outbound filters
+ /* end outbound filters */
o_text = text;
text = convert_eol(text);
@@ -1022,12 +1026,12 @@
if(strlen(s)>0)
{
cw->history=g_list_append(cw->history, strdup(s));
- //cw->hist_pos=cw->history->next;
- g_free(s); // that strdup() followed by g_free() looks stupid, but
it isn't
- // - strdup() uses vanilla malloc(), and the destroy
code uses
- // vanilla free(), so we can't use something that
needs to be
- // g_free()ed (apparently glib uses an incompatible
allocation
- //system
+ /* cw->hist_pos=cw->history->next; */
+ g_free(s); /* that strdup() followed by g_free() looks stupid, but
it isn't */
+ /* - strdup() uses vanilla malloc(), and the destroy
code uses */
+ /* vanilla free(), so we can't use something that
needs to be */
+ /* g_free()ed (apparently glib uses an incompatible
allocation */
+ /* system */
cw->this_msg_in_history=1;
}
@@ -1104,9 +1108,9 @@
{
for(l2 = ((grouplist*)l1->data)->members; l2; l2=l2->next )
{
- // if this contact's chatwindow is equal to this one,
- // then we need to end the conversation and remove the
- // notebook tab...
+ /* if this contact's chatwindow is equal to this one, */
+ /* then we need to end the conversation and remove the */
+ /* notebook tab... */
c = (struct contact*)l2->data;
if (c->chatwindow != NULL) {
if (c->chatwindow->notebook_child == page->child) {
@@ -1811,7 +1815,6 @@
void eb_chat_window_display_remote_message(eb_local_account * account,
eb_account * remote,
- struct service * serv,
gchar * o_message)
{
struct contact * remote_contact = remote->account_contact;
@@ -1820,7 +1823,7 @@
struct tm * cur_time;
time_t t;
GList * filter_walk;
- gchar * message;
+ gchar * message, *temp_message;
gboolean firstmsg = FALSE; /* init to false so only play if
* first msg is one received rather
* than sent */
@@ -1838,7 +1841,7 @@
if(!strcasecmp(remote_contact->group->name, _("Ignore") ))
return;
- // Inbound filters here - Meredydd
+ /* Inbound filters here - Meredydd */
filter_walk=incoming_message_filters;
eb_debug(DBG_CORE, "Starting to run incoming filters\n");
@@ -1853,20 +1856,21 @@
ofilter=(gchar *(*)(eb_local_account *, eb_account *, struct contact *,
gchar *))filter_walk->data;
message=ofilter(account, remote, remote_contact, message);
- if(message==NULL) { return; } // Nothing to clean up (I think...)
+ if(message==NULL) { return; } /* Nothing to clean up (I think...) */
filter_walk=g_list_next(filter_walk);
}
eb_debug(DBG_CORE, "Finished incoming filters\n");
- // end inbound filters
-
-
- message = eb_smilify(message, serv->sc->get_smileys());
+ /* end inbound filters */
+ temp_message = eb_smilify(message, RUN_SERVICE(account)->get_smileys());
+ message = linkify(temp_message);
+ g_free(temp_message);
+
if(!remote_contact->chatwindow || !remote_contact->chatwindow->window)
- {
+ {
if(remote_contact->chatwindow)
g_free(remote_contact->chatwindow);
@@ -1879,13 +1883,13 @@
gtk_widget_show(remote_contact->chatwindow->window);
firstmsg = TRUE; /* chat window created by
* receive msg, so set to true */
- if ( iGetLocalPref("do_restore_last_conv") )
- {
- gchar buff[NAME_MAX];
- make_safe_filename(buff, remote_contact->nick);
- eb_restore_last_conv(buff,remote_contact->chatwindow);
- }
- }
+ if ( iGetLocalPref("do_restore_last_conv") )
+ {
+ gchar buff[NAME_MAX];
+ make_safe_filename(buff, remote_contact->nick);
+ eb_restore_last_conv(buff,remote_contact->chatwindow);
+ }
+ }
/*for now we will assume the identity that the person in question talked
to us last as */
@@ -1937,14 +1941,14 @@
if ( iGetLocalPref("do_raise_window") )
{
gdk_window_raise(remote_contact->chatwindow->window->window);
- // gtk_widget_grab_focus(remote_contact->chatwindow->entry);
+ /* gtk_widget_grab_focus(remote_contact->chatwindow->entry); */
}
if ( iGetLocalPref("do_convo_timestamp") )
{
gchar * color;
- color=serv->sc->get_color(); // note do not free() afterwards, may be
static
+ color=RUN_SERVICE(account)->get_color(); /* note do not free()
afterwards, may be static */
time(&t);
cur_time = localtime(&t);
@@ -2173,7 +2177,7 @@
if ( (fp = fopen(file_name, "r")) == NULL)
{
- //there must not be a list logfile...
+ /* there must not be a list logfile... */
return;
}
@@ -2244,8 +2248,10 @@
gtk_eb_html_add(EXT_GTK_TEXT(cw->chat), "<br>",0,0,0);
- if(strlen(buff) > strlen(_("<B>Conversation ")) &&
!strncmp(buff+strlen(_("<B>Conversation ")),_("ended on"),8)
- || strlen(buff) > strlen(_("<P ALIGN=\"CENTER\"><B>Conversation "))
&& !strncmp(buff+strlen(_("<P ALIGN=\"CENTER\"><B>Conversation ")),_("ended
on"),8))
+ if(( strlen(buff) > strlen(_("<B>Conversation "))
+ && !strncmp(buff+strlen(_("<B>Conversation
")),_("ended on"),8) )
+ || ( strlen(buff) > strlen(_("<P
ALIGN=\"CENTER\"><B>Conversation "))
+ && !strncmp(buff+strlen(_("<P
ALIGN=\"CENTER\"><B>Conversation ")),_("ended on"),8) ))
{
endreached = TRUE;
break;
Index: chat_window.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/chat_window.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- chat_window.h 13 Jan 2003 04:58:32 -0000 1.5
+++ chat_window.h 16 Jan 2003 09:51:04 -0000 1.6
@@ -27,17 +27,13 @@
#ifndef __CHAT_WINDOW_H__
#define __CHAT_WINDOW_H__
-
+#include <gtk/gtk.h>
#include <stdio.h>
#include <time.h>
-
-#include "log_window.h"
+#include "contact.h"
#include "account.h"
-
-/* forward declarations */
-struct contact;
-struct service;
-
+#include "log_window.h"
+#include "service.h"
typedef struct _chat_window
{
@@ -91,7 +87,6 @@
void eb_chat_window_display_remote_message( eb_local_account * account,
eb_account * remote,
- struct service * serv,
gchar * message);
void eb_chat_window_display_status( eb_account * remote,
@@ -105,13 +100,5 @@
void eb_chat_window_do_timestamp( struct contact * c, gboolean online );
void eb_restore_last_conv(gchar *file_name, chat_window* cw);
void send_message(GtkWidget *widget, gpointer d);
-
-#if defined(__MINGW32__) && defined(__IN_PLUGIN__)
-__declspec(dllimport) GList *outgoing_message_filters;
-__declspec(dllimport) GList *incoming_message_filters;
-#else
-extern GList *outgoing_message_filters;
-extern GList *incoming_message_filters;
-#endif
#endif
Index: console_session.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/console_session.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- console_session.c 15 Jan 2003 07:54:59 -0000 1.4
+++ console_session.c 16 Jan 2003 09:51:04 -0000 1.5
@@ -23,19 +23,20 @@
#include "console_session.h"
#include <sys/un.h>
#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/socket.h>
#include "chat_window.h"
#include "util.h"
#include "status.h"
+#include "plugin_api.h"
static void console_session_close(int * session)
{
- gdk_input_remove(*((int*)session));
+ eb_input_remove(*((int*)session));
g_free(session);
}
-void console_session_get_command(gpointer data,
- gint source,
-
GdkInputCondition condition )
+void console_session_get_command(void *data, int source, eb_input_condition
condition )
{
char * contact_name;
char * message;
@@ -98,7 +99,7 @@
}
-void console_session_init(gpointer data, gint source, GdkInputCondition
condition )
+void console_session_init(void *data, int source, eb_input_condition condition)
{
struct sockaddr_un remote;
int len;
@@ -106,7 +107,7 @@
int * listener = g_new0(int, 1);
sock = accept(source, (struct sockaddr *)&remote, &len);
- *listener = gdk_input_add(sock, GDK_INPUT_READ,
+ *listener = eb_input_add(sock, EB_INPUT_READ,
console_session_get_command,
(gpointer)listener);
}
Index: console_session.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/console_session.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- console_session.h 23 Dec 2002 22:05:31 -0000 1.1.1.1
+++ console_session.h 16 Jan 2003 09:51:04 -0000 1.2
@@ -1,10 +1,3 @@
-#include <gtk/gtk.h>
-#include <sys/types.h>
-#ifdef __MINGW32__
-#include <winsock2.h>
-#else
-#include <sys/socket.h>
-#endif
-#include <unistd.h>
+#include <plugin_api.h>
-void console_session_init(gpointer data, gint source, GdkInputCondition
condition );
+void console_session_init(void *data, int source, eb_input_condition
condition);
Index: contact.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/contact.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- contact.h 3 Jan 2003 23:26:07 -0000 1.2
+++ contact.h 16 Jan 2003 09:51:04 -0000 1.3
@@ -45,13 +45,13 @@
struct _chat_window * chatwindow;
struct _log_window* logwindow;
- GtkWidget * list_item;
- GtkWidget * tree;
- GtkWidget * pix;
- GtkWidget * status;
- GtkWidget * label;
+ void * list_item; /* GtkWidget */
+ void * tree; /* GtkWidget */
+ void * pix; /* GtkWidget */
+ void * status; /* GtkWidget */
+ void * label; /* GtkWidget */
gint icon_handler;
};
-#endif /* __CONTACT_H__ */
+#endif
Index: contact_actions.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/contact_actions.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- contact_actions.c 15 Jan 2003 07:54:59 -0000 1.5
+++ contact_actions.c 16 Jan 2003 09:51:04 -0000 1.6
@@ -22,6 +22,7 @@
#include <string.h>
#include "util.h"
+#include "service.h"
#include "intl.h"
#include "message_parse.h"
#include "log_window.h"
Index: contact_parser.y
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/contact_parser.y,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- contact_parser.y 8 Jan 2003 01:55:19 -0000 1.4
+++ contact_parser.y 16 Jan 2003 09:51:04 -0000 1.5
@@ -1,12 +1,18 @@
%token ACCOUNT END_ACCOUNT GROUP END_GROUP CONTACT END_CONTACT
%{
- #include <stdlib.h>
- #include <string.h>
+ #include <gtk/gtk.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+
+ #include "globals.h"
+ #include "account.h"
+ #include "value_pair.h"
+ #include "service.h"
+ #include "trigger.h"
+ #include "triggerdecls.h"
+ #include "util.h"
- #include "globals.h"
- #include "value_pair.h"
- #include "util.h"
-
extern int Line_contact;
#define contacterror(error) printf("Parse error on line %d: %s\n",
Line_contact, error );
static struct contact * cur_contact = NULL;
Index: dialog.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/dialog.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- dialog.c 15 Jan 2003 07:54:59 -0000 1.10
+++ dialog.c 16 Jan 2003 09:51:04 -0000 1.11
@@ -333,7 +333,7 @@
/* The dialog for getting an error */
/*------------------------------------------------------------------------*/
-GtkWidget*
+void
do_error_dialog(char *message, char *title)
{
GtkWidget *d;
@@ -360,8 +360,6 @@
gtk_window_set_modal(GTK_WINDOW(d), TRUE);
gtk_widget_show(d);
gtk_widget_grab_focus(close);
-
- return d;
}
Index: dialog.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/dialog.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- dialog.h 10 Jan 2003 15:02:15 -0000 1.4
+++ dialog.h 16 Jan 2003 09:51:04 -0000 1.5
@@ -100,7 +100,7 @@
GtkWidget *submenu, int nb);
-GtkWidget* do_error_dialog(char *message, char *title);
+void do_error_dialog(char *message, char *title);
void eb_icon(GdkWindow *);
void do_dialog( gchar * message, gchar * title, void (*action)(GtkWidget *
widget, gpointer data), gpointer data );
void do_list_dialog( gchar * message, gchar * title, char **list, void
(*action)(char * text, gpointer data), gpointer data );
@@ -110,7 +110,25 @@
} /* extern "C" */
#endif
+/*prefs.c*/
+#include "prefs.h"
+
/*editcontacts.c*/
void eb_new_user();
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int progress_window_new( char * filename, unsigned long size );
+void update_progress(int tag, unsigned long progress);
+void progress_window_close(int tag);
+
+/* defined in util.c */
+gint gtk_notebook_get_number_pages(GtkNotebook *notebook);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
#endif
Index: edit_account_window.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/edit_account_window.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- edit_account_window.c 15 Jan 2003 07:54:59 -0000 1.5
+++ edit_account_window.c 16 Jan 2003 09:51:04 -0000 1.6
@@ -20,13 +20,15 @@
*/
#include "intl.h"
+#include <gtk/gtk.h>
#include <string.h>
-
+#include "contact.h"
+#include "service.h"
#include "status.h"
+#include "account.h"
#include "util.h"
#include "globals.h"
#include "dialog.h"
-
#include "pixmaps/tb_preferences.xpm"
#include "pixmaps/cancel.xpm"
@@ -76,21 +78,6 @@
static gint strcasecmp_glist(gconstpointer a, gconstpointer b)
{
return strcasecmp((const char *)a, (const char *)b);
-}
-
-static GList * get_groups()
-{
- GList * node = NULL;
- GList * newlist = NULL;
- node = groups;
-
- while(node)
- {
- newlist = g_list_append(newlist, ((grouplist *)node->data)->name);
- node = node->next;
- }
-
- return newlist;
}
static GList * get_contacts(gchar * group)
Index: edit_contact_window.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/edit_contact_window.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- edit_contact_window.c 15 Jan 2003 14:04:47 -0000 1.5
+++ edit_contact_window.c 16 Jan 2003 09:51:04 -0000 1.6
@@ -20,13 +20,14 @@
*/
#include "intl.h"
+#include <gtk/gtk.h>
#include <string.h>
-
+#include "contact.h"
+#include "service.h"
#include "status.h"
#include "dialog.h"
#include "util.h"
#include "add_contact_window.h"
-
#include "pixmaps/tb_edit.xpm"
#include "pixmaps/cancel.xpm"
Index: editcontacts.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/editcontacts.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- editcontacts.c 15 Jan 2003 07:54:59 -0000 1.13
+++ editcontacts.c 16 Jan 2003 09:51:04 -0000 1.14
@@ -25,15 +25,22 @@
#include "intl.h"
+#include <gtk/gtk.h>
#include <stdlib.h>
+#include <stdio.h>
#include <string.h>
+#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include "account.h"
+#include "service.h"
#include "gtk_globals.h"
#include "status.h"
#include "util.h"
+#include "contact.h"
#include "dialog.h"
+#include "service.h"
#include "value_pair.h"
#include "pixmaps/ok.xpm"
Index: extgtktext.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/extgtktext.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- extgtktext.c 14 Jan 2003 21:54:47 -0000 1.5
+++ extgtktext.c 16 Jan 2003 09:51:04 -0000 1.6
@@ -58,6 +58,8 @@
#include <gdk/gdkprivate.h>
#include "extgtktext.h"
#include "globals.h"
+#include "plugin_api.h"
+
#ifdef HAVE_LIBXFT
#include <X11/Xft/Xft.h>
#endif
@@ -1442,7 +1444,7 @@
if (text->timer)
{
- gtk_timeout_remove (text->timer);
+ eb_timeout_remove (text->timer);
text->timer = 0;
}
@@ -1925,8 +1927,8 @@
return FALSE;
}
-static gint
-gtk_text_scroll_timeout (gpointer data)
+static int
+gtk_text_scroll_timeout (void * data)
{
ExtGtkText *text;
GdkEventMotion event;
@@ -2082,7 +2084,7 @@
if (text->timer)
{
- gtk_timeout_remove (text->timer);
+ eb_timeout_remove (text->timer);
text->timer = 0;
}
@@ -2155,7 +2157,7 @@
{
if (text->timer == 0)
{
- text->timer = gtk_timeout_add (SCROLL_TIME,
+ text->timer = eb_timeout_add (SCROLL_TIME,
gtk_text_scroll_timeout,
text);
Index: globals.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/globals.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- globals.h 10 Jan 2003 23:43:56 -0000 1.5
+++ globals.h 16 Jan 2003 09:51:04 -0000 1.6
@@ -24,7 +24,11 @@
*
*/
-#include <gtk/gtk.h>
+#ifndef __GLOBALS_H__
+#define __GLOBALS_H__
+
+#include <glib.h>
+
#if defined(__MINGW32__) && defined(__IN_PLUGIN__)
#define extern __declspec(dllimport)
#endif
@@ -36,7 +40,6 @@
extern gint is_away;
-extern GtkWidget *away_menu;
char geometry[256];
#ifdef HAVE_ICONV_H
@@ -48,13 +51,6 @@
/* The location of our config files */
extern char config_dir[];
-/* tabbed chat tab switching hotkeys */
-extern GdkDeviceKey accel_next_tab;
-extern GdkDeviceKey accel_prev_tab;
-
-/* current parent (for error dialogs) */
-GtkWidget *current_parent_widget;
-
/* debug messages */
extern gint do_yattm_debug;
extern gint do_yattm_debug_html;
@@ -62,8 +58,10 @@
#define DBG_HTML do_yattm_debug_html
#define DBG_CORE do_yattm_debug
-#include "debug.h"
#if defined(__MINGW32__) && defined(__IN_PLUGIN__)
#define extern extern
#endif
+#include "debug.h"
+
+#endif
Index: gtk_globals.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/gtk_globals.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gtk_globals.h 5 Jan 2003 08:32:16 -0000 1.2
+++ gtk_globals.h 16 Jan 2003 09:51:04 -0000 1.3
@@ -28,7 +28,7 @@
#ifndef __GTK_GLOBALS_H__
#define __GTK_GLOBALS_H__
-#include "globals.h"
+#include <gtk/gtk.h>
#if defined(__MINGW32__) && defined(__IN_PLUGIN__)
#define extern __declspec(dllimport)
@@ -42,8 +42,13 @@
/* - defined in main.c */
extern GtkWidget *current_parent_widget;
+/* tabbed chat tab switching hotkeys */
+extern GdkDeviceKey accel_next_tab;
+extern GdkDeviceKey accel_prev_tab;
+
#if defined(__MINGW32__) && defined(__IN_PLUGIN__)
#define extern extern
#endif
+#include "globals.h"
#endif
Index: help_menu.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/help_menu.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- help_menu.c 23 Dec 2002 22:05:36 -0000 1.1.1.1
+++ help_menu.c 16 Jan 2003 09:51:04 -0000 1.2
@@ -20,14 +20,19 @@
*/
#include "browser.h"
-#include "help_menu.h"
-void show_manual(GtkWidget *w, void *null)
+/*
+ * instead of including all the definitions in stdio.h, we just define
+ * a specialised NULL here
+ */
+#define NULL (void *)0
+
+void show_manual()
{
open_url_nw(NULL, "http://staff.ncst.ernet.in/tahir/eb-manual/");
}
-void show_website(GtkWidget *w, void *null)
+void show_website()
{
open_url_nw(NULL, "http://www.yattm.com/");
}
Index: help_menu.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/help_menu.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- help_menu.h 23 Dec 2002 22:05:41 -0000 1.1.1.1
+++ help_menu.h 16 Jan 2003 09:51:04 -0000 1.2
@@ -26,8 +26,8 @@
Function prototypes
*/
-void show_manual(GtkWidget *w, void *null);
-void show_website(GtkWidget *w, void *null);
+void show_manual(void);
+void show_website(void);
#endif
Index: input_list.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/input_list.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- input_list.c 11 Jan 2003 14:52:16 -0000 1.4
+++ input_list.c 16 Jan 2003 09:51:04 -0000 1.5
@@ -29,7 +29,7 @@
#include "dialog.h"
-void eb_input_render(input_list * il, GtkWidget * box)
+void eb_input_render(input_list * il, void * box)
{
/* XXX: for backwards compatibility remove later */
char *item_label=NULL;
Index: input_list.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/input_list.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- input_list.h 23 Dec 2002 22:05:36 -0000 1.1.1.1
+++ input_list.h 16 Jan 2003 09:51:04 -0000 1.2
@@ -19,11 +19,11 @@
*
*/
-#include <gtk/gtk.h>
-#include <stdio.h>
#ifndef __EB_INPUT_LIST_H__
#define __EB_INPUT_LIST_H__
+#include <glib.h>
+
enum
{
EB_INPUT_CHECKBOX,
@@ -44,7 +44,7 @@
char * name;
char * label;
char * value;
- GtkWidget * entry;
+ void * entry; /* GtkWidget */
} entry_input;
typedef struct _input_list
@@ -59,7 +59,7 @@
} input_list;
-void eb_input_render(input_list * il, GtkWidget * box);
+void eb_input_render(input_list * il, void * box); /* GtkWidget * box */
void eb_input_cancel(input_list * il);
void eb_input_accept(input_list * il);
GList *eb_input_to_value_pair(input_list * il);
Index: main.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/main.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- main.c 14 Jan 2003 10:51:56 -0000 1.8
+++ main.c 16 Jan 2003 09:51:04 -0000 1.9
@@ -162,7 +162,7 @@
{
eb_status_window();
if( iGetLocalPref("do_login_on_startup") )
- eb_sign_on_all(NULL, NULL) ;
+ eb_sign_on_all() ;
}
}
@@ -185,7 +185,6 @@
struct stat stat_buf;
gboolean accounts_success = FALSE;
- GtkWidget *wid;
pid_t pid;
const char * cmd = argv [0];
@@ -387,9 +386,8 @@
{
perror("connect");
g_snprintf(buff, 1024, _("Yattm already running,
pid=%d\n"), pid);
- wid = do_error_dialog(buff, _("Already logged on"));
- /* UGLY UGLY HACK... */
- while (GTK_CHECK_TYPE(wid, GTK_TYPE_WINDOW) &&
GTK_WIDGET_VISIBLE(wid)){while (g_main_iteration(FALSE));}
+ /* TODO make sure this one is modal */
+ do_error_dialog(buff, _("Already logged on"));
exit(1);
}
length = strlen("focus-yattm")+1;
@@ -428,7 +426,7 @@
perror("Unable to handle console connections. listen");
exit(1);
}
- gdk_input_add(sock, GDK_INPUT_READ, console_session_init, NULL);
+ eb_input_add(sock, EB_INPUT_READ, console_session_init, NULL);
}
//proxy_set_proxy( PROXY_NONE, "", 0 );
Index: message_parse.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/message_parse.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- message_parse.c 14 Jan 2003 22:17:28 -0000 1.9
+++ message_parse.c 16 Jan 2003 09:51:04 -0000 1.10
@@ -54,6 +54,7 @@
#include "dialog.h"
#include "globals.h"
#include "progress_window.h"
+#include "plugin_api.h"
char filename[1024];
@@ -178,21 +179,21 @@
{
do_error_dialog(_("Remote Side Disconnected"), _("Yattm file
x-fer"));
progress_window_close(pcd->tag);
- gtk_timeout_remove(pcd->timer);
+ eb_timeout_remove(pcd->timer);
g_free(pcd);
}
else if( xfer_in_progress == -2 )
{
do_error_dialog(_("Unable to open file!"), _("Yattm file
x-fer"));
progress_window_close(pcd->tag);
- gtk_timeout_remove(pcd->timer);
+ eb_timeout_remove(pcd->timer);
g_free(pcd);
}
else
{
do_error_dialog(_("File Sent Successfully"), _("Yattm file
x-fer"));
progress_window_close(pcd->tag);
- gtk_timeout_remove(pcd->timer);
+ eb_timeout_remove(pcd->timer);
g_free(pcd);
}
#ifndef __MINGW32__
@@ -266,7 +267,7 @@
#else
send_file2(&sfs);
#endif
- pcd->timer = gtk_timeout_add((guint32)500,
update_send_progress, pcd);
+ pcd->timer = eb_timeout_add((guint32)500, update_send_progress,
pcd);
}
else
{
@@ -278,7 +279,7 @@
-void get_file2( gpointer data, gint source, GdkInputCondition condition )
+void get_file2( void *data, int source, eb_input_condition condition )
{
char buffer[1025];
int len2;
@@ -292,7 +293,7 @@
progress_window_close(pcd->tag);
xfer_in_progress = 0;
- gdk_input_remove(pcd->input);
+ eb_input_remove(pcd->input);
g_free(pcd);
}
else
@@ -319,7 +320,7 @@
#ifndef __MINGW32__
fsync(fd);
#endif
- pcd->input = gdk_input_add(fd, GDK_INPUT_READ, get_file2, pcd);
+ pcd->input = eb_input_add(fd, EB_INPUT_READ, get_file2, pcd);
}
else
{
@@ -457,7 +458,7 @@
else
{
gchar * message2 = linkify(message);
- eb_chat_window_display_remote_message( account, remote, serv,
message2 );
+ eb_chat_window_display_remote_message( account, remote,
message2 );
g_free(message2);
}
free(buff);
Index: plugin_api.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/plugin_api.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- plugin_api.c 4 Jan 2003 13:59:27 -0000 1.3
+++ plugin_api.c 16 Jan 2003 09:51:04 -0000 1.4
@@ -20,6 +20,7 @@
*/
#include "intl.h"
+#include <stdio.h>
#include "globals.h"
#include "plugin.h"
#include "dialog.h"
@@ -146,6 +147,17 @@
{
gdk_input_remove(tag);
}
+
+int eb_timeout_add(int ms, eb_timeout_function function, void *callback_data)
+{
+ return(gtk_timeout_add(ms, function, callback_data));
+}
+
+void eb_timeout_remove(int tag)
+{
+ gtk_timeout_remove(tag);
+}
+
/* Debugging */
Index: plugin_api.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/plugin_api.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- plugin_api.h 23 Dec 2002 22:05:37 -0000 1.1.1.1
+++ plugin_api.h 16 Jan 2003 09:51:04 -0000 1.2
@@ -120,11 +120,17 @@
} eb_input_condition;
typedef void (*eb_input_function) (void *data, int source, eb_input_condition
condition);
+typedef int (*eb_timeout_function) (void *data);
/* Returns a tag to be used by eb_input_remove */
int eb_input_add(int fd, eb_input_condition condition, eb_input_function
function,
void *callback_data);
void eb_input_remove(int tag);
+
+/* Returns a tag to be used by eb_timeout_remove */
+int eb_timeout_add(int ms, eb_timeout_function function, void *callback_data);
+void eb_timeout_remove(int tag);
+
const char *eb_config_dir();
/* Service */
Index: prefs.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/prefs.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- prefs.c 14 Jan 2003 11:10:40 -0000 1.14
+++ prefs.c 16 Jan 2003 09:51:04 -0000 1.15
@@ -29,21 +29,26 @@
#endif
#include "intl.h"
+#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <glib.h>
+#include "dialog.h"
+#include "service.h"
#include "util.h"
#include "libproxy/libproxy.h"
#include "sound.h"
#include "defaults.h"
+#include "input_list.h"
#include "value_pair.h"
#include "gtk_globals.h"
#include "status.h"
#include "gtkspell.h"
#include "plugin.h"
#include "file_select.h"
-#include "dialog.h"
#ifdef HAVE_ISPELL
#include "gtkspell.h"
#endif
Index: service.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/service.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- service.c 10 Jan 2003 23:43:56 -0000 1.3
+++ service.c 16 Jan 2003 09:51:04 -0000 1.4
@@ -24,25 +24,25 @@
#endif
#include "intl.h"
+#include <gtk/gtk.h>
#include <gdk/gdkprivate.h>
-
#ifndef __MINGW32__
-#include <gdk/gdkx.h>
-#include <X11/Xlib.h>
+# include <gdk/gdkx.h>
+# include <X11/Xlib.h>
#endif
-
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <stdlib.h>
#include <assert.h>
+#include "service.h"
#include "globals.h"
#include "account.h"
#include "dialog.h"
#include "util.h"
#include "nomodule.h"
-#include "prefs.h"
+#include "plugin_api.h"
#ifdef HAVE_MIT_SAVER_EXTENSION
#include <X11/extensions/scrnsaver.h>
@@ -168,7 +168,7 @@
static guint idle_time = 0;
-static gint report_idle()
+static int report_idle(void * data)
{
GList * node;
@@ -215,7 +215,7 @@
if ((idle_time >= 600) && sendIdleTime) {
if (is_idle == 0) {
GList * node;
- idle_reporter = gtk_timeout_add(60000,
(GtkFunction)report_idle, NULL);
+ idle_reporter = eb_timeout_add(60000, report_idle,
NULL);
for(node = accounts; node; node = node->next )
{
if(((eb_local_account *)node->data)->connected)
@@ -240,7 +240,7 @@
void add_idle_check()
{
int eventnum, errornum;
- idle_timer = gtk_timeout_add(5000, (GtkFunction)check_idle, NULL);
+ idle_timer = eb_timeout_add(5000, (GtkFunction)check_idle, NULL);
serv_touch_idle();
#ifdef HAVE_MIT_SAVER_EXTENSION
if (XScreenSaverQueryExtension(gdk_display, &eventnum, &errornum)) {
Index: service.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/service.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- service.h 13 Jan 2003 05:45:58 -0000 1.3
+++ service.h 16 Jan 2003 09:51:04 -0000 1.4
@@ -27,9 +27,10 @@
#ifndef __SERVICE_H__
#define __SERVICE_H__
+#include "account.h"
#include "chat_room.h"
#include "input_list.h"
-
+#include <gdk/gdk.h>
extern int NUM_SERVICES;
#define GET_SERVICE(x) eb_services[x->service_id]
Index: sound.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/sound.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- sound.c 11 Jan 2003 14:52:16 -0000 1.6
+++ sound.c 16 Jan 2003 09:51:04 -0000 1.7
@@ -30,6 +30,8 @@
#include "intl.h"
#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -48,6 +50,7 @@
#include "sound.h"
#include "prefs.h"
#include "dialog.h"
+#include "plugin_api.h"
#ifdef ESD_SOUND
#include <esd.h>
@@ -655,7 +658,7 @@
else
{
/* We're the parent process... */
- gtk_timeout_add(100, (GtkFunction)clean_pid, NULL);
+ eb_timeout_add(100, clean_pid, NULL);
}
#endif
Index: status.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/status.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- status.c 15 Jan 2003 07:54:59 -0000 1.18
+++ status.c 16 Jan 2003 09:51:04 -0000 1.19
@@ -25,19 +25,22 @@
*
*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include "intl.h"
-#include <stdlib.h>
#include <string.h>
-#include <assert.h>
-
-#ifndef __MINGW32__
+#include <gtk/gtk.h>
+#include <time.h>
#include <X11/Xlib.h>
-#endif
-
+#include <assert.h>
+#include "service.h"
#include "globals.h"
#include "status.h"
+#include "contact.h"
+#include "account.h"
#include "chat_window.h"
-#include "about.h"
#include "help_menu.h"
#include "util.h"
#include "add_contact_window.h"
@@ -46,13 +49,20 @@
#include "message_parse.h"
#include "contact_actions.h"
#include "sound.h"
+#include "trigger.h"
+#include "triggerdecls.h"
#include "plugin.h"
-#include "prefs.h"
#include "pixmaps/login_icon.xpm"
#include "pixmaps/blank_icon.xpm"
#include "pixmaps/logoff_icon.xpm"
+void update_contact_list();
+
+/*** MIZHI
+ * log window
+ */
+#include "log_window.h"
enum {
TARGET_STRING,
@@ -315,7 +325,7 @@
if(account->online && RUN_SERVICE(account)->get_info){
buff = g_strdup_printf("%s [%s]", account->handle,
get_service_name(account->service_id));
button = gtk_menu_item_new_with_label(buff);
- free(buff);
+ g_free(buff);
gtk_signal_connect(GTK_OBJECT(button), "activate",
GTK_SIGNAL_FUNC(get_info),account);
gtk_menu_append(GTK_MENU(InfoMenu), button);
gtk_widget_show(button);
@@ -562,7 +572,7 @@
}
-void eb_sign_on_all(GtkWidget *widget, gpointer foo) {
+void eb_sign_on_all() {
GList *node = accounts ;
while(node) {
eb_local_account *ac = (eb_local_account*)(node->data);
@@ -573,7 +583,7 @@
}
}
-static void eb_sign_off_all(GtkWidget *widget, gpointer foo) {
+void eb_sign_off_all() {
GList *node = accounts ;
while(node) {
@@ -1011,7 +1021,7 @@
ec->status = NULL;
ec->label = NULL;
if (ec->icon_handler != -1)
- gtk_timeout_remove(ec->icon_handler);
+ eb_timeout_remove(ec->icon_handler);
ec->icon_handler = -1;
}
@@ -1031,7 +1041,7 @@
ea->pix = NULL;
ea->status = NULL;
if (ea->icon_handler != -1)
- gtk_timeout_remove(ea->icon_handler);
+ eb_timeout_remove(ea->icon_handler);
ea->icon_handler = -1;
}
@@ -1265,10 +1275,10 @@
/* remove any other timeouts (if a user just logged out immediately
before) */
if (ec->icon_handler != -1)
- gtk_timeout_remove(ec->icon_handler);
+ eb_timeout_remove(ec->icon_handler);
/* timeout to set the contact icon in 10 seconds */
- ec->icon_handler = gtk_timeout_add(10000, (GtkFunction)set_contact_icon,
+ ec->icon_handler = eb_timeout_add(10000, (GtkFunction)set_contact_icon,
(gpointer) ec);
if((time(NULL) - last_sound_played > 0) &&
iGetLocalPref("do_online_sound"))
@@ -1298,10 +1308,10 @@
/* remove any other timeouts (if the user just logged in) */
if (ec->icon_handler != -1)
- gtk_timeout_remove(ec->icon_handler);
+ eb_timeout_remove(ec->icon_handler);
/* timeout to remove the contact from the list */
- ec->icon_handler = gtk_timeout_add(10000, (GtkFunction)hide_contact,
+ ec->icon_handler = eb_timeout_add(10000, (GtkFunction)hide_contact,
(gpointer) ec);
if((time(NULL) - last_sound_played > 0) &&
iGetLocalPref("do_online_sound"))
@@ -1363,8 +1373,8 @@
/* set the timeout to remove the "open door" icon */
if (ea->icon_handler != -1)
- gtk_timeout_remove(ea->icon_handler);
- ea->icon_handler = gtk_timeout_add(10000, (GtkFunction)set_account_icon,
+ eb_timeout_remove(ea->icon_handler);
+ ea->icon_handler = eb_timeout_add(10000, (GtkFunction)set_account_icon,
(gpointer) ea);
/* if there is only one account (this one) logged in under the
@@ -1375,7 +1385,7 @@
buddy_update_status(ea);
/* make sure the status gets updated often */
- ea->status_handler = gtk_timeout_add(30000,
+ ea->status_handler = eb_timeout_add(30000,
(GtkFunction)refresh_buddy_status, (gpointer) ea);
}
@@ -1399,10 +1409,10 @@
/* removes any previously set timeouts for the account */
if (ea->icon_handler != -1)
- gtk_timeout_remove(ea->icon_handler);
+ eb_timeout_remove(ea->icon_handler);
ea->icon_handler = -1;
if (ea->status_handler != -1)
- gtk_timeout_remove(ea->status_handler);
+ eb_timeout_remove(ea->status_handler);
ea->status_handler = -1;
/* if this is the last account of the parent contact to log off,
@@ -1411,7 +1421,7 @@
contact_logoff(ea->account_contact);
/* timeout to remove the "close door" icon */
- ea->icon_handler = gtk_timeout_add(10000, (GtkFunction)hide_account,
+ ea->icon_handler = eb_timeout_add(10000, (GtkFunction)hide_account,
(gpointer) ea);
}
Index: status.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/status.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- status.h 8 Jan 2003 01:55:19 -0000 1.3
+++ status.h 16 Jan 2003 09:51:04 -0000 1.4
@@ -26,13 +26,9 @@
#ifndef __STATUS_H__
#define __STATUS_H__
+#include <gtk/gtk.h>
#include "account.h"
-
-/* forward declarations */
-struct contact;
-
-
enum list_type
{
LIST_ONLINE,
@@ -61,17 +57,22 @@
void contact_update_status(struct contact * ec);
void buddy_login(eb_account * ea);
void buddy_logoff(eb_account * ea);
-void eb_sign_on_all(GtkWidget *widget, gpointer foo) ;
+void eb_sign_on_all(void);
+void eb_sign_off_all(void);
void eb_import_window(GtkWidget *import_submenuitem);
void eb_profile_window(GtkWidget *profile_submenuitem);
void eb_set_status_window(GtkWidget *set_status_submenuitem);
void eb_status_window();
-GtkWidget* MakeStatusButton(eb_local_account * ela);
+/*GtkWidget* MakeStatusButton(eb_local_account * ela);*/
void update_contact_list ();
void update_user(eb_account * ea );
void update_contact_window_length ();
void focus_statuswindow (void);
+
+/* defined in about.c */
+void show_about(void);
+
#ifdef __cplusplus
} /* extern "C" */
#endif
Index: trigger.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/trigger.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- trigger.c 15 Jan 2003 07:55:00 -0000 1.6
+++ trigger.c 16 Jan 2003 09:51:04 -0000 1.7
@@ -25,8 +25,9 @@
#include "intl.h"
#include <string.h>
#include <stdlib.h>
-#include <string.h>
+#include "contact.h"
+#include "triggerdecls.h"
#include "chat_window.h"
#include "dialog.h"
#include "sound.h"
Index: trigger.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/trigger.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- trigger.h 5 Jan 2003 08:32:17 -0000 1.3
+++ trigger.h 16 Jan 2003 09:51:04 -0000 1.4
@@ -26,10 +26,6 @@
#ifndef __TRIGGER_H__
#define __TRIGGER_H__
-/* forward declarations */
-struct contact;
-
-
typedef enum {NO_TYPE, USER_ONLINE, USER_OFFLINE, USER_ON_OFF_LINE}
trigger_type;
typedef enum {NO_ACTION, PLAY_SOUND, EXECUTE, DIALOG, POUNCE} trigger_action;
@@ -39,19 +35,5 @@
trigger_action action;
char param[1024];
} trigger_struct;
-
-
-void destroy_window();
-
-trigger_type get_trigger_type_num(char *text);
-trigger_action get_trigger_action_num(char *text);
-
-char * get_trigger_type_text(trigger_type type);
-char * get_trigger_action_text(trigger_action action);
-
-void show_trigger_window();
-void do_trigger_online(struct contact *con);
-void do_trigger_offline(struct contact *con);
-void do_trigger_action(struct contact *con, int trigger_type);
#endif
Index: util.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/util.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- util.c 15 Jan 2003 14:04:47 -0000 1.10
+++ util.c 16 Jan 2003 09:51:04 -0000 1.11
@@ -60,7 +60,7 @@
#define NAME_MAX 4096
#endif
-gint clean_pid(void * dummy)
+int clean_pid(void * dummy)
{
int status;
pid_t pid;
@@ -1546,7 +1546,7 @@
#endif
}
-void eb_generic_menu_function(GtkWidget *add_button, gpointer userdata)
+void eb_generic_menu_function(void *add_button, gpointer userdata)
{
menu_item_data *mid=(menu_item_data *)userdata;
ebmCallbackData *ecd=NULL;
@@ -1575,3 +1575,25 @@
update_contact_list ();
write_contact_list();
}
+
+/*
+ * This function just gets a linked list of groups, this is handy
+ * because we can then use it to populate the groups combo widget
+ * with this information
+ */
+
+GList * get_groups()
+{
+ GList * node = NULL;
+ GList * newlist = NULL;
+ node = groups;
+
+ while(node)
+ {
+ newlist=g_list_append(newlist, ((grouplist *)node->data)->name);
+ node=node->next;
+ }
+
+ return newlist;
+}
+
Index: util.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/util.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- util.h 15 Jan 2003 14:04:47 -0000 1.4
+++ util.h 16 Jan 2003 09:51:04 -0000 1.5
@@ -30,25 +30,20 @@
#include <glib.h>
#ifndef __MINGW32__
-#include <sys/types.h>
-#include <unistd.h>
+# include <sys/types.h>
+# include <unistd.h>
#else
-#include <io.h>
-#include <process.h>
+# include <io.h>
+# include <process.h>
#endif
#include "contact.h"
-#include "service.h"
+#include "account.h"
#ifdef __cplusplus
extern "C" {
#endif
-#if defined(__MINGW32__) && defined(__IN_PLUGIN__)
-__declspec(dllimport) GtkWidget *statuswindow;
-#else
-extern GtkWidget *statuswindow;
-#endif
-gint clean_pid(void * dummy);
+int clean_pid(void * dummy);
char * get_local_addresses();
@@ -85,8 +80,6 @@
struct contact * rest );
eb_account * find_suitable_file_transfer_account( eb_account * first,
struct contact * rest );
-eb_chat_room * find_chat_room_by_id( gchar * id );
-eb_chat_room * find_chat_room_by_name( gchar * name, gint service_id );
GList * find_chatrooms_with_remote_account(eb_account *remote);
grouplist * find_grouplist_by_nick(gchar * nick);
grouplist * find_grouplist_by_name(gchar * name);
@@ -114,11 +107,10 @@
void * id );
void make_safe_filename(gchar *buff, gchar *name);
-gint gtk_notebook_get_number_pages(GtkNotebook *notebook);
-
pid_t create_lock_file(gchar* fname);
void delete_lock_file(gchar* fname);
-void eb_generic_menu_function(GtkWidget *add_button, gpointer userdata);
+void eb_generic_menu_function(void *add_button, gpointer userdata);
+GList * get_groups();
#ifdef __cplusplus
} /* extern "C" */
@@ -128,4 +120,4 @@
#define NAME_MAX 4096
#endif
-#endif /* __UTIL_H__ */
+#endif
--- about.h DELETED ---
--- account_parser.tab.h DELETED ---
--- contact_parser.tab.h DELETED ---
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/src externs.h,1.2,1.3 triggerdecls.h,1.2,1.3 Makefile.am,1.9,1.10 about.c,1.12,1.13 account.c,1.4,1.5 account.h,1.3,1.4 account_parser.y,1.2,1.3 add_contact_window.c,1.9,1.10 browser.c,1.9,1.10 browser.h,1.1.1.1,1.2 chat_room.c,1.30,1.31 chat_room.h,1.7,1.8 chat_window.c,1.22,1.23 chat_window.h,1.5,1.6 console_session.c,1.4,1.5 console_session.h,1.1.1.1,1.2 contact.h,1.2,1.3 contact_actions.c,1.5,1.6 contact_parser.y,1.4,1.5 dialog.c,1.10,1.11 dialog.h,1.4,1.5 edit_account_window.c,1.5,1.6 edit_contact_window.c,1.5,1.6 editcontacts.c,1.13,1.14 extgtktext.c,1.5,1.6 globals.h,1.5,1.6 gtk_globals.h,1.2,1.3 help_menu.c,1.1.1.1,1.2 help_menu.h,1.1.1.1,1.2 input_list.c,1.4,1.5 input_list.h,1.1.1.1,1.2 main.c,1.8,1.9 message_parse.c,1.9,1.10 plugin_api.c,1.3,1.4 plugin_api.h,1.1.1.1,1.2 prefs.c,1.14,1.15 service.c,1.3,1.4 service.h,1.3,1.4 sound.c,1.6,1.7 status.c,1.18,1.19 status.h,1.3,1.4 trigger.c,1.6,1.7 trigger.h,1.3,1.4 util.c,1.10,1.11 util.h,1.4,1.5 about.h,1.3,NONE account_parser.tab.h,1.1.1.1,NONE contact_parser.tab.h,1.1.1.1,NONE,
Philip S Tellis <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm/modules/workwizu workwizu.c,1.13,1.14
- Next by Date:
[Ayttm-commits] CVS: ayttm/libirc frontend.c,1.1.1.1,1.2 gtkhtml.c,1.1.1.1,1.2
- Previous by thread:
[Ayttm-commits] CVS: ayttm/modules/workwizu workwizu.c,1.13,1.14
- Next by thread:
[Ayttm-commits] CVS: ayttm/libirc frontend.c,1.1.1.1,1.2 gtkhtml.c,1.1.1.1,1.2
- Index(es):