Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • libadwaita libadwaita
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 134
    • Issues 134
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 19
    • Merge requests 19
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOME
  • libadwaitalibadwaita
  • Issues
  • #48
Closed
Open
Created Dec 26, 2020 by Andrei Lișiță@Yetizone🎮

The "use-underline" property needs to be removed from AdwActionRow

There's already the "use-underline" property from HdyPreferencesRow, which causes the notify event to be emitted twice.

Discovered this while writing this test for HdyActionRow:

static void
test_hdy_action_row_use_underline (void)
{
  g_autoptr (HdyActionRow) row = NULL;
  gboolean use_underline = FALSE;

  row = g_object_ref_sink (HDY_ACTION_ROW (hdy_action_row_new ()));
  g_assert_nonnull (row);

  notified = 0;
  g_signal_connect (row, "notify::use-underline", G_CALLBACK (notify_cb), NULL);

  g_object_get (row, "use-underline", &use_underline, NULL);
  g_assert_false (use_underline);

  hdy_action_row_set_use_underline (row, FALSE);
  g_assert_cmpint (notified, ==, 0);

  hdy_action_row_set_use_underline (row, TRUE);
  g_assert_true (hdy_action_row_get_use_underline (row));
  g_assert_cmpint (notified, ==, 1);

  g_object_set (row, "use-underline", FALSE, NULL);
  g_assert_false (hdy_action_row_get_use_underline (row));
  g_assert_cmpint (notified, ==, 2);
}

The test should pass, but it fails

Edited Jan 16, 2021 by Andrei Lișiță
Assignee
Assign to
Time tracking