diff options
author | Javier Jardón <jjardon@gnome.org> | 2010-09-15 03:28:24 +0200 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2010-09-15 03:28:24 +0200 |
commit | 8345760fdb52c9ca4228b8faa27410fa78a122f9 (patch) | |
tree | 8b82aad8bb47d66ef163d008b31c550a26073ab4 /gtk/gtkentry.c | |
parent | e3a8e29a6c6a0852b869c8ea7cab29d83b5f0b80 (diff) | |
download | gtk+-8345760fdb52c9ca4228b8faa27410fa78a122f9.tar.gz |
gtkentry: remove unnneded check in map/unmap functions
Diffstat (limited to 'gtk/gtkentry.c')
-rw-r--r-- | gtk/gtkentry.c | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index f9b9a41afa..5aea1375fb 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -2694,21 +2694,18 @@ gtk_entry_map (GtkWidget *widget) EntryIconInfo *icon_info = NULL; gint i; - if (gtk_widget_get_realized (widget) && !gtk_widget_get_mapped (widget)) - { - GTK_WIDGET_CLASS (gtk_entry_parent_class)->map (widget); + GTK_WIDGET_CLASS (gtk_entry_parent_class)->map (widget); - for (i = 0; i < MAX_ICONS; i++) + for (i = 0; i < MAX_ICONS; i++) + { + if ((icon_info = priv->icons[i]) != NULL) { - if ((icon_info = priv->icons[i]) != NULL) - { - if (icon_info->pixbuf != NULL && icon_info->window != NULL) - gdk_window_show (icon_info->window); - } + if (icon_info->pixbuf != NULL && icon_info->window != NULL) + gdk_window_show (icon_info->window); } - - update_cursors (widget); } + + update_cursors (widget); } static void @@ -2718,19 +2715,16 @@ gtk_entry_unmap (GtkWidget *widget) EntryIconInfo *icon_info = NULL; gint i; - if (gtk_widget_get_mapped (widget)) + for (i = 0; i < MAX_ICONS; i++) { - for (i = 0; i < MAX_ICONS; i++) + if ((icon_info = priv->icons[i]) != NULL) { - if ((icon_info = priv->icons[i]) != NULL) - { - if (icon_info->pixbuf != NULL && icon_info->window != NULL) - gdk_window_hide (icon_info->window); - } + if (icon_info->pixbuf != NULL && icon_info->window != NULL) + gdk_window_hide (icon_info->window); } - - GTK_WIDGET_CLASS (gtk_entry_parent_class)->unmap (widget); } + + GTK_WIDGET_CLASS (gtk_entry_parent_class)->unmap (widget); } static void |