{"action":"created","issue":{"url":"https://api.github.com/repos/LinuxCNC/linuxcnc/issues/422","repository_url":"https://api.github.com/repos/LinuxCNC/linuxcnc","labels_url":"https://api.github.com/repos/LinuxCNC/linuxcnc/issues/422/labels{/name}","comments_url":"https://api.github.com/repos/LinuxCNC/linuxcnc/issues/422/comments","events_url":"https://api.github.com/repos/LinuxCNC/linuxcnc/issues/422/events","html_url":"https://github.com/LinuxCNC/linuxcnc/issues/422","id":306325018,"number":422,"title":"\tHAL gladevcp Iconview widget - Coding error ","user":{"login":"fairnorth","id":15316672,"avatar_url":"https://avatars0.githubusercontent.com/u/15316672?v=4","gravatar_id":"","url":"https://api.github.com/users/fairnorth","html_url":"https://github.com/fairnorth","followers_url":"https://api.github.com/users/fairnorth/followers","following_url":"https://api.github.com/users/fairnorth/following{/other_user}","gists_url":"https://api.github.com/users/fairnorth/gists{/gist_id}","starred_url":"https://api.github.com/users/fairnorth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fairnorth/subscriptions","organizations_url":"https://api.github.com/users/fairnorth/orgs","repos_url":"https://api.github.com/users/fairnorth/repos","events_url":"https://api.github.com/users/fairnorth/events{/privacy}","received_events_url":"https://api.github.com/users/fairnorth/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"c-morley","id":7367477,"avatar_url":"https://avatars3.githubusercontent.com/u/7367477?v=4","gravatar_id":"","url":"https://api.github.com/users/c-morley","html_url":"https://github.com/c-morley","followers_url":"https://api.github.com/users/c-morley/followers","following_url":"https://api.github.com/users/c-morley/following{/other_user}","gists_url":"https://api.github.com/users/c-morley/gists{/gist_id}","starred_url":"https://api.github.com/users/c-morley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c-morley/subscriptions","organizations_url":"https://api.github.com/users/c-morley/orgs","repos_url":"https://api.github.com/users/c-morley/repos","events_url":"https://api.github.com/users/c-morley/events{/privacy}","received_events_url":"https://api.github.com/users/c-morley/received_events","type":"User","site_admin":false},"assignees":[{"login":"c-morley","id":7367477,"avatar_url":"https://avatars3.githubusercontent.com/u/7367477?v=4","gravatar_id":"","url":"https://api.github.com/users/c-morley","html_url":"https://github.com/c-morley","followers_url":"https://api.github.com/users/c-morley/followers","following_url":"https://api.github.com/users/c-morley/following{/other_user}","gists_url":"https://api.github.com/users/c-morley/gists{/gist_id}","starred_url":"https://api.github.com/users/c-morley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c-morley/subscriptions","organizations_url":"https://api.github.com/users/c-morley/orgs","repos_url":"https://api.github.com/users/c-morley/repos","events_url":"https://api.github.com/users/c-morley/events{/privacy}","received_events_url":"https://api.github.com/users/c-morley/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-03-19T03:49:12Z","updated_at":"2018-03-19T21:26:25Z","closed_at":"2018-03-19T21:26:25Z","author_association":"NONE","body":"Small things can bug me a little because you never know if these small things will lead to other more serious issues later. I decided to look at why my gmoccapy always reports an error at start up, Invalid icon size 48. Not a big issue but still a problem that needs to be fixed. One of the causes for this is that Hal GladeVCP iconview.py has a programming error and thus more than just gmoccapy reports can show this error in its printed log.\r\n\r\nHere is my description of the issue with Hal GladeVCP iconview.py and a simple suggestion for a fix.\r\n\r\nWithing the iconview.py are 9 lines like:\r\n\r\n\"image.set_from_stock(gtk.STOCK_GOTO_TOP, 48)\"\r\n\r\nThe 48 is supposed to refer to the displayed file folders icons desired size. This cannot be done with entering 48 in these lines.\r\nIn these lines size is looking for a \"name\" that has defined an icon and \"not a size number\".\r\n\r\nPer the gtk Class Reference for gtk.Image, the normal allowed things for unless a custom one is made are:\r\n\r\ngtk.ICON_SIZE_MENU\r\ngtk.ICON_SIZE_SMALL_TOOLBAR\r\ngtk.ICON_SIZE_LARGE_TOOLBAR\r\ngtk.ICON_SIZE_BUTTON\r\ngtk.ICON_SIZE_DND\r\ngtk.ICON_SIZE_DIALOG.\r\n\r\nHere are my suggested changes to consider to the Hal GladeVCP iconview.py widget:\r\n\r\nLeave this line alone:\r\nself.icon_size = 48 # The actual per file folder display size - must agree with the named item standard size definitions. A error in choosing the wrong size here will show wrong folder colors since that size is not likely defined as being possible in the named STOCK item definition.\r\n\r\nOk now for the suggested changes:\r\n\r\nAdd this line:\r\nstksize = gtk.ICON_SIZE_MENU # GTK standard size name # chosen at random\r\n\r\nChange 9 lines from and to list:\r\nimage.set_from_stock(gtk.STOCK_HOME,48)\r\nimage.set_from_stock(gtk.STOCK_HOME, stksize)\r\n\r\nimage.set_from_stock(gtk.STOCK_GOTO_TOP,48)\r\nimage.set_from_stock(gtk.STOCK_GOTO_TOP,stksize)\r\n\r\nmage.set_from_stock(gtk.STOCK_GO_BACK,48)\r\nimage.set_from_stock(gtk.STOCK_GO_BACK, stksize)\r\n\r\nimage.set_from_stock(gtk.STOCK_GO_FORWARD,48)\r\nimage.set_from_stock(gtk.STOCK_GO_FORWARD, stksize)\r\n\r\n#image.set_from_stock(gtk.STOCK_GO_DOWN,48)\r\n#image.set_from_stock(gtk.STOCK_GO_DOWN, stksize)\r\n\r\n#image.set_from_stock(gtk.STOCK_GO_UP,48)\r\n#image.set_from_stock(gtk.STOCK_GO_UP, stksize)\r\n\r\nimage.set_from_stock(gtk.STOCK_JUMP_TO,48)\r\nimage.set_from_stock(gtk.STOCK_JUMP_TO, stksize)\r\n\r\nimage.set_from_stock(gtk.STOCK_OK,48)\r\nimage.set_from_stock(gtk.STOCK_OK, stksize)\r\n\r\nimage.set_from_stock(gtk.STOCK_STOP,48)\r\nimage.set_from_stock(gtk.STOCK_STOP, stksize)\r\n\r\nThis eliminates the Invalid icon size 48 error message generated by this widget.\r\nI have seen similar errors in the past from at least one other file but cant recall its name. "},"comment":{"url":"https://api.github.com/repos/LinuxCNC/linuxcnc/issues/comments/374384436","html_url":"https://github.com/LinuxCNC/linuxcnc/issues/422#issuecomment-374384436","issue_url":"https://api.github.com/repos/LinuxCNC/linuxcnc/issues/422","id":374384436,"user":{"login":"c-morley","id":7367477,"avatar_url":"https://avatars3.githubusercontent.com/u/7367477?v=4","gravatar_id":"","url":"https://api.github.com/users/c-morley","html_url":"https://github.com/c-morley","followers_url":"https://api.github.com/users/c-morley/followers","following_url":"https://api.github.com/users/c-morley/following{/other_user}","gists_url":"https://api.github.com/users/c-morley/gists{/gist_id}","starred_url":"https://api.github.com/users/c-morley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c-morley/subscriptions","organizations_url":"https://api.github.com/users/c-morley/orgs","repos_url":"https://api.github.com/users/c-morley/repos","events_url":"https://api.github.com/users/c-morley/events{/privacy}","received_events_url":"https://api.github.com/users/c-morley/received_events","type":"User","site_admin":false},"created_at":"2018-03-19T21:26:25Z","updated_at":"2018-03-19T21:26:25Z","author_association":"COLLABORATOR","body":"Fix pushed to master - If there is still a problem not covered please reopen. Thanks everyone."}}
{"actor":{"display_login":"c-morley"}}