Permalink
Browse files

Added a helper to rotate the screen

  • Loading branch information...
1 parent 9a2bb11 commit 4ef43d9b6cc54464b0e2279344400ecce25fb37d @khorben khorben committed Dec 24, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 tools/helper.c
View
@@ -26,6 +26,7 @@ static char const _license[] =
#include <gtk/gtk.h>
#include <System.h>
#include <Desktop.h>
+#include <Desktop/Browser.h>
/* types */
@@ -74,6 +75,7 @@ static void _helper_about_dialog(Panel * panel);
static void _helper_logout_dialog(Panel * panel);
static void _helper_position_menu(Panel * panel, GtkMenu * menu, gint * x,
gint * y, gboolean * push_in);
+static void _helper_rotate_screen(Panel * panel);
static void _helper_shutdown_dialog(Panel * panel);
@@ -150,6 +152,7 @@ static void _helper_init(PanelAppletHelper * helper, Panel * panel,
helper->about_dialog = _helper_about_dialog;
helper->logout_dialog = _helper_logout_dialog;
helper->position_menu = _helper_position_menu;
+ helper->rotate_screen = _helper_rotate_screen;
helper->shutdown_dialog = _helper_shutdown_dialog;
}
@@ -256,6 +259,14 @@ static void _helper_position_menu(Panel * panel, GtkMenu * menu, gint * x,
}
+/* helper_rotate_screen */
+static void _helper_rotate_screen(Panel * panel)
+{
+ desktop_message_send(DESKTOP_CLIENT_MESSAGE, DESKTOP_MESSAGE_SET_LAYOUT,
+ DESKTOP_LAYOUT_TOGGLE, 0);
+}
+
+
/* helper_shutdown_dialog */
enum { RES_CANCEL, RES_REBOOT, RES_SHUTDOWN };

0 comments on commit 4ef43d9

Please sign in to comment.