From 3666e3997dd17263b8e3119cdaccd3be0b2d7f77 Mon Sep 17 00:00:00 2001 From: James Ross Date: Mon, 9 Mar 2020 13:52:00 -0700 Subject: [PATCH] all: remove CinnamonMountOperation unused code --- cinnamon.pot | 4 - data/theme/cinnamon.css | 64 --- docs/reference/cinnamon/cinnamon-docs.sgml.in | 1 - js/Makefile.am | 1 - js/ui/cinnamonMountOperation.js | 406 ------------------ po/POTFILES.in | 1 - src/Makefile.am | 2 - src/cinnamon-mount-operation.c | 184 -------- src/cinnamon-mount-operation.h | 64 --- 9 files changed, 727 deletions(-) delete mode 100644 js/ui/cinnamonMountOperation.js delete mode 100644 src/cinnamon-mount-operation.c delete mode 100644 src/cinnamon-mount-operation.h diff --git a/cinnamon.pot b/cinnamon.pot index 32f987d7a2..83e663f23a 100644 --- a/cinnamon.pot +++ b/cinnamon.pot @@ -263,10 +263,6 @@ msgstr "" msgid "Hide Text" msgstr "" -#: js/ui/cinnamonMountOperation.js:286 -msgid "Wrong password, please try again" -msgstr "" - #: js/ui/desklet.js:238 msgid "Remove this desklet" msgstr "" diff --git a/data/theme/cinnamon.css b/data/theme/cinnamon.css index 04c64c3225..fccb31930e 100644 --- a/data/theme/cinnamon.css +++ b/data/theme/cinnamon.css @@ -900,70 +900,6 @@ StScrollBar StButton#vhandle:hover { background-color: rgba(0, 0, 0, 0.4); } -/* CinnamonMountOperation Dialogs */ -.cinnamon-mount-operation-icon { - icon-size: 48px; -} -.mount-password-reask { - color: red; -} -.show-processes-dialog, -.mount-question-dialog { - spacing: 24px; -} -.show-processes-dialog-subject, -.mount-question-dialog-subject { - font-weight: bold; - color: #666666; - padding-top: 10px; - padding-left: 17px; - padding-bottom: 6px; -} -.show-processes-dialog-subject:rtl, -.mount-question-dialog-subject:rtl { - padding-left: 0px; - padding-right: 17px; -} -.show-processes-dialog-description, -.mount-question-dialog-description { - color: white; - padding-left: 17px; - width: 28em; -} -.show-processes-dialog-description:rtl, -.mount-question-dialog-description:rtl { - padding-right: 17px; -} -.show-processes-dialog-app-list { - max-height: 200px; - padding-top: 24px; - padding-left: 49px; - padding-right: 32px; -} -.show-processes-dialog-app-list:rtl { - padding-right: 49px; - padding-left: 32px; -} -.show-processes-dialog-app-list-item { - color: #ccc; -} -.show-processes-dialog-app-list-item:hover { - color: white; -} -.show-processes-dialog-app-list-item:ltr { - padding-right: 1em; -} -.show-processes-dialog-app-list-item:rtl { - padding-left: 1em; -} -.show-processes-dialog-app-list-item-icon:ltr { - padding-right: 17px; -} -.show-processes-dialog-app-list-item-icon:rtl { - padding-left: 17px; -} -.show-processes-dialog-app-list-item-name { -} /* =================================================================== * Magnifier * ===================================================================*/ diff --git a/docs/reference/cinnamon/cinnamon-docs.sgml.in b/docs/reference/cinnamon/cinnamon-docs.sgml.in index 8887b8caff..cf77ac235a 100644 --- a/docs/reference/cinnamon/cinnamon-docs.sgml.in +++ b/docs/reference/cinnamon/cinnamon-docs.sgml.in @@ -43,7 +43,6 @@ - Object Hierarchy diff --git a/js/Makefile.am b/js/Makefile.am index 73c9c05f3d..ce1adc0da3 100644 --- a/js/Makefile.am +++ b/js/Makefile.am @@ -57,7 +57,6 @@ nobase_dist_js_DATA = \ ui/messageTray.js \ ui/modalDialog.js \ ui/cinnamonEntry.js \ - ui/cinnamonMountOperation.js \ ui/osdWindow.js \ ui/notificationDaemon.js \ ui/overview.js \ diff --git a/js/ui/cinnamonMountOperation.js b/js/ui/cinnamonMountOperation.js deleted file mode 100644 index 7b060b4eb8..0000000000 --- a/js/ui/cinnamonMountOperation.js +++ /dev/null @@ -1,406 +0,0 @@ -// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- - -const Lang = imports.lang; -const Signals = imports.signals; -const Gio = imports.gi.Gio; -const Gtk = imports.gi.Gtk; -const Pango = imports.gi.Pango; -const St = imports.gi.St; -const Cinnamon = imports.gi.Cinnamon; - -const Main = imports.ui.main; -const MessageTray = imports.ui.messageTray; -const ModalDialog = imports.ui.modalDialog; -const Params = imports.misc.params; - -const LIST_ITEM_ICON_SIZE = 48; - -/* ------ Common Utils ------- */ -function _setLabelText(label, text) { - if (text) { - label.set_text(text); - label.show(); - } else { - label.set_text(''); - label.hide(); - } -} - -function _setButtonsForChoices(dialog, choices) { - let buttons = []; - - for (let idx = choices.length - 1; idx >= 0; idx--) { - buttons.push({ - label: choices[idx], - action: Lang.bind(dialog, () => { - dialog.emit('response', idx); - }) - }); - } - - dialog.setButtons(buttons); -} - -function _setLabelsForMessage(dialog, message) { - let labels = message.split('\n'); - - _setLabelText(dialog.subjectLabel, labels[0]); - if (labels.length > 1) - _setLabelText(dialog.descriptionLabel, labels[1]); -} - -/* -------------------------------------------------------- */ - -function ListItem(app) { - this._init(app); -} - -ListItem.prototype = { - _init: function(app) { - this._app = app; - - let layout = new St.BoxLayout({ vertical: false}); - - this.actor = new St.Button({ style_class: 'show-processes-dialog-app-list-item', - can_focus: true, - child: layout, - reactive: true, - x_align: St.Align.START, - x_fill: true }); - - this._icon = this._app.create_icon_texture(LIST_ITEM_ICON_SIZE); - - let iconBin = new St.Bin({ style_class: 'show-processes-dialog-app-list-item-icon', - child: this._icon }); - layout.add(iconBin); - - this._nameLabel = new St.Label({ text: this._app.get_name(), - style_class: 'show-processes-dialog-app-list-item-name' }); - let labelBin = new St.Bin({ y_align: St.Align.MIDDLE, - child: this._nameLabel }); - layout.add(labelBin); - - this.actor.connect('clicked', Lang.bind(this, this._onClicked)); - }, - - _onClicked: function() { - this.emit('activate'); - this._app.activate(); - } -}; -Signals.addSignalMethods(ListItem.prototype); - -function CinnamonMountOperation(source, params) { - this._init(source, params); -} - -CinnamonMountOperation.prototype = { - _init: function(source, params) { - params = Params.parse(params, { reaskPassword: false }); - - this._reaskPassword = params.reaskPassword; - - this._dialog = null; - this._processesDialog = null; - - this.mountOp = new Cinnamon.MountOperation(); - - this.mountOp.connect('ask-question', - Lang.bind(this, this._onAskQuestion)); - this.mountOp.connect('ask-password', - Lang.bind(this, this._onAskPassword)); - this.mountOp.connect('show-processes-2', - Lang.bind(this, this._onShowProcesses2)); - this.mountOp.connect('aborted', - Lang.bind(this, this._onAborted)); - - this._icon = new St.Icon({ gicon: source.get_icon(), - style_class: 'cinnamon-mount-operation-icon' }); - }, - - _onAskQuestion: function(op, message, choices) { - this._dialog = new CinnamonMountQuestionDialog(this._icon); - - this._dialog.connect('response', - Lang.bind(this, function(object, choice) { - this.mountOp.set_choice(choice); - this.mountOp.reply(Gio.MountOperationResult.HANDLED); - - this._dialog.close(global.get_current_time()); - this._dialog = null; - })); - - this._dialog.update(message, choices); - this._dialog.open(global.get_current_time()); - }, - - _onAskPassword: function(op, message) { - this._notificationShowing = true; - this._source = new CinnamonMountPasswordSource(message, this._icon, this._reaskPassword); - - this._source.connect('password-ready', - Lang.bind(this, function(source, password) { - this.mountOp.set_password(password); - this.mountOp.reply(Gio.MountOperationResult.HANDLED); - - this._notificationShowing = false; - this._source.destroy(); - })); - - this._source.connect('destroy', - Lang.bind(this, function() { - if (!this._notificationShowing) - return; - - this._notificationShowing = false; - this.mountOp.reply(Gio.MountOperationResult.ABORTED); - })); - }, - - _onAborted: function(op) { - if (!this._dialog) - return; - - this._dialog.close(global.get_current_time()); - this._dialog = null; - }, - - _onShowProcesses2: function(op) { - let processes = op.get_show_processes_pids(); - let choices = op.get_show_processes_choices(); - let message = op.get_show_processes_message(); - - if (!this._processesDialog) { - this._processesDialog = new CinnamonProcessesDialog(this._icon); - this._dialog = this._processesDialog; - - this._processesDialog.connect('response', - Lang.bind(this, function(object, choice) { - if (choice == -1) { - this.mountOp.reply(Gio.MountOperationResult.ABORTED); - } else { - this.mountOp.set_choice(choice); - this.mountOp.reply(Gio.MountOperationResult.HANDLED); - } - - this._processesDialog.close(global.get_current_time()); - this._dialog = null; - })); - this._processesDialog.open(global.get_current_time()); - } - - this._processesDialog.update(message, processes, choices); - }, -} - -function CinnamonMountQuestionDialog(icon) { - this._init(icon); -} - -CinnamonMountQuestionDialog.prototype = { - __proto__: ModalDialog.ModalDialog.prototype, - - _init: function(icon) { - ModalDialog.ModalDialog.prototype._init.call(this, { styleClass: 'mount-question-dialog' }); - - let mainContentLayout = new St.BoxLayout(); - this.contentLayout.add(mainContentLayout, { x_fill: true, - y_fill: false }); - - this._iconBin = new St.Bin({ child: icon }); - mainContentLayout.add(this._iconBin, - { x_fill: true, - y_fill: false, - x_align: St.Align.END, - y_align: St.Align.MIDDLE }); - - let messageLayout = new St.BoxLayout({ vertical: true }); - mainContentLayout.add(messageLayout, - { y_align: St.Align.START }); - - this.subjectLabel = new St.Label({ style_class: 'mount-question-dialog-subject' }); - - messageLayout.add(this.subjectLabel, - { y_fill: false, - y_align: St.Align.START }); - - this.descriptionLabel = new St.Label({ style_class: 'mount-question-dialog-description' }); - this.descriptionLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE; - this.descriptionLabel.clutter_text.line_wrap = true; - - messageLayout.add(this.descriptionLabel, - { y_fill: true, - y_align: St.Align.START }); - }, - - update: function(message, choices) { - _setLabelsForMessage(this, message); - _setButtonsForChoices(this, choices); - } -} -Signals.addSignalMethods(CinnamonMountQuestionDialog.prototype); - -function CinnamonMountPasswordSource(message, icon, reaskPassword) { - this._init(message, icon, reaskPassword); -} - -CinnamonMountPasswordSource.prototype = { - __proto__: MessageTray.Source.prototype, - - _init: function(message, icon, reaskPassword) { - let strings = message.split('\n'); - MessageTray.Source.prototype._init.call(this, strings[0]); - - this._notification = new CinnamonMountPasswordNotification(this, strings, icon, reaskPassword); - - // add ourselves as a source, and popup the notification - if (Main.messageTray) Main.messageTray.add(this); - this.notify(this._notification); - }, -} -Signals.addSignalMethods(CinnamonMountPasswordSource.prototype); - -function CinnamonMountPasswordNotification(source, strings, icon, reaskPassword) { - this._init(source, strings, icon, reaskPassword); -} - -CinnamonMountPasswordNotification.prototype = { - __proto__: MessageTray.Notification.prototype, - - _init: function(source, strings, icon, reaskPassword) { - MessageTray.Notification.prototype._init.call(this, source, - strings[0], null, - { customContent: true, - icon: icon }); - - // set the notification to transient and urgent, so that it - // expands out - this.setTransient(true); - this.setUrgency(MessageTray.Urgency.CRITICAL); - - if (strings[1]) - this.addBody(strings[1]); - - if (reaskPassword) { - let label = new St.Label({ style_class: 'mount-password-reask', - text: _("Wrong password, please try again") }); - - this.addActor(label); - } - - this._responseEntry = new St.Entry({ style_class: 'mount-password-entry', - can_focus: true }); - this.setActionArea(this._responseEntry); - - this._responseEntry.clutter_text.connect('activate', - Lang.bind(this, this._onEntryActivated)); - this._responseEntry.clutter_text.set_password_char('\u25cf'); // U+25CF is the unicode BLACK CIRCLE - - this._responseEntry.grab_key_focus(); - }, - - _onEntryActivated: function() { - let text = this._responseEntry.get_text(); - if (text == '') - return; - - this.source.emit('password-ready', text); - } -} - -function CinnamonProcessesDialog(icon) { - this._init(icon); -} - -CinnamonProcessesDialog.prototype = { - __proto__: ModalDialog.ModalDialog.prototype, - - _init: function(icon) { - ModalDialog.ModalDialog.prototype._init.call(this, { styleClass: 'show-processes-dialog' }); - - let mainContentLayout = new St.BoxLayout(); - this.contentLayout.add(mainContentLayout, { x_fill: true, - y_fill: false }); - - this._iconBin = new St.Bin({ child: icon }); - mainContentLayout.add(this._iconBin, - { x_fill: true, - y_fill: false, - x_align: St.Align.END, - y_align: St.Align.MIDDLE }); - - let messageLayout = new St.BoxLayout({ vertical: true }); - mainContentLayout.add(messageLayout, - { y_align: St.Align.START }); - - this.subjectLabel = new St.Label({ style_class: 'show-processes-dialog-subject' }); - - messageLayout.add(this.subjectLabel, - { y_fill: false, - y_align: St.Align.START }); - - this.descriptionLabel = new St.Label({ style_class: 'show-processes-dialog-description' }); - this.descriptionLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE; - this.descriptionLabel.clutter_text.line_wrap = true; - - messageLayout.add(this.descriptionLabel, - { y_fill: true, - y_align: St.Align.START }); - - let scrollView = new St.ScrollView({ style_class: 'show-processes-dialog-app-list'}); - scrollView.set_policy(Gtk.PolicyType.NEVER, - Gtk.PolicyType.AUTOMATIC); - this.contentLayout.add(scrollView, - { x_fill: true, - y_fill: true }); - scrollView.hide(); - - this._applicationList = new St.BoxLayout({ vertical: true }); - scrollView.add_actor(this._applicationList, - { x_fill: true, - y_fill: true, - x_align: St.Align.START, - y_align: St.Align.MIDDLE }); - - this._applicationList.connect('actor-added', - Lang.bind(this, function() { - if (this._applicationList.get_n_children() == 1) - scrollView.show(); - })); - - this._applicationList.connect('actor-removed', - Lang.bind(this, function() { - if (this._applicationList.get_n_children() == 0) - scrollView.hide(); - })); - }, - - _setAppsForPids: function(pids) { - // remove all the items - this._applicationList.destroy_all_children(); - - pids.forEach(Lang.bind(this, function(pid) { - let tracker = Cinnamon.WindowTracker.get_default(); - let app = tracker.get_app_from_pid(pid); - - if (!app) - return; - - let item = new ListItem(app); - this._applicationList.add(item.actor, { x_fill: true }); - - item.connect('activate', - Lang.bind(this, function() { - // use -1 to indicate Cancel - this.emit('response', -1); - })); - })); - }, - - update: function(message, processes, choices) { - this._setAppsForPids(processes); - _setLabelsForMessage(this, message); - _setButtonsForChoices(this, choices); - } -} -Signals.addSignalMethods(CinnamonProcessesDialog.prototype); diff --git a/po/POTFILES.in b/po/POTFILES.in index 7d969c3e15..d25e44e27a 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -17,7 +17,6 @@ js/ui/polkitAuthenticationAgent.js js/ui/popupMenu.js js/ui/runDialog.js js/ui/cinnamonEntry.js -js/ui/cinnamonMountOperation.js js/ui/windowAttentionHandler.js src/gvc/gvc-mixer-control.c src/main.c diff --git a/src/Makefile.am b/src/Makefile.am index cbe9a40645..0f7e60b59e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -95,7 +95,6 @@ cinnamon_public_headers_h = \ cinnamon-generic-container.h \ cinnamon-gtk-embed.h \ cinnamon-global.h \ - cinnamon-mount-operation.h \ cinnamon-perf-log.h \ cinnamon-screenshot.h \ cinnamon-slicer.h \ @@ -124,7 +123,6 @@ libcinnamon_la_SOURCES = \ cinnamon-generic-container.c \ cinnamon-gtk-embed.c \ cinnamon-global.c \ - cinnamon-mount-operation.c \ cinnamon-perf-log.c \ cinnamon-screenshot.c \ cinnamon-slicer.c \ diff --git a/src/cinnamon-mount-operation.c b/src/cinnamon-mount-operation.c deleted file mode 100644 index 9a37c21c2d..0000000000 --- a/src/cinnamon-mount-operation.c +++ /dev/null @@ -1,184 +0,0 @@ -/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ -/* - * Copyright (C) 2011 Red Hat, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA - * 02110-1335, USA. - * - * Author: Cosimo Cecchi - * - */ - -#include "cinnamon-mount-operation.h" - -/* This is a dummy class; we would like to be able to subclass the - * object from JS but we can't yet; the default GMountOperation impl - * automatically calls g_mount_operation_reply(UNHANDLED) after an idle, - * in interactive methods. We want to handle the reply outselves - * instead, so we just override the default methods with empty ones, - * except for ask-password, as we don't want to handle that. - * - * Also, we need to workaround the fact that gjs doesn't support type - * annotations for signals yet (so we can't effectively forward e.g. - * the GPid array to JS). - * See https://bugzilla.gnome.org/show_bug.cgi?id=645978 - */ -G_DEFINE_TYPE (CinnamonMountOperation, cinnamon_mount_operation, G_TYPE_MOUNT_OPERATION); - -enum { - SHOW_PROCESSES_2, - NUM_SIGNALS -}; - -static guint signals[NUM_SIGNALS] = { 0, }; - -struct _CinnamonMountOperationPrivate { - GArray *pids; - gchar **choices; - gchar *message; -}; - -static void -cinnamon_mount_operation_init (CinnamonMountOperation *self) -{ - self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, CINNAMON_TYPE_MOUNT_OPERATION, - CinnamonMountOperationPrivate); -} - -static void -cinnamon_mount_operation_ask_password (GMountOperation *op, - const char *message, - const char *default_user, - const char *default_domain, - GAskPasswordFlags flags) -{ - /* do nothing */ -} - -static void -cinnamon_mount_operation_ask_question (GMountOperation *op, - const char *message, - const char *choices[]) -{ - /* do nothing */ -} - -static void -cinnamon_mount_operation_show_processes (GMountOperation *operation, - const gchar *message, - GArray *processes, - const gchar *choices[]) -{ - CinnamonMountOperation *self = CINNAMON_MOUNT_OPERATION (operation); - - if (self->priv->pids != NULL) - { - g_array_unref (self->priv->pids); - self->priv->pids = NULL; - } - - g_free (self->priv->message); - g_strfreev (self->priv->choices); - - /* save the parameters */ - self->priv->pids = g_array_ref (processes); - self->priv->choices = g_strdupv ((gchar **) choices); - self->priv->message = g_strdup (message); - - g_signal_emit (self, signals[SHOW_PROCESSES_2], 0); -} - -static void -cinnamon_mount_operation_finalize (GObject *obj) -{ - CinnamonMountOperation *self = CINNAMON_MOUNT_OPERATION (obj); - - g_strfreev (self->priv->choices); - g_free (self->priv->message); - - if (self->priv->pids != NULL) - { - g_array_unref (self->priv->pids); - self->priv->pids = NULL; - } - - G_OBJECT_CLASS (cinnamon_mount_operation_parent_class)->finalize (obj); -} - -static void -cinnamon_mount_operation_class_init (CinnamonMountOperationClass *klass) -{ - GMountOperationClass *mclass; - GObjectClass *oclass; - - mclass = G_MOUNT_OPERATION_CLASS (klass); - mclass->show_processes = cinnamon_mount_operation_show_processes; - mclass->ask_question = cinnamon_mount_operation_ask_question; - mclass->ask_password = cinnamon_mount_operation_ask_password; - - oclass = G_OBJECT_CLASS (klass); - oclass->finalize = cinnamon_mount_operation_finalize; - - signals[SHOW_PROCESSES_2] = - g_signal_new ("show-processes-2", - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - 0, NULL, NULL, NULL, - G_TYPE_NONE, 0); - - g_type_class_add_private (klass, sizeof (CinnamonMountOperationPrivate)); -} - -GMountOperation * -cinnamon_mount_operation_new (void) -{ - return g_object_new (CINNAMON_TYPE_MOUNT_OPERATION, NULL); -} - -/** - * cinnamon_mount_operation_get_show_processes_pids: - * @self: a #CinnamonMountOperation - * - * Returns: (transfer full) (element-type GPid): a #GArray - */ -GArray * -cinnamon_mount_operation_get_show_processes_pids (CinnamonMountOperation *self) -{ - return g_array_ref (self->priv->pids); -} - -/** - * cinnamon_mount_operation_get_show_processes_choices: - * @self: a #CinnamonMountOperation - * - * Returns: (transfer full): - */ -gchar ** -cinnamon_mount_operation_get_show_processes_choices (CinnamonMountOperation *self) -{ - return g_strdupv (self->priv->choices); -} - -/** - * cinnamon_mount_operation_get_show_processes_message: - * @self: a #CinnamonMountOperation - * - * Returns: (transfer full): - */ -gchar * -cinnamon_mount_operation_get_show_processes_message (CinnamonMountOperation *self) -{ - return g_strdup (self->priv->message); -} diff --git a/src/cinnamon-mount-operation.h b/src/cinnamon-mount-operation.h deleted file mode 100644 index 200697572c..0000000000 --- a/src/cinnamon-mount-operation.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ -/* - * Copyright (C) 2011 Red Hat, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA - * 02110-1335, USA. - * - * Author: Cosimo Cecchi - * - */ - -#ifndef __CINNAMON_MOUNT_OPERATION_H__ -#define __CINNAMON_MOUNT_OPERATION_H__ - -#include - -G_BEGIN_DECLS - -#define CINNAMON_TYPE_MOUNT_OPERATION (cinnamon_mount_operation_get_type ()) -#define CINNAMON_MOUNT_OPERATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CINNAMON_TYPE_MOUNT_OPERATION, CinnamonMountOperation)) -#define CINNAMON_MOUNT_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), CINNAMON_TYPE_MOUNT_OPERATION, CinnamonMountOperationClass)) -#define CINNAMON_IS_MOUNT_OPERATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CINNAMON_TYPE_MOUNT_OPERATION)) -#define CINNAMON_IS_MOUNT_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CINNAMON_TYPE_MOUNT_OPERATION)) -#define CINNAMON_MOUNT_OPERATION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CINNAMON_TYPE_MOUNT_OPERATION, CinnamonMountOperationClass)) - -typedef struct _CinnamonMountOperation CinnamonMountOperation; -typedef struct _CinnamonMountOperationClass CinnamonMountOperationClass; -typedef struct _CinnamonMountOperationPrivate CinnamonMountOperationPrivate; - -struct _CinnamonMountOperation -{ - GMountOperation parent_instance; - - CinnamonMountOperationPrivate *priv; -}; - -struct _CinnamonMountOperationClass -{ - GMountOperationClass parent_class; -}; - - -GType cinnamon_mount_operation_get_type (void); -GMountOperation *cinnamon_mount_operation_new (void); - -GArray * cinnamon_mount_operation_get_show_processes_pids (CinnamonMountOperation *self); -gchar ** cinnamon_mount_operation_get_show_processes_choices (CinnamonMountOperation *self); -gchar * cinnamon_mount_operation_get_show_processes_message (CinnamonMountOperation *self); - -G_END_DECLS - -#endif /* __CINNAMON_MOUNT_OPERATION_H__ */