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
This commit is contained in:
Owen Taylor 1998-03-29 02:44:43 +00:00 committed by Owen Taylor
parent 5b3cc69b43
commit 93e1585614
11 changed files with 111 additions and 8 deletions

View File

@ -1,3 +1,12 @@
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

View File

@ -1,3 +1,12 @@
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

View File

@ -1,3 +1,12 @@
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

View File

@ -1,3 +1,12 @@
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

View File

@ -1,3 +1,12 @@
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

View File

@ -1,3 +1,12 @@
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

View File

@ -1,3 +1,12 @@
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

View File

@ -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)

View File

@ -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)

View File

@ -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;
}
}

View File

@ -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);
}