[gthumb/ext: 26/79] show the curcors again when exiting from fullscreen mode
- From: Paolo Bacchilega <paobac src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gthumb/ext: 26/79] show the curcors again when exiting from fullscreen mode
- Date: Sun, 2 Aug 2009 20:26:04 +0000 (UTC)
commit a9350d89a8aaddc6ecfaa4088fec724e2b529ce3
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Jun 28 00:13:07 2009 +0200
show the curcors again when exiting from fullscreen mode
gthumb/gth-browser-actions-entries.h | 2 +-
gthumb/gth-browser.c | 10 +++++-----
gthumb/gth-image-viewer.c | 17 +++++++++++++----
3 files changed, 19 insertions(+), 10 deletions(-)
---
diff --git a/gthumb/gth-browser-actions-entries.h b/gthumb/gth-browser-actions-entries.h
index bf4e1cb..d92da20 100644
--- a/gthumb/gth-browser-actions-entries.h
+++ b/gthumb/gth-browser-actions-entries.h
@@ -77,7 +77,7 @@ static GtkActionEntry gth_browser_action_entries[] = {
{ "Edit_Extensions", NULL,
N_("Extensions"), NULL,
- N_("Activate and configure the application extensions"),
+ N_("Activate, deactivate and configure the gthumb extensions"),
G_CALLBACK (gth_browser_activate_action_edit_extensions) },
{ "Edit_SelectAll", GTK_STOCK_SELECT_ALL,
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index a25a77c..574ca54 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -3905,15 +3905,14 @@ gth_browser_fullscreen (GthBrowser *browser)
_gth_browser_create_fullscreen_toolbar (browser);
gth_browser_show_viewer_properties (browser, FALSE);
- gtk_window_fullscreen (GTK_WINDOW (browser));
gth_window_set_current_page (GTH_WINDOW (browser), GTH_BROWSER_PAGE_VIEWER);
gth_window_show_only_content (GTH_WINDOW (browser), TRUE);
+ gtk_window_fullscreen (GTK_WINDOW (browser));
if (browser->priv->viewer_page != NULL) {
gth_viewer_page_show (browser->priv->viewer_page);
gth_viewer_page_fullscreen (browser->priv->viewer_page, TRUE);
gth_viewer_page_show_pointer (browser->priv->viewer_page, FALSE);
}
-
gth_browser_update_sensitivity (browser);
browser->priv->last_mouse_x = 0.0;
@@ -3931,11 +3930,12 @@ gth_browser_unfullscreen (GthBrowser *browser)
browser->priv->fullscreen = FALSE;
gtk_widget_hide (browser->priv->fullscreen_toolbar);
- gtk_window_unfullscreen (GTK_WINDOW (browser));
gth_window_show_only_content (GTH_WINDOW (browser), FALSE);
- if (browser->priv->viewer_page != NULL)
+ gtk_window_unfullscreen (GTK_WINDOW (browser));
+ if (browser->priv->viewer_page != NULL) {
gth_viewer_page_fullscreen (browser->priv->viewer_page, FALSE);
-
+ gth_viewer_page_show_pointer (browser->priv->viewer_page, TRUE);
+ }
gth_browser_update_sensitivity (browser);
if (browser->priv->motion_signal != 0)
diff --git a/gthumb/gth-image-viewer.c b/gthumb/gth-image-viewer.c
index 6ccfc13..fda7c3d 100644
--- a/gthumb/gth-image-viewer.c
+++ b/gthumb/gth-image-viewer.c
@@ -2525,6 +2525,9 @@ gth_image_viewer_get_reset_scrollbars (GthImageViewer *viewer)
void
gth_image_viewer_show_cursor (GthImageViewer *viewer)
{
+ if (viewer->priv->cursor_visible)
+ return;
+
viewer->priv->cursor_visible = TRUE;
gdk_window_set_cursor (GTK_WIDGET (viewer)->window, viewer->priv->cursor);
}
@@ -2533,6 +2536,9 @@ gth_image_viewer_show_cursor (GthImageViewer *viewer)
void
gth_image_viewer_hide_cursor (GthImageViewer *viewer)
{
+ if (! viewer->priv->cursor_visible)
+ return;
+
viewer->priv->cursor_visible = FALSE;
gdk_window_set_cursor (GTK_WIDGET (viewer)->window, viewer->priv->cursor_void);
}
@@ -2542,20 +2548,23 @@ void
gth_image_viewer_set_cursor (GthImageViewer *viewer,
GdkCursor *cursor)
{
+ if (cursor != NULL)
+ gdk_cursor_ref (cursor);
+
if (viewer->priv->cursor != NULL) {
gdk_cursor_unref (viewer->priv->cursor);
viewer->priv->cursor = NULL;
}
- if (cursor != NULL) {
- viewer->priv->cursor = gdk_cursor_ref (cursor);
- }
+ if (cursor != NULL)
+ viewer->priv->cursor = cursor;
else
viewer->priv->cursor = gdk_cursor_ref (viewer->priv->cursor_void);
if (! GTK_WIDGET_REALIZED (viewer))
return;
- gdk_window_set_cursor (GTK_WIDGET (viewer)->window, viewer->priv->cursor);
+ if (viewer->priv->cursor_visible)
+ gdk_window_set_cursor (GTK_WIDGET (viewer)->window, viewer->priv->cursor);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]