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.5,1.6 about.c,1.2,1.3 about


From: Andy Maloney <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/src Makefile.am,1.5,1.6 about.c,1.2,1.3 about.h,1.1.1.1,1.2 account.c,1.3,1.4 contact_parser.y,1.2,1.3 contactlist.c,1.1.1.1,1.2 gtk_globals.h,1.1.1.1,1.2 main.c,1.4,1.5 status.c,1.12,1.13 trigger.c,1.4,1.5 trigger.h,1.2,1.3 externs.h,1.1.1.1,NONE triggerdecls.h,1.1.1.1,NONE
Date: Sun, 05 Jan 2003 03:32:24 -0500

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

Modified Files:
        Makefile.am about.c about.h account.c contact_parser.y 
        contactlist.c gtk_globals.h main.c status.c trigger.c 
        trigger.h 
Removed Files:
        externs.h triggerdecls.h 
Log Message:
Merged triggerdecls.h into trigger.h
More header cleanup stuff


Index: Makefile.am
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/Makefile.am,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Makefile.am 4 Jan 2003 20:12:37 -0000       1.5
+++ Makefile.am 5 Jan 2003 08:32:16 -0000       1.6
@@ -10,11 +10,11 @@
        smileys.c help_menu.c account_parser.y account_scanner.l \
        contact_parser.y contact_scanner.l
 
-noinst_HEADERS = account.h service.h contact.h gtk_globals.h globals.h 
externs.h status.h \
+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 
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 triggerdecls.h console_session.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

Index: about.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/about.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- about.c     27 Dec 2002 16:46:52 -0000      1.2
+++ about.c     5 Jan 2003 08:32:16 -0000       1.3
@@ -23,12 +23,11 @@
 #   include <config.h>
 #endif
 
+#include "intl.h"
 #include <string.h>
 #include <stdio.h>
-#include "intl.h"
 #include <stdlib.h>
-#include <time.h>  
-#include <gtk/gtk.h>
+
 #include "about.h"
 #include "dialog.h"
 
@@ -39,7 +38,7 @@
   raw strings for you, automatically, so...  use lines -- they are cheap....
 */
 
-char * About_Caption;
+static char * About_Caption;
 
 /*
   Array of Dev_Team Data....
@@ -48,7 +47,7 @@
   Dev_Team_Size -- THIS IS VERY IMPORTANT!  ON YOUR HEAD IF YOU DON'T
 */
 
-Dev_Member Dev_Team [] = 
+static Dev_Member Dev_Team [] = 
 {
        {"Torrey Searle", "<address@hidden>", "Creator"},
        {"Ben Rigas", "<address@hidden>", "Web Design & GUI Devel"},
@@ -60,7 +59,7 @@
        {"Colin Leroy", "<address@hidden>", "Various hacks, i18n, Yattm fork"},
        {"Philip Tellis", "<address@hidden>", "Yahoo Devel"},
 };
-const unsigned int Dev_Team_Size = 9;
+static const unsigned int Dev_Team_Size = 9;
 
 /*
   Functions

Index: about.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/about.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- about.h     23 Dec 2002 22:05:29 -0000      1.1.1.1
+++ about.h     5 Jan 2003 08:32:16 -0000       1.2
@@ -22,6 +22,8 @@
 #ifndef __ABOUT_H__
 #define __ABOUT_H__
 
+#include <gtk/gtk.h>
+
 /*
   Function prototypes
 */

Index: account.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/account.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- account.c   4 Jan 2003 09:04:49 -0000       1.3
+++ account.c   5 Jan 2003 08:32:16 -0000       1.4
@@ -26,9 +26,9 @@
 #include <fcntl.h>
 
 #include "globals.h"
-#include "triggerdecls.h"
 #include "value_pair.h"
 #include "util.h"
+
 
 void write_account_list()
 {

Index: contact_parser.y
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/contact_parser.y,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- contact_parser.y    4 Jan 2003 09:04:49 -0000       1.2
+++ contact_parser.y    5 Jan 2003 08:32:16 -0000       1.3
@@ -9,8 +9,6 @@
        #include "account.h"
        #include "value_pair.h"
        #include "service.h"
-       #include "trigger.h"
-       #include "triggerdecls.h"
        #include "util.h"
        
        extern int Line_contact;

Index: contactlist.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/contactlist.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- contactlist.c       23 Dec 2002 22:05:31 -0000      1.1.1.1
+++ contactlist.c       5 Jan 2003 08:32:16 -0000       1.2
@@ -23,9 +23,7 @@
  * contactlist.c
  */
 
-#include "intl.h"
-#include <gtk/gtk.h>
-
+#include <glib.h>
 
 
 GList *groups;

Index: gtk_globals.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/gtk_globals.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- gtk_globals.h       23 Dec 2002 22:06:18 -0000      1.1.1.1
+++ gtk_globals.h       5 Jan 2003 08:32:16 -0000       1.2
@@ -28,20 +28,22 @@
 #ifndef __GTK_GLOBALS_H__
 #define __GTK_GLOBALS_H__
 
-#include <gtk/gtk.h>
+#include "globals.h"
+
 #if defined(__MINGW32__) && defined(__IN_PLUGIN__)
 #define extern __declspec(dllimport)
 #endif
 
+/* defined in status.c */
 extern GtkWidget *statuswindow;
 extern GtkWidget *away_menu;
 
 /* current parent (for error dialogs) */
+/*    - defined in main.c */
 extern GtkWidget *current_parent_widget;
+
 #if defined(__MINGW32__) && defined(__IN_PLUGIN__)
 #define extern extern
 #endif
-
-#include "globals.h"
 
 #endif

Index: main.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/main.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- main.c      4 Jan 2003 20:12:37 -0000       1.4
+++ main.c      5 Jan 2003 08:32:16 -0000       1.5
@@ -139,7 +139,7 @@
 }
 
 
-/* Global variable, referenced in globals.h */
+/* Global variable, referenced in gtk_globals.h */
 char config_dir[1024] = "";
 GtkWidget *current_parent_widget = NULL;
 

Index: status.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/status.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- status.c    4 Jan 2003 13:59:27 -0000       1.12
+++ status.c    5 Jan 2003 08:32:16 -0000       1.13
@@ -11,7 +11,7 @@
  * 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 etails.
+ * 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
@@ -34,6 +34,10 @@
 #include <string.h>
 #include <assert.h>
 
+#ifndef __MINGW32__
+#include <X11/Xlib.h>
+#endif
+
 #include "globals.h"
 #include "status.h"
 #include "chat_window.h"
@@ -46,7 +50,6 @@
 #include "message_parse.h"
 #include "contact_actions.h"
 #include "sound.h"
-#include "triggerdecls.h"
 #include "plugin.h"
 #include "prefs.h"
 
@@ -54,8 +57,6 @@
 #include "pixmaps/blank_icon.xpm"
 #include "pixmaps/logoff_icon.xpm"
 
-void update_contact_list ();
-
 
 enum {
        TARGET_STRING,
@@ -63,11 +64,20 @@
        TARGET_URL
 };
 
-static GtkTooltips * status_tips=NULL;
+struct acctStatus
+{
+    eb_local_account * ela;
+    gint status;
+};
 
+
+/* globals - referenced in gtk_globals.h */
 GtkWidget *statuswindow = NULL;
 GtkWidget *away_menu;
 
+
+static GtkTooltips * status_tips=NULL;
+
 static GtkWidget * contact_list;
 static GtkWidget * contact_window;
 static GtkWidget * status_bar = 0;
@@ -87,6 +97,7 @@
 {
        gdk_window_raise(statuswindow->window);
 }
+
 static void delete_event( GtkWidget *widget,
                                   GdkEvent *event,
                                   gpointer data )
@@ -134,9 +145,6 @@
 }
 
 
-
-
-
 static void edit_group_callback(GtkWidget * w, grouplist * g)
 {
     edit_group_window_new(g);
@@ -243,7 +251,7 @@
     }
 }
 
-void eb_save_size( GtkWidget * widget, gpointer data ) {
+static void eb_save_size( GtkWidget * widget, gpointer data ) {
        int h = widget->allocation.height;
        int w = widget->allocation.width;
        if (h<10 || w < 10) return;
@@ -262,13 +270,13 @@
       el = find_suitable_local_account(NULL, ea->service_id);
       RUN_SERVICE(ea)->get_info(el ,ea);  
   }  else {
-      eb_debug(DBG_CORE, "Couldn't find suitable local acount for info 
request");
+      eb_debug(DBG_CORE, "Couldn't find suitable local account for info 
request");
       return;
   }  
 
 }
 
-void update_status_message(gchar * message )
+static void update_status_message(gchar * message )
 {
        if(status_bar)
        {
@@ -280,13 +288,13 @@
 }
 
 
-void collapse_contact( GtkTreeItem * treeItem, gpointer data )
+static void collapse_contact( GtkTreeItem * treeItem, gpointer data )
 {
        struct contact * c = data;
        c->expanded = FALSE;
 }
 
-void expand_contact( GtkTreeItem * treeItem, gpointer data )
+static void expand_contact( GtkTreeItem * treeItem, gpointer data )
 {
        struct contact * c = data;
        c->expanded = TRUE;
@@ -344,6 +352,7 @@
   gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL,
                 event->button, event->time );
 }
+
 static void contact_menu(GdkEventButton * event, gpointer d )
 {
   struct contact *conn=d;
@@ -492,40 +501,33 @@
        show_add_group_window();
 }
 
-struct Status
-{
-    eb_local_account * ela;
-    gint status;
-};
-
-void eb_edit_accounts( GtkWidget * widget, gpointer stats )
+static void eb_edit_accounts( GtkWidget * widget, gpointer stats )
 {
        eb_new_user();
 }
 
-void build_prefs_callback( GtkWidget * widget, gpointer stats )
+static void build_prefs_callback( GtkWidget * widget, gpointer stats )
 {
        build_prefs();
 }
 
-void launch_group_chat( GtkWidget * widget, gpointer userdata )
+static void launch_group_chat( GtkWidget * widget, gpointer userdata )
 {
        open_join_chat_window();
-
 }
 
 /* Be sure to free the menu items in the status menu */
-void eb_status_remove(GtkContainer *container,  GtkWidget * widget, gpointer 
stats )
+static void eb_status_remove(GtkContainer *container,  GtkWidget * widget, 
gpointer stats )
 {
        g_free(stats);
 }
 
-void eb_status( GtkCheckMenuItem * widget, gpointer stats )
+static void eb_status( GtkCheckMenuItem * widget, gpointer stats )
 {
-    struct Status *s;
+    struct acctStatus *s;
     int current_state=0, new_state=0;;
 
-    s = (struct Status *)stats;
+    s = (struct acctStatus *)stats;
     eb_debug(DBG_CORE, "Status of radio button for state[%i]: %i\n", 
s->status, widget->active);
     current_state = 
eb_services[s->ela->service_id].sc->get_current_state(s->ela);
     /* We were called for the deactivating state, ignore it */
@@ -559,7 +561,7 @@
        }
 }
 
-void eb_sign_off_all(GtkWidget *widget, gpointer foo) {
+static void eb_sign_off_all(GtkWidget *widget, gpointer foo) {
 
        GList *node = accounts ;
        while(node) {
@@ -572,7 +574,7 @@
 
 }
 
-gint get_contact_position( struct contact * ec)
+static gint get_contact_position( struct contact * ec)
 {
        gint i=0;
        GList *l;
@@ -586,7 +588,7 @@
        return i;
 }
 
-gint get_account_position( eb_account * ea)
+static gint get_account_position( eb_account * ea)
 {
        gint i=0;
        GList *l;
@@ -707,7 +709,7 @@
 
 /* makes all accounts visible on the contact list */
 
-/* shows a contact tree and its accounts and explicity draws
+/* shows a contact tree and its accounts and explicitly draws
    each account rather than waiting for a login message from
    the server.  Useful for reshowing a contact after removing
    it from the buddy list. */
@@ -743,12 +745,14 @@
                                          gint            x,
                                          gint            y,
                                          guint           time,
-                                         gpointer        data) {
+                                         gpointer        data)
+{
        dndtarget = data;
        return 1;
-       
 }
-static void start_drag(GtkWidget *widget, GdkDragContext *dc, gpointer data) {
+
+static void start_drag(GtkWidget *widget, GdkDragContext *dc, gpointer data)
+{
        dndtarget=NULL;
 }
 
@@ -757,7 +761,8 @@
                                     GtkSelectionData *selection_data,
                                     guint             info,
                                     guint             time,
-                                    gpointer          data) {
+                                    gpointer          data)
+{
        grouplist *gl=(grouplist *)dndtarget;
        struct contact *ec = data;
        if(gl == NULL || ec == NULL) {
@@ -1043,7 +1048,7 @@
    (removes the logoff icon and hides the account if necessary)
    This timeout is only set when other accounts in the parent
    contact are remaining shown */
-gint hide_account(eb_account * ea)
+static gint hide_account(eb_account * ea)
 {
        if (ea->icon_handler == -1)
                return FALSE;
@@ -1209,7 +1214,7 @@
 
 /* the timeout function called after a contact logs in (to take the
    "open door" icon away) */
-gint set_contact_icon(struct contact * ec)
+static gint set_contact_icon(struct contact * ec)
 {
        /* abort if another timeout already took care of it */
        if (ec->icon_handler == -1)
@@ -1222,7 +1227,7 @@
 
 /* the timeout function called after an account logs in (to take the
    "open door" icon away) */
-gint set_account_icon(eb_account * ea)
+static gint set_account_icon(eb_account * ea)
 {
        /* abort if another timeout already took care of it */
        if (ea->icon_handler == -1)
@@ -1238,7 +1243,7 @@
 }
 
 /* function called when a contact logs in */
-void contact_login(struct contact * ec)
+static void contact_login(struct contact * ec)
 {
        char buff[1024];
        ec->group->contacts_online++;
@@ -1272,7 +1277,7 @@
 }
 
 /* function called when a contact logs off */
-void contact_logoff(struct contact * ec)
+static void contact_logoff(struct contact * ec)
 {
        char buff[1024];
        /* display the "closed door" icon */
@@ -1308,7 +1313,7 @@
 
 /* timeout called every 30 seconds for each online account to update
    its status */
-gint refresh_buddy_status(eb_account * ea)
+static gint refresh_buddy_status(eb_account * ea)
 {
        /* remove the timeout if the account is no longer displayed */
        if (!ea->list_item || ea->status_handler == -1) {
@@ -1413,7 +1418,7 @@
 }
 
 /* Generates the contact list tree (should only be called once) */
-GtkWidget* MakeContactList()
+static GtkWidget* MakeContactList()
 {
        GList * l1;
        
@@ -1463,7 +1468,7 @@
   
   for(temp_list = status_label, x = 0; temp_list; x++, 
temp_list=temp_list->next)
   {
-      struct Status * stats = g_new0(struct Status, 1);
+      struct acctStatus * stats = g_new0(struct acctStatus, 1);
       stats->ela = ela;
       stats->status= x;
       status_menu_item = gtk_radio_menu_item_new(group);
@@ -1521,58 +1526,7 @@
   return ela->status_button;
 }
 
-/*This function is to be eventually phased out*/
-
-/*
-GtkWidget* MakeStatusButton(eb_local_account * ela)
-{
-  GtkWidget* status_menu_item;
-  GtkWidget* status_menu;
-  GList * status_label;
-  GList * temp_list;
-  GtkWidget* hbox, *label;
-  GtkStyle* style;
-  int x;
-  status_menu = gtk_menu_new();
-  style = gtk_widget_get_style(status_menu);
-
-  gtk_widget_realize(status_menu);
-  status_label = eb_services[ela->service_id].sc->get_states();
-
-  for(temp_list = status_label, x = 0; temp_list; x++, 
temp_list=temp_list->next)
-  {
-      struct Status * stats = g_new0(struct Status, 1);
-      stats->ela = ela;
-      stats->status= x;
-      status_menu_item = gtk_menu_item_new();
-      hbox = gtk_hbox_new(FALSE, 3);
-      label = gtk_label_new((gchar*)temp_list->data);
-      gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
-      gtk_widget_show(label);
-      gtk_widget_show(hbox);
-      gtk_widget_show(status_menu_item);
-      gtk_container_add(GTK_CONTAINER(status_menu_item), hbox);
-      gtk_menu_append(GTK_MENU(status_menu), status_menu_item);
-      gtk_signal_connect(GTK_OBJECT(status_menu_item), "activate",
-                         eb_status, (gpointer) stats );
-
-  }
-
-  ela->status_button = gtk_option_menu_new();
-  gtk_menu_set_active(GTK_MENU(status_menu),
-                                        
eb_services[ela->service_id].sc->get_current_state(ela) );
-  gtk_option_menu_set_menu(GTK_OPTION_MENU(ela->status_button), status_menu);
-  
-  g_list_free(status_label);
-
-  return ela->status_button;
-}
-*/
-#ifndef __MINGW32__
-#include <X11/Xlib.h>
-#endif
-
-void eb_import_function(GtkWidget *widget, gpointer callback) {
+static void eb_import_function(GtkWidget *widget, gpointer callback) {
        void (*callback_function)();
 
        assert(callback);
@@ -1583,7 +1537,7 @@
        write_contact_list();
 }
 
-void eb_profile_function(GtkWidget *widget, gpointer data) {
+static void eb_profile_function(GtkWidget *widget, gpointer data) {
        menu_item_data *mid=data;
 
        assert(data);
@@ -1721,7 +1675,7 @@
        return retval;
 }
 
-void get_main_menu( GtkWidget  *window,
+static void get_main_menu( GtkWidget  *window,
                     GtkWidget **menubar )
 {
   GtkItemFactory *item_factory;
@@ -1785,7 +1739,7 @@
                    *win_y = DisplayHeight(display, screenNum) - *win_y;
            */
            gtk_window_set_position(GTK_WINDOW(statuswindow), 
GTK_WIN_POS_NONE); 
-           gtk_widget_set_uposition(statuswindow, win_x, win_y); 
+           gtk_widget_set_uposition(statuswindow, win_x, win_y);
            gtk_widget_set_usize(statuswindow, win_w, win_h);
        }
 #endif

Index: trigger.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/trigger.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- trigger.c   3 Jan 2003 23:26:07 -0000       1.4
+++ trigger.c   5 Jan 2003 08:32:17 -0000       1.5
@@ -31,7 +31,6 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "triggerdecls.h"
 #include "chat_window.h"
 #include "dialog.h"
 #include "sound.h"
@@ -101,7 +100,7 @@
        eb_debug(DBG_CORE, "Trigger parameter too long - ignoring");
        return;
     }
-    /* replace all occurences of %t with "online" or "offline" */
+    /* replace all occurrences of %t with "online" or "offline" */
     basestr = con->trigger.param;
     while ((substr = strstr(basestr, "%t")) != NULL)
     {
@@ -417,7 +416,7 @@
   gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);
   gtk_widget_show(frame);
      
-  /*Lets try adding a seperator*/
+  /*Lets try adding a separator*/
   separator = gtk_hseparator_new();
   gtk_box_pack_start(GTK_BOX(vbox), separator, FALSE, FALSE, 5);
   gtk_widget_show(separator);

Index: trigger.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/trigger.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- trigger.h   3 Jan 2003 23:26:07 -0000       1.2
+++ trigger.h   5 Jan 2003 08:32:17 -0000       1.3
@@ -26,6 +26,9 @@
 #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;
@@ -37,5 +40,18 @@
        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

--- externs.h DELETED ---

--- triggerdecls.h DELETED ---





reply via email to

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