aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--CMakeLists.txt2
-rw-r--r--ChangeLog47
-rw-r--r--NEWS14
-rw-r--r--debian/changelog18
-rw-r--r--src/idoscalemenuitem.c37
6 files changed, 113 insertions, 6 deletions
diff --git a/AUTHORS b/AUTHORS
index 5f8f46b..4661012 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -29,3 +29,4 @@ Robert Tari <robert@tari.in>
Sebastien Bacher <seb128@ubuntu.com>
Sylvain POULAIN <kikislater@users.noreply.github.com>
Ted Gould <ted@gould.cx>
+Till Maas <opensource@till.name>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 02a751c..24fa0cb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,7 +52,7 @@ pkg_check_modules(PROJECT_DEPS REQUIRED ${DEPS})
# Set global variables
include(GNUInstallDirs)
-set(PROJECT_VERSION "0.10.0")
+set(PROJECT_VERSION "0.10.2")
# Make everything
diff --git a/ChangeLog b/ChangeLog
index 7574a07..ce8c832 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,51 @@
+2024-04-08 Mike Gabriel
+
+ * release 0.10.2 (HEAD -> main, tag: 0.10.2)
+ * Merge branch 'tari01-pr/expand-scale' (de33725f)
+
+2024-04-04 Robert Tari
+
+ * src/idoscalemenuitem.c: Add new functionality via the digits and
+ marks parameters (451a9efb)
+ * src/idoscalemenuitem.c: Make page increment same as step increment
+ (87715f3f)
+
+2023-08-24 Mike Gabriel
+
+ * release 0.10.1 (13402a2c) (tag: 0.10.1)
+ * COPYING: Symlink to COPYING.GPL-3, the licensed used by the
+ majority of code files. (c9bfd1b5)
+ * Rename COPYING to COPYING.GPL-3 and use Debian's version of it.
+ (cc276098)
+ * COPYING files: Ship a copy of LGPL-2(+) and LGPL-3. Some code files
+ in this project use either of those licenses. (b040a375)
+ * COPYING.LGPL.2.1: Rename to COPYING.LGPL-2.1 (and use layout from
+ Debian's LGPL-2.1 license file shipped in
+ /usr/share/common-licenses/). (20d65627)
+ * Merge branch 'tyll-executable_so' (39277de1)
+
+2023-08-24 Till Maas
+
+ * cmake: Install library as library (610ddb96)
+
+2023-08-07 Mike Gabriel
+
+ * Merge branch 'tari01-pr/no-hardcoded-icon-sizes' (b1998c6a)
+
+2023-08-05 Robert Tari
+
+ * Do not hardcode icon sizes (e487b162)
+ * Fix possible memory leaks (ebb915b5)
+ * src/idoalarmmenuitem.c: Do not free non memory-allocated variable
+ (579cad6e)
+ * src/idoplaybackmenuitem.c: Drop unused variable (c2bade07)
+ * src/idoplaybackmenuitem.c: Fix undefined variable (be68b43c)
+
2023-06-09 Mike Gabriel
- * release 0.10.0 (HEAD -> main, tag: 0.10.0)
+ * d/libayatana-ido3-0.4-0.symbols: Update symbols. (09c5052d)
+ * d/changelog: amend revision (5263257c)
+ * release 0.10.0 (75f61898) (tag: 0.10.0)
2023-05-05 Mike Gabriel
diff --git a/NEWS b/NEWS
index 206e97b..4344ab0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,17 @@
+Overview of changes in ayatana-ido 0.10.2
+
+ - src/idoscalemenuitem.c: Make page increment same as step increment.
+ - src/idoscalemenuitem.c: Add new functionality via the digits and
+ marks parameters.
+
+Overview of changes in ayatana-ido 0.10.1
+
+ - src/idoalarmmenuitem.c: Do not free non memory-allocated variable
+ - Fix possible memory leaks.
+ - Do not hardcode icon sizes.
+ - cmake: Install library as library.
+ - Update/add COPYING files, ship COPYING files for all licensed used.
+
Overview of changes in ayatana-ido 0.10.0
- Add level menu item.
diff --git a/debian/changelog b/debian/changelog
index af6fe0a..fdf5b1e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,23 @@
-ayatana-ido (0.10.0-0) UNRELEASED; urgency=medium
+ayatana-ido (0.10.2-0) unstable; urgency=medium
* Upstream-provided Debian package for ayatana-ido.
See upstream ChangeLog for recent changes.
- -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Fri, 09 Jun 2023 07:55:31 +0200
+ -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Mon, 08 Apr 2024 12:01:46 +0200
+
+ayatana-ido (0.10.1-0) unstable; urgency=medium
+
+ * Upstream-provided Debian package for ayatana-ido.
+ See upstream ChangeLog for recent changes.
+
+ -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Thu, 24 Aug 2023 17:06:52 +0200
+
+ayatana-ido (0.10.0-0) unstable; urgency=medium
+
+ * Upstream-provided Debian package for ayatana-ido.
+ See upstream ChangeLog for recent changes.
+
+ -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Fri, 09 Jun 2023 08:01:24 +0200
ayatana-ido (0.9.3-0) unstable; urgency=medium
diff --git a/src/idoscalemenuitem.c b/src/idoscalemenuitem.c
index 37a9385..c6cf877 100644
--- a/src/idoscalemenuitem.c
+++ b/src/idoscalemenuitem.c
@@ -1,6 +1,6 @@
/*
* Copyright 2010 Canonical, Ltd.
- * Copyright 2021 Robert Tari
+ * Copyright 2021-2024 Robert Tari
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of either or both of the following licenses:
@@ -26,6 +26,7 @@
*/
#include <gtk/gtk.h>
+#include <math.h>
#include "idorange.h"
#include "idoscalemenuitem.h"
#include "idotypebuiltins.h"
@@ -701,7 +702,7 @@ ido_scale_menu_item_new_with_range (const gchar *label,
gdouble max,
gdouble step)
{
- GObject *adjustment = G_OBJECT (gtk_adjustment_new (value, min, max, step, 10 * step, 0));
+ GObject *adjustment = G_OBJECT (gtk_adjustment_new (value, min, max, step, step, 0));
return GTK_WIDGET (g_object_new (IDO_TYPE_SCALE_MENU_ITEM,
"label", label,
@@ -1048,6 +1049,13 @@ menu_item_get_icon (GMenuItem *menuitem,
return value ? g_icon_deserialize (value) : NULL;
}
+static gchar* onFormatValue (GtkScale *pScale, gdouble fValue)
+{
+ gint nValue = fValue * 100;
+ gchar *sValue = g_strdup_printf ("%i%%", nValue);
+
+ return sValue;
+}
/**
* ido_scale_menu_item_new_from_model:
*
@@ -1089,6 +1097,31 @@ ido_scale_menu_item_new_from_model (GMenuItem *menuitem,
g_free (action);
}
+ IdoScaleMenuItemPrivate *pPrivate = ido_scale_menu_item_get_instance_private (IDO_SCALE_MENU_ITEM (item));
+ guchar nDigits = 0;
+ gboolean bFound = g_menu_item_get_attribute (menuitem, "digits", "y", &nDigits);
+
+ if (bFound)
+ {
+ gtk_scale_set_digits (GTK_SCALE (pPrivate->scale), nDigits);
+ gtk_range_set_round_digits (GTK_RANGE (pPrivate->scale), nDigits);
+ }
+
+ gboolean bMarks = FALSE;
+ bFound = g_menu_item_get_attribute (menuitem, "marks", "b", &bMarks);
+
+ if (bFound)
+ {
+ gtk_scale_set_draw_value (GTK_SCALE (pPrivate->scale), TRUE);
+
+ for (gdouble fValue = min; fValue < (max + step); fValue += step)
+ {
+ gtk_scale_add_mark (GTK_SCALE (pPrivate->scale), round (fValue * 10) / 10, GTK_POS_BOTTOM, NULL);
+ }
+
+ g_signal_connect (pPrivate->scale, "format-value", G_CALLBACK (onFormatValue), NULL);
+ }
+
min_icon = menu_item_get_icon (menuitem, "min-icon");
max_icon = menu_item_get_icon (menuitem, "max-icon");
ido_scale_menu_item_set_icons (IDO_SCALE_MENU_ITEM (item), min_icon, max_icon);