Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MlfEC-0005bC-TF for mharc-grub-devel@gnu.org; Thu, 10 Sep 2009 04:42:04 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlfEA-0005Zl-KM for grub-devel@gnu.org; Thu, 10 Sep 2009 04:42:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlfE6-0005WB-Qm for grub-devel@gnu.org; Thu, 10 Sep 2009 04:42:02 -0400 Received: from [199.232.76.173] (port=45973 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlfE6-0005Vw-OH for grub-devel@gnu.org; Thu, 10 Sep 2009 04:41:58 -0400 Received: from mail-pz0-f176.google.com ([209.85.222.176]:39378) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MlfE6-00056O-79 for grub-devel@gnu.org; Thu, 10 Sep 2009 04:41:58 -0400 Received: by pzk6 with SMTP id 6so3693740pzk.8 for ; Thu, 10 Sep 2009 01:41:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=2vtTv4q0yXOYPNjFIvnAr2+SrI+iIMJcNu1dkbnnDVs=; b=pTjS0KZuKb7/gkddfcJtFe2e/MSyYMnKs6Q/szHBUIoOC8Qf35j2p3/1F/Cil3xlMo pUCOQT1rgmX9WD5mpldXrZyNV79F4lxO2Oc5WKZtxMnysMBup6KvOnd6x+nvLVA9nP73 6ufOPw5X/ZOd7Zqm15zavQOLeHKafIH7XGzSU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=lkFdHRmyhEk/0Xi8DST7o1kFjJfWtLbgmaiiSgj5uECNzvqF4dD0ShNS9IBVGT+AMZ CJT0uJ6NsF/ZjGM2dep4dmbx8AgJA7IcL+DR3bVjiVHmE/OgVMeTlOE3M59RqPm4n6L1 qS3fTDAMJ6WzWI2yBi4kUL0jLozzI5h54vNXQ= MIME-Version: 1.0 Received: by 10.140.158.21 with SMTP id g21mr432848rve.104.1252572114931; Thu, 10 Sep 2009 01:41:54 -0700 (PDT) In-Reply-To: References: Date: Thu, 10 Sep 2009 16:41:54 +0800 Message-ID: From: Bean To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [GITGRUB] New menu interface (second draft) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Sep 2009 08:42:03 -0000 On Thu, Sep 10, 2009 at 3:26 PM, Michal Suchanek wrot= e: > I don't know why you would move or resize a window. If there is only > one window displayed it should get sized and placed reasonably from > the start. Since grub has no threading you cannot have something like > two applications running in parallel. At least we have nothing > remotely similar to that now and I do not know about any plans for > that either. There could be more than one window, for example, we can have a menu window and terminal window, user uses ctrl-tab to switch between them. Only one of them receives input focus, so threading is not needed. And it can also be used for small widgets like clock. Although some of feature like the mouse support is not implemented yet, so windows is not very useful at this point. > There are two reasons to make this the basic label component: > > =A0- if you need just text the image is simply omitted at no cost to the = user > =A0- if you want an image and there is only a component that displays an > image and text it should hint the user to also include a description > =A0- adding icons to boot menu items is probably going to be the most > common use of images so managing the compound in a single component > should ease writing config files > =A0- you can probably add the image later like > > + panel { > class =3D main > =A0+ label { > =A0 class =3D grub_title > =A0 text =3D Grub $version > =A0} > =A0+ panel { > =A0class =3D boot_menu > =A0+ label { > =A0 class =3D linux > =A0 action { > =A0 =A0linux /boot/vmlinuz... > =A0... > > style (class =3D linux) { > =A0icon =3D Tux.png > =A0icon-position =3D left > } I believe we have approached this in different direction. I'm more inclined to create simple component first, then build complex ones from it, while you like component that can handle many situation. The end result would be the same, but I think my approach is more extensible: text - text only image - image only label - text plus image For normal user, label would be enough, but if he wants to create customized components in grub/lua script, it'd be useful to access lower level components like text and image. > I think that styling based on some user-defined selectors (shown as > class in the mockups) gives pretty much all you can get this way > without scripting new components in lua or something. > > Unfortunately the components written in C probably would not be very > extensible. If I decided I am bored with rectangular panels and wanted > a different shape it would be probably hard to write a new layout > manager for panel in lua and add it to the existing panel. The class method only works for one component, it won't work if it involves more than one component. For example, we can define a confirm dialog box with a panel, a label and the YES/NO button. > I am using the current key bindings in gfxterm to make this clear. > Obviously these can be changed but the default should mimic current > gfxterm to ease transition from older grub. Ok. > We don't need a shell parser, it's in the shell already, and we cannot > modify it, it's outside of grub. > > I do not get what you meant here. > > The shell is already used to execute /etc/grub.d/* and > /usr/lib/grub/grub-mkconfig_lib and there are many utility functions > in /usr/lib/grub/grub-mkconfig_lib for creating grub.cfg snippets. > > There is no need to make everything in grub if it's simple enough to > be written in a shell function outside of grub. Oh, I thought you mean the sh parser in grub.cfg, whose function is quite limited. --=20 Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/