[Xfce-bugs] [Bug 16566] Improve tooltips in shortcuts view

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Mon Mar 23 09:37:15 CET 2020


https://bugzilla.xfce.org/show_bug.cgi?id=16566

--- Comment #5 from alexxcons <alexxcons at xfce.org> ---
Oh, I see. In that case I would rather split the if/else structure in a
different way:

          if (shortcut->device != NULL)
            {
              file = thunar_device_get_root (shortcut->device);
              if (G_LIKELY (file != NULL))
                {
                  shortcut->tooltip = g_file_get_uri (file);
                  g_object_unref (file);
                }
            }
          else
            {
              if (shortcut->file != NULL)
                file = thunar_file_get_file (shortcut->file);
              else if (shortcut->location != NULL)
                file = shortcut->location;
              else
                file = NULL;
              if (G_LIKELY (file != NULL))
                {
                  parse_name = g_file_get_parse_name (file);
                  shortcut->tooltip = g_markup_escape_text (parse_name, -1);
                  g_free (parse_name);
                }
            }

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Xfce-bugs mailing list