Skip to content
Commits on Source (17)
......@@ -18,7 +18,7 @@ api-visibility:
- ./.gitlab-ci/api-visibility.sh
doc:
image: fedora:34
image: fedora:37
stage: build
variables:
MESON_ARGS: >-
......@@ -29,7 +29,7 @@ doc:
before_script:
- dnf -y update
- dnf -y install gcc git gobject-introspection-devel gtk3-devel meson pip
- pip install Jinja2 pygments toml typogrify
- pip install Jinja2 packaging pygments toml typogrify
script:
- meson --prefix=/app ${MESON_ARGS} _build
- ninja -C _build
......@@ -58,7 +58,7 @@ build-flatpak-glade:
BUNDLE: 'sm.puri.Handy.Glade.flatpak'
abi-check:
image: fedora:34
image: fedora:37
stage: build
variables:
LAST_ABI_BREAK: "b90b5120c5e9e3f5a3b0d228bd7ddb24f053289a"
......
=============
Version 1.8.2
=============
- Demo
- Correctly use GtkSwitch
- Fix a GLib deprecation
- Docs
- Fix dependency names
- HdyTabView
- Fix set_menu_model() input check
- Fix a typo in docs
- HdySwipeable
- Fix get_swipe_area() fallback
- Memory leak fixes
- Translation updates
- Slovenian
=============
Version 1.8.1
=============
......
......@@ -20,7 +20,7 @@ description = "The base type system library"
docs_url = "https://developer.gnome.org/gobject/stable"
[dependencies."Gtk-3.0"]
name = "GTK"
name = "Gtk"
description = "The GTK toolkit"
docs_url = "https://docs.gtk.org/gtk3/"
......
......@@ -69,7 +69,7 @@ main (int argc,
{ "preferences", show_preferences, NULL, NULL, NULL },
};
app = gtk_application_new ("sm.puri.Handy.Demo", G_APPLICATION_FLAGS_NONE);
app = gtk_application_new ("sm.puri.Handy.Demo", 0);
g_action_map_add_action_entries (G_ACTION_MAP (app),
app_entries, G_N_ELEMENTS (app_entries),
app);
......
......@@ -268,7 +268,7 @@ notify_carousel_indicators_cb (GObject *sender,
HdyDemoWindow *self)
{
HdyComboRow *row = HDY_COMBO_ROW (sender);
HdyValueObject *obj;
g_autoptr (HdyValueObject) obj = NULL;
g_assert (HDY_IS_COMBO_ROW (row));
g_assert (HDY_IS_DEMO_WINDOW (self));
......@@ -528,7 +528,7 @@ hdy_demo_window_class_init (HdyDemoWindowClass *klass)
static void
lists_page_init (HdyDemoWindow *self)
{
GListStore *list_store;
g_autoptr (GListStore) list_store = NULL;
HdyValueObject *obj;
list_store = g_list_store_new (HDY_TYPE_VALUE_OBJECT);
......@@ -554,6 +554,7 @@ lists_page_init (HdyDemoWindow *self)
static void
carousel_page_init (HdyDemoWindow *self)
{
g_autoptr (GListStore) list_store = NULL;
HdyValueObject *obj;
hdy_combo_row_set_for_enum (self->carousel_orientation_row,
......@@ -562,18 +563,19 @@ carousel_page_init (HdyDemoWindow *self)
NULL,
NULL);
self->carousel_indicators_model = g_list_store_new (HDY_TYPE_VALUE_OBJECT);
list_store = g_list_store_new (HDY_TYPE_VALUE_OBJECT);
obj = hdy_value_object_new_string ("dots");
g_list_store_insert (self->carousel_indicators_model, 0, obj);
g_list_store_insert (list_store, 0, obj);
g_clear_object (&obj);
obj = hdy_value_object_new_string ("lines");
g_list_store_insert (self->carousel_indicators_model, 1, obj);
g_list_store_insert (list_store, 1, obj);
g_clear_object (&obj);
self->carousel_indicators_model = list_store;
hdy_combo_row_bind_name_model (self->carousel_indicators_row,
G_LIST_MODEL (self->carousel_indicators_model),
G_LIST_MODEL (list_store),
(HdyComboRowGetNameFunc) carousel_indicators_name,
NULL,
NULL);
......
......@@ -38,7 +38,7 @@
<object class="GtkRevealer" id="header_revealer">
<property name="visible">True</property>
<property name="transition-type">slide-down</property>
<property name="reveal-child" bind-source="window_header_revealer_switch" bind-property="state" bind-flags="sync-create | bidirectional"/>
<property name="reveal-child" bind-source="window_header_revealer_switch" bind-property="active" bind-flags="sync-create | bidirectional"/>
<child>
<object class="HdyHeaderBar" id="header_bar">
<property name="visible">True</property>
......@@ -392,7 +392,7 @@
<object class="GtkSwitch" id="keypad_letters_visible">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="state">True</property>
<property name="active">True</property>
<property name="valign">center</property>
</object>
</child>
......@@ -407,7 +407,7 @@
<object class="GtkSwitch" id="keypad_symbols_visible">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="state">True</property>
<property name="active">True</property>
<property name="valign">center</property>
</object>
</child>
......@@ -425,8 +425,8 @@
<property name="visible">True</property>
<property name="halign">center</property>
<property name="entry">entry_keypad</property>
<property name="symbols-visible" bind-source="keypad_symbols_visible" bind-property="state" bind-flags="sync-create | bidirectional"/>
<property name="letters-visible" bind-source="keypad_letters_visible" bind-property="state" bind-flags="sync-create | bidirectional"/>
<property name="symbols-visible" bind-source="keypad_symbols_visible" bind-property="active" bind-flags="sync-create | bidirectional"/>
<property name="letters-visible" bind-source="keypad_letters_visible" bind-property="active" bind-flags="sync-create | bidirectional"/>
</object>
<packing>
<property name="expand">False</property>
......@@ -1022,7 +1022,7 @@
<property name="valign">center</property>
<property name="halign">center</property>
<property name="size" bind-source="avatar_size" bind-property="value" bind-flags="sync-create"></property>
<property name="show-initials" bind-source="avatar_show_initials" bind-property="state" bind-flags="sync-create"/>
<property name="show-initials" bind-source="avatar_show_initials" bind-property="active" bind-flags="sync-create"/>
<property name="text" bind-source="avatar_text" bind-property="text" bind-flags="sync-create"/>
</object>
<packing>
......@@ -1111,7 +1111,7 @@
<object class="GtkSwitch" id="avatar_show_initials">
<property name="visible">True</property>
<property name="valign">center</property>
<property name="state">True</property>
<property name="active">True</property>
</object>
</child>
</object>
......@@ -1241,7 +1241,7 @@
<child>
<object class="GtkSwitch" id="window_header_revealer_switch">
<property name="visible">True</property>
<property name="state">True</property>
<property name="active">True</property>
<property name="valign">center</property>
</object>
</child>
......
project('libhandy', 'c',
version: '1.8.1',
version: '1.8.2',
license: 'LGPL-2.1-or-later',
meson_version: '>= 0.49.0',
default_options: [ 'warning_level=1', 'buildtype=debugoptimized', 'c_std=gnu11' ],
......
This diff is collapsed.
......@@ -408,7 +408,7 @@ hdy_carousel_remove (GtkContainer *container,
{
HdyCarousel *self = HDY_CAROUSEL (container);
if (self->scrolling_box)
if (self->scrolling_box && widget != GTK_WIDGET (self->scrolling_box))
gtk_container_remove (GTK_CONTAINER (self->scrolling_box), widget);
else
GTK_CONTAINER_CLASS (hdy_carousel_parent_class)->remove (container, widget);
......
......@@ -231,6 +231,23 @@ list_children_changed_cb (HdyExpanderRow *self)
gtk_style_context_remove_class (context, "empty");
}
static void
hdy_expander_row_destroy (GtkWidget *widget)
{
HdyExpanderRow *self = HDY_EXPANDER_ROW (widget);
HdyExpanderRowPrivate *priv = hdy_expander_row_get_instance_private (self);
if (priv->box) {
gtk_widget_destroy (GTK_WIDGET (priv->box));
priv->box = NULL;
priv->prefixes = NULL;
priv->actions = NULL;
priv->list = NULL;
}
GTK_WIDGET_CLASS (hdy_expander_row_parent_class)->destroy (widget);
}
static void
hdy_expander_row_add (GtkContainer *container,
GtkWidget *child)
......@@ -274,6 +291,8 @@ hdy_expander_row_class_init (HdyExpanderRowClass *klass)
object_class->get_property = hdy_expander_row_get_property;
object_class->set_property = hdy_expander_row_set_property;
widget_class->destroy = hdy_expander_row_destroy;
container_class->add = hdy_expander_row_add;
container_class->remove = hdy_expander_row_remove;
container_class->forall = hdy_expander_row_forall;
......
......@@ -98,6 +98,18 @@ hdy_preferences_page_finalize (GObject *object)
G_OBJECT_CLASS (hdy_preferences_page_parent_class)->finalize (object);
}
static void
hdy_preferences_page_destroy (GtkWidget *widget)
{
HdyPreferencesPage *self = HDY_PREFERENCES_PAGE (widget);
HdyPreferencesPagePrivate *priv = hdy_preferences_page_get_instance_private (self);
if (priv->scrolled_window)
gtk_widget_destroy (GTK_WIDGET (priv->scrolled_window));
GTK_WIDGET_CLASS (hdy_preferences_page_parent_class)->destroy (widget);
}
static void
hdy_preferences_page_add (GtkContainer *container,
GtkWidget *child)
......@@ -157,6 +169,8 @@ hdy_preferences_page_class_init (HdyPreferencesPageClass *klass)
object_class->set_property = hdy_preferences_page_set_property;
object_class->finalize = hdy_preferences_page_finalize;
widget_class->destroy = hdy_preferences_page_destroy;
container_class->add = hdy_preferences_page_add;
container_class->remove = hdy_preferences_page_remove;
container_class->forall = hdy_preferences_page_forall;
......
......@@ -204,6 +204,8 @@ new_search_row_for_preference (HdyPreferencesRow *row,
g_object_set_data (G_OBJECT (widget), "page", page);
g_object_set_data (G_OBJECT (widget), "row", row);
g_object_unref (row);
return GTK_WIDGET (widget);
}
......
......@@ -262,6 +262,8 @@ settings_portal_changed_cb (GDBusProxy *proxy,
return;
}
g_variant_unref (value);
}
static void
......
......@@ -2472,8 +2472,8 @@ hdy_stackable_box_finalize (GObject *object)
self->visible_child = NULL;
if (self->shadow_helper)
g_clear_object (&self->shadow_helper);
g_clear_object (&self->shadow_helper);
g_clear_object (&self->tracker);
hdy_stackable_box_unschedule_child_ticks (self);
......
......@@ -30,9 +30,23 @@ enum {
static guint signals[SIGNAL_LAST_SIGNAL];
static void
hdy_swipeable_default_get_swipe_area (HdySwipeable *self,
HdyNavigationDirection navigation_direction,
gboolean is_drag,
GdkRectangle *rect)
{
rect->x = 0;
rect->y = 0;
rect->width = gtk_widget_get_allocated_width (GTK_WIDGET (self));
rect->height = gtk_widget_get_allocated_height (GTK_WIDGET (self));
}
static void
hdy_swipeable_default_init (HdySwipeableInterface *iface)
{
iface->get_swipe_area = hdy_swipeable_default_get_swipe_area;
/**
* HdySwipeable::child-switched:
* @self: a swipeable
......@@ -266,13 +280,5 @@ hdy_swipeable_get_swipe_area (HdySwipeable *self,
iface = HDY_SWIPEABLE_GET_IFACE (self);
if (iface->get_swipe_area) {
iface->get_swipe_area (self, navigation_direction, is_drag, rect);
return;
}
rect->x = 0;
rect->y = 0;
rect->width = gtk_widget_get_allocated_width (GTK_WIDGET (self));
rect->height = gtk_widget_get_allocated_height (GTK_WIDGET (self));
iface->get_swipe_area (self, navigation_direction, is_drag, rect);
}
......@@ -1704,7 +1704,7 @@ hdy_tab_page_get_loading (HdyTabPage *self)
* @self: a tab page
* @loading: whether @self is loading
*
* Sets wether @self is loading.
* Sets whether @self is loading.
*
* Since: 1.2
*/
......@@ -2197,7 +2197,7 @@ hdy_tab_view_set_menu_model (HdyTabView *self,
GMenuModel *menu_model)
{
g_return_if_fail (HDY_IS_TAB_VIEW (self));
g_return_if_fail (G_IS_MENU_MODEL (menu_model));
g_return_if_fail (menu_model == NULL || G_IS_MENU_MODEL (menu_model));
if (self->menu_model == menu_model)
return;
......
......@@ -19,7 +19,8 @@ test_hdy_combo_row_set_for_enum (void)
{
g_autoptr (HdyComboRow) row = NULL;
GListModel *model;
HdyEnumValueObject *value;
g_autoptr (HdyEnumValueObject) value1 = NULL;
g_autoptr (HdyEnumValueObject) value2 = NULL;
row = g_object_ref_sink (HDY_COMBO_ROW (hdy_combo_row_new ()));
g_assert_nonnull (row);
......@@ -32,13 +33,13 @@ test_hdy_combo_row_set_for_enum (void)
g_assert_cmpuint (g_list_model_get_n_items (model), ==, 2);
value = g_list_model_get_item (model, 0);
g_assert_true (HDY_IS_ENUM_VALUE_OBJECT (value));
g_assert_cmpstr (hdy_enum_value_object_get_nick (value), ==, "horizontal");
value1 = g_list_model_get_item (model, 0);
g_assert_true (HDY_IS_ENUM_VALUE_OBJECT (value1));
g_assert_cmpstr (hdy_enum_value_object_get_nick (value1), ==, "horizontal");
value = g_list_model_get_item (model, 1);
g_assert_true (HDY_IS_ENUM_VALUE_OBJECT (value));
g_assert_cmpstr (hdy_enum_value_object_get_nick (value), ==, "vertical");
value2 = g_list_model_get_item (model, 1);
g_assert_true (HDY_IS_ENUM_VALUE_OBJECT (value2));
g_assert_cmpstr (hdy_enum_value_object_get_nick (value2), ==, "vertical");
}
static void
......