PageHeader.Logo requires absolute path

Bug #1340135 reported by Michał Karnicki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
The Savilerow project
Fix Released
Undecided
Unassigned
unity-scopes-api
Fix Released
Undecided
Pete Woods
unity-scopes-api (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The scope framework should not require an absolute path to PageHeader.Logo, but also accept a relative one (relative to scope_directory(), I suppose).

Tags: scope-dev

Related branches

Revision history for this message
Michal Hruby (mhr3) wrote :

Is this something the library should be doing automatically? Ie prepending the scope_dir to customization fields that hold relative paths?

Revision history for this message
Michał Karnicki (karni) wrote :

FTR
Icon =
in the same file accepts just the file name (or relative path, haven't tried, I just use the file name for the file that is in same directory as .ini and .so).

Revision history for this message
Michi Henning (michihenning) wrote :

I don't think it would be desirable to prepend anything to the configured path. For testing, it can be really useful to not have to muck around with absolute paths.

The Icon and Logo settings (among others) are never looked at by the scopes run time. They are just opaque values that are made available via the registry metadata. So, this really is something for the shell to decide.

Changed in unity-scopes-api:
status: New → Invalid
Revision history for this message
Michal Hruby (mhr3) wrote :

@michi:

scoperegistry.cpp:

269: mi->set_art(relative_scope_path_to_abs_path(sc.art(), scope_dir).native());
276: mi->set_icon(relative_scope_path_to_abs_path(sc.icon(), scope_dir).native());

Changed in unity-scopes-api:
status: Invalid → New
Revision history for this message
Michi Henning (michihenning) wrote :

Ah, yes. I missed that change when it was made. I guess it makes sense to do this here, because the shell has no idea where to look otherwise, and the run time knows about the icon and art config items.

But Pageheader.Logo is different, because the run time doesn't even know about the existence of that. This is purely an appearance attribute, as far as I know.

So, as far as I can see, the shell would have to convert this to an absolute path by prepending scope_directory() itself.

Revision history for this message
Michal Hruby (mhr3) wrote :

Right, and since the registry is already making it simple for the clients for the Art and Icon, we can special case some appearance attributes as well (the ones that are known to possibly point to a file)

Chris Wayne (cwayne)
Changed in savilerow:
status: New → Confirmed
Revision history for this message
Michi Henning (michihenning) wrote :

Cool. Just confirming, because it's not entirely clear to me from looking at the tutorial: Pageheader.Logo is expected to be path (not a URL), yes? If so, easy: I can just prepend the installation directory if the path isn't absolute.

I'll also add the attributes that are currently in tutorial.docx to the list of known attributes in ScopeConfig.cpp.

Changed in unity-scopes-api:
assignee: nobody → Michi Henning (michihenning)
status: New → In Progress
Revision history for this message
Michi Henning (michihenning) wrote :

I just set this as invalid for scopes-api because, as discussed in the stand-up, the shell will be dealing with this for now.

I'm about to open a separate bug for post-RTM regarding a more general stragegy for how to deal with URIs in the run time.

Changed in unity-scopes-api:
status: In Progress → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-scopes-api - 0.5.2+14.10.20140723-0ubuntu1

---------------
unity-scopes-api (0.5.2+14.10.20140723-0ubuntu1) utopic; urgency=low

  [ Pete Woods ]
  * Normalize relative paths (LP: #1340135)

  [ Marcus Tomlinson ]
  * Call locate() before every two-way request. Increased two-way
    invocation timeouts.

  [ Michi Henning ]
  * Normalize relative paths (LP: #1340135)
 -- Ubuntu daily release <email address hidden> Wed, 23 Jul 2014 22:06:06 +0000

Changed in unity-scopes-api (Ubuntu):
status: New → Fix Released
Michal Hruby (mhr3)
Changed in unity-scopes-api:
assignee: Michi Henning (michihenning) → Pete Woods (pete-woods)
status: Invalid → Fix Released
no longer affects: unity-scopes-shell
Chris Wayne (cwayne)
Changed in savilerow:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.