diff options
author | Stefano Karapetsas <[email protected]> | 2012-02-22 03:44:27 -0800 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2012-02-22 03:44:27 -0800 |
commit | 2dfe3164d9f195b50e066def8e2a4782b5910c10 (patch) | |
tree | f95660c9462b74c2775355c29df79267fc30501b /plugins/housekeeping | |
parent | ecd8a153901507f5d210d6f85103693ef81d49c3 (diff) | |
parent | e46b4adef5c6c6805b3ca6dbfbe99a4299252514 (diff) | |
download | mate-settings-daemon-2dfe3164d9f195b50e066def8e2a4782b5910c10.tar.bz2 mate-settings-daemon-2dfe3164d9f195b50e066def8e2a4782b5910c10.tar.xz |
Merge pull request #3 from haxar/master
gsd to msd complete rename patch by NiceandGently
Diffstat (limited to 'plugins/housekeeping')
-rw-r--r-- | plugins/housekeeping/Makefile.am | 24 | ||||
-rw-r--r-- | plugins/housekeeping/gsd-housekeeping-manager.h | 59 | ||||
-rw-r--r-- | plugins/housekeeping/gsd-ldsm-dialog.h | 72 | ||||
-rw-r--r-- | plugins/housekeeping/msd-disk-space.c (renamed from plugins/housekeeping/gsd-disk-space.c) | 36 | ||||
-rw-r--r-- | plugins/housekeeping/msd-disk-space.h (renamed from plugins/housekeeping/gsd-disk-space.h) | 10 | ||||
-rw-r--r-- | plugins/housekeeping/msd-housekeeping-manager.c (renamed from plugins/housekeeping/gsd-housekeeping-manager.c) | 50 | ||||
-rw-r--r-- | plugins/housekeeping/msd-housekeeping-manager.h | 59 | ||||
-rw-r--r-- | plugins/housekeeping/msd-housekeeping-plugin.c (renamed from plugins/housekeeping/gsd-housekeeping-plugin.c) | 42 | ||||
-rw-r--r-- | plugins/housekeeping/msd-housekeeping-plugin.h (renamed from plugins/housekeeping/gsd-housekeeping-plugin.h) | 28 | ||||
-rw-r--r-- | plugins/housekeeping/msd-ldsm-dialog.c (renamed from plugins/housekeeping/gsd-ldsm-dialog.c) | 90 | ||||
-rw-r--r-- | plugins/housekeeping/msd-ldsm-dialog.h | 72 | ||||
-rw-r--r-- | plugins/housekeeping/msd-ldsm-trash-empty.c (renamed from plugins/housekeeping/gsd-ldsm-trash-empty.c) | 10 | ||||
-rw-r--r-- | plugins/housekeeping/msd-ldsm-trash-empty.h (renamed from plugins/housekeeping/gsd-ldsm-trash-empty.h) | 14 |
13 files changed, 283 insertions, 283 deletions
diff --git a/plugins/housekeeping/Makefile.am b/plugins/housekeeping/Makefile.am index 485d4ed..4eb4517 100644 --- a/plugins/housekeeping/Makefile.am +++ b/plugins/housekeeping/Makefile.am @@ -1,16 +1,16 @@ plugin_LTLIBRARIES = libhousekeeping.la libhousekeeping_la_SOURCES = \ - gsd-ldsm-dialog.c \ - gsd-ldsm-dialog.h \ - gsd-ldsm-trash-empty.c \ - gsd-ldsm-trash-empty.h \ - gsd-disk-space.c \ - gsd-disk-space.h \ - gsd-housekeeping-manager.c \ - gsd-housekeeping-manager.h \ - gsd-housekeeping-plugin.c \ - gsd-housekeeping-plugin.h + msd-ldsm-dialog.c \ + msd-ldsm-dialog.h \ + msd-ldsm-trash-empty.c \ + msd-ldsm-trash-empty.h \ + msd-disk-space.c \ + msd-disk-space.h \ + msd-housekeeping-manager.c \ + msd-housekeeping-manager.h \ + msd-housekeeping-plugin.c \ + msd-housekeeping-plugin.h libhousekeeping_la_CPPFLAGS = \ -I$(top_srcdir)/mate-settings-daemon \ @@ -23,7 +23,7 @@ libhousekeeping_la_CFLAGS = \ $(LIBMATENOTIFY_CFLAGS) \ $(AM_CFLAGS) -libhousekeeping_la_LDFLAGS = $(GSD_PLUGIN_LDFLAGS) +libhousekeeping_la_LDFLAGS = $(MSD_PLUGIN_LDFLAGS) libhousekeeping_la_LIBADD = $(SETTINGS_PLUGIN_LIBS) $(GIOUNIX_LIBS) $(LIBMATENOTIFY_LIBS) @@ -37,4 +37,4 @@ CLEANFILES = $(plugin_DATA) DISTCLEANFILES = (plugin_DATA) -@GSD_INTLTOOL_PLUGIN_RULE@ +@MSD_INTLTOOL_PLUGIN_RULE@ diff --git a/plugins/housekeeping/gsd-housekeeping-manager.h b/plugins/housekeeping/gsd-housekeeping-manager.h deleted file mode 100644 index 3cba840..0000000 --- a/plugins/housekeeping/gsd-housekeeping-manager.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- - * - * Copyright (C) 2008 Michael J. Chudobiak <[email protected]> - * - * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - */ - -#ifndef __GSD_HOUSEKEEPING_MANAGER_H -#define __GSD_HOUSEKEEPING_MANAGER_H - -#include <glib-object.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#define GSD_TYPE_HOUSEKEEPING_MANAGER (gsd_housekeeping_manager_get_type ()) -#define GSD_HOUSEKEEPING_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_HOUSEKEEPING_MANAGER, GsdHousekeepingManager)) -#define GSD_HOUSEKEEPING_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_HOUSEKEEPING_MANAGER, GsdHousekeepingManagerClass)) -#define GSD_IS_HOUSEKEEPING_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_HOUSEKEEPING_MANAGER)) -#define GSD_IS_HOUSEKEEPING_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_HOUSEKEEPING_MANAGER)) -#define GSD_HOUSEKEEPING_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_HOUSEKEEPING_MANAGER, GsdHousekeepingManagerClass)) - -typedef struct GsdHousekeepingManagerPrivate GsdHousekeepingManagerPrivate; - -typedef struct { - GObject parent; - GsdHousekeepingManagerPrivate *priv; -} GsdHousekeepingManager; - -typedef struct { - GObjectClass parent_class; -} GsdHousekeepingManagerClass; - -GType gsd_housekeeping_manager_get_type (void); - -GsdHousekeepingManager * gsd_housekeeping_manager_new (void); -gboolean gsd_housekeeping_manager_start (GsdHousekeepingManager *manager, - GError **error); -void gsd_housekeeping_manager_stop (GsdHousekeepingManager *manager); - -#ifdef __cplusplus -} -#endif - -#endif /* __GSD_HOUSEKEEPING_MANAGER_H */ diff --git a/plugins/housekeeping/gsd-ldsm-dialog.h b/plugins/housekeeping/gsd-ldsm-dialog.h deleted file mode 100644 index 81e2f1b..0000000 --- a/plugins/housekeeping/gsd-ldsm-dialog.h +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- - * - * gsd-ldsm-dialog.c - * Copyright (C) Chris Coulson 2009 <[email protected]> - * - * gsd-ldsm-dialog.c 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 3 of the License, or - * (at your option) any later version. - * - * gsd-ldsm-dialog.c 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, see <http://www.gnu.org/licenses/>. - */ - -#ifndef _GSD_LDSM_DIALOG_H_ -#define _GSD_LDSM_DIALOG_H_ - -#include <glib-object.h> -#include <gtk/gtk.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#define GSD_TYPE_LDSM_DIALOG (gsd_ldsm_dialog_get_type ()) -#define GSD_LDSM_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSD_TYPE_LDSM_DIALOG, GsdLdsmDialog)) -#define GSD_LDSM_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSD_TYPE_LDSM_DIALOG, GsdLdsmDialogClass)) -#define GSD_IS_LDSM_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSD_TYPE_LDSM_DIALOG)) -#define GSD_IS_LDSM_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSD_TYPE_LDSM_DIALOG)) -#define GSD_LDSM_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSD_TYPE_LDSM_DIALOG, GsdLdsmDialogClass)) - -enum -{ - GSD_LDSM_DIALOG_RESPONSE_EMPTY_TRASH = -20, - GSD_LDSM_DIALOG_RESPONSE_ANALYZE = -21 -}; - -typedef struct GsdLdsmDialogPrivate GsdLdsmDialogPrivate; -typedef struct _GsdLdsmDialogClass GsdLdsmDialogClass; -typedef struct _GsdLdsmDialog GsdLdsmDialog; - -struct _GsdLdsmDialogClass -{ - GtkDialogClass parent_class; -}; - -struct _GsdLdsmDialog -{ - GtkDialog parent_instance; - GsdLdsmDialogPrivate *priv; -}; - -GType gsd_ldsm_dialog_get_type (void) G_GNUC_CONST; - -GsdLdsmDialog * gsd_ldsm_dialog_new (gboolean other_usable_partitions, - gboolean other_partitions, - gboolean display_baobab, - gboolean display_empty_trash, - gint64 space_remaining, - const gchar *partition_name, - const gchar *mount_path); - -#ifdef __cplusplus -} -#endif - -#endif /* _GSD_LDSM_DIALOG_H_ */ diff --git a/plugins/housekeeping/gsd-disk-space.c b/plugins/housekeeping/msd-disk-space.c index 97e2093..6842ae5 100644 --- a/plugins/housekeeping/gsd-disk-space.c +++ b/plugins/housekeeping/msd-disk-space.c @@ -21,7 +21,7 @@ * */ -/* gcc -DHAVE_LIBMATENOTIFY -DTEST -Wall `pkg-config --cflags --libs gobject-2.0 gio-unix-2.0 glib-2.0 gtk+-2.0 libmatenotify` -o gsd-disk-space-test gsd-disk-space.c */ +/* gcc -DHAVE_LIBMATENOTIFY -DTEST -Wall `pkg-config --cflags --libs gobject-2.0 gio-unix-2.0 glib-2.0 gtk+-2.0 libmatenotify` -o msd-disk-space-test msd-disk-space.c */ #include "config.h" @@ -37,9 +37,9 @@ #include <gtk/gtk.h> #include <mateconf/mateconf-client.h> -#include "gsd-disk-space.h" -#include "gsd-ldsm-dialog.h" -#include "gsd-ldsm-trash-empty.h" +#include "msd-disk-space.h" +#include "msd-ldsm-dialog.h" +#include "msd-ldsm-trash-empty.h" #define GIGABYTE 1024 * 1024 * 1024 @@ -72,7 +72,7 @@ static unsigned int min_notify_period = 10; static GSList *ignore_paths = NULL; static unsigned int mateconf_notify_id; static MateConfClient *client = NULL; -static GsdLdsmDialog *dialog = NULL; +static MsdLdsmDialog *dialog = NULL; static guint64 *time_read; static gchar* @@ -196,7 +196,7 @@ ldsm_notify_for_mount (LdsmMountInfo *mount, has_disk_analyzer = (program != NULL); g_free (program); - dialog = gsd_ldsm_dialog_new (other_usable_volumes, + dialog = msd_ldsm_dialog_new (other_usable_volumes, multiple_volumes, has_disk_analyzer, has_trash, @@ -216,13 +216,13 @@ ldsm_notify_for_mount (LdsmMountInfo *mount, case GTK_RESPONSE_CANCEL: retval = FALSE; break; - case GSD_LDSM_DIALOG_RESPONSE_ANALYZE: + case MSD_LDSM_DIALOG_RESPONSE_ANALYZE: retval = FALSE; ldsm_analyze_path (g_unix_mount_get_mount_path (mount->mount)); break; - case GSD_LDSM_DIALOG_RESPONSE_EMPTY_TRASH: + case MSD_LDSM_DIALOG_RESPONSE_EMPTY_TRASH: retval = TRUE; - gsd_ldsm_trash_empty (); + msd_ldsm_trash_empty (); break; case GTK_RESPONSE_NONE: case GTK_RESPONSE_DELETE_EVENT: @@ -566,7 +566,7 @@ ldsm_is_hash_item_in_ignore_paths (gpointer key, } static void -gsd_ldsm_get_config () +msd_ldsm_get_config () { GError *error = NULL; @@ -629,16 +629,16 @@ gsd_ldsm_get_config () } static void -gsd_ldsm_update_config (MateConfClient *client, +msd_ldsm_update_config (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, gpointer user_data) { - gsd_ldsm_get_config (); + msd_ldsm_get_config (); } void -gsd_ldsm_setup (gboolean check_now) +msd_ldsm_setup (gboolean check_now) { GError *error = NULL; @@ -653,10 +653,10 @@ gsd_ldsm_setup (gboolean check_now) client = mateconf_client_get_default (); if (client != NULL) { - gsd_ldsm_get_config (); + msd_ldsm_get_config (); mateconf_notify_id = mateconf_client_notify_add (client, MATECONF_HOUSEKEEPING_DIR, - (MateConfClientNotifyFunc) gsd_ldsm_update_config, + (MateConfClientNotifyFunc) msd_ldsm_update_config, NULL, NULL, &error); if (error != NULL) { g_warning ("Cannot register callback for MateConf notification"); @@ -680,7 +680,7 @@ gsd_ldsm_setup (gboolean check_now) } void -gsd_ldsm_clean (void) +msd_ldsm_clean (void) { if (ldsm_timeout_id) g_source_remove (ldsm_timeout_id); @@ -721,11 +721,11 @@ main (int argc, loop = g_main_loop_new (NULL, FALSE); - gsd_ldsm_setup (TRUE); + msd_ldsm_setup (TRUE); g_main_loop_run (loop); - gsd_ldsm_clean (); + msd_ldsm_clean (); g_main_loop_unref (loop); return 0; diff --git a/plugins/housekeeping/gsd-disk-space.h b/plugins/housekeeping/msd-disk-space.h index 9a079a4..43f7059 100644 --- a/plugins/housekeeping/gsd-disk-space.h +++ b/plugins/housekeeping/msd-disk-space.h @@ -21,8 +21,8 @@ * */ -#ifndef __GSD_DISK_SPACE_H -#define __GSD_DISK_SPACE_H +#ifndef __MSD_DISK_SPACE_H +#define __MSD_DISK_SPACE_H #include <glib.h> @@ -30,11 +30,11 @@ extern "C" { #endif -void gsd_ldsm_setup (gboolean check_now); -void gsd_ldsm_clean (void); +void msd_ldsm_setup (gboolean check_now); +void msd_ldsm_clean (void); #ifdef __cplusplus } #endif -#endif /* __GSD_DISK_SPACE_H */ +#endif /* __MSD_DISK_SPACE_H */ diff --git a/plugins/housekeeping/gsd-housekeeping-manager.c b/plugins/housekeeping/msd-housekeeping-manager.c index bbdea2c..6cb3353 100644 --- a/plugins/housekeeping/gsd-housekeeping-manager.c +++ b/plugins/housekeeping/msd-housekeeping-manager.c @@ -25,8 +25,8 @@ #include <string.h> #include "mate-settings-profile.h" -#include "gsd-housekeeping-manager.h" -#include "gsd-disk-space.h" +#include "msd-housekeeping-manager.h" +#include "msd-disk-space.h" /* General */ @@ -42,19 +42,19 @@ #define MATECONF_THUMB_BINDING_DIR "/desktop/mate/thumbnail_cache" -struct GsdHousekeepingManagerPrivate { +struct MsdHousekeepingManagerPrivate { guint long_term_cb; guint short_term_cb; guint mateconf_notify; }; -#define GSD_HOUSEKEEPING_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_HOUSEKEEPING_MANAGER, GsdHousekeepingManagerPrivate)) +#define MSD_HOUSEKEEPING_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_HOUSEKEEPING_MANAGER, MsdHousekeepingManagerPrivate)) -static void gsd_housekeeping_manager_class_init (GsdHousekeepingManagerClass *klass); -static void gsd_housekeeping_manager_init (GsdHousekeepingManager *housekeeping_manager); +static void msd_housekeeping_manager_class_init (MsdHousekeepingManagerClass *klass); +static void msd_housekeeping_manager_init (MsdHousekeepingManager *housekeeping_manager); -G_DEFINE_TYPE (GsdHousekeepingManager, gsd_housekeeping_manager, G_TYPE_OBJECT) +G_DEFINE_TYPE (MsdHousekeepingManager, msd_housekeeping_manager, G_TYPE_OBJECT) static gpointer manager_object = NULL; @@ -241,7 +241,7 @@ purge_thumbnail_cache (void) static gboolean -do_cleanup (GsdHousekeepingManager *manager) +do_cleanup (MsdHousekeepingManager *manager) { purge_thumbnail_cache (); return TRUE; @@ -249,7 +249,7 @@ do_cleanup (GsdHousekeepingManager *manager) static gboolean -do_cleanup_once (GsdHousekeepingManager *manager) +do_cleanup_once (MsdHousekeepingManager *manager) { do_cleanup (manager); manager->priv->short_term_cb = 0; @@ -258,7 +258,7 @@ do_cleanup_once (GsdHousekeepingManager *manager) static void -do_cleanup_soon (GsdHousekeepingManager *manager) +do_cleanup_soon (MsdHousekeepingManager *manager) { if (manager->priv->short_term_cb == 0) { g_debug ("housekeeping: will tidy up in 2 minutes"); @@ -273,14 +273,14 @@ static void bindings_callback (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, - GsdHousekeepingManager *manager) + MsdHousekeepingManager *manager) { do_cleanup_soon (manager); } static guint -register_config_callback (GsdHousekeepingManager *manager, +register_config_callback (MsdHousekeepingManager *manager, const char *path, MateConfClientNotifyFunc func) { @@ -297,13 +297,13 @@ register_config_callback (GsdHousekeepingManager *manager, gboolean -gsd_housekeeping_manager_start (GsdHousekeepingManager *manager, +msd_housekeeping_manager_start (MsdHousekeepingManager *manager, GError **error) { g_debug ("Starting housekeeping manager"); mate_settings_profile_start (NULL); - gsd_ldsm_setup (FALSE); + msd_ldsm_setup (FALSE); manager->priv->mateconf_notify = register_config_callback (manager, MATECONF_THUMB_BINDING_DIR, @@ -323,9 +323,9 @@ gsd_housekeeping_manager_start (GsdHousekeepingManager *manager, void -gsd_housekeeping_manager_stop (GsdHousekeepingManager *manager) +msd_housekeeping_manager_stop (MsdHousekeepingManager *manager) { - GsdHousekeepingManagerPrivate *p = manager->priv; + MsdHousekeepingManagerPrivate *p = manager->priv; g_debug ("Stopping housekeeping manager"); @@ -356,34 +356,34 @@ gsd_housekeeping_manager_stop (GsdHousekeepingManager *manager) } } - gsd_ldsm_clean (); + msd_ldsm_clean (); } static void -gsd_housekeeping_manager_class_init (GsdHousekeepingManagerClass *klass) +msd_housekeeping_manager_class_init (MsdHousekeepingManagerClass *klass) { - g_type_class_add_private (klass, sizeof (GsdHousekeepingManagerPrivate)); + g_type_class_add_private (klass, sizeof (MsdHousekeepingManagerPrivate)); } static void -gsd_housekeeping_manager_init (GsdHousekeepingManager *manager) +msd_housekeeping_manager_init (MsdHousekeepingManager *manager) { - manager->priv = GSD_HOUSEKEEPING_MANAGER_GET_PRIVATE (manager); + manager->priv = MSD_HOUSEKEEPING_MANAGER_GET_PRIVATE (manager); } -GsdHousekeepingManager * -gsd_housekeeping_manager_new (void) +MsdHousekeepingManager * +msd_housekeeping_manager_new (void) { if (manager_object != NULL) { g_object_ref (manager_object); } else { - manager_object = g_object_new (GSD_TYPE_HOUSEKEEPING_MANAGER, NULL); + manager_object = g_object_new (MSD_TYPE_HOUSEKEEPING_MANAGER, NULL); g_object_add_weak_pointer (manager_object, (gpointer *) &manager_object); } - return GSD_HOUSEKEEPING_MANAGER (manager_object); + return MSD_HOUSEKEEPING_MANAGER (manager_object); } diff --git a/plugins/housekeeping/msd-housekeeping-manager.h b/plugins/housekeeping/msd-housekeeping-manager.h new file mode 100644 index 0000000..11f50a7 --- /dev/null +++ b/plugins/housekeeping/msd-housekeeping-manager.h @@ -0,0 +1,59 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * + * Copyright (C) 2008 Michael J. Chudobiak <[email protected]> + * + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ + +#ifndef __MSD_HOUSEKEEPING_MANAGER_H +#define __MSD_HOUSEKEEPING_MANAGER_H + +#include <glib-object.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#define MSD_TYPE_HOUSEKEEPING_MANAGER (msd_housekeeping_manager_get_type ()) +#define MSD_HOUSEKEEPING_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_HOUSEKEEPING_MANAGER, MsdHousekeepingManager)) +#define MSD_HOUSEKEEPING_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_HOUSEKEEPING_MANAGER, MsdHousekeepingManagerClass)) +#define MSD_IS_HOUSEKEEPING_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_HOUSEKEEPING_MANAGER)) +#define MSD_IS_HOUSEKEEPING_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_HOUSEKEEPING_MANAGER)) +#define MSD_HOUSEKEEPING_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_HOUSEKEEPING_MANAGER, MsdHousekeepingManagerClass)) + +typedef struct MsdHousekeepingManagerPrivate MsdHousekeepingManagerPrivate; + +typedef struct { + GObject parent; + MsdHousekeepingManagerPrivate *priv; +} MsdHousekeepingManager; + +typedef struct { + GObjectClass parent_class; +} MsdHousekeepingManagerClass; + +GType msd_housekeeping_manager_get_type (void); + +MsdHousekeepingManager * msd_housekeeping_manager_new (void); +gboolean msd_housekeeping_manager_start (MsdHousekeepingManager *manager, + GError **error); +void msd_housekeeping_manager_stop (MsdHousekeepingManager *manager); + +#ifdef __cplusplus +} +#endif + +#endif /* __MSD_HOUSEKEEPING_MANAGER_H */ diff --git a/plugins/housekeeping/gsd-housekeeping-plugin.c b/plugins/housekeeping/msd-housekeeping-plugin.c index 1bbddb0..5b0cfef 100644 --- a/plugins/housekeeping/gsd-housekeeping-plugin.c +++ b/plugins/housekeeping/msd-housekeeping-plugin.c @@ -24,38 +24,38 @@ #include <gmodule.h> #include "mate-settings-plugin.h" -#include "gsd-housekeeping-plugin.h" -#include "gsd-housekeeping-manager.h" +#include "msd-housekeeping-plugin.h" +#include "msd-housekeeping-manager.h" -struct GsdHousekeepingPluginPrivate { - GsdHousekeepingManager *manager; +struct MsdHousekeepingPluginPrivate { + MsdHousekeepingManager *manager; }; -#define GSD_HOUSEKEEPING_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), GSD_TYPE_HOUSEKEEPING_PLUGIN, GsdHousekeepingPluginPrivate)) +#define MSD_HOUSEKEEPING_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), MSD_TYPE_HOUSEKEEPING_PLUGIN, MsdHousekeepingPluginPrivate)) -MATE_SETTINGS_PLUGIN_REGISTER (GsdHousekeepingPlugin, gsd_housekeeping_plugin) +MATE_SETTINGS_PLUGIN_REGISTER (MsdHousekeepingPlugin, msd_housekeeping_plugin) static void -gsd_housekeeping_plugin_init (GsdHousekeepingPlugin *plugin) +msd_housekeeping_plugin_init (MsdHousekeepingPlugin *plugin) { - plugin->priv = GSD_HOUSEKEEPING_PLUGIN_GET_PRIVATE (plugin); + plugin->priv = MSD_HOUSEKEEPING_PLUGIN_GET_PRIVATE (plugin); - g_debug ("GsdHousekeepingPlugin initializing"); + g_debug ("MsdHousekeepingPlugin initializing"); - plugin->priv->manager = gsd_housekeeping_manager_new (); + plugin->priv->manager = msd_housekeeping_manager_new (); } static void -gsd_housekeeping_plugin_finalize (GObject *object) +msd_housekeeping_plugin_finalize (GObject *object) { - GsdHousekeepingPlugin *plugin; + MsdHousekeepingPlugin *plugin; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_HOUSEKEEPING_PLUGIN (object)); + g_return_if_fail (MSD_IS_HOUSEKEEPING_PLUGIN (object)); - g_debug ("GsdHousekeepingPlugin finalizing"); + g_debug ("MsdHousekeepingPlugin finalizing"); - plugin = GSD_HOUSEKEEPING_PLUGIN (object); + plugin = MSD_HOUSEKEEPING_PLUGIN (object); g_return_if_fail (plugin->priv != NULL); @@ -63,7 +63,7 @@ gsd_housekeeping_plugin_finalize (GObject *object) g_object_unref (plugin->priv->manager); } - G_OBJECT_CLASS (gsd_housekeeping_plugin_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_housekeeping_plugin_parent_class)->finalize (object); } static void @@ -75,7 +75,7 @@ impl_activate (MateSettingsPlugin *plugin) g_debug ("Activating housekeeping plugin"); error = NULL; - res = gsd_housekeeping_manager_start (GSD_HOUSEKEEPING_PLUGIN (plugin)->priv->manager, &error); + res = msd_housekeeping_manager_start (MSD_HOUSEKEEPING_PLUGIN (plugin)->priv->manager, &error); if (! res) { g_warning ("Unable to start housekeeping manager: %s", error->message); g_error_free (error); @@ -86,19 +86,19 @@ static void impl_deactivate (MateSettingsPlugin *plugin) { g_debug ("Deactivating housekeeping plugin"); - gsd_housekeeping_manager_stop (GSD_HOUSEKEEPING_PLUGIN (plugin)->priv->manager); + msd_housekeeping_manager_stop (MSD_HOUSEKEEPING_PLUGIN (plugin)->priv->manager); } static void -gsd_housekeeping_plugin_class_init (GsdHousekeepingPluginClass *klass) +msd_housekeeping_plugin_class_init (MsdHousekeepingPluginClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); MateSettingsPluginClass *plugin_class = MATE_SETTINGS_PLUGIN_CLASS (klass); - object_class->finalize = gsd_housekeeping_plugin_finalize; + object_class->finalize = msd_housekeeping_plugin_finalize; plugin_class->activate = impl_activate; plugin_class->deactivate = impl_deactivate; - g_type_class_add_private (klass, sizeof (GsdHousekeepingPluginPrivate)); + g_type_class_add_private (klass, sizeof (MsdHousekeepingPluginPrivate)); } diff --git a/plugins/housekeeping/gsd-housekeeping-plugin.h b/plugins/housekeeping/msd-housekeeping-plugin.h index daca16b..1c2d816 100644 --- a/plugins/housekeeping/gsd-housekeeping-plugin.h +++ b/plugins/housekeeping/msd-housekeeping-plugin.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_HOUSEKEEPING_PLUGIN_H__ -#define __GSD_HOUSEKEEPING_PLUGIN_H__ +#ifndef __MSD_HOUSEKEEPING_PLUGIN_H__ +#define __MSD_HOUSEKEEPING_PLUGIN_H__ #include <glib.h> #include <glib-object.h> @@ -31,25 +31,25 @@ extern "C" { #endif -#define GSD_TYPE_HOUSEKEEPING_PLUGIN (gsd_housekeeping_plugin_get_type ()) -#define GSD_HOUSEKEEPING_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_HOUSEKEEPING_PLUGIN, GsdHousekeepingPlugin)) -#define GSD_HOUSEKEEPING_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_HOUSEKEEPING_PLUGIN, GsdHousekeepingPluginClass)) -#define GSD_IS_HOUSEKEEPING_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_HOUSEKEEPING_PLUGIN)) -#define GSD_IS_HOUSEKEEPING_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_HOUSEKEEPING_PLUGIN)) -#define GSD_HOUSEKEEPING_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_HOUSEKEEPING_PLUGIN, GsdHousekeepingPluginClass)) +#define MSD_TYPE_HOUSEKEEPING_PLUGIN (msd_housekeeping_plugin_get_type ()) +#define MSD_HOUSEKEEPING_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_HOUSEKEEPING_PLUGIN, MsdHousekeepingPlugin)) +#define MSD_HOUSEKEEPING_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_HOUSEKEEPING_PLUGIN, MsdHousekeepingPluginClass)) +#define MSD_IS_HOUSEKEEPING_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_HOUSEKEEPING_PLUGIN)) +#define MSD_IS_HOUSEKEEPING_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_HOUSEKEEPING_PLUGIN)) +#define MSD_HOUSEKEEPING_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_HOUSEKEEPING_PLUGIN, MsdHousekeepingPluginClass)) -typedef struct GsdHousekeepingPluginPrivate GsdHousekeepingPluginPrivate; +typedef struct MsdHousekeepingPluginPrivate MsdHousekeepingPluginPrivate; typedef struct { MateSettingsPlugin parent; - GsdHousekeepingPluginPrivate *priv; -} GsdHousekeepingPlugin; + MsdHousekeepingPluginPrivate *priv; +} MsdHousekeepingPlugin; typedef struct { MateSettingsPluginClass parent_class; -} GsdHousekeepingPluginClass; +} MsdHousekeepingPluginClass; -GType gsd_housekeeping_plugin_get_type (void) G_GNUC_CONST; +GType msd_housekeeping_plugin_get_type (void) G_GNUC_CONST; /* All the plugins must implement this function */ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); @@ -58,4 +58,4 @@ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); } #endif -#endif /* __GSD_HOUSEKEEPING_PLUGIN_H__ */ +#endif /* __MSD_HOUSEKEEPING_PLUGIN_H__ */ diff --git a/plugins/housekeeping/gsd-ldsm-dialog.c b/plugins/housekeeping/msd-ldsm-dialog.c index 695db91..80ca857 100644 --- a/plugins/housekeeping/gsd-ldsm-dialog.c +++ b/plugins/housekeeping/msd-ldsm-dialog.c @@ -1,14 +1,14 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- * - * gsd-ldsm-dialog.c + * msd-ldsm-dialog.c * Copyright (C) Chris Coulson 2009 <[email protected]> * - * gsd-ldsm-dialog.c is free software: you can redistribute it and/or modify it + * msd-ldsm-dialog.c 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 3 of the License, or * (at your option) any later version. * - * gsd-ldsm-dialog.c is distributed in the hope that it will be useful, but + * msd-ldsm-dialog.c 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. @@ -20,7 +20,7 @@ #include <glib/gi18n.h> #include <mateconf/mateconf-client.h> -#include "gsd-ldsm-dialog.h" +#include "msd-ldsm-dialog.h" #define MATECONF_CLIENT_IGNORE_PATHS "/apps/mate_settings_daemon/plugins/housekeeping/ignore_paths" @@ -35,7 +35,7 @@ enum PROP_MOUNT_PATH }; -struct GsdLdsmDialogPrivate +struct MsdLdsmDialogPrivate { GtkWidget *primary_label; GtkWidget *secondary_label; @@ -48,17 +48,17 @@ struct GsdLdsmDialogPrivate gchar *mount_path; }; -#define GSD_LDSM_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_LDSM_DIALOG, GsdLdsmDialogPrivate)) +#define MSD_LDSM_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_LDSM_DIALOG, MsdLdsmDialogPrivate)) -static void gsd_ldsm_dialog_class_init (GsdLdsmDialogClass *klass); -static void gsd_ldsm_dialog_init (GsdLdsmDialog *dialog); +static void msd_ldsm_dialog_class_init (MsdLdsmDialogClass *klass); +static void msd_ldsm_dialog_init (MsdLdsmDialog *dialog); -G_DEFINE_TYPE (GsdLdsmDialog, gsd_ldsm_dialog, GTK_TYPE_DIALOG); +G_DEFINE_TYPE (MsdLdsmDialog, msd_ldsm_dialog, GTK_TYPE_DIALOG); static const gchar* -gsd_ldsm_dialog_get_checkbutton_text (GsdLdsmDialog *dialog) +msd_ldsm_dialog_get_checkbutton_text (MsdLdsmDialog *dialog) { - g_return_val_if_fail (GSD_IS_LDSM_DIALOG (dialog), NULL); + g_return_val_if_fail (MSD_IS_LDSM_DIALOG (dialog), NULL); if (dialog->priv->other_partitions) return _("Don't show any warnings again for this file system"); @@ -67,11 +67,11 @@ gsd_ldsm_dialog_get_checkbutton_text (GsdLdsmDialog *dialog) } static gchar* -gsd_ldsm_dialog_get_primary_text (GsdLdsmDialog *dialog) +msd_ldsm_dialog_get_primary_text (MsdLdsmDialog *dialog) { gchar *primary_text, *free_space; - g_return_val_if_fail (GSD_IS_LDSM_DIALOG (dialog), NULL); + g_return_val_if_fail (MSD_IS_LDSM_DIALOG (dialog), NULL); free_space = g_format_size_for_display (dialog->priv->space_remaining); @@ -89,9 +89,9 @@ gsd_ldsm_dialog_get_primary_text (GsdLdsmDialog *dialog) } static const gchar* -gsd_ldsm_dialog_get_secondary_text (GsdLdsmDialog *dialog) +msd_ldsm_dialog_get_secondary_text (MsdLdsmDialog *dialog) { - g_return_val_if_fail (GSD_IS_LDSM_DIALOG (dialog), NULL); + g_return_val_if_fail (MSD_IS_LDSM_DIALOG (dialog), NULL); if (dialog->priv->other_usable_partitions) { if (dialog->priv->has_trash) { @@ -148,7 +148,7 @@ static void ignore_check_button_toggled_cb (GtkToggleButton *button, gpointer user_data) { - GsdLdsmDialog *dialog = (GsdLdsmDialog *)user_data; + MsdLdsmDialog *dialog = (MsdLdsmDialog *)user_data; MateConfClient *client; GSList *ignore_paths; GError *error = NULL; @@ -191,12 +191,12 @@ ignore_check_button_toggled_cb (GtkToggleButton *button, } static void -gsd_ldsm_dialog_init (GsdLdsmDialog *dialog) +msd_ldsm_dialog_init (MsdLdsmDialog *dialog) { GtkWidget *main_vbox, *text_vbox, *hbox; GtkWidget *image; - dialog->priv = GSD_LDSM_DIALOG_GET_PRIVATE (dialog); + dialog->priv = MSD_LDSM_DIALOG_GET_PRIVATE (dialog); main_vbox = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); @@ -261,14 +261,14 @@ gsd_ldsm_dialog_init (GsdLdsmDialog *dialog) } static void -gsd_ldsm_dialog_finalize (GObject *object) +msd_ldsm_dialog_finalize (GObject *object) { - GsdLdsmDialog *self; + MsdLdsmDialog *self; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_LDSM_DIALOG (object)); + g_return_if_fail (MSD_IS_LDSM_DIALOG (object)); - self = GSD_LDSM_DIALOG (object); + self = MSD_LDSM_DIALOG (object); if (self->priv->partition_name) g_free (self->priv->partition_name); @@ -276,17 +276,17 @@ gsd_ldsm_dialog_finalize (GObject *object) if (self->priv->mount_path) g_free (self->priv->mount_path); - G_OBJECT_CLASS (gsd_ldsm_dialog_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_ldsm_dialog_parent_class)->finalize (object); } static void -gsd_ldsm_dialog_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) +msd_ldsm_dialog_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - GsdLdsmDialog *self; + MsdLdsmDialog *self; - g_return_if_fail (GSD_IS_LDSM_DIALOG (object)); + g_return_if_fail (MSD_IS_LDSM_DIALOG (object)); - self = GSD_LDSM_DIALOG (object); + self = MSD_LDSM_DIALOG (object); switch (prop_id) { @@ -315,13 +315,13 @@ gsd_ldsm_dialog_set_property (GObject *object, guint prop_id, const GValue *valu } static void -gsd_ldsm_dialog_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) +msd_ldsm_dialog_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - GsdLdsmDialog *self; + MsdLdsmDialog *self; - g_return_if_fail (GSD_IS_LDSM_DIALOG (object)); + g_return_if_fail (MSD_IS_LDSM_DIALOG (object)); - self = GSD_LDSM_DIALOG (object); + self = MSD_LDSM_DIALOG (object); switch (prop_id) { @@ -350,13 +350,13 @@ gsd_ldsm_dialog_get_property (GObject *object, guint prop_id, GValue *value, GPa } static void -gsd_ldsm_dialog_class_init (GsdLdsmDialogClass *klass) +msd_ldsm_dialog_class_init (MsdLdsmDialogClass *klass) { GObjectClass* object_class = G_OBJECT_CLASS (klass); - object_class->finalize = gsd_ldsm_dialog_finalize; - object_class->set_property = gsd_ldsm_dialog_set_property; - object_class->get_property = gsd_ldsm_dialog_get_property; + object_class->finalize = msd_ldsm_dialog_finalize; + object_class->set_property = msd_ldsm_dialog_set_property; + object_class->get_property = msd_ldsm_dialog_get_property; g_object_class_install_property (object_class, PROP_OTHER_USABLE_PARTITIONS, @@ -406,11 +406,11 @@ gsd_ldsm_dialog_class_init (GsdLdsmDialogClass *klass) "Unknown", G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); - g_type_class_add_private (klass, sizeof (GsdLdsmDialogPrivate)); + g_type_class_add_private (klass, sizeof (MsdLdsmDialogPrivate)); } -GsdLdsmDialog* -gsd_ldsm_dialog_new (gboolean other_usable_partitions, +MsdLdsmDialog* +msd_ldsm_dialog_new (gboolean other_usable_partitions, gboolean other_partitions, gboolean display_baobab, gboolean display_empty_trash, @@ -418,13 +418,13 @@ gsd_ldsm_dialog_new (gboolean other_usable_partitions, const gchar *partition_name, const gchar *mount_path) { - GsdLdsmDialog *dialog; + MsdLdsmDialog *dialog; GtkWidget *button_empty_trash, *button_ignore, *button_analyze; GtkWidget *empty_trash_image, *analyze_image, *ignore_image; gchar *primary_text, *primary_text_markup; const gchar *secondary_text, *checkbutton_text; - dialog = GSD_LDSM_DIALOG (g_object_new (GSD_TYPE_LDSM_DIALOG, + dialog = MSD_LDSM_DIALOG (g_object_new (MSD_TYPE_LDSM_DIALOG, "other-usable-partitions", other_usable_partitions, "other-partitions", other_partitions, "has-trash", display_empty_trash, @@ -437,7 +437,7 @@ gsd_ldsm_dialog_new (gboolean other_usable_partitions, if (dialog->priv->has_trash) { button_empty_trash = gtk_dialog_add_button (GTK_DIALOG (dialog), _("Empty Trash"), - GSD_LDSM_DIALOG_RESPONSE_EMPTY_TRASH); + MSD_LDSM_DIALOG_RESPONSE_EMPTY_TRASH); empty_trash_image = gtk_image_new_from_stock (GTK_STOCK_CLEAR, GTK_ICON_SIZE_BUTTON); gtk_button_set_image (GTK_BUTTON (button_empty_trash), empty_trash_image); } @@ -445,7 +445,7 @@ gsd_ldsm_dialog_new (gboolean other_usable_partitions, if (display_baobab) { button_analyze = gtk_dialog_add_button (GTK_DIALOG (dialog), _("Examine…"), - GSD_LDSM_DIALOG_RESPONSE_ANALYZE); + MSD_LDSM_DIALOG_RESPONSE_ANALYZE); analyze_image = gtk_image_new_from_icon_name ("baobab", GTK_ICON_SIZE_BUTTON); gtk_button_set_image (GTK_BUTTON (button_analyze), analyze_image); } @@ -459,14 +459,14 @@ gsd_ldsm_dialog_new (gboolean other_usable_partitions, gtk_widget_grab_default (button_ignore); /* Set the label text */ - primary_text = gsd_ldsm_dialog_get_primary_text (dialog); + primary_text = msd_ldsm_dialog_get_primary_text (dialog); primary_text_markup = g_markup_printf_escaped ("<big><b>%s</b></big>", primary_text); gtk_label_set_markup (GTK_LABEL (dialog->priv->primary_label), primary_text_markup); - secondary_text = gsd_ldsm_dialog_get_secondary_text (dialog); + secondary_text = msd_ldsm_dialog_get_secondary_text (dialog); gtk_label_set_text (GTK_LABEL (dialog->priv->secondary_label), secondary_text); - checkbutton_text = gsd_ldsm_dialog_get_checkbutton_text (dialog); + checkbutton_text = msd_ldsm_dialog_get_checkbutton_text (dialog); gtk_button_set_label (GTK_BUTTON (dialog->priv->ignore_check_button), checkbutton_text); g_free (primary_text); diff --git a/plugins/housekeeping/msd-ldsm-dialog.h b/plugins/housekeeping/msd-ldsm-dialog.h new file mode 100644 index 0000000..8b95fb9 --- /dev/null +++ b/plugins/housekeeping/msd-ldsm-dialog.h @@ -0,0 +1,72 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * + * msd-ldsm-dialog.c + * Copyright (C) Chris Coulson 2009 <[email protected]> + * + * msd-ldsm-dialog.c 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 3 of the License, or + * (at your option) any later version. + * + * msd-ldsm-dialog.c 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, see <http://www.gnu.org/licenses/>. + */ + +#ifndef _MSD_LDSM_DIALOG_H_ +#define _MSD_LDSM_DIALOG_H_ + +#include <glib-object.h> +#include <gtk/gtk.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#define MSD_TYPE_LDSM_DIALOG (msd_ldsm_dialog_get_type ()) +#define MSD_LDSM_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MSD_TYPE_LDSM_DIALOG, MsdLdsmDialog)) +#define MSD_LDSM_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MSD_TYPE_LDSM_DIALOG, MsdLdsmDialogClass)) +#define MSD_IS_LDSM_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MSD_TYPE_LDSM_DIALOG)) +#define MSD_IS_LDSM_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MSD_TYPE_LDSM_DIALOG)) +#define MSD_LDSM_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MSD_TYPE_LDSM_DIALOG, MsdLdsmDialogClass)) + +enum +{ + MSD_LDSM_DIALOG_RESPONSE_EMPTY_TRASH = -20, + MSD_LDSM_DIALOG_RESPONSE_ANALYZE = -21 +}; + +typedef struct MsdLdsmDialogPrivate MsdLdsmDialogPrivate; +typedef struct _MsdLdsmDialogClass MsdLdsmDialogClass; +typedef struct _MsdLdsmDialog MsdLdsmDialog; + +struct _MsdLdsmDialogClass +{ + GtkDialogClass parent_class; +}; + +struct _MsdLdsmDialog +{ + GtkDialog parent_instance; + MsdLdsmDialogPrivate *priv; +}; + +GType msd_ldsm_dialog_get_type (void) G_GNUC_CONST; + +MsdLdsmDialog * msd_ldsm_dialog_new (gboolean other_usable_partitions, + gboolean other_partitions, + gboolean display_baobab, + gboolean display_empty_trash, + gint64 space_remaining, + const gchar *partition_name, + const gchar *mount_path); + +#ifdef __cplusplus +} +#endif + +#endif /* _MSD_LDSM_DIALOG_H_ */ diff --git a/plugins/housekeeping/gsd-ldsm-trash-empty.c b/plugins/housekeeping/msd-ldsm-trash-empty.c index d4ea183..05f82cd 100644 --- a/plugins/housekeeping/gsd-ldsm-trash-empty.c +++ b/plugins/housekeeping/msd-ldsm-trash-empty.c @@ -1,15 +1,15 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- * - * gsd-ldsm-trash-empty.c + * msd-ldsm-trash-empty.c * Copyright (C) Chris Coulson 2009 <[email protected]> * (C) Ryan Lortie 2008 * - * gsd-ldsm-trash-empty.c is free software: you can redistribute it and/or modify it + * msd-ldsm-trash-empty.c 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 3 of the License, or * (at your option) any later version. * - * gsd-ldsm-trash-empty.c is distributed in the hope that it will be useful, but + * msd-ldsm-trash-empty.c 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. @@ -22,7 +22,7 @@ #include <glib/gi18n.h> #include <gio/gio.h> -#include "gsd-ldsm-trash-empty.h" +#include "msd-ldsm-trash-empty.h" #define CAJA_CONFIRM_TRASH_KEY "/apps/caja/preferences/confirm_trash" @@ -387,7 +387,7 @@ trash_empty_show_confirmation_dialog () } void -gsd_ldsm_trash_empty () +msd_ldsm_trash_empty () { if (trash_empty_confirm_dialog) gtk_window_present (GTK_WINDOW (trash_empty_confirm_dialog)); diff --git a/plugins/housekeeping/gsd-ldsm-trash-empty.h b/plugins/housekeeping/msd-ldsm-trash-empty.h index 4d46a5b..85b09c0 100644 --- a/plugins/housekeeping/gsd-ldsm-trash-empty.h +++ b/plugins/housekeeping/msd-ldsm-trash-empty.h @@ -1,14 +1,14 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- * - * gsd-ldsm-trash-empty.h + * msd-ldsm-trash-empty.h * Copyright (C) Chris Coulson 2009 <[email protected]> * - * gsd-ldsm-trash-empty.h is free software: you can redistribute it and/or modify it + * msd-ldsm-trash-empty.h 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 3 of the License, or * (at your option) any later version. * - * gsd-ldsm-trash-empty.h is distributed in the hope that it will be useful, but + * msd-ldsm-trash-empty.h 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. @@ -17,11 +17,11 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _gsd_ldsm_trash_empty_h_ -#define _gsd_ldsm_trash_empty_h_ +#ifndef _msd_ldsm_trash_empty_h_ +#define _msd_ldsm_trash_empty_h_ #include <gtk/gtk.h> -void gsd_ldsm_trash_empty (); +void msd_ldsm_trash_empty (); -#endif /* _gsd_ldsm_trash_empty_h_ */ +#endif /* _msd_ldsm_trash_empty_h_ */ |