| version 1.1, 2004/07/14 16:01:40 | version 1.7, 2011/01/15 16:01:52 | 
| Line 12 | Line 12 | 
 | * 2. Redistributions in binary form must reproduce the above copyright | * 2. Redistributions in binary form must reproduce the above copyright | 
 | *    notice, this list of conditions and the following disclaimer in the | *    notice, this list of conditions and the following disclaimer in the | 
 | *    documentation and/or other materials provided with the distribution. | *    documentation and/or other materials provided with the distribution. | 
 | * 3. The name of the author may not be used to endorse or promote products |  | 
 | *    derived from this software without specific prior written permission. |  | 
 | * | * | 
 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | 
 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 
| Line 33 | Line 31 | 
 | #include "np2ver.h" | #include "np2ver.h" | 
 |  |  | 
 | #include "gtk2/xnp2.h" | #include "gtk2/xnp2.h" | 
 |  | #include "gtk2/gtk_menu.h" | 
 |  |  | 
 | #include "resources/np2.xpm" | #include "resources/np2.xpm" | 
 |  |  | 
| Line 41  static void | Line 40  static void | 
 | about_destroy(GtkWidget *w, GtkWidget **wp) | about_destroy(GtkWidget *w, GtkWidget **wp) | 
 | { | { | 
 |  |  | 
 | UNUSED(wp); |  | 
 |  |  | 
 | install_idle_process(); | install_idle_process(); | 
 | gtk_widget_destroy(w); | gtk_widget_destroy(w); | 
 | } | } | 
| Line 69  create_about_dialog(void) | Line 66  create_about_dialog(void) | 
 | gtk_window_set_resizable(GTK_WINDOW(about_dialog), FALSE); | gtk_window_set_resizable(GTK_WINDOW(about_dialog), FALSE); | 
 | gtk_container_set_border_width(GTK_CONTAINER(about_dialog), 10); | gtk_container_set_border_width(GTK_CONTAINER(about_dialog), 10); | 
 | g_signal_connect(GTK_OBJECT(about_dialog), "destroy", | g_signal_connect(GTK_OBJECT(about_dialog), "destroy", | 
| GTK_SIGNAL_FUNC(about_destroy), NULL); | G_CALLBACK(about_destroy), NULL); | 
 |  |  | 
 | main_widget = gtk_hbox_new(FALSE, 3); | main_widget = gtk_hbox_new(FALSE, 3); | 
 | gtk_widget_show(main_widget); | gtk_widget_show(main_widget); | 
| Line 81  create_about_dialog(void) | Line 78  create_about_dialog(void) | 
 | if (neko_pixmap == NULL) | if (neko_pixmap == NULL) | 
 | g_error("Couldn't create replacement pixmap."); | g_error("Couldn't create replacement pixmap."); | 
 | neko_image = gtk_image_new_from_pixmap(neko_pixmap, mask); | neko_image = gtk_image_new_from_pixmap(neko_pixmap, mask); | 
| gdk_pixmap_unref(neko_pixmap); | g_object_unref(neko_pixmap); | 
| gdk_bitmap_unref(mask); | g_object_unref(mask); | 
 | gtk_widget_show(neko_image); | gtk_widget_show(neko_image); | 
 | gtk_box_pack_start(GTK_BOX(main_widget), neko_image, FALSE, FALSE, 10); | gtk_box_pack_start(GTK_BOX(main_widget), neko_image, FALSE, FALSE, 10); | 
 |  |  | 
| Line 99  create_about_dialog(void) | Line 96  create_about_dialog(void) | 
 | gtk_widget_show(ok_button); | gtk_widget_show(ok_button); | 
 | gtk_box_pack_end(GTK_BOX(main_widget), ok_button, FALSE, TRUE, 0); | gtk_box_pack_end(GTK_BOX(main_widget), ok_button, FALSE, TRUE, 0); | 
 | g_signal_connect_swapped(GTK_OBJECT(ok_button), "clicked", | g_signal_connect_swapped(GTK_OBJECT(ok_button), "clicked", | 
| GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(about_dialog)); | G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(about_dialog)); | 
| GTK_WIDGET_SET_FLAGS(ok_button, GTK_CAN_DEFAULT); | gtk_widget_set_can_default(ok_button, TRUE); | 
| GTK_WIDGET_SET_FLAGS(ok_button, GTK_HAS_DEFAULT); | gtk_widget_has_default(ok_button); | 
 | gtk_widget_grab_default(ok_button); | gtk_widget_grab_default(ok_button); | 
 |  |  | 
 | gtk_widget_show_all(about_dialog); | gtk_widget_show_all(about_dialog); |