[gthumb] give the focus to the image viewer only if it's visible
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] give the focus to the image viewer only if it's visible
- Date: Thu, 18 Feb 2010 18:34:13 +0000 (UTC)
commit cfc9ca418f61bcd883a07c7c6cb7b8149cb09f13
Author: Paolo Bacchilega <paobac src gnome org>
Date: Thu Feb 18 19:33:07 2010 +0100
give the focus to the image viewer only if it's visible
[bug #608364]
extensions/image_viewer/gth-image-viewer-page.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/extensions/image_viewer/gth-image-viewer-page.c b/extensions/image_viewer/gth-image-viewer-page.c
index 3bfd4a0..b085699 100644
--- a/extensions/image_viewer/gth-image-viewer-page.c
+++ b/extensions/image_viewer/gth-image-viewer-page.c
@@ -274,8 +274,7 @@ image_preloader_requested_ready_cb (GthImagePreloader *preloader,
return;
}
- if (GTK_WIDGET_VISIBLE (self->priv->viewer))
- gth_viewer_page_focus (GTH_VIEWER_PAGE (self));
+ gth_viewer_page_focus (GTH_VIEWER_PAGE (self));
gth_image_viewer_load_from_image_loader (GTH_IMAGE_VIEWER (self->priv->viewer), image_loader);
}
@@ -608,7 +607,7 @@ gth_image_viewer_page_real_focus (GthViewerPage *base)
GtkWidget *widget;
widget = GTH_IMAGE_VIEWER_PAGE (base)->priv->viewer;
- if (GTK_WIDGET_REALIZED (widget))
+ if (GTK_WIDGET_REALIZED (widget) && GTK_WIDGET_MAPPED (widget))
gtk_widget_grab_focus (widget);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]