Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added a helper to rotate the screen

  • Loading branch information...
commit 4ef43d9b6cc54464b0e2279344400ecce25fb37d 1 parent 9a2bb11
Pierre Pronchery khorben authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 tools/helper.c
11 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 };
Please sign in to comment.
Something went wrong with that request. Please try again.