comparison plugins/notify.c @ 4359:5fb47ec9bfe4

[gaim-migrate @ 4625] Wow, okay, where to begin with this one ;) I rewrote the whole conversation backend. It is now core/UI split. Here's how it works.. Every conversation is represented by a gaim_conversation structure. This branches out into gaim_im and gaim_chat structures. Every conversation lives in (well, normally, but it doesn't have to) a gaim_window structure. This is a _CORE_ representation of a window. There can be multiple gaim_window structures around. The gaim_window and gaim_conversation structures have UI-specific operation structures associated with them. At the moment, the only UI is GTK+, and this will be for some time. Don't start thinking you can write a QT UI now. It's just not going to happen. Everything that is done on a conversation is done through the core API. This API does core processing and then calls the UI operations for the rendering and anything else. Now, what does this give the user? - Multiple windows. - Multiple tabs per window. - Draggable tabs. - Send As menu is moved to the menubar. - Menubar for chats. - Some very cool stuff in the future, like replacing, say, IRC chat windows with an X-Chat interface, or whatever. - Later on, customizable window/conversation positioning. For developers: - Fully documented API - Core/UI split - Variable checking and mostly sane handling of incorrect variables. - Logical structure to conversations, both core and UI. - Some very cool stuff in the future, like replacing, say, IRC chat windows with an X-Chat interface, or whatever. - Later on, customizable window/conversation positioning. - Oh yeah, and the beginning of a stock icon system. Now, there are things that aren't there yet. You will see tabs even if you have them turned off. This will be fixed in time. Also, the preferences will change to work with the new structure. I'm starting school in 2 days, so it may not be done immediately, but hopefully in the next week. Enjoy! committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 20 Jan 2003 09:10:23 +0000
parents fac89c0d55c2
children 2c985a9e994c
comparison
equal deleted inserted replaced
4358:2b8abf7f9cc1 4359:5fb47ec9bfe4
68 gboolean count_remove(GtkWidget *widget); 68 gboolean count_remove(GtkWidget *widget);
69 /* quote functions */ 69 /* quote functions */
70 void quote_add(GtkWidget *widget); 70 void quote_add(GtkWidget *widget);
71 gboolean quote_remove(GtkWidget *widget); 71 gboolean quote_remove(GtkWidget *widget);
72 /* urgent functions */ 72 /* urgent functions */
73 void urgent_add(struct conversation *c); 73 void urgent_add(struct gaim_conversation *c);
74 gboolean urgent_remove(struct conversation *c); 74 gboolean urgent_remove(struct gaim_conversation *c);
75 75
76 struct conversation *find_chat(struct gaim_connection *gc, int id) { 76 int notify(struct gaim_conversation *cnv) {
77 GList *cnv = chats; 77 struct gaim_gtk_window *gtkwin;
78 struct conversation *c;
79
80 while (cnv) {
81 c = (struct conversation *) cnv->data;
82
83 if (c && (c->gc == gc) && c->is_chat && (c->id == id))
84 return c;
85
86 cnv = cnv->next;
87 }
88 return NULL;
89 }
90
91 int notify(struct conversation *cnv) {
92 Window focus_return; 78 Window focus_return;
93 int revert_to_return; 79 int revert_to_return;
94 80
95 XGetInputFocus(GDK_WINDOW_XDISPLAY(cnv->window->window), &focus_return, &revert_to_return); 81 gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(cnv));
82
83 XGetInputFocus(GDK_WINDOW_XDISPLAY(gtkwin->window->window), &focus_return, &revert_to_return);
96 84
97 if ((choice & NOTIFY_IN_FOCUS) || 85 if ((choice & NOTIFY_IN_FOCUS) ||
98 focus_return != GDK_WINDOW_XWINDOW(cnv->window->window)) { 86 focus_return != GDK_WINDOW_XWINDOW(gtkwin->window->window)) {
99 if (method & METHOD_STRING) 87 if (method & METHOD_STRING)
100 string_add(cnv->window); 88 string_add(gtkwin->window);
101 if (method & METHOD_COUNT) 89 if (method & METHOD_COUNT)
102 count_add(cnv->window, 0); 90 count_add(gtkwin->window, 0);
103 if (method & METHOD_QUOTE) 91 if (method & METHOD_QUOTE)
104 quote_add(cnv->window); 92 quote_add(gtkwin->window);
105 if (method & METHOD_URGENT) 93 if (method & METHOD_URGENT)
106 urgent_add(cnv); 94 urgent_add(cnv);
107 } 95 }
108 return 0; 96 return 0;
109 } 97 }
110 98
111 guint unnotify(struct conversation *c, gboolean clean) { 99 guint unnotify(struct gaim_conversation *c, gboolean clean) {
100 struct gaim_gtk_window *gtkwin;
112 guint option = 0; 101 guint option = 0;
102
103 gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(c));
104
113 /* The top level ifs check whether we are either cleaning all methods, 105 /* The top level ifs check whether we are either cleaning all methods,
114 * or whether we have that method is currently selected. 106 * or whether we have that method is currently selected.
115 * If we do then they are cleaned 107 * If we do then they are cleaned
116 * 108 *
117 * The second level ifs check if we removed something, 109 * The second level ifs check if we removed something,
118 * and if that method is currently selected. 110 * and if that method is currently selected.
119 * If we did and it is then set option so that it can be re-added */ 111 * If we did and it is then set option so that it can be re-added */
120 if (clean || (method & METHOD_QUOTE)) 112 if (clean || (method & METHOD_QUOTE))
121 if (quote_remove(c->window) && (method & METHOD_QUOTE)) 113 if (quote_remove(gtkwin->window) && (method & METHOD_QUOTE))
122 option ^= METHOD_QUOTE; 114 option ^= METHOD_QUOTE;
123 115
124 if (clean || (method & METHOD_COUNT)) 116 if (clean || (method & METHOD_COUNT))
125 if (count_remove(c->window) && (method & METHOD_COUNT)) 117 if (count_remove(gtkwin->window) && (method & METHOD_COUNT))
126 option ^= METHOD_COUNT; 118 option ^= METHOD_COUNT;
127 119
128 if (clean || (method & METHOD_STRING)) 120 if (clean || (method & METHOD_STRING))
129 if (string_remove(c->window) && (method & METHOD_STRING)) 121 if (string_remove(gtkwin->window) && (method & METHOD_STRING))
130 option ^= METHOD_STRING; 122 option ^= METHOD_STRING;
131 123
132 if (clean || (method & METHOD_URGENT)) 124 if (clean || (method & METHOD_URGENT))
133 if (urgent_remove(c) && (method & METHOD_URGENT)) 125 if (urgent_remove(c) && (method & METHOD_URGENT))
134 option ^= METHOD_URGENT; 126 option ^= METHOD_URGENT;
135 127
136 return option; 128 return option;
137 } 129 }
138 130
139 void chat_recv_im(struct gaim_connection *gc, int id, char **who, char **text) { 131 void chat_recv_im(struct gaim_connection *gc, int id, char **who, char **text) {
140 struct conversation *c = find_chat(gc, id); 132 struct gaim_conversation *c = gaim_find_chat(gc, id);
141 133
142 if (c && (type & TYPE_CHAT)) 134 if (c && (type & TYPE_CHAT))
143 notify(c); 135 notify(c);
144 return; 136 return;
145 } 137 }
146 138
147 void chat_sent_im(struct gaim_connection *gc, int id, char **text) { 139 void chat_sent_im(struct gaim_connection *gc, int id, char **text) {
148 struct conversation *c = find_chat(gc, id); 140 struct gaim_conversation *c = gaim_find_chat(gc, id);
149 141
150 if (c && (type & TYPE_CHAT)) 142 if (c && (type & TYPE_CHAT))
151 unnotify(c, FALSE); 143 unnotify(c, FALSE);
152 return; 144 return;
153 } 145 }
154 146
155 int im_recv_im(struct gaim_connection *gc, char **who, char **what, void *m) { 147 int im_recv_im(struct gaim_connection *gc, char **who, char **what, void *m) {
156 struct conversation *c = find_conversation(*who); 148 struct gaim_conversation *c = gaim_find_conversation(*who);
157 149
158 if (c && (type & TYPE_IM)) 150 if (c && (type & TYPE_IM))
159 notify(c); 151 notify(c);
160 return 0; 152 return 0;
161 } 153 }
162 154
163 int im_sent_im(struct gaim_connection *gc, char *who, char **what, void *m) { 155 int im_sent_im(struct gaim_connection *gc, char *who, char **what, void *m) {
164 struct conversation *c = find_conversation(who); 156 struct gaim_conversation *c = gaim_find_conversation(who);
165 157
166 if (c && (type & TYPE_IM)) 158 if (c && (type & TYPE_IM))
167 unnotify(c, FALSE); 159 unnotify(c, FALSE);
168 return 0; 160 return 0;
169 } 161 }
170 162
171 int attach_signals(struct conversation *c) { 163 int attach_signals(struct gaim_conversation *c) {
164 struct gaim_gtk_conversation *gtkconv;
165 struct gaim_gtk_window *gtkwin;
166
167 gtkconv = GAIM_GTK_CONVERSATION(c);
168 gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(c));
169
172 if (choice & NOTIFY_FOCUS) { 170 if (choice & NOTIFY_FOCUS) {
173 g_signal_connect(G_OBJECT(c->window), "focus-in-event", G_CALLBACK(un_star), NULL); 171 g_signal_connect(G_OBJECT(gtkwin->window), "focus-in-event", G_CALLBACK(un_star), NULL);
174 } 172 }
175 173
176 if (choice & NOTIFY_CLICK) { 174 if (choice & NOTIFY_CLICK) {
177 g_signal_connect(G_OBJECT(c->window), "button_press_event", G_CALLBACK(un_star), NULL); 175 g_signal_connect(G_OBJECT(gtkwin->window), "button_press_event", G_CALLBACK(un_star), NULL);
178 176
179 g_signal_connect_swapped(G_OBJECT(c->text), "button_press_event", G_CALLBACK(un_star), G_OBJECT(c->window)); 177 g_signal_connect_swapped(G_OBJECT(gtkconv->imhtml), "button_press_event", G_CALLBACK(un_star), G_OBJECT(gtkwin->window));
180 178
181 g_signal_connect_swapped(G_OBJECT(c->entry), "button_press_event", G_CALLBACK(un_star), G_OBJECT(c->window)); 179 g_signal_connect_swapped(G_OBJECT(gtkconv->entry), "button_press_event", G_CALLBACK(un_star), G_OBJECT(gtkwin->window));
182 } 180 }
183 181
184 if (choice & NOTIFY_TYPE) { 182 if (choice & NOTIFY_TYPE) {
185 g_signal_connect_swapped(G_OBJECT(c->entry), "key-press-event", G_CALLBACK(un_star), G_OBJECT(c->window)); 183 g_signal_connect_swapped(G_OBJECT(gtkconv->entry), "key-press-event", G_CALLBACK(un_star), G_OBJECT(gtkwin->window));
186 } 184 }
187 185
188 g_object_set_data(G_OBJECT(c->window), "user_data", c); 186 g_object_set_data(G_OBJECT(gtkwin->window), "user_data", c);
189 g_object_set_data(G_OBJECT(c->window), "notify_data", GUINT_TO_POINTER(choice)); 187 g_object_set_data(G_OBJECT(gtkwin->window), "notify_data", GUINT_TO_POINTER(choice));
190 return 0; 188 return 0;
191 } 189 }
192 190
193 void detach_signals(struct conversation *c) { 191 void detach_signals(struct gaim_conversation *c) {
194 guint options = GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(c->window), "notify_data")); 192 struct gaim_gtk_conversation *gtkconv;
193 struct gaim_gtk_window *gtkwin;
194 guint options;
195
196 gtkconv = GAIM_GTK_CONVERSATION(c);
197 gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(c));
198
199 options = GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(gtkwin->window), "notify_data"));
195 200
196 if (options & NOTIFY_FOCUS) { 201 if (options & NOTIFY_FOCUS) {
197 g_signal_handlers_disconnect_by_func(G_OBJECT(c->window), un_star, NULL); 202 g_signal_handlers_disconnect_by_func(G_OBJECT(gtkwin->window), un_star, NULL);
198 } 203 }
199 if (options & NOTIFY_CLICK) { 204 if (options & NOTIFY_CLICK) {
200 g_signal_handlers_disconnect_by_func(G_OBJECT(c->window), un_star, NULL); 205 g_signal_handlers_disconnect_by_func(G_OBJECT(gtkwin->window), un_star, NULL);
201 g_signal_handlers_disconnect_by_func(G_OBJECT(c->text), un_star, c->window); 206 g_signal_handlers_disconnect_by_func(G_OBJECT(gtkconv->imhtml), un_star, gtkwin->window);
202 g_signal_handlers_disconnect_by_func(G_OBJECT(c->entry), un_star, c->window); 207 g_signal_handlers_disconnect_by_func(G_OBJECT(gtkconv->entry), un_star, gtkwin->window);
203 } 208 }
204 209
205 if (options & NOTIFY_TYPE) { 210 if (options & NOTIFY_TYPE) {
206 g_signal_handlers_disconnect_by_func(G_OBJECT(c->entry), un_star, c->window); 211 g_signal_handlers_disconnect_by_func(G_OBJECT(gtkconv->entry), un_star, gtkwin->window);
207 } 212 }
208 } 213 }
209 214
210 void new_conv(char *who) { 215 void new_conv(char *who) {
211 struct conversation *c = find_conversation(who); 216 struct gaim_conversation *c = gaim_find_conversation(who);
212 217
213 if (c && (type & TYPE_IM)) 218 if (c && (type & TYPE_IM))
214 attach_signals(c); 219 attach_signals(c);
215 return;
216 } 220 }
217 221
218 void chat_join(struct gaim_connection *gc, int id, char *room) { 222 void chat_join(struct gaim_connection *gc, int id, char *room) {
219 struct conversation *c = find_chat(gc, id); 223 struct gaim_conversation *c = gaim_find_chat(gc, id);
220 224
221 if (c && (type & TYPE_CHAT)) 225 if (c && (type & TYPE_CHAT))
222 attach_signals(c); 226 attach_signals(c);
223 return;
224 } 227 }
225 228
226 int un_star(GtkWidget *widget, gpointer data) { 229 int un_star(GtkWidget *widget, gpointer data) {
227 struct conversation *c = g_object_get_data(G_OBJECT(widget), "user_data"); 230 struct gaim_conversation *c = g_object_get_data(G_OBJECT(widget), "user_data");
228 231
229 if (method & METHOD_QUOTE) 232 if (method & METHOD_QUOTE)
230 quote_remove(widget); 233 quote_remove(widget);
231 if (method & METHOD_COUNT) 234 if (method & METHOD_COUNT)
232 count_remove(widget); 235 count_remove(widget);
336 return TRUE; 339 return TRUE;
337 } 340 }
338 return FALSE; 341 return FALSE;
339 } 342 }
340 343
341 void urgent_add(struct conversation *c) { 344 void urgent_add(struct gaim_conversation *c) {
342 XWMHints *hints = XGetWMHints(GDK_WINDOW_XDISPLAY(c->window->window), GDK_WINDOW_XWINDOW(c->window->window)); 345 struct gaim_gtk_window *gtkwin;
346 XWMHints *hints;
347
348 gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(c));
349
350 hints = XGetWMHints(GDK_WINDOW_XDISPLAY(gtkwin->window->window), GDK_WINDOW_XWINDOW(gtkwin->window->window));
343 hints->flags |= XUrgencyHint; 351 hints->flags |= XUrgencyHint;
344 XSetWMHints(GDK_WINDOW_XDISPLAY(c->window->window), GDK_WINDOW_XWINDOW(c->window->window), hints); 352 XSetWMHints(GDK_WINDOW_XDISPLAY(gtkwin->window->window), GDK_WINDOW_XWINDOW(gtkwin->window->window), hints);
345 XFree(hints); 353 XFree(hints);
346 } 354 }
347 355
348 gboolean urgent_remove(struct conversation *c) { 356 gboolean urgent_remove(struct gaim_conversation *c) {
349 if ((c->is_chat && (chat_options & OPT_CHAT_ONE_WINDOW)) || (!c->is_chat && (im_options & OPT_IM_ONE_WINDOW))) { 357 struct gaim_gtk_conversation *gtkconv;
350 if (c->is_chat) { 358
351 struct conversation *c = (struct conversation *)chats->data; 359 gtkconv = GAIM_GTK_CONVERSATION(c);
352 GdkWindow *win = c->window->window; 360
353 361 if ((gaim_conversation_get_type(c) == GAIM_CONV_CHAT &&
354 XWMHints *hints = XGetWMHints(GDK_WINDOW_XDISPLAY(win), GDK_WINDOW_XWINDOW(win)); 362 (chat_options & OPT_CHAT_ONE_WINDOW)) ||
363 (gaim_conversation_get_type(c) != GAIM_CONV_CHAT &&
364 (im_options & OPT_IM_ONE_WINDOW))) {
365 if (gaim_conversation_get_type(c) == GAIM_CONV_CHAT) {
366 struct gaim_conversation *c = (struct gaim_conversation *)gaim_get_chats()->data;
367 struct gaim_gtk_window *gtkwin;
368 GdkWindow *win;
369 XWMHints *hints;
370
371 gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(c));
372
373 win = gtkwin->window->window;
374
375 hints = XGetWMHints(GDK_WINDOW_XDISPLAY(win), GDK_WINDOW_XWINDOW(win));
355 if (hints->flags & XUrgencyHint) { 376 if (hints->flags & XUrgencyHint) {
356 hints->flags &= ~XUrgencyHint; 377 hints->flags &= ~XUrgencyHint;
357 XSetWMHints(GDK_WINDOW_XDISPLAY(c->window->window), GDK_WINDOW_XWINDOW(c->window->window), hints); 378 XSetWMHints(GDK_WINDOW_XDISPLAY(gtkwin->window->window), GDK_WINDOW_XWINDOW(gtkwin->window->window), hints);
358 XFree(hints); 379 XFree(hints);
359 return TRUE; 380 return TRUE;
360 } 381 }
361 XFree(hints); 382 XFree(hints);
362 return FALSE; 383 return FALSE;
363 } else { 384 } else {
364 struct conversation *c = (struct conversation *)conversations->data; 385 struct gaim_conversation *c;
365 GdkWindow *win = c->window->window; 386 struct gaim_gtk_window *gtkwin;
366 387 GdkWindow *win;
367 XWMHints *hints = XGetWMHints(GDK_WINDOW_XDISPLAY(win), GDK_WINDOW_XWINDOW(win)); 388 XWMHints *hints;
389
390 c = (struct gaim_conversation *)gaim_get_ims()->data;
391 gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(c));
392 win = gtkwin->window->window;
393
394 hints = XGetWMHints(GDK_WINDOW_XDISPLAY(win), GDK_WINDOW_XWINDOW(win));
368 if (hints->flags & XUrgencyHint) { 395 if (hints->flags & XUrgencyHint) {
369 hints->flags &= ~XUrgencyHint; 396 hints->flags &= ~XUrgencyHint;
370 XSetWMHints(GDK_WINDOW_XDISPLAY(c->window->window), GDK_WINDOW_XWINDOW(c->window->window), hints); 397 XSetWMHints(GDK_WINDOW_XDISPLAY(gtkwin->window->window), GDK_WINDOW_XWINDOW(gtkwin->window->window), hints);
371 XFree(hints); 398 XFree(hints);
372 return TRUE; 399 return TRUE;
373 } 400 }
374 XFree(hints); 401 XFree(hints);
375 return FALSE; 402 return FALSE;
376 } 403 }
377 } else { 404 } else {
378 XWMHints *hints = XGetWMHints(GDK_WINDOW_XDISPLAY(c->window->window), GDK_WINDOW_XWINDOW(c->window->window)); 405 struct gaim_gtk_window *gtkwin;
406 XWMHints *hints;
407
408 gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(c));
409 hints = XGetWMHints(GDK_WINDOW_XDISPLAY(gtkwin->window->window), GDK_WINDOW_XWINDOW(gtkwin->window->window));
410
379 if (hints->flags & XUrgencyHint) { 411 if (hints->flags & XUrgencyHint) {
380 hints->flags &= ~XUrgencyHint; 412 hints->flags &= ~XUrgencyHint;
381 XSetWMHints(GDK_WINDOW_XDISPLAY(c->window->window), GDK_WINDOW_XWINDOW(c->window->window), hints); 413 XSetWMHints(GDK_WINDOW_XDISPLAY(gtkwin->window->window), GDK_WINDOW_XWINDOW(gtkwin->window->window), hints);
382 XFree(hints); 414 XFree(hints);
383 return TRUE; 415 return TRUE;
384 } 416 }
385 XFree(hints); 417 XFree(hints);
386 return FALSE; 418 return FALSE;
478 void apply_options(GtkWidget *widget, gpointer data) { 510 void apply_options(GtkWidget *widget, gpointer data) {
479 GList *cnv = conversations; 511 GList *cnv = conversations;
480 512
481 while (cnv) { 513 while (cnv) {
482 guint notification; 514 guint notification;
483 struct conversation *c = (struct conversation *) cnv->data; 515 struct gaim_conversation *c = (struct gaim_conversation *) cnv->data;
516 struct gaim_gtk_conversation *gtkconv;
517 struct gaim_gtk_window *gtkwin;
518 guint options = GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(c->window), "notify_data"));
519
520 gtkconv = GAIM_GTK_CONVERSATION(c);
521 gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(c));
522
523 if (options & NOTIFY_FOCUS)
524 g_signal_handlers_disconnect_by_func(G_OBJECT(gtkwin->window), un_star, NULL);
484 525
485 /* remove old notification signals */ 526 /* remove old notification signals */
486 detach_signals(c); 527 detach_signals(c);
487 528
488 /* clean off all notification markings */ 529 /* clean off all notification markings */
489 notification = unnotify(c, TRUE); 530 notification = unnotify(c, TRUE);
490 531
491 /* re-add appropriate notification methods cleaned above */ 532 /* re-add appropriate notification methods cleaned above */
492 if (notification & METHOD_STRING) /* re-add string */ 533 if (notification & METHOD_STRING) /* re-add string */
493 string_add(c->window); 534 string_add(gtkwin->window);
494 if (notification & METHOD_QUOTE) /* re-add quote */ 535 if (notification & METHOD_QUOTE) /* re-add quote */
495 quote_add(c->window); 536 quote_add(gtkwin->window);
496 if (notification & METHOD_COUNT) /* re-add count */ 537 if (notification & METHOD_COUNT) /* re-add count */
497 count_add(c->window, Number); 538 count_add(gtkwin->window, Number);
498 if (notification & METHOD_URGENT) /* re-add urgent */ 539 if (notification & METHOD_URGENT) /* re-add urgent */
499 urgent_add(c); 540 urgent_add(c);
500 541
501 /* attach new unnotification signals */ 542 /* attach new unnotification signals */
502 attach_signals(c); 543 attach_signals(c);
503 544
504 cnv = cnv->next; 545 cnv = cnv->next;
505 } 546 }
506
507 return;
508 } 547 }
509 548
510 char *gaim_plugin_init(GModule *hndl) { 549 char *gaim_plugin_init(GModule *hndl) {
511 handle = hndl; 550 handle = hndl;
512 title_string = g_strdup("(*) "); 551 title_string = g_strdup("(*) ");
521 gaim_signal_connect(handle, event_chat_join, chat_join, NULL); 560 gaim_signal_connect(handle, event_chat_join, chat_join, NULL);
522 return NULL; 561 return NULL;
523 } 562 }
524 563
525 void gaim_plugin_remove() { 564 void gaim_plugin_remove() {
526 GList *c = conversations; 565 GList *c = gaim_get_ims();
527 566
528 while (c) { 567 while (c) {
529 struct conversation *cnv = (struct conversation *)c->data; 568 struct gaim_conversation *cnv = (struct gaim_conversation *)c->data;
530 569 struct gaim_gtk_window *gtkwin;
570
571 gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(cnv));
572
531 detach_signals(cnv); 573 detach_signals(cnv);
532 un_star(cnv->window, NULL); 574 un_star(gtkwin->window, NULL);
533 575
534 c = c->next; 576 c = c->next;
535 } 577 }
536 578
537 /* this might be a hack I'm not sure, I don't think so but... */ 579 /* this might be a hack I'm not sure, I don't think so but... */
538 g_free(title_string); 580 g_free(title_string);