Ejemplo n.º 1
0
        public FolderSyncSource() : base(AddinManager.CurrentLocalizer.GetString("FolderSync"),
                                         "FolderSync",
                                         sort_order, "extension-unique-id")
        {
            Properties.SetStringList("Icon.Name", "refresh", "gtk-refresh");
            Properties.Set <ISourceContents> ("Nereid.SourceContents", Controller);
            Properties.SetString("ActiveSourceUIResource", "ActiveUI.xml");
            Properties.SetString("UnmapSourceActionLabel", AddinManager.CurrentLocalizer.GetString("Close"));
            Properties.SetString("UnmapSourceActionIconName", "gtk-close");
            var actions = new BansheeActionGroup("directory-sync");

            actions.AddImportant(
                new Gtk.ActionEntry("StopSyncing", Gtk.Stock.Stop, AddinManager.CurrentLocalizer.GetString("Stop"), null, null,
                                    (o, a) => {
                if (Controller != null)
                {
                    Controller.StopSync();
                }
            })
                );
            actions.Register();
        }