comparison finch/gntconv.c @ 18243:a8b19e002cb4

propagate from branch 'im.pidgin.pidgin' (head e9da27c3123d1223162bf9fb76f58822873e18f8) to branch 'im.pidgin.soc.2007.remotelogging' (head da5442aedd302aafb260948b66ce0549a3e0a0e4)
author Richard Laager <rlaager@wiktel.com>
date Sun, 24 Jun 2007 20:01:43 +0000
parents 2b1af79e768f
children 9eb2f4d27990 b25cb0775be3
comparison
equal deleted inserted replaced
18176:b14dfa2f49a1 18243:a8b19e002cb4
22 * along with this program; if not, write to the Free Software 22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */ 24 */
25 #include <string.h> 25 #include <string.h>
26 26
27 #include "finch.h"
28
27 #include <cmds.h> 29 #include <cmds.h>
28 #include <idle.h> 30 #include <idle.h>
29 #include <prefs.h> 31 #include <prefs.h>
30 #include <util.h> 32 #include <util.h>
31 33
32 #include "finch.h"
33 #include "gntaccount.h" 34 #include "gntaccount.h"
34 #include "gntblist.h" 35 #include "gntblist.h"
35 #include "gntconv.h" 36 #include "gntconv.h"
36 #include "gntdebug.h" 37 #include "gntdebug.h"
37 #include "gntplugin.h" 38 #include "gntplugin.h"
482 483
483 ggc->window = gnt_vwindow_new(FALSE); 484 ggc->window = gnt_vwindow_new(FALSE);
484 gnt_box_set_title(GNT_BOX(ggc->window), title); 485 gnt_box_set_title(GNT_BOX(ggc->window), title);
485 gnt_box_set_toplevel(GNT_BOX(ggc->window), TRUE); 486 gnt_box_set_toplevel(GNT_BOX(ggc->window), TRUE);
486 gnt_box_set_pad(GNT_BOX(ggc->window), 0); 487 gnt_box_set_pad(GNT_BOX(ggc->window), 0);
487 gnt_widget_set_name(ggc->window, "conversation-window"); 488
489 switch(conv->type){
490 case PURPLE_CONV_TYPE_UNKNOWN:
491 gnt_widget_set_name(ggc->window, "conversation-window-unknown" );
492 break;
493 case PURPLE_CONV_TYPE_IM:
494 gnt_widget_set_name(ggc->window, "conversation-window-im" );
495 break;
496 case PURPLE_CONV_TYPE_CHAT:
497 gnt_widget_set_name(ggc->window, "conversation-window-chat" );
498 break;
499 case PURPLE_CONV_TYPE_MISC:
500 gnt_widget_set_name(ggc->window, "conversation-window-misc" );
501 break;
502 case PURPLE_CONV_TYPE_ANY:
503 gnt_widget_set_name(ggc->window, "conversation-window-any" );
504 break;
505 }
488 506
489 gg_create_menu(ggc); 507 gg_create_menu(ggc);
490 508
491 ggc->tv = gnt_text_view_new(); 509 ggc->tv = gnt_text_view_new();
492 gnt_widget_set_name(ggc->tv, "conversation-window-textview"); 510 gnt_widget_set_name(ggc->tv, "conversation-window-textview");
551 if (ggc->list && conv == ggc->active_conv) 569 if (ggc->list && conv == ggc->active_conv)
552 ggc->active_conv = ggc->list->data; 570 ggc->active_conv = ggc->list->data;
553 571
554 if (ggc->list == NULL) { 572 if (ggc->list == NULL) {
555 g_free(ggc->u.chat); 573 g_free(ggc->u.chat);
556 gnt_widget_destroy(ggc->window); 574 if (ggc->window)
575 gnt_widget_destroy(ggc->window);
557 g_free(ggc); 576 g_free(ggc);
558 } 577 }
559 } 578 }
560 579
561 static void 580 static void