pidgin/gtkdebug.c

changeset 22099
8e70e3ba6096
parent 21743
7a0caaf628ff
child 22684
2570d6613550
child 25888
d0fdd378a635
equal deleted inserted replaced
22098:16144010f03c 22099:8e70e3ba6096
684 win = g_new0(DebugWindow, 1); 684 win = g_new0(DebugWindow, 1);
685 685
686 width = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/debug/width"); 686 width = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/debug/width");
687 height = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/debug/height"); 687 height = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/debug/height");
688 688
689 PIDGIN_DIALOG(win->window); 689 win->window = pidgin_create_dialog(_("Debug Window"), 0, "debug", TRUE);
690 purple_debug_info("gtkdebug", "Setting dimensions to %d, %d\n", 690 purple_debug_info("gtkdebug", "Setting dimensions to %d, %d\n",
691 width, height); 691 width, height);
692 692
693 gtk_window_set_default_size(GTK_WINDOW(win->window), width, height); 693 gtk_window_set_default_size(GTK_WINDOW(win->window), width, height);
694 gtk_window_set_role(GTK_WINDOW(win->window), "debug");
695 gtk_window_set_title(GTK_WINDOW(win->window), _("Debug Window"));
696 694
697 g_signal_connect(G_OBJECT(win->window), "delete_event", 695 g_signal_connect(G_OBJECT(win->window), "delete_event",
698 G_CALLBACK(debug_window_destroy), NULL); 696 G_CALLBACK(debug_window_destroy), NULL);
699 g_signal_connect(G_OBJECT(win->window), "configure_event", 697 g_signal_connect(G_OBJECT(win->window), "configure_event",
700 G_CALLBACK(configure_cb), win); 698 G_CALLBACK(configure_cb), win);
701 699
702 handle = pidgin_debug_get_handle(); 700 handle = pidgin_debug_get_handle();
703 701
704 #ifdef HAVE_REGEX_H 702 #ifdef HAVE_REGEX_H
705 /* the list store for all the messages */ 703 /* the list store for all the messages */
706 win->store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_INT); 704 win->store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_INT);
707 705
708 /* row-changed gets called when we do gtk_list_store_set, and row-inserted 706 /* row-changed gets called when we do gtk_list_store_set, and row-inserted
714 G_CALLBACK(regex_row_changed_cb), win); 712 G_CALLBACK(regex_row_changed_cb), win);
715 713
716 #endif /* HAVE_REGEX_H */ 714 #endif /* HAVE_REGEX_H */
717 715
718 /* Setup the vbox */ 716 /* Setup the vbox */
719 vbox = gtk_vbox_new(FALSE, 0); 717 vbox = pidgin_dialog_get_vbox(GTK_DIALOG(win->window));
720 gtk_container_add(GTK_CONTAINER(win->window), vbox);
721 718
722 if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/debug/toolbar")) { 719 if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/debug/toolbar")) {
723 /* Setup our top button bar thingie. */ 720 /* Setup our top button bar thingie. */
724 toolbar = gtk_toolbar_new(); 721 toolbar = gtk_toolbar_new();
725 gtk_toolbar_set_tooltips(GTK_TOOLBAR(toolbar), TRUE); 722 gtk_toolbar_set_tooltips(GTK_TOOLBAR(toolbar), TRUE);

mercurial