Example #1
0
        protected override void CopyItems(Result[] r)
        {
            int t = base.TotalItems;

            base.CopyItems(r);
            r[t] = new MBString(Program);
        }
Example #2
0
		protected override void CopyItems (Result[] r) {
			int t = base.TotalItems;

			base.CopyItems (r);
			r[t] = new MBString (ForcedArgs);
			r[t + 1] = environment;
			r[t + 2] = new ArchKindResult (Architecture);
		}
Example #3
0
        protected override void CopyItems(Result[] r)
        {
            int t = base.TotalItems;

            base.CopyItems(r);
            r[t]     = new MBString(ForcedArgs);
            r[t + 1] = environment;
            r[t + 2] = new ArchKindResult(Architecture);
        }
Example #4
0
    void OnStringTimeout(Entry entry)
    {
        BuildServices services = (BuildServices)entry.Data[services_key];
        MBString      val      = (MBString)entry.Data[result_key];

        val.Value = entry.Text;
        Console.WriteLine("Fixing {0} = {1}", services.FullName, val);
        services.FixValue(val);
        timeouts.Remove(entry);
    }
Example #5
0
    void DoConfigString(string prompt, MBString res)
    {
        Console.WriteLine("{0} (default: {1})", prompt, res.Value);

        string response = Console.ReadLine();

        if (response == "")
        {
            Console.WriteLine("(Didn't understand; going with the default.)");
        }
        else
        {
            res.Value = response;
        }
    }
Example #6
0
    Widget MakeStringItem(BuildServices services, string prompt, MBString res)
    {
        HBox box = new HBox();

        box.Show();

        Label label = new Label(prompt);

        label.Show();
        label.Xalign = 1.0F;

        Entry entry = new Entry(res.Value);

        entry.Show();
        entry.Data[result_key]   = res;
        entry.Data[services_key] = services;
        entry.Changed           += new EventHandler(OnStringChanged);

        box.PackStart(label, true, true, 2);
        box.PackStart(entry, false, true, 2);
        return(box);
    }
Example #7
0
    bool LoadConfigItem(WrenchProject proj, BuildServices bs)
    {
        string prompt, group;
        string target = bs.FullName;
        Result res    = bs.GetValue().Result;

        if (res == null)
        {
            return(true);
        }

        Result tag;

        if (bs.GetTag("prompt", out tag))
        {
            return(true);
        }

        MBString rstr = tag as MBString;

        if (rstr == null)
        {
            // FIXME
            Console.Error.WriteLine("Configurable option " + target + " does not have a string \'prompt\' tag.");
            prompt = target;
        }
        else
        {
            // TODO: i18n
            prompt = rstr.Value;
        }

        if (bs.GetTag("config_group", out tag))
        {
            return(true);
        }

        rstr = tag as MBString;

        if (rstr == null)
        {
            group = DefaultGroupName;
        }
        else
        {
            // TODO: i18n
            group = rstr.Value;
        }

        Widget widget = null;

        if (res is MBBool)
        {
            widget = MakeBoolItem(bs, prompt, (MBBool)res);
        }
        else if (res is MBString)
        {
            widget = MakeStringItem(bs, prompt, (MBString)res);
        }
        else
        {
            // FIXME
            Console.Error.WriteLine("Don't know how to configure the option {0}.", target);
            return(true);
        }

        AddGuiItem(group, widget);
        return(false);
    }
Example #8
0
		protected override void CopyItems (Result[] r) {
			int t = base.TotalItems;

			base.CopyItems (r);
			r[t] = new MBString (Program);
		}
Example #9
0
		public void SetString (string key, string val) {
			if (val == null)
				store[key] = null;
			else
				store[key] = new MBString (val);
		}
Example #10
0
	Widget MakeStringItem (BuildServices services, string prompt, MBString res) {
		HBox box = new HBox ();
		box.Show ();

		Label label = new Label (prompt);
		label.Show ();
		label.Xalign = 1.0F;

		Entry entry = new Entry (res.Value);
		entry.Show ();
		entry.Data[result_key] = res;
		entry.Data[services_key] = services;
		entry.Changed += new EventHandler (OnStringChanged);

		box.PackStart (label, true, true, 2);
		box.PackStart (entry, false, true, 2);
		return box;
	}
Example #11
0
	void DoConfigString (string prompt, MBString res) {
		Console.WriteLine ("{0} (default: {1})", prompt, res.Value);

		string response = Console.ReadLine ();

		if (response == "")
			Console.WriteLine ("(Didn't understand; going with the default.)");
		else
			res.Value = response;
	}