diff options
author | Laurent Napias <[email protected]> | 2019-06-29 11:50:53 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-07-01 02:49:33 +0000 |
commit | 8d22bd7590c3487df96f8dc3972173236c66de87 (patch) | |
tree | 14ccecbfa067a2d7ab2bdb315686d01a20ecc084 /plugins | |
parent | 86362cdd37c71ad4d6b9a1c506838b201953fd29 (diff) | |
download | mate-settings-daemon-8d22bd7590c3487df96f8dc3972173236c66de87.tar.bz2 mate-settings-daemon-8d22bd7590c3487df96f8dc3972173236c66de87.tar.xz |
Remove trailing whitespaces
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/clipboard/list.c | 22 | ||||
-rw-r--r-- | plugins/clipboard/list.h | 14 | ||||
-rw-r--r-- | plugins/clipboard/xutils.c | 10 | ||||
-rw-r--r-- | plugins/clipboard/xutils.h | 2 | ||||
-rw-r--r-- | plugins/common/msd-osd-window.c | 2 | ||||
-rw-r--r-- | plugins/datetime/msd-datetime-mechanism.c | 22 | ||||
-rw-r--r-- | plugins/datetime/system-timezone.c | 14 | ||||
-rw-r--r-- | plugins/housekeeping/msd-disk-space.c | 14 | ||||
-rw-r--r-- | plugins/housekeeping/msd-ldsm-dialog.c | 108 | ||||
-rw-r--r-- | plugins/housekeeping/msd-ldsm-trash-empty.h | 8 | ||||
-rw-r--r-- | plugins/keyboard/msd-keyboard-xkb.c | 2 | ||||
-rw-r--r-- | plugins/mouse/msd-mouse-manager.c | 2 | ||||
-rw-r--r-- | plugins/mpris/msd-mpris-manager.c | 4 | ||||
-rw-r--r-- | plugins/xrandr/msd-xrandr-manager.c | 12 | ||||
-rw-r--r-- | plugins/xsettings/xsettings-common.c | 18 | ||||
-rw-r--r-- | plugins/xsettings/xsettings-common.h | 6 | ||||
-rw-r--r-- | plugins/xsettings/xsettings-manager.c | 32 | ||||
-rw-r--r-- | plugins/xsettings/xsettings-manager.h | 2 |
18 files changed, 147 insertions, 147 deletions
diff --git a/plugins/clipboard/list.c b/plugins/clipboard/list.c index 477eead..7f60bb1 100644 --- a/plugins/clipboard/list.c +++ b/plugins/clipboard/list.c @@ -15,7 +15,7 @@ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Matthias Clasen, Red Hat, Inc. @@ -26,8 +26,8 @@ void -list_foreach (List *list, - Callback func, +list_foreach (List *list, + Callback func, void *user_data) { while (list) @@ -57,14 +57,14 @@ list_free (List *list) while (list) { List *next = list->next; - + free (list); list = next; } } -List * +List * list_find (List *list, ListFindFunc func, void *user_data) @@ -85,7 +85,7 @@ list_remove (List *list, void *data) { List *tmp, *prev; - + prev = NULL; for (tmp = list; tmp; tmp = tmp->next) { @@ -93,7 +93,7 @@ list_remove (List *list, { if (prev) prev->next = tmp->next; - else + else list = tmp->next; free (tmp); @@ -115,7 +115,7 @@ list_length (List *list) length = 0; for (tmp = list; tmp; tmp = tmp->next) length++; - + return length; } @@ -131,7 +131,7 @@ list_copy (List *list) new_list = (List *) malloc (sizeof (List)); new_list->data = list->data; new_list->next = NULL; - + last = new_list; list = list->next; @@ -142,9 +142,9 @@ list_copy (List *list) last->data = list->data; list = list->next; } - + last->next = NULL; } - + return new_list; } diff --git a/plugins/clipboard/list.h b/plugins/clipboard/list.h index 158b779..04cf1e1 100644 --- a/plugins/clipboard/list.h +++ b/plugins/clipboard/list.h @@ -15,7 +15,7 @@ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Matthias Clasen, Red Hat, Inc. @@ -24,23 +24,23 @@ #define LIST_H -typedef struct _List List; -typedef void (*Callback) (void *data, +typedef struct _List List; +typedef void (*Callback) (void *data, void *user_data); -struct _List +struct _List { void *data; List *next; }; -typedef int (*ListFindFunc) (void *data, +typedef int (*ListFindFunc) (void *data, void *user_data); -void list_foreach (List *list, - Callback func, +void list_foreach (List *list, + Callback func, void *user_data); List *list_prepend (List *list, void *data); diff --git a/plugins/clipboard/xutils.c b/plugins/clipboard/xutils.c index 4e48b98..ef57a85 100644 --- a/plugins/clipboard/xutils.c +++ b/plugins/clipboard/xutils.c @@ -15,7 +15,7 @@ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Matthias Clasen, Red Hat, Inc. @@ -46,7 +46,7 @@ void init_atoms (Display *display) { unsigned long max_request_size; - + if (SELECTION_MAX_SIZE > 0) return; @@ -63,17 +63,17 @@ init_atoms (Display *display) XA_SAVE_TARGETS = XInternAtom (display, "SAVE_TARGETS", False); XA_TARGETS = XInternAtom (display, "TARGETS", False); XA_TIMESTAMP = XInternAtom (display, "TIMESTAMP", False); - + max_request_size = XExtendedMaxRequestSize (display); if (max_request_size == 0) max_request_size = XMaxRequestSize (display); - + SELECTION_MAX_SIZE = max_request_size - 100; if (SELECTION_MAX_SIZE > 262144) SELECTION_MAX_SIZE = 262144; } -typedef struct +typedef struct { Window window; Atom timestamp_prop_atom; diff --git a/plugins/clipboard/xutils.h b/plugins/clipboard/xutils.h index 143fe44..12a00e4 100644 --- a/plugins/clipboard/xutils.h +++ b/plugins/clipboard/xutils.h @@ -15,7 +15,7 @@ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Matthias Clasen, Red Hat, Inc. diff --git a/plugins/common/msd-osd-window.c b/plugins/common/msd-osd-window.c index ec5cbb2..b800410 100644 --- a/plugins/common/msd-osd-window.c +++ b/plugins/common/msd-osd-window.c @@ -2,7 +2,7 @@ * * On-screen-display (OSD) window for mate-settings-daemon's plugins * - * Copyright (C) 2006-2007 William Jon McCann <[email protected]> + * Copyright (C) 2006-2007 William Jon McCann <[email protected]> * Copyright (C) 2009 Novell, Inc * * Authors: diff --git a/plugins/datetime/msd-datetime-mechanism.c b/plugins/datetime/msd-datetime-mechanism.c index 1a89234..8be824e 100644 --- a/plugins/datetime/msd-datetime-mechanism.c +++ b/plugins/datetime/msd-datetime-mechanism.c @@ -96,7 +96,7 @@ GType msd_datetime_mechanism_error_get_type (void) { static GType etype = 0; - + if (etype == 0) { static const GEnumValue values[] = @@ -106,12 +106,12 @@ msd_datetime_mechanism_error_get_type (void) ENUM_ENTRY (MSD_DATETIME_MECHANISM_ERROR_INVALID_TIMEZONE_FILE, "InvalidTimezoneFile"), { 0, 0, 0 } }; - + g_assert (MSD_DATETIME_MECHANISM_NUM_ERRORS == G_N_ELEMENTS (values) - 1); - + etype = g_enum_register_static ("MsdDatetimeMechanismError", values); } - + return etype; } @@ -194,7 +194,7 @@ register_mechanism (MsdDatetimeMechanism *mechanism) goto error; } - dbus_g_connection_register_g_object (mechanism->priv->system_bus_connection, "/", + dbus_g_connection_register_g_object (mechanism->priv->system_bus_connection, "/", G_OBJECT (mechanism)); mechanism->priv->system_bus_proxy = dbus_g_proxy_new_for_name (mechanism->priv->system_bus_connection, @@ -287,7 +287,7 @@ _set_time (MsdDatetimeMechanism *mechanism, if (settimeofday (tv, NULL) != 0) { error = g_error_new (MSD_DATETIME_MECHANISM_ERROR, MSD_DATETIME_MECHANISM_ERROR_GENERAL, - "Error calling settimeofday({%ld,%ld}): %s", + "Error calling settimeofday({%ld,%ld}): %s", (gint64) tv->tv_sec, (gint64) tv->tv_usec, strerror (errno)); dbus_g_method_return_error (context, error); @@ -295,7 +295,7 @@ _set_time (MsdDatetimeMechanism *mechanism, return FALSE; } - if (g_file_test ("/sbin/hwclock", + if (g_file_test ("/sbin/hwclock", G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR | G_FILE_TEST_IS_EXECUTABLE)) { int exit_status; if (!g_spawn_command_line_sync ("/sbin/hwclock --systohc", NULL, NULL, &exit_status, &error)) { @@ -333,7 +333,7 @@ _rh_update_etc_sysconfig_clock (DBusGMethodInvocation *context, const char *key, char *data; gsize len; GError *error; - + error = NULL; if (!g_file_get_contents ("/etc/sysconfig/clock", &data, &len, &error)) { @@ -425,7 +425,7 @@ msd_datetime_mechanism_adjust_time (MsdDatetimeMechanism *mechanism, } tv.tv_sec += (time_t) seconds_to_add; - return _set_time (mechanism, &tv, context); + return _set_time (mechanism, &tv, context); } @@ -450,7 +450,7 @@ msd_datetime_mechanism_set_timezone (MsdDatetimeMechanism *mechanism, if (error->code == SYSTEM_TIMEZONE_ERROR_INVALID_TIMEZONE_FILE) code = MSD_DATETIME_MECHANISM_ERROR_INVALID_TIMEZONE_FILE; - else + else code = MSD_DATETIME_MECHANISM_ERROR_GENERAL; error2 = g_error_new (MSD_DATETIME_MECHANISM_ERROR, @@ -551,7 +551,7 @@ msd_datetime_mechanism_set_hardware_clock_using_utc (MsdDatetimeMechanism *mech "org.mate.settingsdaemon.datetimemechanism.configurehwclock")) return FALSE; - if (g_file_test ("/sbin/hwclock", + if (g_file_test ("/sbin/hwclock", G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR | G_FILE_TEST_IS_EXECUTABLE)) { int exit_status; char *cmd; diff --git a/plugins/datetime/system-timezone.c b/plugins/datetime/system-timezone.c index 1062334..d9e4909 100644 --- a/plugins/datetime/system-timezone.c +++ b/plugins/datetime/system-timezone.c @@ -3,7 +3,7 @@ * Copyright (C) 2008 Novell, Inc. * * Authors: Vincent Untz <[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 @@ -17,11 +17,11 @@ * 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 St, Fifth Floor, Boston, MA 02110-1301, USA. - * + * * Some code is based on previous code in clock-location.c and on code from * tz.c (shipped with version <= 2.22.0). Those files were under the same * license, with those authors and copyrights: - * + * * clock-location.c: * ================ * No header, but most of the work was done (AFAIK) by @@ -36,7 +36,7 @@ * Authors: Hans Petter Jansson <[email protected]> * additional functions by Erwann Chenede <[email protected]> * reworked by Vincent Untz <[email protected]> - * + * * Largely based on Michael Fulbright's work on Anaconda. */ @@ -160,7 +160,7 @@ system_timezone_init (SystemTimezone *systz) priv->tz = NULL; priv->env_tz = NULL; - for (i = 0; i < CHECK_NB; i++) + for (i = 0; i < CHECK_NB; i++) priv->monitors[i] = NULL; } @@ -214,7 +214,7 @@ system_timezone_constructor (GType type, if (priv->monitors[i]) g_signal_connect (G_OBJECT (priv->monitors[i]), - "changed", + "changed", G_CALLBACK (system_timezone_monitor_changed), obj); } @@ -447,7 +447,7 @@ system_timezone_write_key_file (const char *filename, gboolean replaced; gboolean retval; int n; - + if (!g_file_test (filename, G_FILE_TEST_IS_REGULAR)) return TRUE; diff --git a/plugins/housekeeping/msd-disk-space.c b/plugins/housekeeping/msd-disk-space.c index 505d6ab..33581d0 100644 --- a/plugins/housekeeping/msd-disk-space.c +++ b/plugins/housekeeping/msd-disk-space.c @@ -244,7 +244,7 @@ ldsm_mount_has_space (LdsmMountInfo *mount) /* enough free space, nothing to do */ if (free_space > free_percent_notify) return TRUE; - + if (((gint64) mount->buf.f_frsize * (gint64) mount->buf.f_bavail) > ((gint64) free_size_gb_no_notify * GIGABYTE)) return TRUE; @@ -277,7 +277,7 @@ ldsm_mount_is_user_ignore (const gchar *path) return TRUE; else return FALSE; -} +} static gboolean @@ -296,11 +296,11 @@ static gboolean ldsm_mount_should_ignore (GUnixMountEntry *mount) { const gchar *fs, *device, *path; - + path = g_unix_mount_get_mount_path (mount); if (ldsm_mount_is_user_ignore (path)) return TRUE; - + /* This is borrowed from GLib and used as a way to determine * which mounts we should ignore by default. GLib doesn't * expose this in a way that allows it to be used for this @@ -354,13 +354,13 @@ ldsm_mount_should_ignore (GUnixMountEntry *mount) "/dev/vn", NULL }; - + fs = g_unix_mount_get_fs_type (mount); device = g_unix_mount_get_device_path (mount); - + if (is_in (fs, ignore_fs)) return TRUE; - + if (is_in (device, ignore_devices)) return TRUE; diff --git a/plugins/housekeeping/msd-ldsm-dialog.c b/plugins/housekeeping/msd-ldsm-dialog.c index d9b5cd5..f045550 100644 --- a/plugins/housekeeping/msd-ldsm-dialog.c +++ b/plugins/housekeeping/msd-ldsm-dialog.c @@ -2,17 +2,17 @@ * * 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/>. */ @@ -60,7 +60,7 @@ static const gchar* msd_ldsm_dialog_get_checkbutton_text (MsdLdsmDialog *dialog) { 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"); else @@ -71,11 +71,11 @@ static gchar* msd_ldsm_dialog_get_primary_text (MsdLdsmDialog *dialog) { gchar *primary_text, *free_space; - + g_return_val_if_fail (MSD_IS_LDSM_DIALOG (dialog), NULL); - + free_space = g_format_size (dialog->priv->space_remaining); - + if (dialog->priv->other_partitions) { primary_text = g_strdup_printf (_("The volume \"%s\" has only %s disk space remaining."), dialog->priv->partition_name, free_space); @@ -83,17 +83,17 @@ msd_ldsm_dialog_get_primary_text (MsdLdsmDialog *dialog) primary_text = g_strdup_printf (_("This computer has only %s disk space remaining."), free_space); } - + g_free (free_space); - - return primary_text; + + return primary_text; } static const gchar* msd_ldsm_dialog_get_secondary_text (MsdLdsmDialog *dialog) { g_return_val_if_fail (MSD_IS_LDSM_DIALOG (dialog), NULL); - + if (dialog->priv->other_usable_partitions) { if (dialog->priv->has_trash) { return _("You can free up disk space by emptying the Trash, removing " \ @@ -127,21 +127,21 @@ update_ignore_paths (GSList **ignore_paths, { GSList *found; gchar *path_to_remove; - + found = g_slist_find_custom (*ignore_paths, mount_path, (GCompareFunc) ignore_path_compare); - + if (ignore && (found == NULL)) { *ignore_paths = g_slist_prepend (*ignore_paths, g_strdup (mount_path)); return TRUE; } - + if (!ignore && (found != NULL)) { path_to_remove = found->data; *ignore_paths = g_slist_remove (*ignore_paths, path_to_remove); g_free (path_to_remove); return TRUE; } - + return FALSE; } @@ -170,8 +170,8 @@ ignore_check_button_toggled_cb (GtkToggleButton *button, ignore_paths = g_slist_reverse (ignore_paths); ignore = gtk_toggle_button_get_active (button); - updated = update_ignore_paths (&ignore_paths, dialog->priv->mount_path, ignore); - + updated = update_ignore_paths (&ignore_paths, dialog->priv->mount_path, ignore); + if (updated) { GSList *l; GPtrArray *array = g_ptr_array_new (); @@ -190,7 +190,7 @@ ignore_check_button_toggled_cb (GtkToggleButton *button, g_slist_foreach (ignore_paths, (GFunc) g_free, NULL); g_slist_free (ignore_paths); - g_object_unref (settings); + g_object_unref (settings); } static void @@ -198,14 +198,14 @@ msd_ldsm_dialog_init (MsdLdsmDialog *dialog) { GtkWidget *main_vbox, *text_vbox, *hbox; GtkWidget *image; - + dialog->priv = MSD_LDSM_DIALOG_GET_PRIVATE (dialog); - + main_vbox = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); /* Set up all the window stuff here */ gtk_window_set_title (GTK_WINDOW (dialog), _("Low Disk Space")); - gtk_window_set_icon_name (GTK_WINDOW (dialog), + gtk_window_set_icon_name (GTK_WINDOW (dialog), "dialog-warning"); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); @@ -219,13 +219,13 @@ msd_ldsm_dialog_init (MsdLdsmDialog *dialog) gtk_widget_set_valign (image, GTK_ALIGN_END); /* Create the labels */ - dialog->priv->primary_label = gtk_label_new (NULL); + dialog->priv->primary_label = gtk_label_new (NULL); gtk_label_set_line_wrap (GTK_LABEL (dialog->priv->primary_label), TRUE); gtk_label_set_single_line_mode (GTK_LABEL (dialog->priv->primary_label), FALSE); gtk_label_set_max_width_chars (GTK_LABEL (dialog->priv->primary_label), 70); gtk_label_set_xalign (GTK_LABEL (dialog->priv->primary_label), 0.0); gtk_label_set_yalign (GTK_LABEL (dialog->priv->primary_label), 0.0); - + dialog->priv->secondary_label = gtk_label_new (NULL); gtk_label_set_line_wrap (GTK_LABEL (dialog->priv->secondary_label), TRUE); gtk_label_set_single_line_mode (GTK_LABEL (dialog->priv->secondary_label), FALSE); @@ -242,26 +242,26 @@ msd_ldsm_dialog_init (MsdLdsmDialog *dialog) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->priv->ignore_check_button), FALSE); g_signal_connect (dialog->priv->ignore_check_button, "toggled", G_CALLBACK (ignore_check_button_toggled_cb), dialog); - + /* Now set up the dialog's GtkBox's' */ gtk_box_set_spacing (GTK_BOX (main_vbox), 14); - + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); gtk_container_set_border_width (GTK_CONTAINER (hbox), 5); - + text_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12); - + gtk_box_pack_start (GTK_BOX (text_vbox), dialog->priv->primary_label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (text_vbox), dialog->priv->secondary_label, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (text_vbox), dialog->priv->ignore_check_button, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (hbox), text_vbox, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (hbox), text_vbox, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0); - + /* Set up the action area */ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (dialog))), 6); gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_action_area (GTK_DIALOG (dialog))), 5); - + gtk_widget_show_all (hbox); } @@ -269,18 +269,18 @@ static void msd_ldsm_dialog_finalize (GObject *object) { MsdLdsmDialog *self; - + g_return_if_fail (object != NULL); g_return_if_fail (MSD_IS_LDSM_DIALOG (object)); self = MSD_LDSM_DIALOG (object); - + if (self->priv->partition_name) g_free (self->priv->partition_name); - + if (self->priv->mount_path) g_free (self->priv->mount_path); - + G_OBJECT_CLASS (msd_ldsm_dialog_parent_class)->finalize (object); } @@ -288,9 +288,9 @@ static void msd_ldsm_dialog_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { MsdLdsmDialog *self; - + g_return_if_fail (MSD_IS_LDSM_DIALOG (object)); - + self = MSD_LDSM_DIALOG (object); switch (prop_id) @@ -323,9 +323,9 @@ static void msd_ldsm_dialog_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { MsdLdsmDialog *self; - + g_return_if_fail (MSD_IS_LDSM_DIALOG (object)); - + self = MSD_LDSM_DIALOG (object); switch (prop_id) @@ -386,7 +386,7 @@ msd_ldsm_dialog_class_init (MsdLdsmDialogClass *klass) "Set to TRUE if the partition has files in it's trash folder that can be deleted", FALSE, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); - + g_object_class_install_property (object_class, PROP_SPACE_REMAINING, g_param_spec_int64 ("space-remaining", @@ -394,7 +394,7 @@ msd_ldsm_dialog_class_init (MsdLdsmDialogClass *klass) "Specify how much space is remaining in bytes", G_MININT64, G_MAXINT64, 0, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); - + g_object_class_install_property (object_class, PROP_PARTITION_NAME, g_param_spec_string ("partition-name", @@ -402,7 +402,7 @@ msd_ldsm_dialog_class_init (MsdLdsmDialogClass *klass) "Specify the name of the partition", "Unknown", G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); - + g_object_class_install_property (object_class, PROP_MOUNT_PATH, g_param_spec_string ("mount-path", @@ -428,7 +428,7 @@ msd_ldsm_dialog_new (gboolean other_usable_partitions, GtkWidget *empty_trash_image, *analyze_image, *ignore_image; gchar *primary_text, *primary_text_markup; const gchar *secondary_text, *checkbutton_text; - + dialog = MSD_LDSM_DIALOG (g_object_new (MSD_TYPE_LDSM_DIALOG, "other-usable-partitions", other_usable_partitions, "other-partitions", other_partitions, @@ -437,7 +437,7 @@ msd_ldsm_dialog_new (gboolean other_usable_partitions, "partition-name", partition_name, "mount-path", mount_path, NULL)); - + /* Add some buttons */ if (dialog->priv->has_trash) { button_empty_trash = gtk_dialog_add_button (GTK_DIALOG (dialog), @@ -446,7 +446,7 @@ msd_ldsm_dialog_new (gboolean other_usable_partitions, empty_trash_image = gtk_image_new_from_icon_name ("edit-clear", GTK_ICON_SIZE_BUTTON); gtk_button_set_image (GTK_BUTTON (button_empty_trash), empty_trash_image); } - + if (display_baobab) { button_analyze = gtk_dialog_add_button (GTK_DIALOG (dialog), _("Examine…"), @@ -454,28 +454,28 @@ msd_ldsm_dialog_new (gboolean other_usable_partitions, analyze_image = gtk_image_new_from_icon_name ("baobab", GTK_ICON_SIZE_BUTTON); gtk_button_set_image (GTK_BUTTON (button_analyze), analyze_image); } - - button_ignore = gtk_dialog_add_button (GTK_DIALOG (dialog), - _("Ignore"), + + button_ignore = gtk_dialog_add_button (GTK_DIALOG (dialog), + _("Ignore"), GTK_RESPONSE_CANCEL); ignore_image = gtk_image_new_from_stock (GTK_STOCK_CANCEL, GTK_ICON_SIZE_BUTTON); gtk_button_set_image (GTK_BUTTON (button_ignore), ignore_image); - + gtk_widget_grab_default (button_ignore); - - /* Set the label text */ + + /* Set the label text */ 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 = msd_ldsm_dialog_get_secondary_text (dialog); gtk_label_set_text (GTK_LABEL (dialog->priv->secondary_label), secondary_text); - + 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); g_free (primary_text_markup); - + return dialog; -} +} diff --git a/plugins/housekeeping/msd-ldsm-trash-empty.h b/plugins/housekeeping/msd-ldsm-trash-empty.h index c65b55c..478f0a7 100644 --- a/plugins/housekeeping/msd-ldsm-trash-empty.h +++ b/plugins/housekeeping/msd-ldsm-trash-empty.h @@ -2,17 +2,17 @@ * * msd-ldsm-trash-empty.h * Copyright (C) Chris Coulson 2009 <[email protected]> - * + * * 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. - * + * * 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. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -24,4 +24,4 @@ void msd_ldsm_trash_empty (void); -#endif /* _msd_ldsm_trash_empty_h_ */ +#endif /* _msd_ldsm_trash_empty_h_ */ diff --git a/plugins/keyboard/msd-keyboard-xkb.c b/plugins/keyboard/msd-keyboard-xkb.c index 7e90f1c..578b0a6 100644 --- a/plugins/keyboard/msd-keyboard-xkb.c +++ b/plugins/keyboard/msd-keyboard-xkb.c @@ -268,7 +268,7 @@ status_icon_popup_menu_cb (GtkStatusIcon * icon, guint button, guint time) /* Fix any failures of compiz/other wm's to communicate with gtk for transparency */ screen = gtk_widget_get_screen(GTK_WIDGET(toplevel)); visual = gdk_screen_get_rgba_visual(screen); - gtk_widget_set_visual(GTK_WIDGET(toplevel), visual); + gtk_widget_set_visual(GTK_WIDGET(toplevel), visual); /* Set menu and it's toplevel window to follow panel theme */ context = gtk_widget_get_style_context (GTK_WIDGET(toplevel)); gtk_style_context_add_class(context,"gnome-panel-menu-bar"); diff --git a/plugins/mouse/msd-mouse-manager.c b/plugins/mouse/msd-mouse-manager.c index 134e1b7..e0a0a29 100644 --- a/plugins/mouse/msd-mouse-manager.c +++ b/plugins/mouse/msd-mouse-manager.c @@ -1615,7 +1615,7 @@ msd_mouse_manager_idle_cb (MsdMouseManager *manager) #if 0 /* FIXME need to fork (?) mousetweaks for this to work */ set_mousetweaks_daemon (manager, - g_settings_get_boolean (manager->priv->settings_mouse_a11y, + g_settings_get_boolean (manager->priv->settings_mouse_a11y, KEY_MOUSE_A11Y_DWELL_ENABLE), g_settings_get_boolean (manager->priv->settings_mouse_a11y, KEY_MOUSE_A11Y_DELAY_ENABLE)); diff --git a/plugins/mpris/msd-mpris-manager.c b/plugins/mpris/msd-mpris-manager.c index ea61125..dd1b765 100644 --- a/plugins/mpris/msd-mpris-manager.c +++ b/plugins/mpris/msd-mpris-manager.c @@ -183,7 +183,7 @@ on_media_player_key_pressed (MsdMprisManager *manager, { mpris_head = g_queue_peek_head (manager->priv->media_player_queue); mpris_name = g_strdup_printf (MPRIS_PREFIX "%s", mpris_head); - + g_debug ("MPRIS Sending '%s' to '%s'!", mpris_key, mpris_head); proxy = g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SESSION, @@ -321,7 +321,7 @@ msd_mpris_manager_start (MsdMprisManager *manager, { GBusNameWatcherFlags flags = G_BUS_NAME_WATCHER_FLAGS_NONE; int i; - + g_debug ("Starting mpris manager"); mate_settings_profile_start (NULL); diff --git a/plugins/xrandr/msd-xrandr-manager.c b/plugins/xrandr/msd-xrandr-manager.c index fff0c9b..496348e 100644 --- a/plugins/xrandr/msd-xrandr-manager.c +++ b/plugins/xrandr/msd-xrandr-manager.c @@ -2009,7 +2009,7 @@ monitor_activate_cb (GtkCheckMenuItem *item, gpointer data) return; } - try_to_apply_intended_configuration (manager, NULL, gtk_get_current_event_time (), NULL); + try_to_apply_intended_configuration (manager, NULL, gtk_get_current_event_time (), NULL); } static void @@ -2060,7 +2060,7 @@ mirror_outputs_cb(GtkCheckMenuItem *item, gpointer data) } mate_rr_config_save (config, NULL); - try_to_apply_intended_configuration (manager, NULL, gtk_get_current_event_time (), NULL); + try_to_apply_intended_configuration (manager, NULL, gtk_get_current_event_time (), NULL); g_object_unref (config); @@ -2073,7 +2073,7 @@ mirror_outputs_cb(GtkCheckMenuItem *item, gpointer data) if (config == NULL) run_display_capplet(GTK_WIDGET(item)); mate_rr_config_save (config, NULL); - try_to_apply_intended_configuration (manager, NULL, gtk_get_current_event_time (), NULL); + try_to_apply_intended_configuration (manager, NULL, gtk_get_current_event_time (), NULL); g_object_unref (config); @@ -2172,7 +2172,7 @@ add_rotation_items_for_output (MsdXrandrManager *manager, MateRROutputInfo *outp static void add_enable_option_for_output (MsdXrandrManager *manager, MateRROutputInfo *output) { - struct MsdXrandrManagerPrivate *priv = manager->priv; + struct MsdXrandrManagerPrivate *priv = manager->priv; GtkWidget *item; gulong activate_id; @@ -2245,7 +2245,7 @@ add_menu_items_for_clone (MsdXrandrManager *manager) gulong activate_id; item = gtk_check_menu_item_new_with_label("Same output all monitors"); - gtk_widget_set_tooltip_text(item, "Mirror same output to all monitors and turn them on"); + gtk_widget_set_tooltip_text(item, "Mirror same output to all monitors and turn them on"); gtk_widget_show_all (item); gtk_menu_shell_append (GTK_MENU_SHELL (priv->popup_menu), item); activate_id = g_signal_connect (item, "activate", @@ -2310,7 +2310,7 @@ status_icon_popup_menu (MsdXrandrManager *manager, guint button, guint32 timesta g_signal_connect (priv->popup_menu, "selection-done", G_CALLBACK (status_icon_popup_menu_selection_done_cb), manager); - + /*Set up custom theming and forced transparency support*/ GtkWidget *toplevel = gtk_widget_get_toplevel (priv->popup_menu); /*Fix any failures of compiz/other wm's to communicate with gtk for transparency */ diff --git a/plugins/xsettings/xsettings-common.c b/plugins/xsettings/xsettings-common.c index 992175a..8e3e04c 100644 --- a/plugins/xsettings/xsettings-common.c +++ b/plugins/xsettings/xsettings-common.c @@ -15,7 +15,7 @@ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Owen Taylor, Red Hat, Inc. @@ -33,7 +33,7 @@ xsettings_setting_copy (XSettingsSetting *setting) { XSettingsSetting *result; size_t str_len; - + result = malloc (sizeof *result); if (!result) return NULL; @@ -73,7 +73,7 @@ xsettings_setting_copy (XSettingsSetting *setting) if (result->name) free (result->name); free (result); - + return NULL; } @@ -105,7 +105,7 @@ xsettings_list_copy (XSettingsList *list) new = new_node; new_iter = new_node; - + old_iter = old_iter->next; } @@ -147,7 +147,7 @@ xsettings_setting_free (XSettingsSetting *setting) { if (setting->type == XSETTINGS_TYPE_STRING) free (setting->data.v_string); - + if (setting->name) free (setting->name); @@ -197,14 +197,14 @@ xsettings_list_insert (XSettingsList **list, last = iter; iter = iter->next; } - + if (last) last->next = node; else *list = node; - + node->next = iter; - + return XSETTINGS_SUCCESS; } @@ -224,7 +224,7 @@ xsettings_list_delete (XSettingsList **list, last->next = iter->next; else *list = iter->next; - + xsettings_setting_free (iter->setting); free (iter); diff --git a/plugins/xsettings/xsettings-common.h b/plugins/xsettings/xsettings-common.h index e3af4a6..caf0e59 100644 --- a/plugins/xsettings/xsettings-common.h +++ b/plugins/xsettings/xsettings-common.h @@ -15,7 +15,7 @@ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Owen Taylor, Red Hat, Inc. @@ -35,7 +35,7 @@ typedef struct _XSettingsSetting XSettingsSetting; /* Types of settings possible. Enum values correspond to * protocol values. */ -typedef enum +typedef enum { XSETTINGS_TYPE_INT = 0, XSETTINGS_TYPE_STRING = 1, @@ -75,7 +75,7 @@ struct _XSettingsSetting { char *name; XSettingsType type; - + union { int v_int; char *v_string; diff --git a/plugins/xsettings/xsettings-manager.c b/plugins/xsettings/xsettings-manager.c index 6578ce1..3d933d5 100644 --- a/plugins/xsettings/xsettings-manager.c +++ b/plugins/xsettings/xsettings-manager.c @@ -15,7 +15,7 @@ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Owen Taylor, Red Hat, Inc. @@ -47,7 +47,7 @@ struct _XSettingsManager static XSettingsList *settings; -typedef struct +typedef struct { Window window; Atom timestamp_prop_atom; @@ -74,9 +74,9 @@ timestamp_predicate (Display *display, * @window: a #Window, used for communication with the server. * The window must have PropertyChangeMask in its * events mask or a hang will result. - * - * Routine to get the current X server time stamp. - * + * + * Routine to get the current X server time stamp. + * * Return value: the time stamp. **/ static Time @@ -106,7 +106,7 @@ xsettings_manager_check_running (Display *display, { char buffer[256]; Atom selection_atom; - + sprintf(buffer, "_XSETTINGS_S%d", screen); selection_atom = XInternAtom (display, buffer, False); @@ -127,7 +127,7 @@ xsettings_manager_new (Display *display, XClientMessageEvent xev; char buffer[256]; - + manager = malloc (sizeof *manager); if (!manager) return NULL; @@ -174,7 +174,7 @@ xsettings_manager_new (Display *display, xev.data.l[2] = manager->window; xev.data.l[3] = 0; /* manager specific data */ xev.data.l[4] = 0; /* manager specific data */ - + XSendEvent (display, RootWindow (display, screen), False, StructureNotifyMask, (XEvent *)&xev); } @@ -182,7 +182,7 @@ xsettings_manager_new (Display *display, { manager->terminate (manager->cb_data); } - + return manager; } @@ -190,7 +190,7 @@ void xsettings_manager_destroy (XSettingsManager *manager) { XDestroyWindow (manager->display, manager->window); - + xsettings_list_free (manager->settings); free (manager); } @@ -242,11 +242,11 @@ xsettings_manager_set_setting (XSettingsManager *manager, new_setting = xsettings_setting_copy (setting); if (!new_setting) return XSETTINGS_NO_MEM; - + new_setting->last_change_serial = manager->serial; - + result = xsettings_list_insert (&settings, new_setting); - + if (result != XSETTINGS_SUCCESS) xsettings_setting_free (new_setting); @@ -335,7 +335,7 @@ setting_store (XSettingsSetting *setting, memcpy (buffer->pos, setting->name, string_len); length -= string_len; buffer->pos += string_len; - + while (length > 0) { *(buffer->pos++) = 0; @@ -355,12 +355,12 @@ setting_store (XSettingsSetting *setting, string_len = strlen (setting->data.v_string); *(CARD32 *)(buffer->pos) = string_len; buffer->pos += 4; - + length = XSETTINGS_PAD (string_len, 4); memcpy (buffer->pos, setting->data.v_string, string_len); length -= string_len; buffer->pos += string_len; - + while (length > 0) { *(buffer->pos++) = 0; diff --git a/plugins/xsettings/xsettings-manager.h b/plugins/xsettings/xsettings-manager.h index f309768..40681ae 100644 --- a/plugins/xsettings/xsettings-manager.h +++ b/plugins/xsettings/xsettings-manager.h @@ -15,7 +15,7 @@ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Owen Taylor, Red Hat, Inc. |