ayttm-commits
[Top][All Lists]
Advanced

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

[Ayttm-commits] CVS: ayttm/src chat_window.c,1.11,1.12


From: Colin Leroy <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/src chat_window.c,1.11,1.12
Date: Thu, 09 Jan 2003 06:52:49 -0500

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

Modified Files:
        chat_window.c 
Log Message:
close smiley window when closing tabs


Index: chat_window.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/chat_window.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- chat_window.c       9 Jan 2003 01:02:54 -0000       1.11
+++ chat_window.c       9 Jan 2003 11:52:45 -0000       1.12
@@ -81,6 +81,16 @@
 #define RECODE_TO_REMOTE       1
 #define RECODE_TO_LOCAL                0
 
+#define GET_CHAT_WINDOW(cur_cw) {\
+  if(do_tabbed_chat) { \
+    chat_window *bck = cur_cw; \
+    if (cur_cw->notebook) \
+        cur_cw = 
find_tabbed_chat_window_index(gtk_notebook_get_current_page(GTK_NOTEBOOK(cur_cw->notebook)));
 \
+    if (cur_cw == NULL) \
+       cur_cw = bck; \
+  } \
+}
+
 /* forward declaration */
 static chat_window * find_tabbed_chat_window_index (int current_page);
 char *
@@ -314,6 +324,11 @@
 {
   chat_window* cw = (chat_window*)userdata;
   /* gotta clean up all of the people we're talking with */
+  if(cw->smiley_window != NULL && cw->smiley_window->window != NULL) {
+    /* close smileys popup */
+    gtk_widget_destroy(cw->smiley_window);
+    cw->smiley_window = NULL;
+  }
 
   end_conversation(cw);
 }
@@ -324,6 +339,14 @@
   GtkWidget *window = cw->window;
   GtkWidget *notebook = cw->notebook;
   gint tab_number;
+  
+  GET_CHAT_WINDOW(cw);
+  if(cw->smiley_window != NULL && cw->smiley_window->window != NULL) {
+    /* close smileys popup */
+    gtk_widget_destroy(cw->smiley_window);
+    cw->smiley_window = NULL;
+  }
+  cw = (chat_window*)userdata;
 
   /* we got called to kill the tab, so find out which tab number
      we need to kill */
@@ -382,16 +405,6 @@
   add_unknown_account_window_new(cw->perfered);
 }
 
-#define GET_CHAT_WINDOW(cur_cw) {\
-  if(do_tabbed_chat) { \
-    chat_window *bck = cur_cw; \
-    if (cur_cw->notebook) \
-        cur_cw = 
find_tabbed_chat_window_index(gtk_notebook_get_current_page(GTK_NOTEBOOK(cur_cw->notebook)));
 \
-    if (cur_cw == NULL) \
-       cur_cw = bck; \
-  } \
-}
-
 void send_message(GtkWidget *widget, gpointer d)
 {
   chat_window * data = (chat_window*)d;
@@ -685,11 +698,6 @@
 static void close_win (GtkWidget * close_button, gpointer userdata)
 {
   chat_window * cw = (chat_window *)userdata;
-  if(cw->smiley_window != NULL && cw->smiley_window->window != NULL) {
-    /* close smileys popup */
-    gtk_widget_destroy(cw->smiley_window);
-    cw->smiley_window = NULL;
-  }
   gtk_widget_destroy(cw->window);
 }
 





reply via email to

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