Advertisement
Guest User

Untitled

a guest
Dec 29th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Vala 0.83 KB | None | 0 0
  1. /**
  2.          * {@inheritDoc}
  3.          */
  4.         protected override void load_from_launcher ()
  5.         {
  6.             stop_monitor ();
  7.  
  8.             if (Prefs.Launcher == "")
  9.                 return;
  10.  
  11.             OwnedFile = File.new_for_uri (Prefs.Launcher);
  12.             Icon = DrawingService.get_icon_from_file (OwnedFile) ?? DEFAULT_ICONS;
  13.  
  14.             if (!OwnedFile.is_native ()) {
  15.                 Text = OwnedFile.get_uri ();
  16.                 return;
  17.             }
  18.  
  19.             Text = get_display_name (OwnedFile);
  20.  
  21.             // pop up the dir contents on a left click too
  22.             if (OwnedFile.query_file_type (0) == FileType.DIRECTORY) {
  23.                 //Button = PopupButton.RIGHT | PopupButton.LEFT; <-- HERE IS THE PROBLEM!
  24.  
  25.                 try {
  26.                     dir_monitor = OwnedFile.monitor_directory (0);
  27.                     dir_monitor.changed.connect (handle_dir_changed);
  28.                 } catch {
  29.                     critical ("Unable to watch the stack directory '%s'.", OwnedFile.get_path () ?? "");
  30.                 }
  31.             }
  32.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement