Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Nov. 28, 2005 08:09:57

Diego Z.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

GtkComboBox can't be reset


Hello.

I Noticed an anti-intuitive thing.Once I've selected a value in a combo box, I can't "reset" it (from anuser's POV). Is there a reason not to handle an "esc" press on it tocall ...set_active(this, -1) ? I know I can do it myself in my programs,but IMVHO it should be done by the library.The patch is trivial, I could send it...

BYtE,
Diego.
_______________________________________________
gtk-list mailing list
gtk-list@gnome.orghttp://mail.gnome.org/mailman/listinfo/gtk-list

Offline

#2 Nov. 28, 2005 08:21:24

ibrar a.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

GtkComboBox can't be reset


hello All,
There is any way to show a wizard type interface using gtk.
If hav't found any idea and widget in documentation. So if any body
knows the details information about it then tell me how to create the
wizard type interface in gtk.

Rgards,

Ibrar Ahmed

On 11/28/05, Diego Zuccato <> wrote:
> Hello.
>
> I Noticed an anti-intuitive thing.
> Once I've selected a value in a combo box, I can't "reset" it (from an
> user's POV). Is there a reason not to handle an "esc" press on it to
> call ...set_active(this, -1) ? I know I can do it myself in my programs,
> but IMVHO it should be done by the library.
>
> The patch is trivial, I could send it...
>
> BYtE,
> Diego.
> _______________________________________________
> gtk-list mailing list
> gtk-l***@*nome.org
>http://mail.gnome.org/mailman/listinfo/gtk-list>
_______________________________________________
gtk-list mailing list
gtk-list@gnome.orghttp://mail.gnome.org/mailman/listinfo/gtk-list

Offline

#3 Nov. 28, 2005 10:44:31

Gian M.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

GtkComboBox can't be reset


2005/11/28, Diego Zuccato <>:
> Hello.
>
> I Noticed an anti-intuitive thing.
> Once I've selected a value in a combo box, I can't "reset" it (from an
> user's POV). Is there a reason not to handle an "esc" press on it to
> call ...set_active(this, -1) ? I know I can do it myself in my programs,
> but IMVHO it should be done by the library.
>
> The patch is trivial, I could send it...

Diego,

I think you should open a new bug in bugzilla and send a patch against CVS.

ciao
--
Gian Mario Tagliaretti
PyGTK GUI programminghttp://www.parafernalia.org/pygtk/_______________________________________________
gtk-list mailing list
gtk-list@gnome.orghttp://mail.gnome.org/mailman/listinfo/gtk-list

Offline

#4 Nov. 28, 2005 10:48:11

Gian M.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

GtkComboBox can't be reset


2005/11/28, ibrar ahmed <>:
> hello All,
> There is any way to show a wizard type interface using gtk.
> If hav't found any idea and widget in documentation. So if any body
> knows the details information about it then tell me how to create the
> wizard type interface in gtk.

Ahmed I think you should NOT reply to a topic talking about something
completely different but open a new thread insted, in the meantime
have a look at gnome druid:http://developer.gnome.org/doc/API/2.0/libgnomeui/GnomeDruid.htmlcheers
--
Gian Mario Tagliaretti
PyGTK GUI programminghttp://www.parafernalia.org/pygtk/_______________________________________________
gtk-list mailing list
gtk-list@gnome.orghttp://mail.gnome.org/mailman/listinfo/gtk-list

Offline

#5 Nov. 28, 2005 13:40:39

Diego Z.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

GtkComboBox can't be reset


Benedikt Meurer wrote:I Noticed an anti-intuitive thing.
Once I've selected a value in a combo box, I can't "reset" it (from an
user's POV). Is there a reason not to handle an "esc" press on it to
call ...set_active(this, -1) ? I know I can do it myself in my programs,
but IMVHO it should be done by the library.Why would you want to "reset" a combo box from the user interface? Even
if one ignores the fact that such a change would (possibly) break quite
a lot of applications, it doesn't seem to be very useful at all. If an
application offers a "reset"-state to the user, it'll usually include a
"None"/"Disabled" item in the combobox' model.Then Gtk should ENFORCE that by selecting the first row of the model.I'm using a model filled from a DB and it's quite useful to have thecurrent behaviour PLUS "esc" management. And it's orthogonal (think abox that lets you select an user from a list, or "nothing" to broadcast:now, once you've selected a user you can't rethink and send to all). IMOthe current behaviour is the safest (a row in the model gets accessedonly when the user wants to), and adding "esc" handling shouldn't breakanything. A complete solution would require API changes(gtk_combo_box_set_default_selection() ?) to be done really well, butcalling gtk_combo_box_set_active(this, -1) should be quite safe.BYtE,
Diego.
_______________________________________________
gtk-list mailing list
gtk-list@gnome.orghttp://mail.gnome.org/mailman/listinfo/gtk-list

Offline

#6 Nov. 28, 2005 13:53:20

Benedikt M.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

GtkComboBox can't be reset


Diego Zuccato wrote:
>>> I Noticed an anti-intuitive thing.
>>> Once I've selected a value in a combo box, I can't "reset" it (from an
>>> user's POV). Is there a reason not to handle an "esc" press on it to
>>> call ...set_active(this, -1) ? I know I can do it myself in my programs,
>>> but IMVHO it should be done by the library.
>>
>> Why would you want to "reset" a combo box from the user interface? Even
>> if one ignores the fact that such a change would (possibly) break quite
>> a lot of applications, it doesn't seem to be very useful at all. If an
>> application offers a "reset"-state to the user, it'll usually include a
>> "None"/"Disabled" item in the combobox' model.
>
> Then Gtk should ENFORCE that by selecting the first row of the model.
> I'm using a model filled from a DB and it's quite useful to have the
> current behaviour PLUS "esc" management. And it's orthogonal (think a
> box that lets you select an user from a list, or "nothing" to broadcast:
> now, once you've selected a user you can't rethink and send to all). IMO
> the current behaviour is the safest (a row in the model gets accessed
> only when the user wants to), and adding "esc" handling shouldn't break
> anything. A complete solution would require API changes
> (gtk_combo_box_set_default_selection() ?) to be done really well, but
> calling gtk_combo_box_set_active(this, -1) should be quite safe.

Then it'd be better to add an item "Broadcast to all users". How many
users of your application would assume that selecting "nothing" means
"broadcast to all users" anyway?

Automatically selecting the first item of the model once the model is
set sounds like a sane option (esp. since that's what nearly every
application does right now, as an "empty combobox" is more or less
confusing to the casual user).

> BYtE,
> Diego.

Benedikt
_______________________________________________
gtk-list mailing list
gtk-list@gnome.orghttp://mail.gnome.org/mailman/listinfo/gtk-list

Offline

#7 Nov. 30, 2005 22:23:21

Benedikt M.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

GtkComboBox can't be reset


Diego Zuccato wrote:
> I Noticed an anti-intuitive thing.
> Once I've selected a value in a combo box, I can't "reset" it (from an
> user's POV). Is there a reason not to handle an "esc" press on it to
> call ...set_active(this, -1) ? I know I can do it myself in my programs,
> but IMVHO it should be done by the library.

Why would you want to "reset" a combo box from the user interface? Even
if one ignores the fact that such a change would (possibly) break quite
a lot of applications, it doesn't seem to be very useful at all. If an
application offers a "reset"-state to the user, it'll usually include a
"None"/"Disabled" item in the combobox' model.

> BYtE,
> Diego.

Benedikt
_______________________________________________
gtk-list mailing list
gtk-list@gnome.orghttp://mail.gnome.org/mailman/listinfo/gtk-list

Offline

Board footer

Moderator control

Enjoy the 23rd of January
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support