Commit f116783b authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

plug-ins/mosaic/mosaic_logo.h converted the logo to pixbuf inline data and

2003-03-21  Sven Neumann  <sven@gimp.org>

	* plug-ins/mosaic/mosaic_logo.h
	* plug-ins/mosaic/mosaic.c: converted the logo to pixbuf inline data
	and replaced the GtkPreview with a GtkImage.

	* plug-ins/print/gimp_main_window.c: replaced some deprecated calls.
parent f0e2988a
2003-03-21 Sven Neumann <sven@gimp.org>
* plug-ins/mosaic/mosaic_logo.h
* plug-ins/mosaic/mosaic.c: converted the logo to pixbuf inline data
and replaced the GtkPreview with a GtkImage.
* plug-ins/print/gimp_main_window.c: replaced some deprecated calls.
2003-03-21 Michael Natterer <mitch@gimp.org>
* app/widgets/gimppreviewrenderer.c
......@@ -28,11 +28,6 @@
#include <stdlib.h>
#include <string.h>
#ifdef __GNUC__
#warning GTK_DISABLE_DEPRECATED
#endif
#undef GTK_DISABLE_DEPRECATED
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
......@@ -540,10 +535,10 @@ mosaic_dialog (void)
GtkWidget *toggle_vbox;
GtkWidget *main_hbox;
GtkWidget *frame;
GtkWidget *preview;
GtkWidget *logo;
GtkWidget *table;
GtkObject *scale_data;
gint y;
GdkPixbuf *pixbuf;
gimp_ui_init ("mosaic", TRUE);
......@@ -580,23 +575,20 @@ mosaic_dialog (void)
logo_box = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), logo_box, FALSE, FALSE, 0);
gtk_widget_show (logo_box);
frame = gtk_frame_new (NULL);
gtk_container_set_border_width (GTK_CONTAINER (frame), 4);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (logo_box), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
preview = gtk_preview_new (GTK_PREVIEW_COLOR);
gtk_preview_size (GTK_PREVIEW (preview), logo_width, logo_height);
for (y = 0; y < logo_height; y++)
gtk_preview_draw_row (GTK_PREVIEW (preview),
logo_data + y * logo_width * logo_bpp,
0, y, logo_width);
pixbuf = gdk_pixbuf_new_from_inline (-1, mosaic_logo, FALSE, NULL);
logo = gtk_image_new_from_pixbuf (pixbuf);
g_object_unref (pixbuf);
gtk_container_add (GTK_CONTAINER (frame), preview);
gtk_widget_show (preview);
gtk_widget_show (frame);
gtk_widget_show (logo_box);
gtk_container_add (GTK_CONTAINER (frame), logo);
gtk_widget_show (logo);
/* the vertical box and its toggle buttons */
frame = gtk_frame_new (_("Options"));
......
......@@ -28,11 +28,6 @@
#include <stdlib.h>
#include <string.h>
#ifdef __GNUC__
#warning GTK_DISABLE_DEPRECATED
#endif
#undef GTK_DISABLE_DEPRECATED
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
......@@ -540,10 +535,10 @@ mosaic_dialog (void)
GtkWidget *toggle_vbox;
GtkWidget *main_hbox;
GtkWidget *frame;
GtkWidget *preview;
GtkWidget *logo;
GtkWidget *table;
GtkObject *scale_data;
gint y;
GdkPixbuf *pixbuf;
gimp_ui_init ("mosaic", TRUE);
......@@ -580,23 +575,20 @@ mosaic_dialog (void)
logo_box = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), logo_box, FALSE, FALSE, 0);
gtk_widget_show (logo_box);
frame = gtk_frame_new (NULL);
gtk_container_set_border_width (GTK_CONTAINER (frame), 4);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (logo_box), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
preview = gtk_preview_new (GTK_PREVIEW_COLOR);
gtk_preview_size (GTK_PREVIEW (preview), logo_width, logo_height);
for (y = 0; y < logo_height; y++)
gtk_preview_draw_row (GTK_PREVIEW (preview),
logo_data + y * logo_width * logo_bpp,
0, y, logo_width);
pixbuf = gdk_pixbuf_new_from_inline (-1, mosaic_logo, FALSE, NULL);
logo = gtk_image_new_from_pixbuf (pixbuf);
g_object_unref (pixbuf);
gtk_container_add (GTK_CONTAINER (frame), preview);
gtk_widget_show (preview);
gtk_widget_show (frame);
gtk_widget_show (logo_box);
gtk_container_add (GTK_CONTAINER (frame), logo);
gtk_widget_show (logo);
/* the vertical box and its toggle buttons */
frame = gtk_frame_new (_("Options"));
......
This diff is collapsed.
......@@ -1632,7 +1632,7 @@ gimp_plist_build_combo (GtkWidget *combo, /* I - Combo widget */
if (*callback_id != -1)
g_signal_handler_disconnect (entry, *callback_id);
gtk_entry_set_editable (entry, FALSE);
gtk_editable_set_editable (GTK_EDITABLE (entry), FALSE);
if (num_items == 0)
{
......@@ -2160,7 +2160,7 @@ gimp_media_size_callback (GtkWidget *widget,
size *= 2.54;
set_entry_value (custom_size_width, size, FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (custom_size_width), TRUE);
gtk_entry_set_editable (GTK_ENTRY (custom_size_width), TRUE);
gtk_editable_set_editable (GTK_EDITABLE (custom_size_width), TRUE);
stp_set_page_width (*pv, default_width);
}
else
......@@ -2170,7 +2170,7 @@ gimp_media_size_callback (GtkWidget *widget,
size *= 2.54;
set_entry_value (custom_size_width, size, FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (custom_size_width), FALSE);
gtk_entry_set_editable (GTK_ENTRY (custom_size_width), FALSE);
gtk_editable_set_editable (GTK_EDITABLE (custom_size_width), FALSE);
stp_set_page_width (*pv, stp_papersize_get_width (pap));
}
......@@ -2183,7 +2183,7 @@ gimp_media_size_callback (GtkWidget *widget,
size *= 2.54;
set_entry_value (custom_size_height, size, FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (custom_size_height), TRUE);
gtk_entry_set_editable (GTK_ENTRY (custom_size_height), TRUE);
gtk_editable_set_editable (GTK_EDITABLE (custom_size_height), TRUE);
stp_set_page_height (*pv, default_height);
}
else
......@@ -2193,7 +2193,7 @@ gimp_media_size_callback (GtkWidget *widget,
size *= 2.54;
set_entry_value (custom_size_height, size, FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (custom_size_height), FALSE);
gtk_entry_set_editable (GTK_ENTRY (custom_size_height), FALSE);
gtk_editable_set_editable (GTK_EDITABLE (custom_size_height), FALSE);
stp_set_page_height (*pv, stp_papersize_get_height (pap));
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment