Esempio n. 1
0
        public StashManagerDialog(GitRepository repo)
        {
            this.Build();
            this.UseNativeContextMenus();
            repository = repo;

            stashes = repo.GetStashes();

            store             = new ListStore(typeof(Stash), typeof(string), typeof(string));
            list.Model        = store;
            list.SearchColumn = -1;             // disable the interactive search

            list.AppendColumn(GettextCatalog.GetString("Date/Time"), new CellRendererText(), "text", 1);
            list.AppendColumn(GettextCatalog.GetString("Comment"), new CellRendererText(), "text", 2);
            Fill();
            TreeIter it;

            if (store.GetIterFirst(out it))
            {
                list.Selection.SelectIter(it);
            }
            UpdateButtons();

            list.Selection.Changed += delegate {
                UpdateButtons();
            };
        }
Esempio n. 2
0
        internal static void Remove(this StashCollection sc, Stash stash)
        {
            int i = 0;

            foreach (var s in sc)
            {
                if (s.FriendlyName == stash.FriendlyName)
                {
                    sc.Remove(i);
                    break;
                }
                ++i;
            }
        }
Esempio n. 3
0
        public StashManagerDialog(GitRepository repo)
        {
            this.Build();
            stashes = repo.GetStashes();

            store      = new ListStore(typeof(Stash), typeof(string), typeof(string));
            list.Model = store;

            list.AppendColumn(GettextCatalog.GetString("Date/Time"), new CellRendererText(), "text", 1);
            list.AppendColumn(GettextCatalog.GetString("Comment"), new CellRendererText(), "text", 2);
            Fill();
            TreeIter it;

            if (store.GetIterFirst(out it))
            {
                list.Selection.SelectIter(it);
            }
            UpdateButtons();
        }
Esempio n. 4
0
 public MergeCommandResult Apply(ProgressMonitor monitor)
 {
     return(StashCollection.Apply(monitor, this));
 }
Esempio n. 5
0
 public MergeCommandResult Apply()
 {
     return(StashCollection.Apply(this));
 }