commit e9bf61138256ca120d52d083e30bc2f2329de75a
parent f13bd41818adaad64f8ed41e0a8018372d83741a
Author: Colin Leroy <colin@colino.net>
Date: Tue, 7 Oct 2008 06:30:41 +0000
2008-10-07 [colin] 3.6.0cvs10
* src/mainwindow.c
Make fullscreen a real menu item
Diffstat:
4 files changed, 29 insertions(+), 13 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-07 [colin] 3.6.0cvs10
+
+ * src/mainwindow.c
+ Make fullscreen a real menu item
+
2008-10-07 [colin] 3.6.0cvs9
* src/mainwindow.c
diff --git a/PATCHSETS b/PATCHSETS
@@ -3566,3 +3566,4 @@
( cvs diff -u -r 1.9.2.32 -r 1.9.2.33 src/common/ssl.c; ) > 3.6.0cvs7.patchset
( cvs diff -u -r 1.274.2.277 -r 1.274.2.278 src/mainwindow.c; cvs diff -u -r 1.39.2.51 -r 1.39.2.52 src/mainwindow.h; ) > 3.6.0cvs8.patchset
( cvs diff -u -r 1.274.2.278 -r 1.274.2.279 src/mainwindow.c; ) > 3.6.0cvs9.patchset
+( cvs diff -u -r 1.274.2.279 -r 1.274.2.280 src/mainwindow.c; ) > 3.6.0cvs10.patchset
diff --git a/configure.ac b/configure.ac
@@ -11,7 +11,7 @@ MINOR_VERSION=6
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=9
+EXTRA_VERSION=10
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
diff --git a/src/mainwindow.c b/src/mainwindow.c
@@ -187,6 +187,8 @@ static void view_source_cb (GtkAction *action,
static void show_all_header_cb (GtkAction *action,
gpointer data);
+static void toggle_fullscreen_cb (GtkAction *action,
+ gpointer data);
static void hide_quotes_cb(GtkAction *action,
gpointer data);
@@ -734,6 +736,9 @@ static GtkToggleActionEntry mainwin_toggle_entries[] = {
{"View/ShowHide/ColumnHeaders", NULL, N_("Column headers"), NULL, NULL, G_CALLBACK(toggle_col_headers_cb) }, /* toggle */
{"View/ThreadView", NULL, N_("Th_read view"), "<control>T", NULL, G_CALLBACK(thread_cb) }, /* toggle */
{"View/HideReadMessages", NULL, N_("_Hide read messages"), NULL, NULL, G_CALLBACK(hide_read_messages) }, /* toggle */
+#ifndef MAEMO
+ {"View/FullScreen", NULL, N_("_Fullscreen"), "F11", NULL, G_CALLBACK(toggle_fullscreen_cb) }, /* toggle */
+#endif
{"View/AllHeaders", NULL, N_("Show all _headers"), "<control>H", NULL, G_CALLBACK(show_all_header_cb) }, /* toggle */
{"View/Quotes/FoldAll", NULL, N_("_Fold all"), "<control><shift>Q", NULL, G_CALLBACK(hide_quotes_cb) }, /* 1 toggle */
{"View/Quotes/Fold2", NULL, N_("Fold from level _2"), NULL, NULL, G_CALLBACK(hide_quotes_cb) }, /* 2 toggle */
@@ -1283,18 +1288,6 @@ static gboolean mainwindow_key_pressed (GtkWidget *widget, GdkEventKey *event,
}
}
break;
-#ifndef MAEMO
- case GDK_F11:
- if (mainwin->fullscreen) {
- gtk_window_unfullscreen(GTK_WINDOW(mainwin->window));
- mainwin->fullscreen = FALSE;
- }
- else {
- mainwin->fullscreen = TRUE;
- gtk_window_fullscreen(GTK_WINDOW(mainwin->window));
- }
- break;
-#endif
#ifdef MAEMO
case GDK_F6:
@@ -1619,6 +1612,9 @@ MainWindow *main_window_create()
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/SetColumns", "Messagelist", "View/SetColumns/Messagelist", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "Separator1", "View/---", GTK_UI_MANAGER_SEPARATOR)
+#ifndef MAEMO
+ MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "FullScreen", "View/FullScreen", GTK_UI_MANAGER_MENUITEM)
+#endif
#ifndef GENERIC_UMPC
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "Layout", "View/Layout", GTK_UI_MANAGER_MENU)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Layout", "Standard", "View/Layout/Standard", GTK_UI_MANAGER_MENUITEM)
@@ -4253,6 +4249,20 @@ static void show_all_header_cb(GtkAction *action, gpointer data)
gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
}
+static void toggle_fullscreen_cb(GtkAction *action, gpointer data)
+{
+ MainWindow *mainwin = (MainWindow *)data;
+ if (mainwin->menu_lock_count) return;
+ if (!gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action))) {
+ gtk_window_unfullscreen(GTK_WINDOW(mainwin->window));
+ mainwin->fullscreen = FALSE;
+ }
+ else {
+ mainwin->fullscreen = TRUE;
+ gtk_window_fullscreen(GTK_WINDOW(mainwin->window));
+ }
+}
+
static void hide_quotes_cb(GtkAction *action, gpointer data)
{
MainWindow *mainwin = (MainWindow *)data;