Skip to content

Commit

Permalink
Added a helper to rotate the screen
Browse files Browse the repository at this point in the history
  • Loading branch information
khorben committed Dec 24, 2012
1 parent 9a2bb11 commit 4ef43d9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tools/helper.c
Expand Up @@ -26,6 +26,7 @@ static char const _license[] =
#include <gtk/gtk.h>
#include <System.h>
#include <Desktop.h>
#include <Desktop/Browser.h>


/* types */
Expand Down Expand Up @@ -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);


Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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 };

Expand Down

0 comments on commit 4ef43d9

Please sign in to comment.