Removed calls to gtk_container_[dis/en]able_resize()

Thu Jun 18 21:20:12 1998  Owen Taylor  <otaylor@gtk.org>

	* app/interface.c app/tools.c: Removed calls to
	  gtk_container_[dis/en]able_resize()

Thu Jun 18 21:03:33 1998  Owen Taylor  <otaylor@gtk.org>

	* app/interface.c (create_display_shell): Set the resize
	mode on the statusbar to prevent the window from being
	unnecessarily auto-shrunk.

	* plug-ins/gfig/gfig.c (my_gtk_label_set): Removed unused
	function using deprecated gtk_container_need_resize()

Thu Jun 18 16:31:16 1998  Owen Taylor  <otaylor@gtk.org>

	* app/blob.c: Try to prevent overflows when drawing ellipses)
	(fixes the ink => line bug for big sizes)
This commit is contained in:
Owen Taylor 1998-06-19 01:39:02 +00:00 committed by Owen Taylor
parent 0a1c208a5d
commit 95118f347f
11 changed files with 36 additions and 55 deletions

View File

@ -1,3 +1,22 @@
Thu Jun 18 21:20:12 1998 Owen Taylor <otaylor@gtk.org>
* app/interface.c app/tools.c: Removed calls to
gtk_container_[dis/en]able_resize()
Thu Jun 18 21:03:33 1998 Owen Taylor <otaylor@gtk.org>
* app/interface.c (create_display_shell): Set the resize
mode on the statusbar to prevent the window from being
unnecessarily auto-shrunk.
* plug-ins/gfig/gfig.c (my_gtk_label_set): Removed unused
function using deprecated gtk_container_need_resize()
Thu Jun 18 16:31:16 1998 Owen Taylor <otaylor@gtk.org>
* app/blob.c: Try to prevent overflows when drawing ellipses)
(fixes the ink => line bug for big sizes)
Thu Jun 18 16:11:19 MEST 1998 Sven Neumann <sven@gimp.org>
* app/preferences_dialog.c: fiddled with the spinbuttons

View File

@ -761,8 +761,8 @@ blob_ellipse (double xc, double yc, double xp, double yp, double xq, double yq)
/* Although it seems that multiplying A-F by a constant would improve
things, this seems not to be the case in practice. Several test
cases showed about equal improvement and degradation */
blob_conic (r,ROUND(xp+xc),ROUND(yp+yc),ROUND(128*A),ROUND(128*B),ROUND(128*C),
ROUND(128*D),ROUND(128*E),ROUND(128*F));
blob_conic (r,ROUND(xp+xc),ROUND(yp+yc),ROUND(1*A),ROUND(1*B),ROUND(1*C),
ROUND(1*D),ROUND(1*E),ROUND(1*F));
/* Add a line through the center to improve things a bit. (Doesn't
* work perfectly because sometimes we overshoot

View File

@ -384,7 +384,7 @@ create_tool_pixmap (GtkWidget *parent, ToolType type)
else if (type == FLIP_VERT)
type = FLIP_HORZ;
for (i=0; i<22; i++)
for (i = FIRST_TOOLBOX_TOOL; i <= LAST_TOOLBOX_TOOL; i++)
{
if ((ToolType)tool_data[i].callback_data == type)
return create_pixmap (parent->window, NULL,
@ -837,6 +837,8 @@ create_display_shell (int gdisp_id,
/* statusbar, progressbar */
gdisp->statusbar = gtk_statusbar_new();
gtk_container_set_resize_mode (GTK_CONTAINER (gdisp->statusbar),
GTK_RESIZE_QUEUE);
gtk_box_pack_start (GTK_BOX (hbox), gdisp->statusbar, TRUE, TRUE, 0);
contextid = gtk_statusbar_get_context_id (GTK_STATUSBAR (gdisp->statusbar),
"title");
@ -1138,12 +1140,8 @@ progress_start ()
tool_label_area->allocation.width,
tool_label_area->allocation.height);
gtk_container_disable_resize (GTK_CONTAINER (progress_area->parent));
gtk_widget_hide (tool_label_area);
gtk_widget_show (progress_area);
gtk_container_enable_resize (GTK_CONTAINER (progress_area->parent));
}
}
@ -1176,13 +1174,9 @@ progress_end ()
{
if (GTK_WIDGET_VISIBLE (progress_area))
{
gtk_container_disable_resize (GTK_CONTAINER (progress_area->parent));
gtk_widget_hide (progress_area);
gtk_widget_show (tool_label_area);
gtk_container_enable_resize (GTK_CONTAINER (progress_area->parent));
gdk_flush ();
gtk_progress_bar_update (GTK_PROGRESS_BAR (progress_area), 0.0);

View File

@ -384,7 +384,7 @@ create_tool_pixmap (GtkWidget *parent, ToolType type)
else if (type == FLIP_VERT)
type = FLIP_HORZ;
for (i=0; i<22; i++)
for (i = FIRST_TOOLBOX_TOOL; i <= LAST_TOOLBOX_TOOL; i++)
{
if ((ToolType)tool_data[i].callback_data == type)
return create_pixmap (parent->window, NULL,
@ -837,6 +837,8 @@ create_display_shell (int gdisp_id,
/* statusbar, progressbar */
gdisp->statusbar = gtk_statusbar_new();
gtk_container_set_resize_mode (GTK_CONTAINER (gdisp->statusbar),
GTK_RESIZE_QUEUE);
gtk_box_pack_start (GTK_BOX (hbox), gdisp->statusbar, TRUE, TRUE, 0);
contextid = gtk_statusbar_get_context_id (GTK_STATUSBAR (gdisp->statusbar),
"title");
@ -1138,12 +1140,8 @@ progress_start ()
tool_label_area->allocation.width,
tool_label_area->allocation.height);
gtk_container_disable_resize (GTK_CONTAINER (progress_area->parent));
gtk_widget_hide (tool_label_area);
gtk_widget_show (progress_area);
gtk_container_enable_resize (GTK_CONTAINER (progress_area->parent));
}
}
@ -1176,13 +1174,9 @@ progress_end ()
{
if (GTK_WIDGET_VISIBLE (progress_area))
{
gtk_container_disable_resize (GTK_CONTAINER (progress_area->parent));
gtk_widget_hide (progress_area);
gtk_widget_show (tool_label_area);
gtk_container_enable_resize (GTK_CONTAINER (progress_area->parent));
gdk_flush ();
gtk_progress_bar_update (GTK_PROGRESS_BAR (progress_area), 0.0);

View File

@ -384,7 +384,7 @@ create_tool_pixmap (GtkWidget *parent, ToolType type)
else if (type == FLIP_VERT)
type = FLIP_HORZ;
for (i=0; i<22; i++)
for (i = FIRST_TOOLBOX_TOOL; i <= LAST_TOOLBOX_TOOL; i++)
{
if ((ToolType)tool_data[i].callback_data == type)
return create_pixmap (parent->window, NULL,
@ -837,6 +837,8 @@ create_display_shell (int gdisp_id,
/* statusbar, progressbar */
gdisp->statusbar = gtk_statusbar_new();
gtk_container_set_resize_mode (GTK_CONTAINER (gdisp->statusbar),
GTK_RESIZE_QUEUE);
gtk_box_pack_start (GTK_BOX (hbox), gdisp->statusbar, TRUE, TRUE, 0);
contextid = gtk_statusbar_get_context_id (GTK_STATUSBAR (gdisp->statusbar),
"title");
@ -1138,12 +1140,8 @@ progress_start ()
tool_label_area->allocation.width,
tool_label_area->allocation.height);
gtk_container_disable_resize (GTK_CONTAINER (progress_area->parent));
gtk_widget_hide (tool_label_area);
gtk_widget_show (progress_area);
gtk_container_enable_resize (GTK_CONTAINER (progress_area->parent));
}
}
@ -1176,13 +1174,9 @@ progress_end ()
{
if (GTK_WIDGET_VISIBLE (progress_area))
{
gtk_container_disable_resize (GTK_CONTAINER (progress_area->parent));
gtk_widget_hide (progress_area);
gtk_widget_show (tool_label_area);
gtk_container_enable_resize (GTK_CONTAINER (progress_area->parent));
gdk_flush ();
gtk_progress_bar_update (GTK_PROGRESS_BAR (progress_area), 0.0);

View File

@ -761,8 +761,8 @@ blob_ellipse (double xc, double yc, double xp, double yp, double xq, double yq)
/* Although it seems that multiplying A-F by a constant would improve
things, this seems not to be the case in practice. Several test
cases showed about equal improvement and degradation */
blob_conic (r,ROUND(xp+xc),ROUND(yp+yc),ROUND(128*A),ROUND(128*B),ROUND(128*C),
ROUND(128*D),ROUND(128*E),ROUND(128*F));
blob_conic (r,ROUND(xp+xc),ROUND(yp+yc),ROUND(1*A),ROUND(1*B),ROUND(1*C),
ROUND(1*D),ROUND(1*E),ROUND(1*F));
/* Add a line through the center to improve things a bit. (Doesn't
* work perfectly because sometimes we overshoot

View File

@ -122,8 +122,6 @@ static gint tools_options_delete_callback (GtkWidget *, GdkEvent *, gpointer);
static void
active_tool_free (void)
{
gtk_container_disable_resize (GTK_CONTAINER (options_shell));
if (!active_tool)
return;
@ -151,8 +149,6 @@ tools_select (ToolType type)
if (tool_info[(int) active_tool->type].tool_options)
gtk_widget_show (tool_info[(int) active_tool->type].tool_options);
gtk_container_enable_resize (GTK_CONTAINER (options_shell));
/* Update the device-information dialog */
device_status_update (current_device);
@ -261,8 +257,6 @@ tools_initialize (ToolType type, GDisplay *gdisp_ptr)
if (tool_info[(int) active_tool->type].tool_options)
gtk_widget_show (tool_info[(int) active_tool->type].tool_options);
gtk_container_enable_resize (GTK_CONTAINER (options_shell));
/* Set the paused count variable to 0
*/
if (gdisp)

View File

@ -761,8 +761,8 @@ blob_ellipse (double xc, double yc, double xp, double yp, double xq, double yq)
/* Although it seems that multiplying A-F by a constant would improve
things, this seems not to be the case in practice. Several test
cases showed about equal improvement and degradation */
blob_conic (r,ROUND(xp+xc),ROUND(yp+yc),ROUND(128*A),ROUND(128*B),ROUND(128*C),
ROUND(128*D),ROUND(128*E),ROUND(128*F));
blob_conic (r,ROUND(xp+xc),ROUND(yp+yc),ROUND(1*A),ROUND(1*B),ROUND(1*C),
ROUND(1*D),ROUND(1*E),ROUND(1*F));
/* Add a line through the center to improve things a bit. (Doesn't
* work perfectly because sometimes we overshoot

View File

@ -761,8 +761,8 @@ blob_ellipse (double xc, double yc, double xp, double yp, double xq, double yq)
/* Although it seems that multiplying A-F by a constant would improve
things, this seems not to be the case in practice. Several test
cases showed about equal improvement and degradation */
blob_conic (r,ROUND(xp+xc),ROUND(yp+yc),ROUND(128*A),ROUND(128*B),ROUND(128*C),
ROUND(128*D),ROUND(128*E),ROUND(128*F));
blob_conic (r,ROUND(xp+xc),ROUND(yp+yc),ROUND(1*A),ROUND(1*B),ROUND(1*C),
ROUND(1*D),ROUND(1*E),ROUND(1*F));
/* Add a line through the center to improve things a bit. (Doesn't
* work perfectly because sometimes we overshoot

View File

@ -122,8 +122,6 @@ static gint tools_options_delete_callback (GtkWidget *, GdkEvent *, gpointer);
static void
active_tool_free (void)
{
gtk_container_disable_resize (GTK_CONTAINER (options_shell));
if (!active_tool)
return;
@ -151,8 +149,6 @@ tools_select (ToolType type)
if (tool_info[(int) active_tool->type].tool_options)
gtk_widget_show (tool_info[(int) active_tool->type].tool_options);
gtk_container_enable_resize (GTK_CONTAINER (options_shell));
/* Update the device-information dialog */
device_status_update (current_device);
@ -261,8 +257,6 @@ tools_initialize (ToolType type, GDisplay *gdisp_ptr)
if (tool_info[(int) active_tool->type].tool_options)
gtk_widget_show (tool_info[(int) active_tool->type].tool_options);
gtk_container_enable_resize (GTK_CONTAINER (options_shell));
/* Set the paused count variable to 0
*/
if (gdisp)

View File

@ -4258,14 +4258,6 @@ gfig_pos_enable(GtkWidget *widget, gpointer data)
gtk_widget_set_sensitive(GTK_WIDGET(y_pos_label),enable);
}
void
my_gtk_label_set2 (GtkLabel *label,
const char *str)
{
gtk_label_set(label,str);
gtk_container_need_resize (GTK_CONTAINER (gtk_widget_get_toplevel (GTK_WIDGET(label))));
}
void
my_gtk_label_set (GtkLabel *label,
const char *str)