示例#1
0
static void
view_minicard_column_width_changed (EAddressbookView *address_view,
                                    gdouble width)
{
	GalView *view;
	GalViewInstance *view_instance;
	GalViewMinicard *view_minicard;

	view_instance = e_addressbook_view_get_view_instance (address_view);
	view = gal_view_instance_get_current_view (view_instance);
	view_minicard = GAL_VIEW_MINICARD (view);

	if (view_minicard->column_width != width) {
		view_minicard->column_width = width;
		gal_view_changed (view);
	}
}
static void
action_gal_save_custom_view_cb (GtkAction *action,
                                EBookShellView *book_shell_view)
{
	EBookShellContent *book_shell_content;
	EShellView *shell_view;
	EAddressbookView *address_view;
	GalViewInstance *view_instance;

	/* All shell views respond to the activation of this action,
	 * which is defined by EShellWindow.  But only the currently
	 * active shell view proceeds with saving the custom view. */
	shell_view = E_SHELL_VIEW (book_shell_view);
	if (!e_shell_view_is_active (shell_view))
		return;

	book_shell_content = book_shell_view->priv->book_shell_content;
	address_view = e_book_shell_content_get_current_view (book_shell_content);
	view_instance = e_addressbook_view_get_view_instance (address_view);
	gal_view_instance_save_as (view_instance);
}