monkey-bubble r314 - in trunk: . src/ui
- From: bellau svn gnome org
- To: svn-commits-list gnome org
- Subject: monkey-bubble r314 - in trunk: . src/ui
- Date: Fri, 8 Feb 2008 21:59:39 +0000 (GMT)
Author: bellau
Date: Fri Feb 8 21:59:38 2008
New Revision: 314
URL: http://svn.gnome.org/viewvc/monkey-bubble?rev=314&view=rev
Log:
2008-02-08 Laurent Belmonte <laurent belmonte gmail com>
* src/ui/ui-main.c: (ui_main_new), (leave_fullscreen),
(window_state_event): add leave fullscreen action,menuitem and method
Modified:
trunk/ChangeLog
trunk/src/ui/ui-main.c
Modified: trunk/src/ui/ui-main.c
==============================================================================
--- trunk/src/ui/ui-main.c (original)
+++ trunk/src/ui/ui-main.c Fri Feb 8 21:59:38 2008
@@ -111,6 +111,9 @@
static void fullscreen (GtkAction* action,
UiMain * uimain);
+static void leave_fullscreen (GtkAction* action,
+ UiMain * uimain);
+
static void window_state_event (GtkWindow *window,
GdkEvent *event,
UiMain * uimain);
@@ -263,6 +266,9 @@
{"WindowFullscreen", GTK_STOCK_FULLSCREEN, N_("_Fullscreen"),
NULL, NULL,
G_CALLBACK (fullscreen)},
+ {"WindowLeaveFullscreen",GTK_STOCK_LEAVE_FULLSCREEN, N_("_Leave Fullscreen"),
+ NULL, NULL,
+ G_CALLBACK (leave_fullscreen)},
#endif
{"GameQuit", GTK_STOCK_QUIT, NULL,
NULL, NULL,
@@ -335,6 +341,7 @@
"<menuitem action='GameSettings' />"
"<menuitem action='GameScores' />"
"<menuitem action='WindowFullscreen' />"
+ "<menuitem action='WindowLeaveFullscreen' />"
"<separator />"
"<menuitem action='GamePause' />"
"<menuitem action='GameResume' />"
@@ -389,6 +396,10 @@
ACCEL_PATH_STOP_GAME);
gtk_action_set_accel_path (gtk_action_group_get_action (PRIVATE (ui_main)->actions, "GameQuit"),
ACCEL_PATH_QUIT_GAME);
+
+ // hide Leave fullscreen item on startup
+ gtk_action_set_visible (gtk_action_group_get_action (PRIVATE (ui_main)->actions, "WindowLeaveFullscreen"),
+ FALSE);
#endif
g_signal_connect (PRIVATE (ui_main)->window, "destroy",
@@ -837,6 +848,13 @@
gtk_window_fullscreen (GTK_WINDOW (PRIVATE (uimain)->window));
}
+static void leave_fullscreen (GtkAction* action,
+ UiMain * uimain)
+{
+ gtk_window_unfullscreen (GTK_WINDOW (PRIVATE (uimain)->window));
+}
+
+
static void window_state_event (GtkWindow *window,
GdkEvent *event,
UiMain * uimain)
@@ -848,6 +866,8 @@
fullscreen = ( gdk_window_get_state( GTK_WIDGET(window) ->window ) & GDK_WINDOW_STATE_FULLSCREEN ) != 0;
gtk_action_set_visible (gtk_action_group_get_action (PRIVATE (uimain)->actions, "WindowFullscreen"),
!fullscreen);
+ gtk_action_set_visible (gtk_action_group_get_action (PRIVATE (uimain)->actions, "WindowLeaveFullscreen"),
+ fullscreen);
}
}
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]