Re: Patch: Error messages



Devin Heitmueller <dheitmueller netilla com> writes:

> In response to concerns by Owen Taylor that the previous patch should
> disable the buttons instead of showing an error message, attached is a
> patch that does the following:
> 
> * Changes the id tags in memprof.glade to give the buttons meaningful
> names
> * Add the buttons to the pwin structure, the same way the status bar
> works
> * Add a function called update_toolbar(), which will show the proper
> sensitivity for the buttons given the state of the process.
> * Add calls to update_toolbar() on initialization, loading of a process,
> killing of a process, generating the profile, etc.
> 
> Please let me know if this is the correct approach.  If it is, I will
> create a patch to address the menu items as well.  If not, a brief
> description of what is wrong will help greatly in creating the
> appropriate fix.

This definitely looks like it is going in the right direction ...
except for the issue of the menu items, my other main concern
is sequences like:

> @@ -1689,8 +1727,10 @@
>  	response = gtk_dialog_run (GTK_DIALOG (dialog));
>  	gtk_widget_destroy (dialog);
>  
> -	if (response == GTK_RESPONSE_YES)
> +	if (response == GTK_RESPONSE_YES) {
>  		process_detach (pwin->process);
> +		update_toolbar (pwin);
> +	}
>  }

It shouldn't be necessary to update the toolbar when we 
think we've made a change in the status - rather, we should
simply update the toolbar in response to the ::status_changed
signal (status_changed_cb).

Regards,
                                        Owen



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