Re: [evolution-patches] Patch to add Properties menu popup on a store
- From: Not Zed <notzed ximian com>
- To: S Shreyas <sshreyas novell com>
- Cc: evolution-patches lists ximian com
- Subject: Re: [evolution-patches] Patch to add Properties menu popup on a store
- Date: Tue, 24 May 2005 09:35:10 +0530
Your braces are all wrong. You must use K&R style bracing. i.e. open
braces on the same line as the if/while/else, close on the same as else,
etc.
You also must check if the account exists after calling the
get_account() function.
You're also missing a bunch of code which is required to show the
editor/etc.
e.g. some example code from em-account-prefs.c:
emae = em_account_editor_new(account, EMAE_NOTEBOOK,
"org.gnome.evolution.mail.config.accountEditor");
prefs->editor = emae->editor;
gtk_window_set_transient_for((GtkWindow *)prefs->editor, (GtkWindow
*)gtk_widget_get_toplevel((GtkWidget *)prefs));
gtk_widget_show(emae->editor);
(i realise the editor is showing anyway - but thats a bug in
em_account_editor).
On Mon, 2005-05-23 at 07:34 -0600, S Shreyas wrote:
>
> - gtk_tree_model_get (model, &iter, COL_STRING_URI, &uri, -1);
> + gtk_tree_model_get (model, &iter, COL_BOOL_IS_STORE,
> &is_store, COL_STRING_URI, &uri, -1);
> + if (is_store){
> + account = mail_config_get_account_by_source_url (uri);
> + em_account_editor_new(account, EMAE_NOTEBOOK,
> "org.gnome.evolution.mail.config.accountEditor");
> + }
> + else
> + {
> em_folder_properties_show (NULL, NULL, uri);
> + }
> g_free (uri);
> }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]