Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * {@inheritDoc}
- */
- protected override void load_from_launcher ()
- {
- stop_monitor ();
- if (Prefs.Launcher == "")
- return;
- OwnedFile = File.new_for_uri (Prefs.Launcher);
- Icon = DrawingService.get_icon_from_file (OwnedFile) ?? DEFAULT_ICONS;
- if (!OwnedFile.is_native ()) {
- Text = OwnedFile.get_uri ();
- return;
- }
- Text = get_display_name (OwnedFile);
- // pop up the dir contents on a left click too
- if (OwnedFile.query_file_type (0) == FileType.DIRECTORY) {
- //Button = PopupButton.RIGHT | PopupButton.LEFT; <-- HERE IS THE PROBLEM!
- try {
- dir_monitor = OwnedFile.monitor_directory (0);
- dir_monitor.changed.connect (handle_dir_changed);
- } catch {
- critical ("Unable to watch the stack directory '%s'.", OwnedFile.get_path () ?? "");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement