diff -Nru indicator-sensors-0.8/debian/bzr-builder.manifest indicator-sensors-0.8/debian/bzr-builder.manifest --- indicator-sensors-0.8/debian/bzr-builder.manifest 2016-04-26 20:51:31.000000000 +0000 +++ indicator-sensors-0.8/debian/bzr-builder.manifest 2017-09-22 09:49:12.000000000 +0000 @@ -1,4 +1,4 @@ -# bzr-builder format 0.3 deb-version {debupstream}-1~r261 -lp:indicator-sensors revid:git-v1:35eeb3a671fc20351b07da2d9726ed4fc3b955ae +# bzr-builder format 0.3 deb-version {debupstream}-2~r267 +lp:indicator-sensors revid:git-v1:6bfed1755c2093fac826764f75af3ed021973ba2 nest-part packaging lp:~baltix/indicator-sensors/packaging debian debian revid:git-v1:c8c3714be2b3fad9429171806cfed3fa941791bc -nest gs-extension lp:~gnome-shell-extensions/indicator-sensors/sensors-gnome-shell-extension gnome-shell-extension revid:git-v1:d4bab6ece7a6599c587dfb9850c94809d8329239 +nest gs-extension lp:~gnome-shell-extensions/indicator-sensors/sensors-gnome-shell-extension gnome-shell-extension revid:git-v1:a40f9ee3fcc26cf32afce6ea7cbaa7d6fc97ebef diff -Nru indicator-sensors-0.8/debian/changelog indicator-sensors-0.8/debian/changelog --- indicator-sensors-0.8/debian/changelog 2016-04-26 20:51:31.000000000 +0000 +++ indicator-sensors-0.8/debian/changelog 2017-09-22 09:49:12.000000000 +0000 @@ -1,8 +1,8 @@ -indicator-sensors (0.8-1~r261~ubuntu16.04.1) xenial; urgency=low +indicator-sensors (0.8-2~r267~ubuntu16.04.1) xenial; urgency=low * Auto build. - -- Mantas Kriaučiūnas Tue, 26 Apr 2016 20:51:31 +0000 + -- Mantas Kriaučiūnas Fri, 22 Sep 2017 09:49:12 +0000 indicator-sensors (0.8-2) trusty; urgency=medium diff -Nru indicator-sensors-0.8/.dir-locals.el indicator-sensors-0.8/.dir-locals.el --- indicator-sensors-0.8/.dir-locals.el 1970-01-01 00:00:00.000000000 +0000 +++ indicator-sensors-0.8/.dir-locals.el 2017-09-22 09:49:11.000000000 +0000 @@ -0,0 +1 @@ +((nil . ((flycheck-cstyle-config . "~/.cstyle.gtk")))) diff -Nru indicator-sensors-0.8/gnome-shell-extension/metadata.json indicator-sensors-0.8/gnome-shell-extension/metadata.json --- indicator-sensors-0.8/gnome-shell-extension/metadata.json 2016-04-26 20:51:31.000000000 +0000 +++ indicator-sensors-0.8/gnome-shell-extension/metadata.json 2017-09-22 09:49:12.000000000 +0000 @@ -2,8 +2,8 @@ "description": "Integrate Hardware Sensors Indicator with GNOME Shell", "extension-id": "indicator-sensors", "name": "Hardware Sensors Indicator", - "shell-version": ["3.10", "3.12", "3.14", "3.16", "3.18"], + "shell-version": ["3.10", "3.12", "3.14", "3.16", "3.18", "3.20", "3.22", "3.24", "3.26"], "url": "https://github.com/alexmurray/gs-indicator-sensors-extension/", "uuid": "indicator-sensors@alexmurray.github.com", - "version": "5" + "version": "6" } diff -Nru indicator-sensors-0.8/indicator-sensors/indicator-sensors.c indicator-sensors-0.8/indicator-sensors/indicator-sensors.c --- indicator-sensors-0.8/indicator-sensors/indicator-sensors.c 2016-04-26 20:51:27.000000000 +0000 +++ indicator-sensors-0.8/indicator-sensors/indicator-sensors.c 2017-09-22 09:49:11.000000000 +0000 @@ -30,6 +30,8 @@ #include #include +static gboolean verbose = FALSE; + static void on_extension_added(PeasExtensionSet *set, PeasPluginInfo *info, @@ -98,8 +100,15 @@ return; } +static GOptionEntry options[] = +{ + { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "Print more verbose debug output", NULL }, + { NULL } +}; + int main(int argc, char **argv) { + GOptionContext *context; IsApplication *application; IsTemperatureSensorScale scale; gboolean show_indicator; @@ -121,6 +130,21 @@ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); textdomain(GETTEXT_PACKAGE); + context = g_option_context_new("- hardware sensors monitor"); + g_option_context_add_main_entries(context, options, GETTEXT_PACKAGE); + g_option_context_add_group(context, gtk_get_option_group (TRUE)); + + if (!g_option_context_parse(context, &argc, &argv, &error)) + { + g_print("command-line option parsing failed: %s\n", error->message); + goto exit; + } + + if (verbose) + { + is_log_set_level(IS_LOG_LEVEL_DEBUG); + } + /* clear the sensor icon cache directory to use any new icon theme */ clear_sensor_icon_cache(); @@ -204,5 +228,6 @@ g_object_unref(application); is_notify_uninit(); +exit: return 0; } diff -Nru indicator-sensors-0.8/indicator-sensors/is-log.c indicator-sensors-0.8/indicator-sensors/is-log.c --- indicator-sensors-0.8/indicator-sensors/is-log.c 2016-04-26 20:51:27.000000000 +0000 +++ indicator-sensors-0.8/indicator-sensors/is-log.c 2017-09-22 09:49:11.000000000 +0000 @@ -23,6 +23,15 @@ #include #include +static IsLogLevel is_log_level = IS_LOG_LEVEL_WARNING; + +void is_log_set_level(IsLogLevel level) +{ + g_return_if_fail((int)level >= IS_LOG_LEVEL_ERROR && + level < NUM_IS_LOG_LEVELS); + is_log_level = level; +} + void is_log(const gchar *source, IsLogLevel level, const gchar *format, @@ -78,14 +87,17 @@ const gchar *format, va_list args) { - gchar *fmt, *output; + if (level <= is_log_level) + { + gchar *fmt, *output; - /* TODO: perhaps add a more elaborate logger */ - fmt = g_strdup_printf("[%s] %s: %s", source, - is_log_level_to_string(level), format); - output = g_strdup_vprintf(fmt, args); - fprintf(stdout, "%s\n", output); - fflush(stdout); - g_free(output); - g_free(fmt); + /* TODO: perhaps add a more elaborate logger */ + fmt = g_strdup_printf("[%s] %s: %s", source, + is_log_level_to_string(level), format); + output = g_strdup_vprintf(fmt, args); + fprintf(stdout, "%s\n", output); + fflush(stdout); + g_free(output); + g_free(fmt); + } } diff -Nru indicator-sensors-0.8/indicator-sensors/is-log.h indicator-sensors-0.8/indicator-sensors/is-log.h --- indicator-sensors-0.8/indicator-sensors/is-log.h 2016-04-26 20:51:27.000000000 +0000 +++ indicator-sensors-0.8/indicator-sensors/is-log.h 2017-09-22 09:49:11.000000000 +0000 @@ -33,6 +33,8 @@ NUM_IS_LOG_LEVELS, } IsLogLevel; +void is_log_set_level(IsLogLevel level); + void is_log(const gchar *source, IsLogLevel level, const gchar *format, diff -Nru indicator-sensors-0.8/indicator-sensors/is-sensor.c indicator-sensors-0.8/indicator-sensors/is-sensor.c --- indicator-sensors-0.8/indicator-sensors/is-sensor.c 2016-04-26 20:51:27.000000000 +0000 +++ indicator-sensors-0.8/indicator-sensors/is-sensor.c 2017-09-22 09:49:11.000000000 +0000 @@ -360,10 +360,10 @@ priv = self->priv; - if (label != NULL && g_strcmp0(label, "") != 0) + if (g_strcmp0(label, priv->label) != 0) { g_free(priv->label); - priv->label = g_strdup(label); + priv->label = label ? g_strdup(label) : NULL; g_object_notify_by_pspec(G_OBJECT(self), properties[PROP_LABEL]); } @@ -796,9 +796,12 @@ const gchar *units) { g_return_if_fail(IS_IS_SENSOR(self)); - g_free(self->priv->units); - self->priv->units = units ? g_strdup(units) : NULL; - g_object_notify_by_pspec(G_OBJECT(self), properties[PROP_UNITS]); + if (g_strcmp0(units, self->priv->units) != 0) + { + g_free(self->priv->units); + self->priv->units = units ? g_strdup(units) : NULL; + g_object_notify_by_pspec(G_OBJECT(self), properties[PROP_UNITS]); + } } guint @@ -860,10 +863,13 @@ const gchar *icon) { g_return_if_fail(IS_IS_SENSOR(self)); - g_free(self->priv->icon); - self->priv->icon = icon ? g_strdup(icon) : NULL; - g_object_notify_by_pspec(G_OBJECT(self), properties[PROP_ICON]); - update_icon_path(self); + if (g_strcmp0(icon, self->priv->icon) != 0) + { + g_free(self->priv->icon); + self->priv->icon = icon ? g_strdup(icon) : NULL; + g_object_notify_by_pspec(G_OBJECT(self), properties[PROP_ICON]); + update_icon_path(self); + } } gdouble diff -Nru indicator-sensors-0.8/plugins/dbus/is-dbus-plugin.c indicator-sensors-0.8/plugins/dbus/is-dbus-plugin.c --- indicator-sensors-0.8/plugins/dbus/is-dbus-plugin.c 2016-04-26 20:51:27.000000000 +0000 +++ indicator-sensors-0.8/plugins/dbus/is-dbus-plugin.c 2017-09-22 09:49:11.000000000 +0000 @@ -357,7 +357,6 @@ { IsManager *manager; gint idx; - gchar *gicon_str; GVariantBuilder meta, metas; g_variant_builder_init(&metas, G_VARIANT_TYPE ("aa{sv}")); @@ -368,6 +367,7 @@ IsSensor *sensor = is_manager_get_sensor(manager, results[idx]); GIcon *gicon = g_themed_icon_new(is_sensor_get_icon(sensor)); gchar *name; + gchar *gicon_str; g_variant_builder_init(&meta, G_VARIANT_TYPE ("a{sv}")); g_variant_builder_add(&meta, "{sv}", diff -Nru indicator-sensors-0.8/plugins/dynamic/is-dynamic-plugin.c indicator-sensors-0.8/plugins/dynamic/is-dynamic-plugin.c --- indicator-sensors-0.8/plugins/dynamic/is-dynamic-plugin.c 2016-04-26 20:51:27.000000000 +0000 +++ indicator-sensors-0.8/plugins/dynamic/is-dynamic-plugin.c 2017-09-22 09:49:11.000000000 +0000 @@ -22,6 +22,7 @@ #include "is-dynamic-plugin.h" #include #include +#include #include #include #include @@ -183,7 +184,7 @@ goto exit; } - is_debug("dynamic", "Got existing rate data for sensor: %s - rate: %f, last_value %f, last_time %lld", + is_debug("dynamic", "Got existing rate data for sensor: %s - rate: %f, last_value %f, last_time %"PRId64"", is_sensor_get_label(sensor), data->rate, data->last_value, diff -Nru indicator-sensors-0.8/plugins/libsensors/is-libsensors-plugin.c indicator-sensors-0.8/plugins/libsensors/is-libsensors-plugin.c --- indicator-sensors-0.8/plugins/libsensors/is-libsensors-plugin.c 2016-04-26 20:51:27.000000000 +0000 +++ indicator-sensors-0.8/plugins/libsensors/is-libsensors-plugin.c 2017-09-22 09:49:11.000000000 +0000 @@ -260,6 +260,9 @@ SENSORS_SUBFEATURE_TEMP_MIN); break; +#if SENSORS_API_VERSION > 0x432 + case SENSORS_FEATURE_MAX: +#endif #if SENSORS_API_VERSION > 0x430 case SENSORS_FEATURE_HUMIDITY: case SENSORS_FEATURE_MAX_MAIN: