diff --git a/ChangeLog b/ChangeLog index ed70cfade7..eebe7b15af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2002-05-16 Sven Neumann + + * app/gui/splash.c: don't allow to close the splash screen. Fixes + bug #81962. + + * plug-ins/gimpressionist/gimpressionist.c: changed button order. + As mentioned in bug #81963 the UI of this plug-in needs some more + work. + + * plug-ins/gimpressionist/brush.c + * plug-ins/gimpressionist/paper.c + * plug-ins/gimpressionist/presets.c: fixed handling of scrolled + windows. + 2002-05-16 Michael Natterer * app/plug-in/plug-in.c: Pass PlugIn, not Gimp pointers to all diff --git a/app/gui/splash.c b/app/gui/splash.c index 1a421b75bb..e209c892fb 100644 --- a/app/gui/splash.c +++ b/app/gui/splash.c @@ -33,10 +33,10 @@ #define DEFAULT_WIDTH 300 -static GtkWidget *win_initstatus = NULL; -static GtkWidget *label1 = NULL; -static GtkWidget *label2 = NULL; -static GtkWidget *progress = NULL; +static GtkWidget *win_initstatus = NULL; +static GtkWidget *label1 = NULL; +static GtkWidget *label2 = NULL; +static GtkWidget *progress = NULL; /* public functions */ @@ -56,6 +56,9 @@ splash_create (gboolean show_image) gtk_window_set_position (GTK_WINDOW (win_initstatus), GTK_WIN_POS_CENTER); gtk_window_set_resizable (GTK_WINDOW (win_initstatus), FALSE); + g_signal_connect (G_OBJECT (win_initstatus), "delete_event", + G_CALLBACK (gtk_true), NULL); + vbox = gtk_vbox_new (FALSE, 4); gtk_container_add (GTK_CONTAINER (win_initstatus), vbox); gtk_widget_show (vbox); diff --git a/plug-ins/gimpressionist/brush.c b/plug-ins/gimpressionist/brush.c index b0b8093e7a..f85dbd2277 100644 --- a/plug-ins/gimpressionist/brush.c +++ b/plug-ins/gimpressionist/brush.c @@ -390,11 +390,9 @@ void create_brushpage(GtkNotebook *notebook) brushlist = list = gtk_list_new (); gtk_list_set_selection_mode (GTK_LIST (list), GTK_SELECTION_BROWSE); -#if GTK_MINOR_VERSION > 0 - gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_win), list); -#else - gtk_container_add (GTK_CONTAINER (scrolled_win), list); -#endif + + gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_win), + list); gtk_widget_show (list); readdirintolist("Brushes", list, pcvals.selectedbrush); diff --git a/plug-ins/gimpressionist/gimpressionist.c b/plug-ins/gimpressionist/gimpressionist.c index 525e7dce82..09859a7903 100644 --- a/plug-ins/gimpressionist/gimpressionist.c +++ b/plug-ins/gimpressionist/gimpressionist.c @@ -342,24 +342,24 @@ void showabout(void) gdk_window_raise(window->window); return; } - window = gtk_dialog_new(); - gtk_window_set_title(GTK_WINDOW(window), _("The GIMPressionist!")); - gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_MOUSE); - gtk_signal_connect(GTK_OBJECT(window), "destroy", - GTK_SIGNAL_FUNC (gtk_widget_destroyed), - &window); - gtk_quit_add_destroy (1, GTK_OBJECT(window)); - gtk_signal_connect(GTK_OBJECT(window), "delete_event", - GTK_SIGNAL_FUNC (gtk_widget_hide_on_delete), - &window); - - tmpw = gtk_button_new_from_stock( GTK_STOCK_OK); + window = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (window), _("The GIMPressionist!")); + gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_MOUSE); + g_signal_connect (G_OBJECT (window), "destroy", + G_CALLBACK (gtk_widget_destroyed), + &window); + gtk_quit_add_destroy (1, GTK_OBJECT (window)); + g_signal_connect (G_OBJECT (window), "delete_event", + G_CALLBACK (gtk_widget_hide_on_delete), + &window); + + tmpw = gtk_button_new_from_stock (GTK_STOCK_CLOSE); GTK_WIDGET_SET_FLAGS(tmpw, GTK_CAN_DEFAULT); - gtk_signal_connect_object (GTK_OBJECT(tmpw), "clicked", - GTK_SIGNAL_FUNC (gtk_widget_hide), - GTK_OBJECT(window)); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(window)->action_area), - tmpw, TRUE, TRUE, 0); + g_signal_connect_swapped (G_OBJECT(tmpw), "clicked", + G_CALLBACK (gtk_widget_hide), + window); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG(window)->action_area), + tmpw, TRUE, TRUE, 0); gtk_widget_grab_default(tmpw); gtk_widget_show(tmpw); @@ -434,9 +434,9 @@ int create_dialog(void) window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_signal_connect (GTK_OBJECT (window), "destroy", - (GtkSignalFunc)dialog_close_callback, - NULL); + g_signal_connect (G_OBJECT (window), "destroy", + G_CALLBACK (dialog_close_callback), + NULL); gtk_window_set_title (GTK_WINDOW (window), _("The GIMPressionist!")); gtk_container_set_border_width (GTK_CONTAINER (window), 5); @@ -473,29 +473,29 @@ int create_dialog(void) gtk_box_pack_end (GTK_BOX (box2), box3, FALSE, FALSE, 0); gtk_widget_show (box3); - tmpw = gtk_button_new_from_stock( GTK_STOCK_OK); - gtk_signal_connect(GTK_OBJECT(tmpw), "clicked", - (GtkSignalFunc)dialog_ok_callback, window); + tmpw = gtk_button_new_from_stock (GTK_STOCK_CANCEL); + g_signal_connect (G_OBJECT(tmpw), "clicked", + G_CALLBACK (dialog_cancel_callback), window); + gtk_box_pack_start (GTK_BOX (box3), tmpw, TRUE, TRUE, 0); + gtk_widget_show(tmpw); + gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Quit the program"), NULL); + + tmpw = gtk_button_new_with_label (_("About...")); + g_signal_connect (G_OBJECT(tmpw), "clicked", + G_CALLBACK (showabout), window); + gtk_box_pack_start (GTK_BOX (box3), tmpw, TRUE, TRUE, 0); + gtk_widget_show (tmpw); + gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Show some information about program"), NULL); + + tmpw = gtk_button_new_from_stock (GTK_STOCK_OK); + g_signal_connect (G_OBJECT(tmpw), "clicked", + G_CALLBACK (dialog_ok_callback), window); gtk_box_pack_start (GTK_BOX (box3), tmpw, TRUE, TRUE, 0); GTK_WIDGET_SET_FLAGS (tmpw, GTK_CAN_DEFAULT); gtk_widget_grab_default (tmpw); gtk_widget_show(tmpw); gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Run with the selected settings"), NULL); - tmpw = gtk_button_new_from_stock( GTK_STOCK_CANCEL); - gtk_signal_connect(GTK_OBJECT(tmpw), "clicked", - (GtkSignalFunc)dialog_cancel_callback, window); - gtk_box_pack_start (GTK_BOX (box3), tmpw, TRUE, TRUE, 0); - gtk_widget_show(tmpw); - gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Quit the program"), NULL); - - tmpw = gtk_button_new_with_label( _("About...")); - gtk_signal_connect(GTK_OBJECT(tmpw), "clicked", - (GtkSignalFunc)showabout, window); - gtk_box_pack_start (GTK_BOX (box3), tmpw, TRUE, TRUE, 0); - gtk_widget_show(tmpw); - gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), tmpw, _("Show some information about program"), NULL); - gtk_widget_show(window); return 1; diff --git a/plug-ins/gimpressionist/paper.c b/plug-ins/gimpressionist/paper.c index 5ed492c884..ef901d8c9f 100644 --- a/plug-ins/gimpressionist/paper.c +++ b/plug-ins/gimpressionist/paper.c @@ -117,11 +117,10 @@ void create_paperpage(GtkNotebook *notebook) paperlist = list = gtk_list_new (); gtk_list_set_selection_mode (GTK_LIST (list), GTK_SELECTION_BROWSE); -#if GTK_MINOR_VERSION > 0 - gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW(scrolled_win), list); -#else - gtk_container_add (GTK_CONTAINER (scrolled_win), list); -#endif + + gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW(scrolled_win), + list); + gtk_widget_show (list); readdirintolist("Paper", list, pcvals.selectedpaper); diff --git a/plug-ins/gimpressionist/presets.c b/plug-ins/gimpressionist/presets.c index e666f2d62e..bd96ecc1e4 100644 --- a/plug-ins/gimpressionist/presets.c +++ b/plug-ins/gimpressionist/presets.c @@ -648,11 +648,9 @@ void create_presetpage(GtkNotebook *notebook) /* list = gtk_list_new (); */ /* Moved up */ gtk_list_set_selection_mode (GTK_LIST (list), GTK_SELECTION_BROWSE); -#if GTK_MINOR_VERSION > 0 - gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_win), list); -#else - gtk_container_add (GTK_CONTAINER (scrolled_win), list); -#endif + + gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_win), + list); gtk_widget_show (list); gtk_signal_connect (GTK_OBJECT(list), "selection_changed",