ayttm-commits
[Top][All Lists]
Advanced

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

[Ayttm-commits] CVS: ayttm/src gtkutils.c,NONE,1.1 gtkutils.h,NONE,1.1 M


From: Colin Leroy <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/src gtkutils.c,NONE,1.1 gtkutils.h,NONE,1.1 Makefile.am,1.17,1.18 nomodule.c,1.8,1.9 service.h,1.12,1.13 status.c,1.38,1.39 util.c,1.28,1.29
Date: Mon, 27 Jan 2003 12:13:05 -0500

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

Modified Files:
        Makefile.am nomodule.c service.h status.c util.c 
Added Files:
        gtkutils.c gtkutils.h 
Log Message:
remove more gtk deps from modules


--- NEW FILE: gtkutils.c ---
/*
 * Ayttm 
 *
 * 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 "gtkutils.h"
#include "gtk_globals.h"

void gtkut_set_pixmap_from_xpm(char **xpm, GtkPixmap *pixmap)
{
        if (xpm && pixmap) {
                GdkPixmap *tpx= NULL;
                GdkBitmap *tbx= NULL;
                tpx = gdk_pixmap_create_from_xpm_d(statuswindow->window, &tbx, 
                                                NULL, xpm);
                gtk_pixmap_set(pixmap, tpx, tbx);
        }
}

--- NEW FILE: gtkutils.h ---
/*
 * Ayttm 
 *
 * 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
 *
 */
#ifndef __GTKUTILS_H__
#define __GTKUTILS_H__

#include <gtk/gtk.h>
#include <gdk/gdk.h>

void gtkut_set_pixmap_from_xpm(char **xpm, GtkPixmap *pixmap);

#endif

Index: Makefile.am
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/Makefile.am,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- Makefile.am 24 Jan 2003 04:38:27 -0000      1.17
+++ Makefile.am 27 Jan 2003 17:12:59 -0000      1.18
@@ -8,7 +8,7 @@
        trigger.c console_session.c gtk_eb_html.c input_list.c nomodule.c \
        plugin_api.c plugin.c file_select.c extgtktext.c contact_actions.c \
        smileys.c help_menu.c crash.c account_parser.y account_scanner.l \
-       contact_parser.y contact_scanner.l llist.c mem_util.c
+       contact_parser.y contact_scanner.l llist.c mem_util.c gtkutils.c
 
 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 \
@@ -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 llist.h mem_util.h
+       externs.h llist.h mem_util.h gtkutils.h
 
 EXTRA_DIST = 
 

Index: nomodule.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/nomodule.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- nomodule.c  24 Jan 2003 20:41:31 -0000      1.8
+++ nomodule.c  27 Jan 2003 17:13:00 -0000      1.9
@@ -64,7 +64,7 @@
 
 /*   callbacks used by Ayttm    */
 
-static gint pixmaps = 0;
+/*static gint pixmaps = 0;
 static GdkPixmap * eb_nomodule_pixmap[NOMODULE_OFFLINE+1];
 static GdkBitmap * eb_nomodule_bitmap[NOMODULE_OFFLINE+1];
 
@@ -78,7 +78,7 @@
                &eb_nomodule_bitmap[i], NULL, xpm);
        pixmaps = 1;
 }
-
+*/
 
 
 static gboolean eb_nomodule_query_connected(eb_account * account)
@@ -218,17 +218,11 @@
        return string;
 }
 
-static void eb_nomodule_get_status_pixmap( eb_account * account, GdkPixmap ** 
pm, GdkBitmap ** bm )
+static char **eb_nomodule_get_status_pixmap( eb_account * account)
 {
        struct eb_nomodule_account_data * aad;
        
-       if (!pixmaps)
-               eb_nomodule_init_pixmaps();
-       
-       aad = account->protocol_account_data;
-       
-       *pm = eb_nomodule_pixmap[aad->status];
-       *bm = eb_nomodule_bitmap[aad->status];
+       return nomodule_away_xpm;
 }
 
 static void eb_nomodule_set_idle( eb_local_account * ela, gint idle )

Index: service.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/service.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- service.h   24 Jan 2003 20:41:31 -0000      1.12
+++ service.h   27 Jan 2003 17:13:00 -0000      1.13
@@ -118,13 +118,13 @@
          this will get used on the Contact List, if statuses
          are not available, this should return the empty string */
 
-       gchar*(*get_status_string)(eb_account * account);
+       gchar *(*get_status_string)(eb_account * account);
 
        /*This returns the string representing the status,
          this will get used on the Contact List, if statuses
          are not available, this should return the empty string */
 
-       void (*get_status_pixmap)(eb_account * account, GdkPixmap **pm, 
GdkBitmap **bm);
+       char **(*get_status_pixmap)(eb_account * account);
 
        /*set the idle time (set this to null if N/A)*/
 

Index: status.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/status.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- status.c    27 Jan 2003 14:10:55 -0000      1.38
+++ status.c    27 Jan 2003 17:13:00 -0000      1.39
@@ -44,6 +44,7 @@
 #include "contact_actions.h"
 #include "sound.h"
 #include "plugin.h"
+#include "gtkutils.h"
 
 #include "pixmaps/login_icon.xpm"
 #include "pixmaps/blank_icon.xpm"
@@ -1082,8 +1083,8 @@
 
        /* set the icon if there isn't another timeout about to alter the icon 
*/
        if (ec->icon_handler == -1) {
-               RUN_SERVICE(ea)->get_status_pixmap(ea, &pm, &bm);
-               gtk_pixmap_set(GTK_PIXMAP(ec->pix), pm, bm);
+               
gtkut_set_pixmap_from_xpm(RUN_SERVICE(ea)->get_status_pixmap(ea), 
+                                         GTK_PIXMAP(ec->pix));
        }
 
        width = contact_list->allocation.width;
@@ -1150,8 +1151,7 @@
 
        /* update the icon if another timeout isn't about to change it */
        if (ea->icon_handler == -1) {
-               RUN_SERVICE(ea)->get_status_pixmap(ea, &pm, &bm);
-               gtk_pixmap_set(GTK_PIXMAP(ea->pix), pm, bm);
+               
gtkut_set_pixmap_from_xpm(RUN_SERVICE(ea)->get_status_pixmap(ea), 
GTK_PIXMAP(ea->pix));
        }
 
        /* since the contact's status info  might be a copy of this

Index: util.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/util.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- util.c      27 Jan 2003 13:48:19 -0000      1.28
+++ util.c      27 Jan 2003 17:13:00 -0000      1.29
@@ -605,6 +605,7 @@
                             others && others->data && !found; 
                             others = others->next) {
                                eb_chat_room_buddy *ecrb = others->data;
+                               printf("others = %p\n",others);
                                if(!strcmp(remote->handle, ecrb->handle)) {
                                        found = TRUE;
                                        result = l_list_append(result, ecr);
@@ -1547,4 +1548,3 @@
 
        return l;
 }
-





reply via email to

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