~ricotz/plank/wayland

« back to all changes in this revision

Viewing changes to lib/Items/ApplicationDockItemProvider.vala

  • Committer: Rico Tzschichholz
  • Date: 2016-02-22 18:53:22 UTC
  • Revision ID: ricotz@ubuntu.com-20160222185322-sjic4iqmgu0tl4po
utils: Add internal file_is_dockitem()

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
                                found.App = app;
204
204
                }
205
205
                
206
 
                bool file_is_dockitem (FileInfo info)
207
 
                {
208
 
                        return !info.get_is_hidden () && info.get_name ().has_suffix (".dockitem");
209
 
                }
210
 
                
211
206
                protected void delay_items_monitor ()
212
207
                {
213
208
                        delay_items_monitor_handle = true;
264
259
                        if (event != FileMonitorEvent.CREATED)
265
260
                                return;
266
261
                        
267
 
                        try {
268
 
                                if (!file_is_dockitem (f.query_info (FileAttribute.STANDARD_NAME + "," + FileAttribute.STANDARD_IS_HIDDEN, 0)))
269
 
                                        return;
270
 
                        } catch {
 
262
                        if (!file_is_dockitem (f))
271
263
                                return;
272
 
                        }
273
264
                        
274
265
                        // bail if an item already manages this dockitem-file
275
266
                        foreach (var element in internal_elements) {