3
// GNOME Do is the legal property of its developers. Please refer to the
4
// COPYRIGHT file distributed with this source distribution.
6
// This program is free software: you can redistribute it and/or modify
7
// it under the terms of the GNU General Public License as published by
8
// the Free Software Foundation, either version 3 of the License, or
9
// (at your option) any later version.
11
// This program is distributed in the hope that it will be useful,
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
// GNU General Public License for more details.
16
// You should have received a copy of the GNU General Public License
17
// along with this program. If not, see <http://www.gnu.org/licenses/>.
27
namespace Do.Platform.Linux
30
public partial class PluginAvailableDialog : Gtk.Dialog
32
const string WhatIsDoUrl = "http://do.davebsd.com/wiki/index.php?title=Main_Page#What_is_GNOME_Do.3F";
36
public PluginAvailableDialog (string package, Addin addin)
40
LinkButton wiki_btn, plugin_desc_btn;
44
body_lbl.Text = string.Format (body_lbl.Text, package);
46
wiki_btn = new LinkButton (WhatIsDoUrl, Catalog.GetString ("What is Do?"));
48
link_vbox.Add (wiki_btn);
50
// if the URL attribute is set, then we show a link to the plugin help
51
if (!string.IsNullOrEmpty (addin.Description.Url)) {
52
plugin_desc_btn = new LinkButton (addin.Description.Url,
53
string.Format (Catalog.GetString ("What does the {0} plugin do?"), package));
54
plugin_desc_btn.Xalign = 0F;
55
link_vbox.Add (plugin_desc_btn);
61
protected virtual void OnButtonCancelClicked (object sender, System.EventArgs e)
66
protected virtual void OnInstallBtnClicked (object sender, System.EventArgs e)
68
Services.PluginManager.Install (addin);
72
protected virtual void OnAskChkToggled (object sender, System.EventArgs e)
74
IPreferences prefs = Services.Preferences.Get<AbstractPackageManagerService> ();
75
prefs.Set (AbstractPackageManagerService.PluginAvailableKey, ask_chk.Active);
b'\\ No newline at end of file'