qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Machine menu patch for Mac OS X


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] Machine menu patch for Mac OS X
Date: Wed, 14 Jan 2015 18:42:37 +0000

On 14 January 2015 at 18:34, Programmingkid <address@hidden> wrote:
>
> On Jan 14, 2015, at 12:42 PM, Peter Maydell wrote:
>
>> On 13 January 2015 at 01:49, Programmingkid <address@hidden> wrote:
>>> This patch adds a Machine menu to QEMU. This menu gives the user the 
>>> ability to easily work with floppy and CD image files.
>>>
>>> Features:
>>> Menu items to switch floppy and CD image files.
>>> Menu items to eject floppy and CD image files.
>>> Menu item to use /dev/cdrom.
>>> Verifies with the user before quitting QEMU by displaying a dialog box.
>>>
>>> Signed-off-by: John Arbuckle <address@hidden>
>>
>> Hi. I'm afraid I couldn't get this patch to apply -- is it dependent
>> on one of your other patches?
>
> I have been making a lot of changes to cocoa.m. Can you suggest a way
> to make these changes not interfere with each other?

It can be hard to avoid in that kind of situation. Sometimes the
best you can do is just to say which patches it depends on.


>> Isn't this changing of the title string going to conflict with the
>> changes that we make for mouse grab/ungrab?
>
> Unfortunately yes, but I still need a way to alert the user that QEMU
> is paused. I guess I could find a way to make both messages show up
> in the titlebar. Or I could display a message in the main window that
> says "Paused". Will come up with something soon.

ui/gtk.c has a 'gd_update_caption()' function which sets the title
string as appropriate for the current situation; that is then called
from the places which change the UI state. That's probably as good
an approach as any.

>> You don't know that the machine being emulated has a floppy drive
>> at all, or that it's called "floppy0"...
>
> I did only use the PC and Mac targets. I know there are others. It looks
> like conditionally adding some of these menu items will have to do. I
> guess detecting if the guest machine has a floppy and/or cdrom drive can
> be done - hopefully...

It's not impossible. But none of the other UIs are trying to do that
kind of thing yet; I'd suggest postponing those parts. Bringing the
OSX UI into line with features already implementing in another UI
is simpler than adding features no other UI has, because you're not
trying to break new ground.

>> In the GTK UI we call this "Reset". We also have a "Power Down" which would
>> probably be nice for consistency.
>
> Changing Restart to Reset will be done. I don't know how to
> implement "Power Down", so I'm not sure about that one.

It's easy: just call qmp_system_powerdown(NULL).

> Do you think anyone will ever make SDL or GTK UIs for QEMU work
> on Mac OS X?

Hard to say. I won't, because I don't have the GTK dependencies
available to me. And there don't really seem to be any other
developers trying to work with QEMU on OSX except you.
It should be possible in theory to get SDL or GTK UIs working,
but you'd have to fix up places where the cocoa UI assumes
it's always present, I expect.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]