302 GtkWidget *vbox, *hbox;
306 GtkIconTheme *icon_theme;
309 icon_theme = gtk_icon_theme_get_default ();
311 gtk_widget_set_can_focus (GTK_WIDGET (
window),
TRUE);
313 vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
316 hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
318 icon = gtk_image_new ();
319 gtk_box_pack_start (GTK_BOX (hbox), icon,
FALSE,
FALSE, 0);
320 gtk_widget_show (icon);
322 header = gtk_event_box_new ();
323 gtk_widget_add_events (header, GDK_BUTTON_PRESS_MASK);
324 g_signal_connect_swapped (header,
"button-press-event",
328 window->title = gtk_label_new (NULL);
329 gtk_container_add (GTK_CONTAINER (header),
window->title);
330 gtk_widget_show (
window->title);
332 gtk_box_pack_start (GTK_BOX (hbox), header,
TRUE,
TRUE, 0);
333 gtk_widget_show (header);
335 window->close_button = gtk_button_new ();
336 gtk_button_set_relief (GTK_BUTTON (
window->close_button), GTK_RELIEF_NONE);
337 gtk_container_set_border_width (GTK_CONTAINER (
window->close_button), 0);
338 g_signal_connect_swapped (
window->close_button,
"clicked",
342 GTK_ICON_LOOKUP_FORCE_SIZE, NULL);
343 icon = gtk_image_new_from_pixbuf (pixbuf);
344 g_object_unref (pixbuf);
345 gtk_container_add (GTK_CONTAINER (
window->close_button), icon);
346 gtk_widget_show (icon);
349 gtk_widget_show (
window->close_button);
351 gtk_box_pack_start (GTK_BOX (vbox), hbox,
FALSE,
FALSE, 0);
352 gtk_widget_show (hbox);
355 swindow = gtk_scrolled_window_new (NULL, NULL);
356 window->text_view = gtk_text_view_new ();
357 gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (
window->text_view), GTK_WRAP_WORD);
358 g_signal_connect (
window->text_view,
"state-flags-changed",
361 gtk_container_add (GTK_CONTAINER (swindow),
window->text_view);
362 gtk_widget_show (
window->text_view);
364 gtk_box_pack_start (GTK_BOX (vbox), swindow,
TRUE,
TRUE, 0);
365 gtk_widget_show (swindow);
368 gtk_window_set_has_resize_grip (GTK_WINDOW(
window),
FALSE);
369 hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
371 window->resize_sw = gtk_event_box_new ();
372 gtk_widget_add_events (
window->resize_sw, GDK_BUTTON_PRESS_MASK);
373 g_signal_connect_swapped (
window->resize_sw,
"button-press-event",
376 g_signal_connect (
window->resize_sw,
"realize",
381 GTK_ICON_LOOKUP_FORCE_SIZE, NULL);
382 icon = gtk_image_new_from_pixbuf (pixbuf);
383 g_object_unref (pixbuf);
384 gtk_container_add (GTK_CONTAINER (
window->resize_sw), icon);
385 gtk_widget_show (icon);
387 gtk_widget_show (
window->resize_sw);
389 window->resize_se = gtk_event_box_new ();
390 gtk_widget_add_events (
window->resize_se, GDK_BUTTON_PRESS_MASK);
391 g_signal_connect_swapped (
window->resize_se,
"button-press-event",
394 g_signal_connect (
window->resize_se,
"realize",
399 GTK_ICON_LOOKUP_FORCE_SIZE, NULL);
400 icon = gtk_image_new_from_pixbuf (pixbuf);
401 g_object_unref (pixbuf);
402 gtk_container_add (GTK_CONTAINER (
window->resize_se), icon);
403 gtk_widget_show (icon);
405 gtk_widget_show (
window->resize_se);
407 gtk_box_pack_start (GTK_BOX (vbox), hbox,
FALSE,
FALSE, 0);
408 gtk_widget_show (hbox);
410 gtk_container_add (GTK_CONTAINER (
window), vbox);
411 gtk_widget_show (vbox);
413 gtk_widget_add_events (GTK_WIDGET (
window),
414 GDK_BUTTON_PRESS_MASK |
417 gtk_container_set_border_width (GTK_CONTAINER (
window), 2);
419 gtk_window_set_decorated (GTK_WINDOW (
window),
FALSE);
420 gtk_window_set_skip_taskbar_hint (GTK_WINDOW (
window),
TRUE);
421 gtk_window_set_skip_pager_hint (GTK_WINDOW (
window),
TRUE);
422 gtk_window_set_resizable (GTK_WINDOW (
window),
TRUE);