static void cal_shell_view_notify_view_id_cb (EShellView *shell_view) { GalViewInstance *view_instance; const gchar *view_id; view_id = e_shell_view_get_view_id (shell_view); view_instance = e_shell_view_get_view_instance (shell_view); /* A NULL view ID implies we're in a custom view. But you can * only get to a custom view via the "Define Views" dialog, which * would have already modified the view instance appropriately. * Furthermore, there's no way to refer to a custom view by ID * anyway, since custom views have no IDs. */ if (view_id == NULL) return; gal_view_instance_set_current_view_id (view_instance, view_id); }
static void mail_shell_view_notify_view_id_cb (EMailShellView *mail_shell_view) { EMailShellContent *mail_shell_content; GalViewInstance *view_instance; EMailView *mail_view; const gchar *view_id; mail_shell_content = mail_shell_view->priv->mail_shell_content; mail_view = e_mail_shell_content_get_mail_view (mail_shell_content); view_instance = e_mail_view_get_view_instance (mail_view); view_id = e_shell_view_get_view_id (E_SHELL_VIEW (mail_shell_view)); /* A NULL view ID implies we're in a custom view. But you can * only get to a custom view via the "Define Views" dialog, which * would have already modified the view instance appropriately. * Furthermore, there's no way to refer to a custom view by ID * anyway, since custom views have no IDs. */ if (view_id == NULL) return; gal_view_instance_set_current_view_id (view_instance, view_id); }