Re: GtkAction vs. AppMenu

2009-05-28 Thread Cornelius Hald
Alberto Garcia wrote: > Well, I'm one of the Hildon developers and I can tell you that we _do_ > accept suggestions :-) > That's really good to hear! Thanks for making that clear :) > Of course we have some constraints and we can't change everything > that we want, but if the change that you pro

Re: GtkAction vs. AppMenu

2009-05-28 Thread Andre Klapper
Am Donnerstag, den 28.05.2009, 16:30 +0200 schrieb Cornelius Hald: > We all know that Maemo 5 is currently in Beta state, but does this mean > that API and/or UI changes are still allowed or not? It would be really > good to know whether or not it makes sense to press for some changes. Useful ch

Re: GtkAction vs. AppMenu

2009-05-28 Thread Alberto Garcia
On Thu, May 28, 2009 at 04:30:10PM +0200, Cornelius Hald wrote: > > > The implementation can be changed, we're in beta and that means > > > that things can still be fixed. > > No, Beta generally means that API and UI changes are no longer > > possible. And I think that's the case with Maemo 5. >

Re: GtkAction vs. AppMenu

2009-05-28 Thread Cornelius Hald
Murray Cumming wrote: > On Sun, 2009-05-24 at 15:55 +0200, Alberto Garcia wrote: > >> On Sun, May 24, 2009 at 01:48:11PM +0200, Murray Cumming wrote: >> >> >>> However, I'm was asking about the API and implementation, because >>> the Fremantle UI guidelines are really out of our control at

Re: GtkAction vs. AppMenu

2009-05-25 Thread Alberto Garcia
On Sun, May 24, 2009 at 07:58:26PM +0200, Cornelius Hald wrote: > Thanks Berto for all the good input and for explaining the decisions > that have been made. Thank you for your feedback :) > Another thing is, that if you compare those two menus, you can > easily see that the Diablo menu has more

Re: GtkAction vs. AppMenu

2009-05-25 Thread Alberto Garcia
On Mon, May 25, 2009 at 06:19:35PM +0200, Cornelius Hald wrote: > I just tried that, and indeed using hildon_app_menu_add_filter() > groups the toggle buttons together into one row. Yes, that's the purpose of that function. As you say, only one filter group is supported, but that's by design. Be

Re: GtkAction vs. AppMenu

2009-05-25 Thread Cornelius Hald
On Mon, 2009-05-25 at 12:24 +0200, Murray Cumming wrote: > On Sun, 2009-05-24 at 19:58 +0200, Cornelius Hald wrote: > > Another thing is, that if you compare those two menus, you can easily > > see that the Diablo menu has more structure due to the use of > > separators. I'm not yet sure how to get

Re: GtkAction vs. AppMenu

2009-05-25 Thread Cornelius Hald
On Fri, 2009-05-22 at 19:00 +0200, Alberto Garcia wrote: > On Fri, May 22, 2009 at 05:08:08PM +0200, Cornelius Hald wrote: > (it might help you with the keyboard accelerators too). It did :) I adapted my code to look like the example which you provided and now the accelerators work for Diablo and

Re: GtkAction vs. AppMenu

2009-05-25 Thread Murray Cumming
On Sun, 2009-05-24 at 19:58 +0200, Cornelius Hald wrote: > Another thing is, that if you compare those two menus, you can easily > see that the Diablo menu has more structure due to the use of > separators. I'm not yet sure how to get back this structure, but I'll > make some experiments. HIG sugge

Re: GtkAction vs. AppMenu

2009-05-25 Thread Murray Cumming
On Sun, 2009-05-24 at 15:55 +0200, Alberto Garcia wrote: > On Sun, May 24, 2009 at 01:48:11PM +0200, Murray Cumming wrote: > > > However, I'm was asking about the API and implementation, because > > the Fremantle UI guidelines are really out of our control at this > > point. > > The implementatio

Re: GtkAction vs. AppMenu

2009-05-25 Thread Murray Cumming
On Fri, 2009-05-22 at 22:09 +0200, Murray Cumming wrote: > On Fri, 2009-05-22 at 19:00 +0200, Alberto Garcia wrote: > > On Fri, May 22, 2009 at 05:08:08PM +0200, Cornelius Hald wrote: > > > > > The result now is: > > > - gtk_toggle_button_new() is working but it displays the buttons as > > > toggl

Re: GtkAction vs. AppMenu

2009-05-24 Thread Cornelius Hald
Thanks Berto for all the good input and for explaining the decisions that have been made. I wasn't really aware that radio buttons are discouraged and that toggle buttons should be favored. Now that I know that, I changed the code again to use toggle buttons and everything works as expected. So the

Re: GtkAction vs. AppMenu

2009-05-24 Thread Alberto Garcia
On Sun, May 24, 2009 at 01:48:11PM +0200, Murray Cumming wrote: > However, I'm was asking about the API and implementation, because > the Fremantle UI guidelines are really out of our control at this > point. The implementation can be changed, we're in beta and that means that things can still be

Re: GtkAction vs. AppMenu

2009-05-24 Thread Murray Cumming
On Sun, 2009-05-24 at 05:08 +0200, Alberto Garcia wrote: > > > Toggle-like radio buttons are quite common too in many user > > > interfaces. > > Not that I can think of. > > Well, I haven't made a list :) but out of the blue I can think at > least of the GIMP, Audacity, OpenOffice/MS Word/Abiword/

Re: GtkAction vs. AppMenu

2009-05-23 Thread Alberto Garcia
On Sat, May 23, 2009 at 10:44:50PM +0200, Murray Cumming wrote: > > Toggle-like radio buttons are quite common too in many user > > interfaces. > Not that I can think of. Well, I haven't made a list :) but out of the blue I can think at least of the GIMP, Audacity, OpenOffice/MS Word/Abiword/Gnum

Re: GtkAction vs. AppMenu

2009-05-23 Thread Alberto Garcia
On Sat, May 23, 2009 at 10:36:42PM +0200, Murray Cumming wrote: > >* First, I don't think there's anything abnormal about that > > API. gtk_toggle_button_set_mode() is there exactly for that > > purpose and it's trivial to use. > > I think that function is widely considered to be us

Re: GtkAction vs. AppMenu

2009-05-23 Thread Murray Cumming
On Sat, 2009-05-23 at 18:38 +0200, Alberto Garcia wrote: [snip] > Toggle-like radio buttons > are quite common too in many user interfaces. Not that I can think of. > For Fremantle it has been decided that the way to show radio buttons > it to make them look like toggle buttons, Fair enough. The

Re: GtkAction vs. AppMenu

2009-05-23 Thread Murray Cumming
On Sat, 2009-05-23 at 18:08 +0200, Alberto Garcia wrote: > On Fri, May 22, 2009 at 10:09:49PM +0200, Murray Cumming wrote: > > > if radio buttons are meant to look a certain way in Maemo, why isn't > > that just a matter of theming or even of making a change in the GTK+ > > code instead of asking

Re: GtkAction vs. AppMenu

2009-05-23 Thread Alberto Garcia
On Sat, May 23, 2009 at 02:33:05PM +0200, Cornelius Hald wrote: > > gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (radio_button), FALSE); > > To be honest, I also like the _look_ of the toggle button more then > the look of the radio button. But I think we really should use radio > buttons where

Re: GtkAction vs. AppMenu

2009-05-23 Thread Alberto Garcia
On Fri, May 22, 2009 at 10:09:49PM +0200, Murray Cumming wrote: > if radio buttons are meant to look a certain way in Maemo, why isn't > that just a matter of theming or even of making a change in the GTK+ > code instead of asking people to use the GTK+ API in an abnormal > way? Well, there are s

Re: GtkAction vs. AppMenu

2009-05-23 Thread Cornelius Hald
On Fri, 2009-05-22 at 19:00 +0200, Alberto Garcia wrote: > Well, that's what looks better in the Fremantle UI style. So even > if you use gtk radio buttons directly (i.e, without gtk actions) I > suggest you to do something like this: > > gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (radio_button

Re: GtkAction vs. AppMenu

2009-05-22 Thread Murray Cumming
On Fri, 2009-05-22 at 19:00 +0200, Alberto Garcia wrote: > On Fri, May 22, 2009 at 05:08:08PM +0200, Cornelius Hald wrote: > > > The result now is: > > - gtk_toggle_button_new() is working but it displays the buttons as > > toggle buttons not as radio buttons. > > Well, that's what looks better i

Re: GtkAction vs. AppMenu

2009-05-22 Thread Alberto Garcia
On Fri, May 22, 2009 at 05:08:08PM +0200, Cornelius Hald wrote: > The result now is: > - gtk_toggle_button_new() is working but it displays the buttons as > toggle buttons not as radio buttons. Well, that's what looks better in the Fremantle UI style. So even if you use gtk radio buttons directly

Re: GtkAction vs. AppMenu

2009-05-22 Thread Cornelius Hald
On Fri, 2009-05-22 at 16:20 +0200, Cornelius Hald wrote: > So it seems like the solution was already in your post from yesterday. > I'll check my code and then report back here. Good, I checked again. I had a small bug which prevented the radio buttons to select the "normal" entry, but the rest wa

Re: GtkAction vs. AppMenu

2009-05-22 Thread Cornelius Hald
On Fri, 2009-05-22 at 16:00 +0200, Alberto Garcia wrote: > On Fri, May 22, 2009 at 03:24:01PM +0200, Cornelius Hald wrote: > Try also this: > > gtk_window_add_accel_group (window, accel); I have this, it was only not included in my mail. > Look at the correction I sent in a subsequent e-mail: tr

Re: GtkAction vs. AppMenu

2009-05-22 Thread Alberto Garcia
On Fri, May 22, 2009 at 03:24:01PM +0200, Cornelius Hald wrote: > But so that you don't have to read through this big and ugly file, > I'll try to outline what I do with one of the actions. Casts etc. > are removed to make it less cluttered: > > action = gtk_toggle_action_new("bold", "Bold", NULL

Re: GtkAction vs. AppMenu

2009-05-22 Thread Cornelius Hald
On Thu, 2009-05-21 at 17:28 +0200, Alberto Garcia wrote: > On Tue, May 19, 2009 at 05:24:47PM +0200, Cornelius Hald wrote: > > First of all, sorry for the delay :) No problem at all. I really appreciate your help :) > They are not supposed to show up, but they should work. I've just > tested it

Re: GtkAction vs. AppMenu

2009-05-21 Thread Alberto Garcia
On Thu, May 21, 2009 at 05:28:35PM +0200, Alberto Garcia wrote: Correction: > > 2) How do I get my GtkRadioActions to work with > > the HildonAppMenu? I created the the buttons with > > gtk_radio_button_new() Well, actually in this case you should probably use gtk_toggle_button_new() instead (Gt

Re: GtkAction vs. AppMenu

2009-05-21 Thread Alberto Garcia
On Tue, May 19, 2009 at 05:24:47PM +0200, Cornelius Hald wrote: First of all, sorry for the delay :) > 1) The accelerators of my actions don't show up on the menu > buttons and they don't work. What do I have to do to get them > back? If I create an old school GtkMenuItem out of my GtkAction the

Re: GtkAction vs. AppMenu

2009-05-19 Thread Cornelius Hald
On Wed, 2009-04-29 at 20:19 +0200, Alberto Garcia wrote: > On Wed, Apr 29, 2009 at 07:37:03PM +0200, Cornelius Hald wrote: > > > Or is it possible to create a GtkButton out of a GtkAction? > > Try this: > > button = gtk_button_new (); > gtk_action_connect_proxy (action, button); Thanks again fo

Re: GtkAction vs. AppMenu

2009-04-29 Thread Cornelius Hald
Hi Berto, On Wed, 2009-04-29 at 20:19 +0200, Alberto Garcia wrote: > On Wed, Apr 29, 2009 at 07:37:03PM +0200, Cornelius Hald wrote: > > > Or is it possible to create a GtkButton out of a GtkAction? > > Try this: > > button = gtk_button_new (); > gtk_action_connect_proxy (action, button); I th

Re: GtkAction vs. AppMenu

2009-04-29 Thread Alberto Garcia
On Wed, Apr 29, 2009 at 07:37:03PM +0200, Cornelius Hald wrote: > Or is it possible to create a GtkButton out of a GtkAction? Try this: button = gtk_button_new (); gtk_action_connect_proxy (action, button); Berto ___ maemo-developers mailing list maem

GtkAction vs. AppMenu

2009-04-29 Thread Cornelius Hald
Hi, last week I just changed my UI code to use GtkAction instead of directly using GtkMenuItem and GtkToolItem. This brought me several advantages and cleaner code. Now I tried the new HildonAppMenu and it looks like it's no longer possible to use GtkAction with it. The HildonAppMenu expect the m