pidgin/gtkwhiteboard.c

changeset 18545
5af898e91ec2
parent 17243
e731e733d5bf
child 19859
71d37b57eff2
equal deleted inserted replaced
17398:1edf059a4a26 18545:5af898e91ec2
26 #include "internal.h" 26 #include "internal.h"
27 #include "blist.h" 27 #include "blist.h"
28 #include "debug.h" 28 #include "debug.h"
29 29
30 #include "gtkwhiteboard.h" 30 #include "gtkwhiteboard.h"
31 #include "gtkutils.h"
31 32
32 /****************************************************************************** 33 /******************************************************************************
33 * Prototypes 34 * Prototypes
34 *****************************************************************************/ 35 *****************************************************************************/
35 static void pidgin_whiteboard_create(PurpleWhiteboard *wb); 36 static void pidgin_whiteboard_create(PurpleWhiteboard *wb);
141 /* Give some initial brush-info */ 142 /* Give some initial brush-info */
142 gtkwb->brush_size = 2; 143 gtkwb->brush_size = 2;
143 gtkwb->brush_color = 0xff0000; 144 gtkwb->brush_color = 0xff0000;
144 } 145 }
145 146
146 window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
147 gtkwb->window = window;
148 gtk_widget_set_name(window, wb->who);
149
150 /* Try and set window title as the name of the buddy, else just use their 147 /* Try and set window title as the name of the buddy, else just use their
151 * username 148 * username
152 */ 149 */
153 buddy = purple_find_buddy(wb->account, wb->who); 150 buddy = purple_find_buddy(wb->account, wb->who);
154 151
155 if (buddy != NULL) 152 window = pidgin_create_window(buddy != NULL ? purple_buddy_get_contact_alias(buddy) : wb->who, 0, NULL, FALSE);
156 gtk_window_set_title((GtkWindow*)(window), purple_buddy_get_contact_alias(buddy)); 153 gtkwb->window = window;
157 else 154 gtk_widget_set_name(window, wb->who);
158 gtk_window_set_title((GtkWindow*)(window), wb->who);
159
160 gtk_window_set_resizable((GtkWindow*)(window), FALSE);
161 155
162 g_signal_connect(G_OBJECT(window), "delete_event", 156 g_signal_connect(G_OBJECT(window), "delete_event",
163 G_CALLBACK(whiteboard_close_cb), gtkwb); 157 G_CALLBACK(whiteboard_close_cb), gtkwb);
164 158
165 #if 0 159 #if 0

mercurial