~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/AuthorInformationPanel.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-06-27 17:03:13 UTC
  • mto: (1.8.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20110627170313-6cvz3s19x6e9hqe9
ImportĀ upstreamĀ versionĀ 2.5.92+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
                
41
41
                public override Gtk.Widget CreatePanelWidget ()
42
42
                {
43
 
                        AuthorInformation info = solution.UserProperties.GetValue<AuthorInformation> ("AuthorInfo");
44
 
                        return widget = new AuthorInformationPanelWidget (info);
 
43
                        return widget = new AuthorInformationPanelWidget (solution.LocalAuthorInformation);
45
44
                }
46
45
 
47
46
                public override void ApplyChanges ()
48
47
                {
49
 
                        if (solution != null) {
50
 
                                AuthorInformation ainfo = widget.Get ();
51
 
                                if (ainfo != null)
52
 
                                        solution.UserProperties.SetValue<AuthorInformation> ("AuthorInfo", ainfo);
53
 
                                else if (solution.UserProperties.HasValue ("AuthorInfo"))
54
 
                                        solution.UserProperties.RemoveValue ("AuthorInfo");
55
 
                        }
 
48
                        if (solution != null)
 
49
                                solution.LocalAuthorInformation = widget.Get ();
56
50
                }
57
51
 
58
52
                public override void Initialize (MonoDevelop.Ide.Gui.Dialogs.OptionsDialog dialog, object dataObject)
83
77
                
84
78
                public AuthorInformation Get ()
85
79
                {
86
 
                        return checkCustom.Active? new AuthorInformation (nameEntry.Text, emailEntry.Text, copyrightEntry.Text) : null;
 
80
                        return checkCustom.Active? new AuthorInformation (nameEntry.Text, emailEntry.Text, copyrightEntry.Text, companyEntry.Text, trademarkEntry.Text) : null;
87
81
                }
88
82
 
89
83
                void UseDefaultToggled (object sender, System.EventArgs e)
94
88
                                        nameEntry.Text = info.Name ?? "";
95
89
                                        emailEntry.Text = info.Email ?? "";
96
90
                                        copyrightEntry.Text = info.Copyright ?? "";
 
91
                                        companyEntry.Text = info.Company ?? "";
 
92
                                        trademarkEntry.Text = info.Trademark ?? "";
97
93
                                }
98
94
                        } else {
99
95
                                infoTable.Sensitive = false;
100
 
                                info = new AuthorInformation (nameEntry.Text, emailEntry.Text, copyrightEntry.Text);
 
96
                                info = new AuthorInformation (nameEntry.Text, emailEntry.Text, copyrightEntry.Text, companyEntry.Text, trademarkEntry.Text);
101
97
                                if (String.IsNullOrEmpty (info.Name) && String.IsNullOrEmpty (info.Email))
102
98
                                        info = null;
103
99
                                nameEntry.Text = AuthorInformation.Default.Name ?? "";