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 670539 - Misc fixes
Misc fixes
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-02-21 13:09 UTC by Marc-Andre Lureau
Modified: 2016-03-31 13:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add some debug messages related to deletion (1.67 KB, patch)
2012-02-21 13:28 UTC, Marc-Andre Lureau
reviewed Details | Review
Remove some warnings when deleting machine (5.79 KB, patch)
2012-02-21 13:29 UTC, Marc-Andre Lureau
reviewed Details | Review
First start experience improvement (3.52 KB, patch)
2012-02-21 13:29 UTC, Marc-Andre Lureau
accepted-commit_now Details | Review
Do not mix draw_id and cursor_id (1.07 KB, patch)
2012-02-21 13:29 UTC, Marc-Andre Lureau
accepted-commit_now Details | Review
Fix a connection race and code silliness (4.12 KB, patch)
2012-02-21 13:30 UTC, Marc-Andre Lureau
accepted-commit_now Details | Review

Description Marc-Andre Lureau 2012-02-21 13:09:01 UTC
Fix a few warnings and add some debugging
Comment 1 Marc-Andre Lureau 2012-02-21 13:28:07 UTC
Created attachment 208109 [details] [review]
Add some debug messages related to deletion
Comment 2 Marc-Andre Lureau 2012-02-21 13:29:33 UTC
Created attachment 208110 [details] [review]
Remove some warnings when deleting machine

Remove two kinds of warnings when a Box is deleted:
- disconnect machine ui-state handler to not stop screenshot from
  happening
- do not attempt to undefine and remove storage in vm-creator if
  already done

The patch also adds some debugging.
Comment 3 Marc-Andre Lureau 2012-02-21 13:29:42 UTC
Created attachment 208111 [details] [review]
First start experience improvement

Currently, when the user starts Boxes for the first time, he ends up
in an empty collection without message on what to do. Instead,
starting with the Wizard is slightly better. Proposed patch attached.

Note: there is no yet final decision from the design team on what
should be done, but only one line of the proposed patch is actually
implementing the first-time experience policy, and thus could easily
be changed if needed.
Comment 4 Marc-Andre Lureau 2012-02-21 13:29:56 UTC
Created attachment 208112 [details] [review]
Do not mix draw_id and cursor_id

This avoid warnings if disconnecting wrong handler in remove_display()
Comment 5 Marc-Andre Lureau 2012-02-21 13:30:02 UTC
Created attachment 208113 [details] [review]
Fix a connection race and code silliness

I noticed a bug when a VM is started, it may receive two connections
very quickly, but since channel events are asynchrnous, we would
disconnect and hide the display, even if the second connection
succeeded.

The current code is silly, trying to connect automatically when needed
when the _connect_display member is set.

Get rid of that, and make sure we try to connect only once. Do not
connect/disconnect/reconnect etc..
Comment 6 Zeeshan Ali 2012-02-21 18:00:06 UTC
Review of attachment 208109 [details] [review]:

ACK otherwise!

::: src/app.vala
@@ -482,2 +482,2 @@
         Notificationbar.OKFunc undo = () => {
-            foreach (var selected in selected_items)
+            debug ("delete undo");

"Box deletion cancelled by user, re-adding to view.."

@@ -487,1 +489,2 @@
         Notificationbar.CancelFunc really_remove = () => {
+            debug ("delete really");

"Box deletion not cancelled by user, actually deleting it now.."
Comment 7 Zeeshan Ali 2012-02-21 18:00:44 UTC
Review of attachment 208109 [details] [review]:

ACK otherwise!

::: src/app.vala
@@ -482,2 +482,2 @@
         Notificationbar.OKFunc undo = () => {
-            foreach (var selected in selected_items)
+            debug ("delete undo");

"Box deletion cancelled by user, re-adding to view.."

@@ -487,1 +489,2 @@
         Notificationbar.CancelFunc really_remove = () => {
+            debug ("delete really");

"Box deletion not cancelled by user, actually deleting it now.."
Comment 8 Zeeshan Ali 2012-02-21 18:01:00 UTC
Review of attachment 208109 [details] [review]:

ACK otherwise!

::: src/app.vala
@@ -482,2 +482,2 @@
         Notificationbar.OKFunc undo = () => {
-            foreach (var selected in selected_items)
+            debug ("delete undo");

"Box deletion cancelled by user, re-adding to view.."

@@ -487,1 +489,2 @@
         Notificationbar.CancelFunc really_remove = () => {
+            debug ("delete really");

"Box deletion not cancelled by user, actually deleting it now.."
Comment 9 Zeeshan Ali 2012-02-21 20:04:13 UTC
Review of attachment 208110 [details] [review]:

- disconnect machine ui-state handler to not stop screenshot from
happening


Wouldn't you agree that this part should be in a separate patch?

::: src/libvirt-machine.vala
@@ -229,2 +230,3 @@
     private void set_stats_enable (bool enable) {
         if (enable) {
+            debug ("enable stats");

"disabled statistics for '%s", name
Comment 10 Zeeshan Ali 2012-02-21 20:17:05 UTC
Review of attachment 208110 [details] [review]:

Ack otherwise!
Comment 11 Zeeshan Ali 2012-02-21 21:04:05 UTC
Review of attachment 208111 [details] [review]:

Good idea! ACK!
Comment 12 Zeeshan Ali 2012-02-21 21:05:57 UTC
Review of attachment 208112 [details] [review]:

ACK!

::: src/display-page.vala
@@ -178,2 +178,3 @@
-        cursor_id = display.draw.connect (() => {
-            display.disconnect (cursor_id);
+        ulong draw_id = 0;
+        draw_id = display.draw.connect (() => {
+            display.disconnect (draw_id);

'if (draw_id == 0)' not needed?
Comment 13 Zeeshan Ali 2012-02-21 21:09:28 UTC
Review of attachment 208113 [details] [review]:

Looks good, ACK if you have tested it.

::: src/machine.vala
@@ -64,1 +64,2 @@
             disconnected_id = _display.disconnected.connect (() => {
+                message ("display disconnected");

machine name in message might make it more useful