Re: [Planner Dev] patch for 308688, 311691, 314480



Hi,

Kurt Maute skrev:
> All,
> 
> Here's a patch to correct the confusing little issue where someone tries
> to print with no views selected. 

Cool!

> 'Print Preview' was a little more involved.  Since it wouldn't do well
> to use the same print dialog for print preview, I created a small dialog
> just to select the views.  I only have it showing up if there are no
> views selected already, so question for the team is:  should we give the
> user the opportunity to change the views each time print preview is
> selected, or no?

I think it's better to just show the dialog when there are no views
selected since preview is meant to just show the preview with the
current settings. For the print dialog, we could also make the view tab
active before showing the dialog.

Two tiny comments:

>  	window = PLANNER_WINDOW (data);
>  	priv = window->priv;
> @@ -961,6 +964,35 @@
>  
>  	views = window_get_print_selection (window);
>  	
> +	/* Check to be sure there are some views selected */
> +	n_views = g_list_length(views);

Missing space before (

> +		if (n_views == 0) {
> +			tmp = g_strdup_printf (_("Please choose one or more views to print."));

There's no need to copy the string, just use it directly below instead.

> -	/* Save printer settings. */
> -	planner_print_dialog_save_config (config);
> +			message = gtk_message_dialog_new (GTK_WINDOW (window),
> +							 GTK_DIALOG_MODAL |
> +							 GTK_DIALOG_DESTROY_WITH_PARENT,
> +							 GTK_MESSAGE_INFO,
> +							 GTK_BUTTONS_OK,
> +							 "%s", tmp);

/Richard

-- 
Imendio AB, http://www.imendio.com/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]