After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 720788 - Label for VM name does not look editable, but it is
Label for VM name does not look editable, but it is
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: wizard
3.6.x
Other Linux
: Normal normal
: 3.22
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
ui-design
Depends on:
Blocks: 693840
 
 
Reported: 2013-12-19 23:19 UTC by Federico Mena Quintero
Modified: 2016-03-31 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of problematic label (281.92 KB, image/png)
2013-12-19 23:19 UTC, Federico Mena Quintero
  Details
editable-entry.ui : patch for bug 720788, button relief added (926 bytes, patch)
2014-10-06 18:38 UTC, Chitra Singh
needs-work Details | Review
Commit message changed now :) (1.04 KB, patch)
2014-10-11 20:04 UTC, Chitra Singh
needs-work Details | Review
Screenshot showing VM label editable (83.13 KB, image/png)
2014-10-11 20:06 UTC, Chitra Singh
  Details
editable-entry.ui: remove button, expose just GtkEntry to make label for vm look editable (2.09 KB, patch)
2014-11-08 08:07 UTC, Chitra Singh
needs-work Details | Review
editable-entry.vala: remove on_button_click signal handler (895 bytes, patch)
2014-11-08 08:07 UTC, Chitra Singh
rejected Details | Review
Screenshot showing VM label editable(without clicking on the button) (64.06 KB, image/png)
2014-11-08 08:10 UTC, Chitra Singh
  Details

Description Federico Mena Quintero 2013-12-19 23:19:00 UTC
This comes from bug #693840.

In the Login section of the Customize mode for a VM, there is a label with the VM's name.  You can click on that label and edit the VM's name to your liking.

However, the VM's name doesn't look at all like it is in an editable entry.  It is by chance that I discovered that I could click it, and edit the name.

If it is editable, it should look editable, just like any other normal entry :)
Comment 1 Federico Mena Quintero 2013-12-19 23:19:34 UTC
Created attachment 264590 [details]
Screenshot of problematic label
Comment 2 Chitra Singh 2014-10-06 18:38:57 UTC
Created attachment 287878 [details] [review]
editable-entry.ui : patch for bug 720788, button relief added
Comment 3 Zeeshan Ali 2014-10-06 19:43:06 UTC
Review of attachment 287878 [details] [review]:

Thanks for the patch Chitra. In the commit log, you need to specify what the patch does and why its needed. You can follow the guidelines here: https://wiki.gnome.org/Git/CommitMessages (there is also a checklist). Please see other commits in the repository for real-world examples.
Comment 4 Chitra Singh 2014-10-11 20:04:17 UTC
Created attachment 288287 [details] [review]
Commit message changed now :)
Comment 5 Chitra Singh 2014-10-11 20:06:55 UTC
Created attachment 288289 [details]
Screenshot showing VM label editable

The button when clicked, lets you change the name of the VM. Relief property to button added.
Comment 6 Lasse Schuirmann 2014-10-11 22:18:05 UTC
Review of attachment 288287 [details] [review]:

It would be nice if a designer could give some feedback on this. I'm not sure if we want to have a button there at all but just a text field. (At least in the window.) The button does make clear that you can do something with it but it is nothing else than editable content. We have text fields for this, right? Why do we try to reinvent the wheel in a manner that makes us inconsistent with the rest of gnome?

::: data/ui/editable-entry.ui
@@ +21,3 @@
         <property name="visible">True</property>
         <property name="receives_default">True</property>
+        <property name="relief">GTK_RELIEF_NORMAL</property>

According to https://developer.gnome.org/gtk3/stable/GtkButton.html#gtk-button-set-relief GTK_RELIEF_NORMAL is the default value. So this line is redundant. Less code is usually better because its less work to maintain ;)
Comment 7 Zeeshan Ali 2014-10-11 23:21:15 UTC
Review of attachment 288287 [details] [review]:

> I'm not sure if we want to have a button there at all but just a text field. 

This is based on (original) design mockups. But true that we probably want designer input if this patch isn't helping anything or we don't know any simple way to solve this bug.
Comment 8 Jakub Steiner 2014-10-14 15:01:09 UTC
Judging from the general layout and having things like URI and virtualizer in the properties' *login* section, I wouldn't want to locate what design you're referring to.

I think for the short term, I'd stick with having an entry. I really don't understand the benefit of having "editable button".

This will be properly addressed in the modal properties design as per bug #733367
Comment 9 Zeeshan Ali 2014-10-14 19:28:43 UTC
(In reply to comment #8)
> Judging from the general layout and having things like URI and virtualizer in
> the properties' *login* section, I wouldn't want to locate what design you're
> referring to.

Hmm.. I think it might have been just that Marc-Andre used the same widget for 'Add password' button on wizard's setup page and here.

> I think for the short term, I'd stick with having an entry. I really don't
> understand the benefit of having "editable button".

Sure. Chitra, you now know what to do exactly. :)

> This will be properly addressed in the modal properties design as per bug
> #733367

That bug is only about putting properties in a separate window/dialog so we'll want another bug (or use this one) for changing the contents of properties pages.
Comment 10 Chitra Singh 2014-11-08 08:07:31 UTC
Created attachment 290209 [details] [review]
editable-entry.ui: remove button, expose just GtkEntry to make label for vm look editable

Remove GtkButton, move the button's child 'button_label' to
GtkEntry's child. This is to enable the entry to look editable,
so that user doesn't click on button to edit.
Comment 11 Chitra Singh 2014-11-08 08:07:55 UTC
Created attachment 290210 [details] [review]
editable-entry.vala: remove on_button_click signal handler

Removed button from boxes editable entry, hence no signal handler
needed for the button.
Comment 12 Chitra Singh 2014-11-08 08:10:56 UTC
Created attachment 290211 [details]
Screenshot showing VM label editable(without clicking on the button)

The gtkentry directly shows up without clicking on the button as before.
Comment 13 Chitra Singh 2014-11-08 08:12:58 UTC
(In reply to comment #10)
> Created an attachment (id=290209) [details] [review]
> editable-entry.ui: remove button, expose just GtkEntry to make label for vm
> look editable
> 
> Remove GtkButton, move the button's child 'button_label' to
> GtkEntry's child. This is to enable the entry to look editable,
> so that user doesn't click on button to edit.


Although I retained the functionality, I get the following message when I run Boxes after this patch.
(gnome-boxes:6157): Gtk-CRITICAL **: gtk_buildable_add_child: assertion 'iface->add_child != NULL' failed
Comment 14 Chitra Singh 2014-11-08 08:14:22 UTC
(In reply to comment #11)
> Created an attachment (id=290210) [details] [review]
> editable-entry.vala: remove on_button_click signal handler
> 
> Removed button from boxes editable entry, hence no signal handler
> needed for the button.

Removing the GtkButton renders the enum entry BUTTON useless, but not removed it.
Comment 15 Zeeshan Ali 2014-11-08 13:03:37 UTC
Review of attachment 290209 [details] [review]:

Firstly, shortlog is supposed to be very short (<= 50 chars) and prefix isn't supposed to be the whole filename.

Secondly, you are working on the wrong module. EditableEntry is used elsewhere too and we only want to replace it in one place. So this patch should simply be replacing that particular usage of EditableEntry with a GtkEntry.
Comment 16 Zeeshan Ali 2014-11-08 13:04:16 UTC
Review of attachment 290210 [details] [review]:

same here. I think we can simply drop this one.
Comment 17 Zeeshan Ali 2015-02-18 14:42:36 UTC
commit: 32576729cc04627c328c34e69c27b964b4f15c5d

    i-props-provider: Separate property for editable strings
    
    Lets have a separate property for Editable strings and use simple labels
    for nonmutable string properties.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=720788

commit: ae4d4695c7bbb9297cfb8ed04dd66ff6051174b6

    i-props-provider: Use entry for editable strings
    
    Instead of using our custom EditableEntry that shows a button to edit,
    lets just use simple text entry.
    
commit: 441946c828fcdca3fd0ebc557dd8dbe07fc90571

    i-props-provider: String change always succeeds
    
    We are no longer watching for failures in change of an editable string
    property and none of the users of this API makes use of this functionality
    anyway so no reason for EditableStringProperty.changed() to return
    boolean.