diff options
| author | Tomas Bzatek <tbzatek@tbzatek.englab.brq.redhat.com> | 2009-02-04 15:07:52 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@tbzatek.englab.brq.redhat.com> | 2009-02-04 15:07:52 +0100 |
| commit | 3faae58d3ad5e3121067bca3ba0a0b122e74ae02 (patch) | |
| tree | 78e1ed00691b90e1746c42d4197822f573b6af6e | |
| parent | 303c8216dc6efaef7af0823ee0754fbfeb719989 (diff) | |
| download | nautilus-gdu-3faae58d3ad5e3121067bca3ba0a0b122e74ae02.tar.gz nautilus-gdu-3faae58d3ad5e3121067bca3ba0a0b122e74ae02.tar.xz nautilus-gdu-3faae58d3ad5e3121067bca3ba0a0b122e74ae02.zip | |
Don't close the dialog when an operation is in progress
| -rw-r--r-- | TODO | 5 | ||||
| -rw-r--r-- | src/nautilus-gdu-window.c | 15 |
2 files changed, 18 insertions, 2 deletions
@@ -4,10 +4,10 @@ Short-term: DONE, NEEDS_TESTING - refresh after operation succesfully finished, make Revert button work as expected (need to retrieve GduPresentable again) DONE - PolicyKit integration DONE - Stop button (once PolicyKit integration is done) - - window close action should be ignored (+ Escape, Alt+F4 keybindings...) + DONE - window close action should be ignored (+ Escape, Alt+F4 keybindings...) - simple standalone mode REMOVED - do we need Bootable flag for something? - - make a Fedora package + DONE - make a Fedora package DONE, NEEDS_TESTING - !! set partition type too !! (only for MBR?) OK - check label length before formatting (should be done automatically) -- DK returning wrong values for FAT and NTFS @@ -22,6 +22,7 @@ DONE, NEEDS_TESTING - monitor device/presentable events like eject, umount etc. - stay consistent with volume labels in Nautilus and gdu (requires gvfs-devicekit port) - localization (transifex? -- ask hughsie) - test multihead (need to ref screen of the source nautilus window) +- nautilus integration: be able to spawn the dialog from sidebar Ideas: diff --git a/src/nautilus-gdu-window.c b/src/nautilus-gdu-window.c index a0821f0..91b004d 100644 --- a/src/nautilus-gdu-window.c +++ b/src/nautilus-gdu-window.c @@ -1171,6 +1171,19 @@ cancel_operation (FormatDialogPrivate *priv) g_object_unref (device); } +static gboolean +window_delete_event (GtkWidget *widget, + GdkEvent *event, + FormatDialogPrivate *priv) +{ + g_return_val_if_fail (priv != NULL, FALSE); + if (priv->job_running) { + cancel_operation (priv); + return TRUE; /* consume the event */ + } + return FALSE; +} + static void format_dialog_got_response (GtkDialog *dialog, gint response_id, @@ -1440,6 +1453,8 @@ nautilus_gdu_spawn_dialog (GduPresentable *presentable) // gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, FALSE); + g_signal_connect (priv->dialog, "delete-event", + G_CALLBACK (window_delete_event), priv); /* update sensivity and length of fs label + entry */ g_signal_connect (priv->part_type_combo_box, "changed", G_CALLBACK (type_combo_box_changed), priv); |
