From 0fda8cb5a28729724c678c4e379c12a79f1e820e Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 27 Aug 2009 14:42:36 -0400 Subject: Remove redundant "vertical view" functions. --- modules/mail/e-mail-shell-view-actions.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'modules/mail/e-mail-shell-view-actions.c') diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c index 08a8d12aa0..5e6a9ba9cf 100644 --- a/modules/mail/e-mail-shell-view-actions.c +++ b/modules/mail/e-mail-shell-view-actions.c @@ -866,13 +866,24 @@ action_mail_view_cb (GtkRadioAction *action, EMailShellView *mail_shell_view) { EMailShellContent *mail_shell_content; - gboolean vertical_view; + GtkOrientable *orientable; + GtkOrientation orientation; mail_shell_content = mail_shell_view->priv->mail_shell_content; - vertical_view = (gtk_radio_action_get_current_value (action) == 1); + orientable = GTK_ORIENTABLE (mail_shell_content); + + switch (gtk_radio_action_get_current_value (action)) { + case 0: + orientation = GTK_ORIENTATION_VERTICAL; + break; + case 1: + orientation = GTK_ORIENTATION_HORIZONTAL; + break; + default: + g_return_if_reached (); + } - e_mail_shell_content_set_vertical_view ( - mail_shell_content, vertical_view); + gtk_orientable_set_orientation (orientable, orientation); } static void -- cgit v1.2.3