ayttm-commits
[Top][All Lists]
Advanced

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

[Ayttm-commits] CVS: ayttm/src Makefile.am,1.14,1.15 account.c,1.9,1.10


From: Philip S Tellis <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/src Makefile.am,1.14,1.15 account.c,1.9,1.10 account.h,1.7,1.8 add_contact_window.h,1.4,1.5 away_window.c,1.10,1.11 away_window.h,1.2,1.3 chat_window.c,1.25,1.26 contact_parser.y,1.5,1.6 status.c,1.25,1.26 trigger.c,1.8,1.9 trigger.h,1.5,1.6 triggerdecls.h,1.4,NONE
Date: Mon, 20 Jan 2003 07:33:47 -0500

Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv28533/src

Modified Files:
        Makefile.am account.c account.h add_contact_window.h 
        away_window.c away_window.h chat_window.c contact_parser.y 
        status.c trigger.c trigger.h 
Removed Files:
        triggerdecls.h 
Log Message:
triggerdecls.h is back where andy sent it.  gtk refs from away_window.h removed

Index: Makefile.am
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/Makefile.am,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- Makefile.am 19 Jan 2003 14:00:19 -0000      1.14
+++ Makefile.am 20 Jan 2003 12:33:44 -0000      1.15
@@ -18,7 +18,7 @@
        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 \
-       externs.h triggerdecls.h
+       externs.h
 
 EXTRA_DIST = 
 

Index: account.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/account.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- account.c   20 Jan 2003 10:02:16 -0000      1.9
+++ account.c   20 Jan 2003 12:33:44 -0000      1.10
@@ -31,7 +31,6 @@
 #include "service.h"
 #include "contact.h"
 #include "globals.h"
-#include "triggerdecls.h"
 #include "value_pair.h"
 #include "util.h"
 #include "add_contact_window.h"

Index: account.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/account.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- account.h   20 Jan 2003 10:31:19 -0000      1.7
+++ account.h   20 Jan 2003 12:33:44 -0000      1.8
@@ -28,7 +28,8 @@
 #define __ACCOUNT_H__
 
 #include <glib.h>
-#include "contact.h"
+
+struct contact;
 
 #ifdef __cplusplus
 extern "C" {
@@ -36,34 +37,34 @@
 
 typedef struct _grouplist
 {
-       gchar name[255];
+       char name[255];
        GList * members;
        void * list_item; /* GtkWidget */
        void * tree; /* GtkWidget */
        void * label; /* GtkWidget */
-       gint contacts_online;
-       gint contacts_shown;
+       int contacts_online;
+       int contacts_shown;
 } grouplist;
 
 typedef struct account {
-        gint service_id;
-        gchar handle[255];
+        int service_id;
+        char handle[255];
        struct contact * account_contact;
-        void *protocol_account_data;
+        void * protocol_account_data;
        void * list_item; /* GtkWidget */
        void * status; /* GtkWidget */
        void * pix; /* GtkWidget */
-       gint icon_handler;
+       int icon_handler;
        gboolean online;
-       gint status_handler;
+       int status_handler;
        struct _info_window * infowindow;
 } eb_account;
 
 
 typedef struct local_account {
-        gint service_id;
-        gchar *handle;
-       gchar alias[255];
+        int service_id;
+        char *handle;
+       char alias[255];
         gboolean connected;
         gboolean connecting;
        void * status_button; /* GtkWidget */

Index: add_contact_window.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/add_contact_window.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- add_contact_window.h        16 Jan 2003 17:28:26 -0000      1.4
+++ add_contact_window.h        20 Jan 2003 12:33:44 -0000      1.5
@@ -19,9 +19,11 @@
  *
  */
 
-#include <gtk/gtk.h>
 #ifndef __ADD_CONTACT_WINDOW__
 #define __ADD_CONTACT_WINDOW__
+
+#include "account.h"
+
 void show_add_contact_window();
 void show_add_contact_to_group_window(grouplist *g);
 void show_add_group_window();

Index: away_window.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/away_window.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- away_window.c       16 Jan 2003 13:11:01 -0000      1.10
+++ away_window.c       20 Jan 2003 12:33:44 -0000      1.11
@@ -40,8 +40,14 @@
 #define MIN(x, y)      ((x)<(y)?(x):(y))
 #endif
 
+/* types */
+typedef struct _away {
+        char title[2048];
+        GString *message;
+} away; 
+
 /* globals */
-GtkWidget *away_message = NULL;
+static GtkWidget *away_message_text_entry = NULL;
 gint is_away = 0;
 
 
@@ -54,6 +60,8 @@
 
 static gint away_open = 0;
 
+static void show_away(GtkWidget *w, gchar *a_message);
+static void show_away2(GtkWidget *w, void *null);
 
 static void destroy_away()
 {
@@ -214,10 +222,10 @@
        gchar buff[2048];
 
        strcpy(buff, gtk_entry_get_text(GTK_ENTRY(title)));
-       strcpy(buff, gtk_entry_get_text(GTK_ENTRY(away_message)));
+       strcpy(buff, gtk_entry_get_text(GTK_ENTRY(away_message_text_entry)));
 
        if (!buff || strlen(buff) == 0) {
-               strcpy(buff, gtk_entry_get_text(GTK_ENTRY(away_message)));
+               strcpy(buff, 
gtk_entry_get_text(GTK_ENTRY(away_message_text_entry)));
        }
        if (!buff || strlen(buff) == 0) {
                do_error_dialog (_("Enter at least a message.\n"),_("Error"));
@@ -225,7 +233,7 @@
        }
        g_string_append(a_title, buff); 
 
-       strcpy(buff, gtk_entry_get_text(GTK_ENTRY(away_message)));
+       strcpy(buff, gtk_entry_get_text(GTK_ENTRY(away_message_text_entry)));
        g_string_append(a_message, buff);
        
        if (save == 1) {
@@ -251,7 +259,7 @@
        gtk_widget_destroy(away_window);
 }
 
-void show_away2(GtkWidget *w, void *null)
+static void show_away2(GtkWidget *w, void *null)
 {
        if ( !away_open ) {
                GtkWidget * vbox;
@@ -288,9 +296,9 @@
                gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1, 2);
                gtk_widget_show(label);
 
-               away_message = gtk_entry_new();
-               gtk_table_attach_defaults(GTK_TABLE(table), away_message, 1, 2, 
1, 2);
-               gtk_widget_show(away_message);
+               away_message_text_entry = gtk_entry_new();
+               gtk_table_attach_defaults(GTK_TABLE(table), 
away_message_text_entry, 1, 2, 1, 2);
+               gtk_widget_show(away_message_text_entry);
 
                save_later = gtk_check_button_new_with_label(_("Save for later 
use"));
                gtk_table_attach_defaults(GTK_TABLE(table), save_later, 1, 2, 
2, 3);
@@ -396,7 +404,7 @@
        away_open = 1; 
 }
 
-void show_away(GtkWidget *w, gchar *a_message)
+static void show_away(GtkWidget *w, gchar *a_message)
 {
        GList * list;
        eb_local_account * ela = NULL;
@@ -421,10 +429,10 @@
                gtk_widget_show(label);
 
 
-               away_message = gtk_entry_new();
-               gtk_entry_set_text(GTK_ENTRY(away_message), 
(strlen(a_message)>0 ? a_message : _("User is currently away")) );
-               gtk_box_pack_start(GTK_BOX(vbox), away_message, TRUE, TRUE, 5);
-               gtk_widget_show(away_message);
+               away_message_text_entry = gtk_entry_new();
+               gtk_entry_set_text(GTK_ENTRY(away_message_text_entry), 
(strlen(a_message)>0 ? a_message : _("User is currently away")) );
+               gtk_box_pack_start(GTK_BOX(vbox), away_message_text_entry, 
TRUE, TRUE, 5);
+               gtk_widget_show(away_message_text_entry);
 
                label = gtk_button_new_with_label(_("I'm Back"));
                gtk_signal_connect_object(GTK_OBJECT(label), "clicked",
@@ -455,5 +463,10 @@
                if(ela->connected)
                        eb_services[ela->service_id].sc->set_away(ela, 
a_message);
        }
+}
+
+gchar * get_away_message()
+{
+       return gtk_entry_get_text(GTK_ENTRY(away_message_text_entry));
 }
 

Index: away_window.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/away_window.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- away_window.h       16 Jan 2003 13:11:01 -0000      1.2
+++ away_window.h       20 Jan 2003 12:33:44 -0000      1.3
@@ -19,20 +19,6 @@
  *
  */  
 
-#include <gtk/gtk.h>
-
-typedef struct _away {
-        char title[2048];
-        GString *message;
-} away; 
-
-#if defined(__MINGW32__) && defined(__IN_PLUGIN__)
-__declspec(dllimport) GtkWidget * away_message;
-#else
-extern GtkWidget * away_message;
-#endif
-void show_away(GtkWidget *w, gchar *a_message);
-void show_away2(GtkWidget *w, void *null); 
 void load_away_messages();
 void build_away_menu();
-void write_away_messages();
+gchar * get_away_message();

Index: chat_window.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/chat_window.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- chat_window.c       16 Jan 2003 17:28:26 -0000      1.25
+++ chat_window.c       20 Jan 2003 12:33:44 -0000      1.26
@@ -1986,14 +1986,14 @@
       RUN_SERVICE(account)->send_im(
                                    account,
                                    remote,
-                                   
gtk_entry_get_text(GTK_ENTRY(away_message)));
+                                   get_away_message());
       time(&t);
       cur_time = localtime(&t);
       g_snprintf(buff, BUF_SIZE, "<FONT COLOR=\"#0000ff\"><B>%d:%.2d:%.2d %s: 
</B></FONT>",
                 cur_time->tm_hour, cur_time->tm_min, cur_time->tm_sec,
                 account->alias);
       gtk_eb_html_add(EXT_GTK_TEXT(remote_contact->chatwindow->chat), 
buff,0,0,0);
-         gtk_eb_html_add(EXT_GTK_TEXT(remote_contact->chatwindow->chat), 
gtk_entry_get_text(GTK_ENTRY(away_message)),
+         gtk_eb_html_add(EXT_GTK_TEXT(remote_contact->chatwindow->chat), 
get_away_message(),
                        iGetLocalPref("do_ignore_back"), 
iGetLocalPref("do_ignore_fore"), iGetLocalPref("do_ignore_font"));
       gtk_eb_html_add(EXT_GTK_TEXT(remote_contact->chatwindow->chat), "<br>", 
0,0,0);
 
@@ -2004,7 +2004,7 @@
       /* Log it */
 
       if ( iGetLocalPref("do_logging") )
-       eb_log_message(remote_contact->chatwindow, buff, 
gtk_entry_get_text(GTK_ENTRY(away_message)));
+       eb_log_message(remote_contact->chatwindow, buff, get_away_message());
     }
     free(message);
 }

Index: contact_parser.y
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/contact_parser.y,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- contact_parser.y    16 Jan 2003 09:51:04 -0000      1.5
+++ contact_parser.y    20 Jan 2003 12:33:45 -0000      1.6
@@ -10,7 +10,6 @@
         #include "value_pair.h"
         #include "service.h"
         #include "trigger.h"
-        #include "triggerdecls.h"
         #include "util.h"
 
        extern int Line_contact;

Index: status.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/status.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- status.c    19 Jan 2003 11:18:38 -0000      1.25
+++ status.c    20 Jan 2003 12:33:45 -0000      1.26
@@ -50,7 +50,6 @@
 #include "contact_actions.h"
 #include "sound.h"
 #include "trigger.h"
-#include "triggerdecls.h"
 #include "plugin.h"
 
 #include "pixmaps/login_icon.xpm"

Index: trigger.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/trigger.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- trigger.c   16 Jan 2003 13:11:01 -0000      1.8
+++ trigger.c   20 Jan 2003 12:33:45 -0000      1.9
@@ -27,7 +27,6 @@
 #include <stdlib.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.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- trigger.h   16 Jan 2003 13:11:01 -0000      1.5
+++ trigger.h   20 Jan 2003 12:33:45 -0000      1.6
@@ -36,4 +36,21 @@
        char param[1024];
 } trigger_struct;
 
+
+/* forward declaration */
+struct contact;
+
+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

--- triggerdecls.h DELETED ---





reply via email to

[Prev in Thread] Current Thread [Next in Thread]