[gnome-disk-utility] Clean up menu items



commit 84396272e16c3d0f9c6473a12306b63daafebfe7
Author: David Zeuthen <davidz redhat com>
Date:   Mon Dec 7 15:28:31 2009 -0500

    Clean up menu items
    
    Also delete a lot of code no longer used.

 src/palimpsest/gdu-shell.c |  740 +-------------------------------------------
 1 files changed, 7 insertions(+), 733 deletions(-)
---
diff --git a/src/palimpsest/gdu-shell.c b/src/palimpsest/gdu-shell.c
index 5ce4cdc..c7512e0 100644
--- a/src/palimpsest/gdu-shell.c
+++ b/src/palimpsest/gdu-shell.c
@@ -404,687 +404,6 @@ presentable_removed (GduPool *pool, GduPresentable *presentable, gpointer user_d
         gdu_shell_update (shell);
 }
 
-typedef struct {
-        GduShell *shell;
-        GduPresentable *presentable;
-} ShellPresentableData;
-
-static ShellPresentableData *
-shell_presentable_new (GduShell *shell, GduPresentable *presentable)
-{
-        ShellPresentableData *data;
-        data = g_new0 (ShellPresentableData, 1);
-        data->shell = g_object_ref (shell);
-        data->presentable = g_object_ref (presentable);
-        return data;
-}
-
-static void
-shell_presentable_free (ShellPresentableData *data)
-{
-        g_object_unref (data->shell);
-        g_object_unref (data->presentable);
-        g_free (data);
-}
-
-static void
-fsck_op_callback (GduDevice *device,
-                  gboolean   is_clean,
-                  GError    *error,
-                  gpointer   user_data)
-{
-        ShellPresentableData *data = user_data;
-        if (error != NULL) {
-                gdu_shell_raise_error (data->shell,
-                                       data->presentable,
-                                       error,
-                                       _("Error checking file system on device"));
-                g_error_free (error);
-        } else {
-                GtkWidget *dialog;
-                char *name;
-                GIcon *icon;
-
-                name = gdu_presentable_get_name (data->presentable);
-                icon = gdu_presentable_get_icon (data->presentable);
-
-                dialog = gtk_message_dialog_new (
-                        GTK_WINDOW (data->shell->priv->app_window),
-                        GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
-                        is_clean ? GTK_MESSAGE_INFO : GTK_MESSAGE_WARNING,
-                        GTK_BUTTONS_CLOSE,
-                        _("File system check on \"%s\" completed"),
-                        name);
-                if (is_clean)
-                        gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
-                                                                  _("File system is clean."));
-                else
-                        gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
-                                                                  _("File system is <b>NOT</b> clean."));
-
-                gtk_window_set_title (GTK_WINDOW (dialog), name);
-                // TODO: no support for GIcon in GtkWindow
-                //gtk_window_set_icon_name (GTK_WINDOW (dialog), icon_name);
-
-                g_signal_connect_swapped (dialog,
-                                          "response",
-                                          G_CALLBACK (gtk_widget_destroy),
-                                          dialog);
-                gtk_window_present (GTK_WINDOW (dialog));
-
-                g_free (name);
-                if (icon != NULL)
-                        g_object_unref (icon);
-        }
-        shell_presentable_free (data);
-}
-
-static void
-fsck_action_callback (GtkAction *action, gpointer user_data)
-{
-        GduShell *shell = GDU_SHELL (user_data);
-        GduDevice *device;
-
-        device = gdu_presentable_get_device (shell->priv->presentable_now_showing);
-        if (device != NULL) {
-                gdu_device_op_filesystem_check (device,
-                                                fsck_op_callback,
-                                                shell_presentable_new (shell, shell->priv->presentable_now_showing));
-                g_object_unref (device);
-        }
-}
-
-static void
-mount_op_callback (GduDevice *device,
-                   char      *mount_point,
-                   GError    *error,
-                   gpointer   user_data)
-{
-        ShellPresentableData *data = user_data;
-        if (error != NULL) {
-                gdu_shell_raise_error (data->shell,
-                                       data->presentable,
-                                       error,
-                                       _("Error mounting device"));
-                g_error_free (error);
-        } else {
-                g_free (mount_point);
-        }
-        shell_presentable_free (data);
-}
-
-static void
-mount_action_callback (GtkAction *action, gpointer user_data)
-{
-        GduShell *shell = GDU_SHELL (user_data);
-        GduDevice *device;
-
-        device = gdu_presentable_get_device (shell->priv->presentable_now_showing);
-        if (device != NULL) {
-                gdu_device_op_filesystem_mount (device,
-                                                NULL,
-                                                mount_op_callback,
-                                                shell_presentable_new (shell, shell->priv->presentable_now_showing));
-                g_object_unref (device);
-        }
-}
-
-static gboolean unmount_show_busy (gpointer user_data);
-
-static void
-unmount_op_callback (GduDevice *device,
-                     GError    *error,
-                     gpointer   user_data)
-{
-        ShellPresentableData *data = user_data;
-        if (error != NULL) {
-                if (error->domain == GDU_ERROR && error->code == GDU_ERROR_BUSY) {
-                        /* show dialog in idle so the job-spinner can be hidden */
-                        g_idle_add (unmount_show_busy, data);
-                        g_error_free (error);
-                } else {
-                        gdu_shell_raise_error (data->shell,
-                                               data->presentable,
-                                               error,
-                                               _("Error unmounting device"));
-                        g_error_free (error);
-                        shell_presentable_free (data);
-                }
-        } else {
-                shell_presentable_free (data);
-        }
-}
-
-static gboolean
-unmount_show_busy (gpointer user_data)
-{
-        ShellPresentableData *data = user_data;
-        if (gdu_util_dialog_show_filesystem_busy (gdu_shell_get_toplevel (data->shell), data->presentable)) {
-                /* user managed to kill all applications; try again */
-                GduDevice *device;
-                device = gdu_presentable_get_device (data->presentable);
-                if (device != NULL) {
-                        gdu_device_op_filesystem_unmount (device,
-                                                          unmount_op_callback,
-                                                          shell_presentable_new (data->shell, data->presentable));
-                        g_object_unref (device);
-                }
-        }
-        shell_presentable_free (data);
-        return FALSE;
-}
-
-static void
-unmount_action_callback (GtkAction *action, gpointer user_data)
-{
-        GduShell *shell = GDU_SHELL (user_data);
-        GduDevice *device;
-
-        device = gdu_presentable_get_device (shell->priv->presentable_now_showing);
-        if (device != NULL) {
-                gdu_device_op_filesystem_unmount (device,
-                                                  unmount_op_callback,
-                                                  shell_presentable_new (shell, shell->priv->presentable_now_showing));
-                g_object_unref (device);
-        }
-}
-
-
-static void
-eject_op_callback (GduDevice *device,
-                   GError    *error,
-                   gpointer   user_data)
-{
-        ShellPresentableData *data = user_data;
-        if (error != NULL) {
-                gdu_shell_raise_error (data->shell,
-                                       data->presentable,
-                                       error,
-                                       _("Error ejecting device"));
-                g_error_free (error);
-        }
-        shell_presentable_free (data);
-}
-
-static void
-eject_action_callback (GtkAction *action, gpointer user_data)
-{
-        GduShell *shell = GDU_SHELL (user_data);
-        GduDevice *device;
-
-        device = gdu_presentable_get_device (shell->priv->presentable_now_showing);
-        if (device != NULL) {
-                gdu_device_op_drive_eject (device,
-                                           eject_op_callback,
-                                           shell_presentable_new (shell, shell->priv->presentable_now_showing));
-                g_object_unref (device);
-        }
-}
-
-static void
-detach_op_callback (GduDevice *device,
-                    GError    *error,
-                    gpointer   user_data)
-{
-        ShellPresentableData *data = user_data;
-        if (error != NULL) {
-                gdu_shell_raise_error (data->shell,
-                                       data->presentable,
-                                       error,
-                                       _("Error detaching device"));
-                g_error_free (error);
-        }
-        shell_presentable_free (data);
-}
-
-static void
-detach_action_callback (GtkAction *action, gpointer user_data)
-{
-        GduShell *shell = GDU_SHELL (user_data);
-        GduDevice *device;
-
-        device = gdu_presentable_get_device (shell->priv->presentable_now_showing);
-        if (device != NULL) {
-                gdu_device_op_drive_detach (device,
-                                            detach_op_callback,
-                                            shell_presentable_new (shell, shell->priv->presentable_now_showing));
-                g_object_unref (device);
-        }
-}
-
-
-static void unlock_action_do (GduShell *shell,
-                              GduPresentable *presentable,
-                              GduDevice *device,
-                              gboolean bypass_keyring,
-                              gboolean indicate_wrong_passphrase);
-
-typedef struct {
-        GduShell *shell;
-        GduPresentable *presentable;
-        gboolean asked_user;
-} UnlockData;
-
-static UnlockData *
-unlock_data_new (GduShell *shell, GduPresentable *presentable, gboolean asked_user)
-{
-        UnlockData *data;
-        data = g_new0 (UnlockData, 1);
-        data->shell = g_object_ref (shell);
-        data->presentable = g_object_ref (presentable);
-        data->asked_user = asked_user;
-        return data;
-}
-
-static void
-unlock_data_free (UnlockData *data)
-{
-        g_object_unref (data->shell);
-        g_object_unref (data->presentable);
-        g_free (data);
-}
-
-static gboolean
-unlock_retry (gpointer user_data)
-{
-        UnlockData *data = user_data;
-        GduDevice *device;
-        gboolean indicate_wrong_passphrase;
-
-        device = gdu_presentable_get_device (data->presentable);
-        if (device != NULL) {
-                indicate_wrong_passphrase = FALSE;
-
-                if (!data->asked_user) {
-                        /* if we attempted to unlock the device without asking the user
-                         * then the password must have come from the keyring.. hence,
-                         * since we failed, the password in the keyring is bad. Remove
-                         * it.
-                         */
-                        g_warning ("removing bad password from keyring");
-                        gdu_util_delete_secret (device);
-                } else {
-                        /* we did ask the user on the last try and that passphrase
-                         * didn't work.. make sure the new dialog tells him that
-                         */
-                        indicate_wrong_passphrase = TRUE;
-                }
-
-                unlock_action_do (data->shell, data->presentable, device, TRUE, indicate_wrong_passphrase);
-                g_object_unref (device);
-        }
-        unlock_data_free (data);
-        return FALSE;
-}
-
-static void
-unlock_op_cb (GduDevice *device,
-              char      *object_path_of_cleartext_device,
-              GError    *error,
-              gpointer   user_data)
-{
-        UnlockData *data = user_data;
-        if (error != NULL && error->code == GDU_ERROR_INHIBITED) {
-                gdu_shell_raise_error (data->shell,
-                                       data->presentable,
-                                       error,
-                                       _("Error unlocking device"));
-                g_error_free (error);
-        } else if (error != NULL) {
-                /* retry in idle so the job-spinner can be hidden */
-                g_idle_add (unlock_retry, data);
-                g_error_free (error);
-        } else {
-                unlock_data_free (data);
-                g_free (object_path_of_cleartext_device);
-        }
-}
-
-static void
-unlock_action_do (GduShell *shell,
-                  GduPresentable *presentable,
-                  GduDevice *device,
-                  gboolean bypass_keyring,
-                  gboolean indicate_wrong_passphrase)
-{
-        char *secret;
-        gboolean asked_user;
-
-        secret = gdu_util_dialog_ask_for_secret (shell->priv->app_window,
-                                                 presentable,
-                                                 bypass_keyring,
-                                                 indicate_wrong_passphrase,
-                                                 &asked_user);
-        if (secret != NULL) {
-                gdu_device_op_luks_unlock (device,
-                                                secret,
-                                                unlock_op_cb,
-                                                unlock_data_new (shell,
-                                                                 shell->priv->presentable_now_showing,
-                                                                 asked_user));
-
-                /* scrub the password */
-                memset (secret, '\0', strlen (secret));
-                g_free (secret);
-        }
-}
-
-static void
-unlock_action_callback (GtkAction *action, gpointer user_data)
-{
-        GduShell *shell = GDU_SHELL (user_data);
-        GduDevice *device;
-
-        device = gdu_presentable_get_device (shell->priv->presentable_now_showing);
-        if (device != NULL) {
-                unlock_action_do (shell, shell->priv->presentable_now_showing, device, FALSE, FALSE);
-                g_object_unref (device);
-        }
-}
-
-static void
-lock_op_callback (GduDevice *device,
-                  GError    *error,
-                  gpointer   user_data)
-{
-        ShellPresentableData *data = user_data;
-
-        if (error != NULL) {
-                gdu_shell_raise_error (data->shell,
-                                       data->presentable,
-                                       error,
-                                       _("Error locking encrypted device"));
-                g_error_free (error);
-        }
-        shell_presentable_free (data);
-}
-
-static void
-lock_action_callback (GtkAction *action, gpointer user_data)
-{
-        GduShell *shell = GDU_SHELL (user_data);
-        GduDevice *device;
-
-        device = gdu_presentable_get_device (shell->priv->presentable_now_showing);
-        if (device != NULL) {
-                gdu_device_op_luks_lock (device,
-                                              lock_op_callback,
-                                              shell_presentable_new (shell, shell->priv->presentable_now_showing));
-                g_object_unref (device);
-        }
-}
-
-static void
-start_cb (GduDrive *ad,
-          char *assembled_array_object_path,
-          GError *error,
-          gpointer user_data)
-{
-        GduShell *shell = GDU_SHELL (user_data);
-
-        if (error != NULL) {
-                GtkWidget *dialog;
-
-                dialog = gtk_message_dialog_new (
-                        GTK_WINDOW (shell->priv->app_window),
-                        GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
-                        GTK_MESSAGE_ERROR,
-                        GTK_BUTTONS_CLOSE,
-                        _("There was an error starting the drive \"%s\"."),
-                        gdu_presentable_get_name (GDU_PRESENTABLE (ad)));
-
-                gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", error->message);
-                gtk_dialog_run (GTK_DIALOG (dialog));
-                gtk_widget_destroy (dialog);
-
-                g_error_free (error);
-                goto out;
-        } else {
-                g_free (assembled_array_object_path);
-        }
-
-out:
-        g_object_unref (shell);
-}
-
-static void
-start_action_callback (GtkAction *action, gpointer user_data)
-{
-        GduShell *shell = GDU_SHELL (user_data);
-        GduDrive *drive;
-        gboolean can_activate;
-        gboolean degraded;
-
-        if (!GDU_IS_DRIVE (shell->priv->presentable_now_showing) ||
-            !gdu_drive_is_activatable (GDU_DRIVE (shell->priv->presentable_now_showing))) {
-                g_warning ("presentable is not an activatable drive");
-                goto out;
-        }
-
-        drive = GDU_DRIVE (shell->priv->presentable_now_showing);
-
-        if (gdu_drive_is_active (drive)) {
-                g_warning ("drive already running; refusing to activate it");
-                goto out;
-        }
-
-        can_activate = gdu_drive_can_activate (drive, &degraded);
-        if (!can_activate) {
-                g_warning ("cannot activate drive");
-                goto out;
-        }
-
-        /* ask for consent before activating in degraded mode */
-        if (degraded) {
-                GtkWidget *dialog;
-                int response;
-
-                dialog = gtk_message_dialog_new (
-                        GTK_WINDOW (shell->priv->app_window),
-                        GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
-                        GTK_MESSAGE_WARNING,
-                        GTK_BUTTONS_CANCEL,
-                        _("Are you sure you want to start the drive \"%s\" in degraded mode ?"),
-                        gdu_presentable_get_name (GDU_PRESENTABLE (drive)));
-
-                gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
-                                                          _("Starting a RAID array in degraded mode means that "
-                                                            "the RAID volume is no longer tolerant to drive "
-                                                            "failures. Data on the volume may be irrevocably "
-                                                            "lost if a drive fails."));
-
-                gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Start Array"), 0);
-
-                response = gtk_dialog_run (GTK_DIALOG (dialog));
-                gtk_widget_destroy (dialog);
-                if (response != 0)
-                        goto out;
-        }
-
-        gdu_drive_activate (drive,
-                            start_cb,
-                            g_object_ref (shell));
-out:
-        ;
-}
-
-static void
-stop_cb (GduDrive *drive, GError *error, gpointer user_data)
-{
-        GduShell *shell = GDU_SHELL (user_data);
-
-        if (error != NULL) {
-                GtkWidget *dialog;
-
-                dialog = gtk_message_dialog_new (
-                        GTK_WINDOW (shell->priv->app_window),
-                        GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
-                        GTK_MESSAGE_ERROR,
-                        GTK_BUTTONS_CLOSE,
-                        _("There was an error stopping the drive \"%s\"."),
-                        gdu_presentable_get_name (GDU_PRESENTABLE (drive)));
-
-                gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", error->message);
-                gtk_dialog_run (GTK_DIALOG (dialog));
-                gtk_widget_destroy (dialog);
-
-                g_error_free (error);
-                goto out;
-        }
-
-out:
-        g_object_unref (shell);
-}
-
-static void
-stop_action_callback (GtkAction *action, gpointer user_data)
-{
-        GduShell *shell = GDU_SHELL (user_data);
-        GduDrive *drive;
-
-        if (!GDU_IS_DRIVE (shell->priv->presentable_now_showing) ||
-            !gdu_drive_is_activatable (GDU_DRIVE (shell->priv->presentable_now_showing))) {
-                g_warning ("presentable is not an activatable drive");
-                goto out;
-        }
-
-        drive = GDU_DRIVE (shell->priv->presentable_now_showing);
-
-        if (!gdu_drive_can_deactivate (drive)) {
-                g_warning ("activatable drive isn't running; refusing to deactivate it");
-                goto out;
-        }
-
-        gdu_drive_deactivate (drive,
-                              stop_cb,
-                              g_object_ref (shell));
-out:
-        ;
-}
-
-static void
-op_erase_callback (GduDevice *device,
-                   GError *error,
-                   gpointer user_data)
-{
-        ShellPresentableData *data = user_data;
-
-        if (error != NULL) {
-                gdu_shell_raise_error (data->shell,
-                                       data->presentable,
-                                       error,
-                                       _("Error erasing data"));
-                g_error_free (error);
-        }
-
-        shell_presentable_free (data);
-}
-
-static void
-erase_action_callback (GtkAction *action, gpointer user_data)
-{
-        GduShell *shell = GDU_SHELL (user_data);
-        GduPresentable *presentable;
-        GduDevice *device;
-        GduPresentable *toplevel_presentable;
-        GduDevice *toplevel_device;
-        gchar *drive_name;
-        gchar *primary;
-        gchar *secondary;
-        gboolean do_erase;
-
-        device = NULL;
-        drive_name = NULL;
-        primary = NULL;
-        secondary = NULL;
-        toplevel_presentable = NULL;
-        toplevel_device = NULL;
-
-        presentable = shell->priv->presentable_now_showing;
-        if (presentable == NULL) {
-                g_warning ("%s: no presentable", __FUNCTION__);
-                goto out;
-        }
-
-        device = gdu_presentable_get_device (shell->priv->presentable_now_showing);
-        if (device == NULL) {
-                g_warning ("%s: no device", __FUNCTION__);
-                goto out;
-        }
-
-        toplevel_presentable = gdu_presentable_get_toplevel (presentable);
-        if (toplevel_presentable == NULL) {
-                g_warning ("%s: no toplevel presentable",  __FUNCTION__);
-                goto out;
-        }
-        toplevel_device = gdu_presentable_get_device (toplevel_presentable);
-        if (toplevel_device == NULL) {
-                g_warning ("%s: no device for toplevel presentable",  __FUNCTION__);
-                goto out;
-        }
-
-        drive_name = gdu_presentable_get_name (toplevel_presentable);
-
-        primary = g_strconcat ("<b><big>", _("Are you sure you want to erase the device ?"), "</big></b>", NULL);
-
-        if (gdu_device_is_partition (device)) {
-                if (gdu_device_is_removable (toplevel_device)) {
-                        secondary = g_strdup_printf (_("All data on partition %d on the media in \"%s\" will be "
-                                                       "irrevocably erased. "
-                                                       "Make sure important data is backed up. "
-                                                       "This action cannot be undone."),
-                                                     gdu_device_partition_get_number (device),
-                                                     drive_name);
-                } else {
-                        secondary = g_strdup_printf (_("All data on partition %d of \"%s\" will be "
-                                                       "irrevocably erased. "
-                                                       "Make sure important data is backed up. "
-                                                       "This action cannot be undone."),
-                                                     gdu_device_partition_get_number (device),
-                                                     drive_name);
-                }
-        } else {
-                if (gdu_device_is_removable (toplevel_device)) {
-                        secondary = g_strdup_printf (_("All data on the media in \"%s\" will be irrevocably erased. "
-                                                       "Make sure important data is backed up. "
-                                                       "This action cannot be undone."),
-                                                     drive_name);
-                } else {
-                        secondary = g_strdup_printf (_("All data on the drive \"%s\" will be irrevocably erased. "
-                                                       "Make sure important data is backed up. "
-                                                       "This action cannot be undone."),
-                                                     drive_name);
-                }
-        }
-
-        do_erase = gdu_util_delete_confirmation_dialog (gdu_shell_get_toplevel (shell),
-                                                        "",
-                                                        primary,
-                                                        secondary,
-                                                        _("_Erase"));
-        if (do_erase) {
-                gdu_device_op_filesystem_create (device,
-                                                 "empty",
-                                                 "",
-                                                 NULL,
-                                                 FALSE,
-                                                 op_erase_callback,
-                                                 shell_presentable_new (shell, presentable));
-        }
-
-out:
-        g_free (secondary);
-        g_free (primary);
-        g_free (drive_name);
-        if (toplevel_presentable != NULL)
-                g_object_unref (toplevel_presentable);
-        if (toplevel_device != NULL)
-                g_object_unref (toplevel_device);
-        if (device != NULL)
-                g_object_unref (device);
-}
-
-
 static void
 help_contents_action_callback (GtkAction *action, gpointer user_data)
 {
@@ -1401,7 +720,7 @@ about_action_callback (GtkAction *action, gpointer user_data)
         gtk_show_about_dialog (GTK_WINDOW (shell->priv->app_window),
                                "program-name", _("Disk Utility"),
                                "version", VERSION,
-                               "copyright", "\xc2\xa9 2008 Red Hat, Inc.",
+                               "copyright", "\xc2\xa9 2007-2009 Red Hat, Inc.",
                                "authors", authors,
                                "artists", artists,
                                "translator-credits", _("translator-credits"),
@@ -1415,72 +734,27 @@ static const gchar *ui =
         "<ui>"
         "  <menubar>"
         "    <menu action='file'>"
-        "      <menu action='file-new'>"
-        "        <menuitem action='file-new-linux-md-array'/>"
-        "      </menu>"
         "      <menuitem action='file-connect'/>"
+        "      <menu action='file-create'>"
+        "        <menuitem action='file-create-linux-md-array'/>"
+        "      </menu>"
         "      <menuitem action='quit'/>"
         "    </menu>"
-#if 0
-        "    <menu action='edit'>"
-        "      <menuitem action='mount'/>"
-        "      <menuitem action='unmount'/>"
-        "      <menuitem action='eject'/>"
-        "      <menuitem action='detach'/>"
-        "      <separator/>"
-        "      <menuitem action='fsck'/>"
-        "      <separator/>"
-        "      <menuitem action='unlock'/>"
-        "      <menuitem action='lock'/>"
-        "      <separator/>"
-        "      <menuitem action='start'/>"
-        "      <menuitem action='stop'/>"
-        "      <separator/>"
-        "      <menuitem action='erase'/>"
-        "    </menu>"
-#endif
         "    <menu action='help'>"
         "      <menuitem action='contents'/>"
         "      <menuitem action='about'/>"
         "    </menu>"
         "  </menubar>"
-        "  <toolbar>"
-        "    <toolitem action='mount'/>"
-        "    <toolitem action='unmount'/>"
-        "    <toolitem action='eject'/>"
-        "    <toolitem action='detach'/>"
-        "    <separator/>"
-        "    <toolitem action='fsck'/>"
-        "    <separator/>"
-        "    <toolitem action='unlock'/>"
-        "    <toolitem action='lock'/>"
-        "    <separator/>"
-        "    <toolitem action='start'/>"
-        "    <toolitem action='stop'/>"
-        "    <separator/>"
-        "    <toolitem action='erase'/>"
-        "  </toolbar>"
         "</ui>";
 
 static GtkActionEntry entries[] = {
         {"file", NULL, N_("_File"), NULL, NULL, NULL },
-        {"file-connect", "gtk-connect", N_("_Connect to server"), NULL, N_("Connect to a remote server and manage disks"), G_CALLBACK (on_file_connect_action)},
-        {"file-new", NULL, N_("_New"), NULL, NULL, NULL },
-        {"file-new-linux-md-array", "gdu-raid-array", N_("Software _RAID Array"), NULL, N_("Create a new Software RAID array"), G_CALLBACK (new_linux_md_array_callback)},
+        {"file-connect", "gtk-connect", N_("Connect to _Server..."), NULL, N_("Manage storage devices on another machine"), G_CALLBACK (on_file_connect_action)},
+        {"file-create", NULL, N_("_Create"), NULL, NULL, NULL },
+        {"file-create-linux-md-array", "gdu-raid-array", N_("_RAID Array..."), NULL, N_("Create a RAID array"), G_CALLBACK (new_linux_md_array_callback)},
         {"edit", NULL, N_("_Edit"), NULL, NULL, NULL },
         {"help", NULL, N_("_Help"), NULL, NULL, NULL },
 
-        {"fsck", "gdu-check-disk", N_("_Check File System"), NULL, N_("Check the file system"), G_CALLBACK (fsck_action_callback)},
-        {"mount", "gdu-mount", N_("_Mount"), NULL, N_("Mount the filesystem on device"), G_CALLBACK (mount_action_callback)},
-        {"unmount", "gdu-unmount", N_("_Unmount"), NULL, N_("Unmount the filesystem"), G_CALLBACK (unmount_action_callback)},
-        {"eject", "gdu-eject", N_("_Eject"), NULL, N_("Eject media from the device"), G_CALLBACK (eject_action_callback)},
-        {"detach", "gdu-detach", N_("_Detach"), NULL, N_("Detach the device from the system, powering it off"), G_CALLBACK (detach_action_callback)},
-        {"unlock", "gdu-encrypted-unlock", N_("_Unlock"), NULL, N_("Unlock the encrypted device, making the data available in cleartext"), G_CALLBACK (unlock_action_callback)},
-        {"lock", "gdu-encrypted-lock", N_("_Lock"), NULL, N_("Lock the encrypted device, making the cleartext data unavailable"), G_CALLBACK (lock_action_callback)},
-        {"start", "gdu-raid-array-start", N_("_Start"), NULL, N_("Start the array"), G_CALLBACK (start_action_callback)},
-        {"stop", "gdu-raid-array-stop", N_("_Stop"), NULL, N_("Stop the array"), G_CALLBACK (stop_action_callback)},
-        {"erase", "nautilus-gdu", N_("_Erase"), NULL, N_("Erase the contents of the device"), G_CALLBACK (erase_action_callback)},
-
         {"quit", GTK_STOCK_QUIT, N_("_Quit"), "<Ctrl>Q", N_("Quit"), G_CALLBACK (quit_action_callback)},
         {"contents", GTK_STOCK_HELP, N_("_Help"), "F1", N_("Get Help on Disk Utility"), G_CALLBACK (help_contents_action_callback)},
         {"about", GTK_STOCK_ABOUT, N_("_About"), NULL, NULL, G_CALLBACK (about_action_callback)}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]