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.49,1.50


From: Colin Leroy <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/src chat_window.c,1.49,1.50
Date: Thu, 20 Feb 2003 04:03:57 -0500

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

Modified Files:
        chat_window.c 
Log Message:
- src/chat_window.c
trim names in tabs
opening new chat_windows should not change the size



Index: chat_window.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/chat_window.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- chat_window.c       11 Feb 2003 06:21:59 -0000      1.49
+++ chat_window.c       20 Feb 2003 09:03:51 -0000      1.50
@@ -1766,8 +1766,15 @@
                        cw->notebook = tab_cw->notebook;
                }
 
+               if (strlen(remote->nick) > 20) {
+                       strncpy(buff, remote->nick, 17);
+                       buff[17]='\0';
+                       strcat(buff, "...");
+               } else
+                       strcpy(buff, remote->nick);
+
                /* set up the text and close button */
-               contact_label = gtk_label_new(remote->nick);
+               contact_label = gtk_label_new(buff);
                gtk_widget_show(contact_label);
 
                /* we use vbox as our child. */
@@ -1797,7 +1804,13 @@
        gtk_window_set_title(GTK_WINDOW(cw->window), remote->nick);    
 
        eb_icon(cw->window->window);    
-       gtk_widget_set_usize(scrollwindow, 375, 150);
+
+       if (tab_cw)
+               gtk_widget_set_usize(cw->chat, 
+                                       tab_cw->chat->allocation.width, 
+                                       tab_cw->chat->allocation.height);
+       else
+               gtk_widget_set_usize(cw->chat, 375, 150);
        gtk_container_add(GTK_CONTAINER(scrollwindow), cw->chat);
        gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwindow), 
                                       GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
@@ -1819,7 +1832,12 @@
 
                cw->entry = gtk_text_new(NULL, NULL);
 
-               gtk_widget_set_usize(scrollwindow, 375, 50);
+               if (tab_cw)
+                       gtk_widget_set_usize(cw->entry, 
+                                               
tab_cw->entry->allocation.width, 
+                                               
tab_cw->entry->allocation.height);
+               else
+                       gtk_widget_set_usize(cw->entry, 375, 50);
                gtk_container_add(GTK_CONTAINER(scrollwindow), cw->entry);
 
                gtk_text_set_editable(GTK_TEXT(cw->entry), TRUE);





reply via email to

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