Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • E exo
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • XfceXfce
  • exo
  • Issues
  • #82
Closed
Open
Issue created Feb 15, 2022 by Yongha Hwang@MShrimp4Maintainer

About deprecating exo-string fucntions in favor of glib functions or moving it to libxfce4util

I investigated on exo-string.{c,h} to weed out unnecessary functions and to move useful ones to libxfce4util/ui. These are the list of the functions/macros:

Unused

  • exo_str_elide_underscores():

Simplified copy of strip_ulines() from GTK. Since the original is a static function this function cannot be replaced.

  • exo_strndupv():

It is a n version of g_strdupv() and has no actual counterpart in glib.

Deprecated in favor of glib functions

  • exo_strdup_strftime (): Used in thunar

Can be replaced with more feature-rich function g_date_time_format(). Might need a converting effort though.

  • exo_str_is_equal(): Used in thunar, thunar-media-tags-plugin, xfce4-places-plugin(panel-plugins/xfce4-places-plugin!8 (merged)), exo-die

Easily replaced with g_strcmp0().

  • exo_str_looks_like_an_uri(): Used in thunar, exo-open

This function is a bit flawed: it only checks the scheme (ex: http, ftp, ...) part of the string. g_uri_is_valid () (Available since Glib 2.66 but Xfce 4.18 will depend on 2.66 anyways) does it properly but its correct behavior may cause some problem if we are very unlucky.

  • exo_str_is_flag(): Used in xfce4-settings

== g_str_has_prefix (str, "-");

Migrated to libxfce4util (libxfce4util!24 (merged))

* exo_str_replace (): Used in thunar, xfce4-settings

The closest function is g_string_replace () which is added since Glib 2.68 so this function will survive for a moment.

  • (Macro)exo_str_is_empty (): Used in xfce4-panel, xfce4-mailwatch-plugin, thunar, xfce4-settings, xfce4-whiskermenu-plugin(fallback), exo-icon-chooser-dialog.c, exo-die

#define exo_str_is_empty(string) ((string) == NULL || *(string) == '\0')

  • (Macro)I_(): xfdesktop (redefines the same macro), thunar, libxfce4ui, xfconf (redefines the same macro), mousepad (redefines the same macro), xfce4-settings, xfce4-terminal (redefines the same macro), exo

#define I_(string) (g_intern_static_string ((string)))

Edited Jun 26, 2022 by Yongha Hwang
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking