fixed grabing page icon
This commit is contained in:
		
							parent
							
								
									c7d74f21fb
								
							
						
					
					
						commit
						1b1d5fdf35
					
				
					 2 changed files with 8 additions and 1 deletions
				
			
		| 
						 | 
					@ -43,6 +43,7 @@
 | 
				
			||||||
                <p>Fixed:</p>
 | 
					                <p>Fixed:</p>
 | 
				
			||||||
                <ul>
 | 
					                <ul>
 | 
				
			||||||
                    <li>Restore correct window size</li>
 | 
					                    <li>Restore correct window size</li>
 | 
				
			||||||
 | 
					                    <li>Grabing page icon</li>
 | 
				
			||||||
                </ul>
 | 
					                </ul>
 | 
				
			||||||
                <p>Translation:</p>
 | 
					                <p>Translation:</p>
 | 
				
			||||||
                <ul>
 | 
					                <ul>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -490,7 +490,13 @@ namespace Webpin.Widgets.Views {
 | 
				
			||||||
            string icon = icon_name_entry.get_text ();
 | 
					            string icon = icon_name_entry.get_text ();
 | 
				
			||||||
            if (tmp_icon_file != "") {
 | 
					            if (tmp_icon_file != "") {
 | 
				
			||||||
                var new_icon = GLib.Path.build_filename (WebpinApp.instance.CACHE_FOLDER, app_name_entry.get_text () + tmp_icon_ext);
 | 
					                var new_icon = GLib.Path.build_filename (WebpinApp.instance.CACHE_FOLDER, app_name_entry.get_text () + tmp_icon_ext);
 | 
				
			||||||
                FileUtils.rename (tmp_icon_file, new_icon);
 | 
					                uint8[] content;
 | 
				
			||||||
 | 
					                try {
 | 
				
			||||||
 | 
					                    FileUtils.get_data (tmp_icon_file, out content);
 | 
				
			||||||
 | 
					                    FileUtils.set_data (new_icon, content);
 | 
				
			||||||
 | 
					                } catch (Error err) {
 | 
				
			||||||
 | 
					                    warning (err.message);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
                FileUtils.remove (tmp_icon_file);
 | 
					                FileUtils.remove (tmp_icon_file);
 | 
				
			||||||
                icon = new_icon;
 | 
					                icon = new_icon;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue