summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-10-27 18:10:02 +0200
committerraveit65 <[email protected]>2021-12-11 15:25:56 +0100
commit8da9bfdbc16d5516ec6088f27088caac7780374f (patch)
tree7ab6c588bea6fab7a76803cf886b897c5e3d0d03
parenta935712451ee1d7d9eb466294c75c5abe727115c (diff)
downloadmate-sensors-applet-8da9bfdbc16d5516ec6088f27088caac7780374f.tar.bz2
mate-sensors-applet-8da9bfdbc16d5516ec6088f27088caac7780374f.tar.xz
Use a blank line at most
-rw-r--r--plugins/acpi/acpi-plugin.c1
-rw-r--r--plugins/dummy/dummy-plugin.c5
-rw-r--r--plugins/i2c-proc/i2c-proc-plugin.c1
-rw-r--r--plugins/i2c-sys/i2c-sys-plugin.c1
-rw-r--r--plugins/i2c-sys/i2c-sys-plugin.h1
-rw-r--r--plugins/ibm-acpi/ibm-acpi-plugin.c2
-rw-r--r--plugins/libsensors/libsensors-plugin.c1
-rw-r--r--plugins/mbmon/mbmon-plugin.c1
-rw-r--r--plugins/nvidia/nvidia-plugin.c1
-rw-r--r--plugins/omnibook/omnibook-plugin.c1
-rw-r--r--plugins/omnibook/omnibook-plugin.h1
-rw-r--r--plugins/pmu-sys/pmu-sys-plugin.c2
-rw-r--r--plugins/smu-sys/smu-sys-plugin.c2
-rw-r--r--plugins/sonypi/sonypi-plugin.c1
-rw-r--r--plugins/udisks2/udisks2-plugin.c9
-rw-r--r--sensors-applet/active-sensor.c1
-rw-r--r--sensors-applet/prefs-dialog.c10
-rw-r--r--sensors-applet/sensor-config-dialog.c3
-rw-r--r--sensors-applet/sensors-applet-plugin.h1
-rw-r--r--sensors-applet/sensors-applet-sensor.h1
-rw-r--r--sensors-applet/sensors-applet-settings.c4
-rw-r--r--sensors-applet/sensors-applet.c4
-rw-r--r--sensors-applet/sensors-applet.h3
23 files changed, 0 insertions, 57 deletions
diff --git a/plugins/acpi/acpi-plugin.c b/plugins/acpi/acpi-plugin.c
index 3f3cb07..add40a5 100644
--- a/plugins/acpi/acpi-plugin.c
+++ b/plugins/acpi/acpi-plugin.c
@@ -43,7 +43,6 @@ static void acpi_plugin_add_sensor(GList **sensors, const gchar *path) {
gchar *dirname;
gchar *id;
-
dirname = g_path_get_dirname(path);
id = g_path_get_basename(dirname);
g_free(dirname);
diff --git a/plugins/dummy/dummy-plugin.c b/plugins/dummy/dummy-plugin.c
index ed3ae6b..9dfd014 100644
--- a/plugins/dummy/dummy-plugin.c
+++ b/plugins/dummy/dummy-plugin.c
@@ -20,7 +20,6 @@
/* Dummy plugin to be able to test msa in a VM */
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */
@@ -29,7 +28,6 @@
#include <stdlib.h>
#include "dummy-plugin.h"
-
// remove // from next line for syslog debug
//#define DPDBG 1
@@ -37,10 +35,8 @@
#include <syslog.h>
#endif
-
const gchar *plugin_name = "dummy";
-
static void dummy_plugin_get_sensors(GList **sensors) {
/* dummy HDD temp sensor */
@@ -96,7 +92,6 @@ static gdouble dummy_plugin_get_sensor_value(const gchar *path,
}
-
/* API functions */
const gchar *sensors_applet_plugin_name(void) {
return plugin_name;
diff --git a/plugins/i2c-proc/i2c-proc-plugin.c b/plugins/i2c-proc/i2c-proc-plugin.c
index 379fdaa..1ed81fe 100644
--- a/plugins/i2c-proc/i2c-proc-plugin.c
+++ b/plugins/i2c-proc/i2c-proc-plugin.c
@@ -119,7 +119,6 @@ static void i2c_proc_plugin_test_sensor(GList **sensors, const gchar *path) {
}
-
/* to be called to setup for proc sensors */
static GList *i2c_proc_plugin_init(void) {
GList *sensors = NULL;
diff --git a/plugins/i2c-sys/i2c-sys-plugin.c b/plugins/i2c-sys/i2c-sys-plugin.c
index 4232283..b39ede4 100644
--- a/plugins/i2c-sys/i2c-sys-plugin.c
+++ b/plugins/i2c-sys/i2c-sys-plugin.c
@@ -135,7 +135,6 @@ if ((g_str_has_suffix(filename, "_input") &&
g_free(filename);
}
-
/* to be called to setup for sys sensors */
static GList *i2c_sys_plugin_init(void) {
GList *sensors = NULL;
diff --git a/plugins/i2c-sys/i2c-sys-plugin.h b/plugins/i2c-sys/i2c-sys-plugin.h
index a3941d3..d1e5ece 100644
--- a/plugins/i2c-sys/i2c-sys-plugin.h
+++ b/plugins/i2c-sys/i2c-sys-plugin.h
@@ -22,5 +22,4 @@
#include <sensors-applet/sensors-applet-plugin.h>
-
#endif /* I2C_SYS_PLUGIN_H*/
diff --git a/plugins/ibm-acpi/ibm-acpi-plugin.c b/plugins/ibm-acpi/ibm-acpi-plugin.c
index 24972d0..9bf3615 100644
--- a/plugins/ibm-acpi/ibm-acpi-plugin.c
+++ b/plugins/ibm-acpi/ibm-acpi-plugin.c
@@ -43,13 +43,11 @@ const gchar *plugin_name = "ibm-acpi";
#define BAT1 "BAT1"
#define FAN "FAN"
-
enum {
IBM_ACPI_FILE_OPEN_ERROR,
IBM_ACPI_FILE_READ_ERROR
};
-
static void ibm_acpi_plugin_setup_manually(GList **sensors) {
if (g_file_test(IBM_ACPI_TEMPERATURE_FILE, G_FILE_TEST_EXISTS)) {
gchar *label;
diff --git a/plugins/libsensors/libsensors-plugin.c b/plugins/libsensors/libsensors-plugin.c
index b587933..b95b888 100644
--- a/plugins/libsensors/libsensors-plugin.c
+++ b/plugins/libsensors/libsensors-plugin.c
@@ -435,7 +435,6 @@ static gdouble libsensors_plugin_get_sensor_value(const gchar *path,
return result;
}
-
static GList *libsensors_plugin_init(void) {
GError *err = NULL;
diff --git a/plugins/mbmon/mbmon-plugin.c b/plugins/mbmon/mbmon-plugin.c
index 1bbf3fc..e5f7c20 100644
--- a/plugins/mbmon/mbmon-plugin.c
+++ b/plugins/mbmon/mbmon-plugin.c
@@ -211,7 +211,6 @@ static GList *mbmon_plugin_init(void) {
return sensors;
}
-
/* returns the value of the sensor_list at the given iter, or if an
error occurs, instatiates error with an error message */
static gdouble mbmon_plugin_get_sensor_value(const gchar *path,
diff --git a/plugins/nvidia/nvidia-plugin.c b/plugins/nvidia/nvidia-plugin.c
index 0aaa649..2643a2a 100644
--- a/plugins/nvidia/nvidia-plugin.c
+++ b/plugins/nvidia/nvidia-plugin.c
@@ -220,4 +220,3 @@ gdouble sensors_applet_plugin_get_sensor_value(const gchar *path,
return nvidia_plugin_get_sensor_value(path, id, type, error);
}
-
diff --git a/plugins/omnibook/omnibook-plugin.c b/plugins/omnibook/omnibook-plugin.c
index 4e237b9..5d6ff91 100644
--- a/plugins/omnibook/omnibook-plugin.c
+++ b/plugins/omnibook/omnibook-plugin.c
@@ -53,7 +53,6 @@ static void omnibook_plugin_setup_manually(GList **sensors) {
}
}
-
/* to be called to setup for sys sensors */
static GList *omnibook_plugin_init(void) {
GList *sensors = NULL;
diff --git a/plugins/omnibook/omnibook-plugin.h b/plugins/omnibook/omnibook-plugin.h
index e5caf07..179f236 100644
--- a/plugins/omnibook/omnibook-plugin.h
+++ b/plugins/omnibook/omnibook-plugin.h
@@ -22,5 +22,4 @@
#include <sensors-applet/sensors-applet-plugin.h>
-
#endif /* OMNIBOOK_PLUGIN_H*/
diff --git a/plugins/pmu-sys/pmu-sys-plugin.c b/plugins/pmu-sys/pmu-sys-plugin.c
index 6585ddf..1cac7e9 100644
--- a/plugins/pmu-sys/pmu-sys-plugin.c
+++ b/plugins/pmu-sys/pmu-sys-plugin.c
@@ -42,7 +42,6 @@ const gchar *plugin_name = "pmu-sys";
#define TEMPERATURE "_temperature"
#define FAN_SPEED "_fan_speed"
-
enum {
PMU_SYS_DEVICE_FILE_OPEN_ERROR,
PMU_SYS_DEVICE_FILE_READ_ERROR
@@ -118,7 +117,6 @@ static void pmu_sys_plugin_test_sensor(GList **sensors, const gchar *path) {
g_free(filename);
}
-
/* to be called to setup for sys sensors */
GList *pmu_sys_plugin_init(void) {
GList *sensors = NULL;
diff --git a/plugins/smu-sys/smu-sys-plugin.c b/plugins/smu-sys/smu-sys-plugin.c
index 22f97f0..fbf3ff6 100644
--- a/plugins/smu-sys/smu-sys-plugin.c
+++ b/plugins/smu-sys/smu-sys-plugin.c
@@ -40,7 +40,6 @@ const gchar *plugin_name = "smu-sys";
#define TEMPERATURE "-temp"
#define FAN_SPEED "-fan"
-
enum {
SMU_SYS_DEVICE_FILE_OPEN_ERROR,
SMU_SYS_DEVICE_FILE_READ_ERROR
@@ -110,7 +109,6 @@ static void smu_sys_plugin_test_sensor(GList **sensors, const gchar *path) {
g_free(filename);
}
-
/* to be called to setup for sys sensors */
GList *smu_sys_plugin_init(void) {
GList *sensors = NULL;
diff --git a/plugins/sonypi/sonypi-plugin.c b/plugins/sonypi/sonypi-plugin.c
index e37eaf1..8a69cf4 100644
--- a/plugins/sonypi/sonypi-plugin.c
+++ b/plugins/sonypi/sonypi-plugin.c
@@ -52,7 +52,6 @@ enum {
SONYPI_DEVICE_FILE_READ_ERROR
};
-
GList *sonypi_plugin_init(void) {
int fd;
GList *sensors = NULL;
diff --git a/plugins/udisks2/udisks2-plugin.c b/plugins/udisks2/udisks2-plugin.c
index f8a0c41..39d2d9a 100644
--- a/plugins/udisks2/udisks2-plugin.c
+++ b/plugins/udisks2/udisks2-plugin.c
@@ -31,7 +31,6 @@ https://developer.gnome.org/gio/stable/index.html
*/
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */
@@ -40,7 +39,6 @@ https://developer.gnome.org/gio/stable/index.html
#include <gio/gio.h>
#include "udisks2-plugin.h"
-
/* remove // from next line for syslog debug */
//#define UD2PD 1
@@ -48,7 +46,6 @@ https://developer.gnome.org/gio/stable/index.html
#include <syslog.h>
#endif
-
#define UDISKS2_BUS_NAME "org.freedesktop.UDisks2"
#define UDISKS2_INTERFACE_NAME "org.freedesktop.DBus.ObjectManager"
#define UDISKS2_DEVICE_INTERFACE_NAME "org.freedesktop.UDisks2.Drive"
@@ -57,7 +54,6 @@ https://developer.gnome.org/gio/stable/index.html
#define UDISKS2_PROPERTIES_INTERFACE "org.freedesktop.DBus.Properties"
#define UDISKS2_OBJECT_PATH "/org/freedesktop/UDisks2"
-
/* Info about a single sensor */
typedef struct _DevInfo {
gchar *path;
@@ -67,7 +63,6 @@ typedef struct _DevInfo {
GError *error;
} DevInfo;
-
const gchar *plugin_name = "udisks2";
/* a container for the devices found to have smart enabled */
@@ -76,7 +71,6 @@ GHashTable *devices = NULL;
/* This is a global variable for convenience */
GDBusConnection *connection = NULL;
-
static void update_device (DevInfo *info) {
GError *error = NULL;
GVariant *tempgvar = NULL;
@@ -301,7 +295,6 @@ syslog(LOG_ERR, "key value: %s", key);
propdict = g_variant_lookup_value (value, UDISKS2_DEVICE_INTERFACE_NAME, G_VARIANT_TYPE_DICTIONARY);
propdict2 = g_variant_lookup_value (value, UDISKS2_DEVICE_INTERFACE2_NAME, G_VARIANT_TYPE_DICTIONARY);
-
/* do we have the right ifname keys? */
if ((NULL != propdict) && (NULL != propdict2)) {
@@ -402,7 +395,6 @@ syslog(LOG_ERR, "b4 free3");
} /* end of while loop */
-
g_variant_unref (managed_objects);
g_clear_object (&proxy);
if (NULL == devices) {
@@ -435,7 +427,6 @@ static gdouble udisks2_plugin_get_sensor_value (const gchar *path,
return info->temp;
}
-
/* API functions */
const gchar *sensors_applet_plugin_name (void) {
return plugin_name;
diff --git a/sensors-applet/active-sensor.c b/sensors-applet/active-sensor.c
index 012d2b4..d273b1b 100644
--- a/sensors-applet/active-sensor.c
+++ b/sensors-applet/active-sensor.c
@@ -55,7 +55,6 @@ static const gchar * const temp_overlay_icons[] = {
PIXMAPS_DIR "very-high-temp-icon.png"
};
-
static gdouble sensor_value_range_normalised(gdouble value,
gdouble low_value,
gdouble high_value) {
diff --git a/sensors-applet/prefs-dialog.c b/sensors-applet/prefs-dialog.c
index 5b511c8..58b839d 100644
--- a/sensors-applet/prefs-dialog.c
+++ b/sensors-applet/prefs-dialog.c
@@ -30,7 +30,6 @@
#define OLD_TEMP_SCALE 0
#define NEW_TEMP_SCALE 1
-
/* when a user closes the prefs-dialog we assume that applet is now
setup, so store all values in gsettings */
void prefs_dialog_close(SensorsApplet *sensors_applet) {
@@ -86,7 +85,6 @@ void prefs_dialog_response(GtkDialog *prefs_dialog,
}
}
-
static gboolean prefs_dialog_convert_low_and_high_values(GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
@@ -111,7 +109,6 @@ static gboolean prefs_dialog_convert_low_and_high_values(GtkTreeModel *model,
scales[OLD_TEMP_SCALE],
scales[NEW_TEMP_SCALE]);
-
gtk_tree_store_set(GTK_TREE_STORE(model),
iter,
LOW_VALUE_COLUMN, low_value,
@@ -121,7 +118,6 @@ static gboolean prefs_dialog_convert_low_and_high_values(GtkTreeModel *model,
return FALSE;
}
-
static void prefs_dialog_timeout_changed(GtkSpinButton *button,
PrefsDialog *prefs_dialog) {
@@ -133,7 +129,6 @@ static void prefs_dialog_timeout_changed(GtkSpinButton *button,
static void prefs_dialog_display_mode_changed(GtkComboBox *display_mode_combo_box,
PrefsDialog *prefs_dialog) {
-
int display_mode;
display_mode = gtk_combo_box_get_active(display_mode_combo_box);
@@ -205,7 +200,6 @@ static void prefs_dialog_show_units_toggled (GtkCheckButton *show_units, PrefsDi
sensors_applet_update_active_sensors (prefs_dialog->sensors_applet);
}
-
#ifdef HAVE_LIBNOTIFY
static void prefs_dialog_display_notifications_toggled(GtkCheckButton *display_notifications,
PrefsDialog *prefs_dialog) {
@@ -225,7 +219,6 @@ static void prefs_dialog_display_notifications_toggled(GtkCheckButton *display_n
}
#endif
-
static void prefs_dialog_graph_size_changed(GtkSpinButton *button,
PrefsDialog *prefs_dialog) {
@@ -427,7 +420,6 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) {
GTK_RESPONSE_CLOSE,
NULL));
-
gtk_window_set_icon_name(GTK_WINDOW(prefs_dialog->dialog), "mate-sensors-applet");
g_object_set(prefs_dialog->dialog,
@@ -794,7 +786,6 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) {
"visible", VISIBLE_COLUMN,
NULL);
-
gtk_tree_view_column_set_min_width(prefs_dialog->enable_column, 90);
prefs_dialog->icon_column = gtk_tree_view_column_new_with_attributes(_("Icon"),
@@ -928,6 +919,5 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) {
content_area = gtk_dialog_get_content_area (prefs_dialog->dialog);
gtk_box_pack_start (GTK_BOX(content_area), GTK_WIDGET(prefs_dialog->notebook), TRUE, TRUE, 0);
-
gtk_widget_show_all(GTK_WIDGET(prefs_dialog->dialog));
}
diff --git a/sensors-applet/sensor-config-dialog.c b/sensors-applet/sensor-config-dialog.c
index 53f1bdd..ecf27b5 100644
--- a/sensors-applet/sensor-config-dialog.c
+++ b/sensors-applet/sensor-config-dialog.c
@@ -69,7 +69,6 @@ typedef struct {
GtkSizeGroup *size_group;
} SensorConfigDialog;
-
static void sensor_config_dialog_response(GtkDialog *dialog,
gint response,
gpointer data) {
@@ -386,7 +385,6 @@ void sensor_config_dialog_create(SensorsApplet *sensors_applet) {
-1);
header_text = g_strdup_printf("%s - %s", _("Sensor Properties"), sensor_label);
-
config_dialog->dialog = GTK_DIALOG(gtk_dialog_new_with_buttons(header_text,
GTK_WINDOW(sensors_applet->prefs_dialog->dialog),
GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -396,7 +394,6 @@ void sensor_config_dialog_create(SensorsApplet *sensors_applet) {
GTK_RESPONSE_CLOSE,
NULL));
-
gtk_window_set_icon_name(GTK_WINDOW(config_dialog->dialog), "sensors-applet");
g_free(header_text);
diff --git a/sensors-applet/sensors-applet-plugin.h b/sensors-applet/sensors-applet-plugin.h
index 6ba04c0..5f48b48 100644
--- a/sensors-applet/sensors-applet-plugin.h
+++ b/sensors-applet/sensors-applet-plugin.h
@@ -27,7 +27,6 @@ GQuark sensors_applet_plugin_error_quark(void);
/* for error handling */
#define SENSORS_APPLET_PLUGIN_ERROR (sensors_applet_plugin_error_quark())
-
/**
* Initialises the plugin, and returns the list of SensorsAppletSensorInfo
* structs to create the sensors for this plugin from
diff --git a/sensors-applet/sensors-applet-sensor.h b/sensors-applet/sensors-applet-sensor.h
index 63954f5..ed874d1 100644
--- a/sensors-applet/sensors-applet-sensor.h
+++ b/sensors-applet/sensors-applet-sensor.h
@@ -61,5 +61,4 @@ typedef struct _SensorsAppletSensorInfo {
gchar *graph_color; /* must be dynamically allocated */
} SensorsAppletSensorInfo;
-
#endif // SENSORS_APPLET_SENSOR_H
diff --git a/sensors-applet/sensors-applet-settings.c b/sensors-applet/sensors-applet-settings.c
index 3b69a61..1fb3750 100644
--- a/sensors-applet/sensors-applet-settings.c
+++ b/sensors-applet/sensors-applet-settings.c
@@ -38,7 +38,6 @@
/* gsettings gvariant type string for the array */
#define GSGVTSA "as"
-
gchar* sensors_applet_settings_get_unique_id (const gchar *interface, const gchar *id, const gchar *path) {
gchar *unique_id = NULL;
gchar *unique_id_hash = NULL;
@@ -353,7 +352,6 @@ static gint sensors_applet_settings_sort_sensors_sort (SensorsApplet *sensors_ap
}
}
-
/* at this point the interfaces are sorted, the sensors are next */
/* set a to be the first sensor in the sensors tree, under the first if. iter */
if (a_is_first) {
@@ -481,7 +479,6 @@ gboolean sensors_applet_settings_sort_sensors (SensorsApplet *sensors_applet) {
sensors_applet_settings_print_sensors_tree (sensors_applet);
#endif
-
for (i = 0; NULL != sensors_list[i]; i++) {
/* first pass */
@@ -575,7 +572,6 @@ gboolean sensors_applet_settings_save_sensors (SensorsApplet *sensors_applet) {
not_end_of_interfaces;
not_end_of_interfaces = gtk_tree_model_iter_next(GTK_TREE_MODEL(sensors_applet->sensors), &interfaces_iter)) {
-
for (not_end_of_sensors = gtk_tree_model_iter_children(GTK_TREE_MODEL(sensors_applet->sensors), &sensors_iter, &interfaces_iter);
not_end_of_sensors;
not_end_of_sensors = gtk_tree_model_iter_next(GTK_TREE_MODEL(sensors_applet->sensors), &sensors_iter)) {
diff --git a/sensors-applet/sensors-applet.c b/sensors-applet/sensors-applet.c
index 6a0a264..b680836 100644
--- a/sensors-applet/sensors-applet.c
+++ b/sensors-applet/sensors-applet.c
@@ -51,11 +51,9 @@
#define COLUMN_SPACING 2
#define ROW_SPACING 1
-
/* builder for sensor sorting verification */
static GVariantBuilder gvb_sensors_hash_list;
-
/* callbacks for panel menu */
static void prefs_cb(GtkAction *action, gpointer *data) {
@@ -1258,7 +1256,6 @@ void sensors_applet_init(SensorsApplet *sensors_applet) {
/* init gsettings */
sensors_applet->settings = mate_panel_applet_settings_new (sensors_applet->applet, "org.mate.sensors-applet");
-
/* set up builder for sorting verification */
g_variant_builder_init (&gvb_sensors_hash_list, G_VARIANT_TYPE ("as"));
@@ -1276,7 +1273,6 @@ void sensors_applet_init(SensorsApplet *sensors_applet) {
/* free hash array */
g_strfreev (sensors_applet->sensors_hash_array);
-
/* should have created sensors tree above, but if have not was because we couldn't find any sensors */
if (NULL == sensors_applet->sensors) {
GtkWidget *label;
diff --git a/sensors-applet/sensors-applet.h b/sensors-applet/sensors-applet.h
index db42581..98473ed 100644
--- a/sensors-applet/sensors-applet.h
+++ b/sensors-applet/sensors-applet.h
@@ -59,7 +59,6 @@ static const gchar * const stock_icons[NUM_ICONS] = {
#define UNITS_VOLTAGE _("V")
#define UNITS_CURRENT _("A")
-
/* enumeration used to identify columns in the GtkTreeStore data structure */
enum {
PATH_COLUMN = 0,
@@ -83,7 +82,6 @@ enum {
N_COLUMNS
};
-
/* for display mode */
typedef enum {
DISPLAY_LABEL_WITH_VALUE = 0,
@@ -145,7 +143,6 @@ struct _SensorsApplet {
gboolean show_tooltip;
};
-
/* non-static function prototypes */
void sensors_applet_init(SensorsApplet *sensors_applet);
void sensors_applet_sensor_enabled(SensorsApplet *sensors_applet, GtkTreePath *path);