Commit 93e15856 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Disconnect from combo->entry, not combo. (From: Daniel Skarda

Sat Mar 28 21:18:42 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtkcombo.c (gtk_combo_disable_activate):
	Disconnect from combo->entry, not combo.
	(From: Daniel Skarda <0rfelyus@atrey.karlin.mff.cuni.cz>)

	* gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpm): Deal
	better with xpm's with bad colors in them.

Plus, 3rd attempt to commit gtklabel changes
parent 5b3cc69b
Sat Mar 28 21:18:42 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkcombo.c (gtk_combo_disable_activate):
Disconnect from combo->entry, not combo.
(From: Daniel Skarda <0rfelyus@atrey.karlin.mff.cuni.cz>)
* gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpm): Deal
better with xpm's with bad colors in them.
Fri Mar 27 21:01:17 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdk.c (gdk_event_translate): Don't call
......
Sat Mar 28 21:18:42 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkcombo.c (gtk_combo_disable_activate):
Disconnect from combo->entry, not combo.
(From: Daniel Skarda <0rfelyus@atrey.karlin.mff.cuni.cz>)
* gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpm): Deal
better with xpm's with bad colors in them.
Fri Mar 27 21:01:17 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdk.c (gdk_event_translate): Don't call
......
Sat Mar 28 21:18:42 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkcombo.c (gtk_combo_disable_activate):
Disconnect from combo->entry, not combo.
(From: Daniel Skarda <0rfelyus@atrey.karlin.mff.cuni.cz>)
* gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpm): Deal
better with xpm's with bad colors in them.
Fri Mar 27 21:01:17 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdk.c (gdk_event_translate): Don't call
......
Sat Mar 28 21:18:42 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkcombo.c (gtk_combo_disable_activate):
Disconnect from combo->entry, not combo.
(From: Daniel Skarda <0rfelyus@atrey.karlin.mff.cuni.cz>)
* gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpm): Deal
better with xpm's with bad colors in them.
Fri Mar 27 21:01:17 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdk.c (gdk_event_translate): Don't call
......
Sat Mar 28 21:18:42 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkcombo.c (gtk_combo_disable_activate):
Disconnect from combo->entry, not combo.
(From: Daniel Skarda <0rfelyus@atrey.karlin.mff.cuni.cz>)
* gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpm): Deal
better with xpm's with bad colors in them.
Fri Mar 27 21:01:17 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdk.c (gdk_event_translate): Don't call
......
Sat Mar 28 21:18:42 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkcombo.c (gtk_combo_disable_activate):
Disconnect from combo->entry, not combo.
(From: Daniel Skarda <0rfelyus@atrey.karlin.mff.cuni.cz>)
* gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpm): Deal
better with xpm's with bad colors in them.
Fri Mar 27 21:01:17 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdk.c (gdk_event_translate): Don't call
......
Sat Mar 28 21:18:42 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkcombo.c (gtk_combo_disable_activate):
Disconnect from combo->entry, not combo.
(From: Daniel Skarda <0rfelyus@atrey.karlin.mff.cuni.cz>)
* gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpm): Deal
better with xpm's with bad colors in them.
Fri Mar 27 21:01:17 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdk.c (gdk_event_translate): Don't call
......
......@@ -473,7 +473,7 @@ gdk_pixmap_colormap_create_from_xpm (GdkWindow *window,
color = NULL;
ns = 0;
while (color == NULL)
while ((color == NULL) && (ns < num_cols))
{
if (strcmp (pixel_str, colors[ns].color_string) == 0)
color = &colors[ns];
......@@ -481,6 +481,9 @@ gdk_pixmap_colormap_create_from_xpm (GdkWindow *window,
ns++;
}
if (!color) /* screwed up XPM file */
color = &colors[0];
gdk_image_put_pixel (image, xcnt, ycnt, color->color.pixel);
if (mask && color->transparent)
......@@ -643,7 +646,7 @@ gdk_pixmap_colormap_create_from_xpm_d (GdkWindow *window,
color = NULL;
ns = 0;
while (color == NULL)
while ((color == NULL) && (ns < num_cols))
{
if (strcmp (pixel_str, colors[ns].color_string) == 0)
color = &colors[ns];
......@@ -651,6 +654,9 @@ gdk_pixmap_colormap_create_from_xpm_d (GdkWindow *window,
ns++;
}
if (!color) /* screwed up XPM file */
color = &colors[0];
gdk_image_put_pixel (image, xcnt, ycnt, color->color.pixel);
if (mask && color->transparent)
......
......@@ -473,7 +473,7 @@ gdk_pixmap_colormap_create_from_xpm (GdkWindow *window,
color = NULL;
ns = 0;
while (color == NULL)
while ((color == NULL) && (ns < num_cols))
{
if (strcmp (pixel_str, colors[ns].color_string) == 0)
color = &colors[ns];
......@@ -481,6 +481,9 @@ gdk_pixmap_colormap_create_from_xpm (GdkWindow *window,
ns++;
}
if (!color) /* screwed up XPM file */
color = &colors[0];
gdk_image_put_pixel (image, xcnt, ycnt, color->color.pixel);
if (mask && color->transparent)
......@@ -643,7 +646,7 @@ gdk_pixmap_colormap_create_from_xpm_d (GdkWindow *window,
color = NULL;
ns = 0;
while (color == NULL)
while ((color == NULL) && (ns < num_cols))
{
if (strcmp (pixel_str, colors[ns].color_string) == 0)
color = &colors[ns];
......@@ -651,6 +654,9 @@ gdk_pixmap_colormap_create_from_xpm_d (GdkWindow *window,
ns++;
}
if (!color) /* screwed up XPM file */
color = &colors[0];
gdk_image_put_pixel (image, xcnt, ycnt, color->color.pixel);
if (mask && color->transparent)
......
......@@ -679,7 +679,7 @@ gtk_combo_disable_activate (GtkCombo* combo)
g_return_if_fail (GTK_IS_COMBO (combo));
if ( combo->activate_id ) {
gtk_signal_disconnect(GTK_OBJECT(combo), combo->activate_id);
gtk_signal_disconnect(GTK_OBJECT(combo->entry), combo->activate_id);
combo->activate_id = 0;
}
}
......@@ -38,6 +38,11 @@ static void gtk_label_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static gint gtk_label_expose (GtkWidget *widget,
GdkEventExpose *event);
static void gtk_label_state_changed (GtkWidget *widget,
guint previous_state);
static void gtk_label_style_set (GtkWidget *widget,
GtkStyle *previous_style);
static GtkMiscClass *parent_class = NULL;
......@@ -85,6 +90,8 @@ gtk_label_class_init (GtkLabelClass *class)
widget_class->size_request = gtk_label_size_request;
widget_class->expose_event = gtk_label_expose;
widget_class->style_set = gtk_label_style_set;
widget_class->state_changed = gtk_label_state_changed;
}
static void
......@@ -365,7 +372,28 @@ gtk_label_expose (GtkWidget *widget,
return TRUE;
}
static void
gtk_label_state_changed (GtkWidget *widget,
guint previous_state)
{
if (GTK_WIDGET_NO_WINDOW (widget) &&
GTK_WIDGET_DRAWABLE (widget))
gdk_window_clear_area (widget->window,
widget->allocation.x,
widget->allocation.y,
widget->allocation.width,
widget->allocation.height);
}
static void
gtk_label_style_set (GtkWidget *widget,
GtkStyle *previous_style)
{
if (GTK_WIDGET_NO_WINDOW (widget) &&
GTK_WIDGET_DRAWABLE (widget))
gdk_window_clear_area (widget->window,
widget->allocation.x,
widget->allocation.y,
widget->allocation.width,
widget->allocation.height);
}
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