[Wayland-bugs] [Bug 767966] New: set_icon_from_file not working

gtk+ (GNOME Bugzilla) bugzilla at gnome.org
Thu Jun 23 07:01:59 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=767966

            Bug ID: 767966
           Summary: set_icon_from_file not working
    Classification: Platform
           Product: gtk+
           Version: 3.20.x
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: Backend: Wayland
          Assignee: gtk-bugs at gtk.org
          Reporter: optimisme at gmail.com
        QA Contact: gtk-bugs at gtk.org
                CC: rob at robster.org.uk, wayland-bugs at lists.freedesktop.org
     GNOME version: ---

window.set_icon_from_file(filePath) does not work on wayland, the icon is not
set as the application icon. 

The same GJS application source runs fine when not using wayland.

Complete example:
https://github.com/optimisme/gjs-examples/blob/master/egIcon.js


The following source will return 'true' from 'set_icon_from_file' and won't
report any error, but the icon won't be shown.


App.prototype.buildUI = function() {

    let result = false;

    this.window = new Gtk.ApplicationWindow({ application: this.application,
                                              title: this.title,
                                              default_height: 200,
                                              default_width: 200,
                                              window_position:
Gtk.WindowPosition.CENTER });
    try {
        this.window.set_icon_from_file(path + '/assets/appIcon.png');
    } catch (err) {
        this.window.set_icon_name('application-x-executable');
    }

    this.label = new Gtk.Label({ label: "Hello icon" });
    this.window.add(this.label);
};

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20160623/2978f5d5/attachment-0001.html>


More information about the wayland-bugs mailing list