[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/src status.c,1.27,1.28
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/src status.c,1.27,1.28 |
Date: |
Tue, 21 Jan 2003 04:21:39 -0500 |
Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv25472/src
Modified Files:
status.c
Log Message:
Update window title when people log(in|off)
Index: status.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/status.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- status.c 20 Jan 2003 20:33:18 -0000 1.27
+++ status.c 21 Jan 2003 09:21:11 -0000 1.28
@@ -80,6 +80,7 @@
GtkWidget *statuswindow = NULL;
GtkWidget *away_menu;
+static int window_title_handler = -1;
static GtkTooltips * status_tips=NULL;
@@ -1268,6 +1269,27 @@
return FALSE;
}
+static gint update_window_title(struct contact *ec)
+{
+ gchar * title = NULL;
+ if (window_title_handler != -1)
+ eb_timeout_remove(window_title_handler);
+
+ if (ec != NULL) {
+ title = g_strdup_printf("(%c %s)",
+ ec->online ? '+':'-', ec->nick);
+ window_title_handler = eb_timeout_add(5000,
+ (GtkFunction)update_window_title,
+ NULL);
+ } else {
+ title = _("Ayttm "VERSION""RELEASE);
+ }
+
+ gtk_window_set_title(GTK_WINDOW(statuswindow), title);
+
+ return 0;
+}
+
/* function called when a contact logs in */
static void contact_login(struct contact * ec)
{
@@ -1299,6 +1321,7 @@
eb_chat_window_do_timestamp(ec, 1);
g_snprintf(buff, 1024, _("%s is now online"), ec->nick);
+ update_window_title(ec);
update_status_message(buff);
}
@@ -1334,6 +1357,7 @@
eb_chat_window_do_timestamp(ec, 0);
g_snprintf(buff, 1024, _("%s is now offline"), ec->nick);
+ update_window_title(ec);
update_status_message(buff);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/src status.c,1.27,1.28,
Colin Leroy <address@hidden> <=
- Prev by Date:
Re: [Ayttm-commits] CVS: ayttm ChangeLog,1.168,1.169 configure.in,1.164,1.165
- Next by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.170,1.171 configure.in,1.166,1.167
- Previous by thread:
[Ayttm-commits] CVS: ayttm configure.in,1.165,1.166 ChangeLog,1.169,1.170
- Next by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.170,1.171 configure.in,1.166,1.167
- Index(es):