Skip to content

Commit

Permalink
issue #111
Browse files Browse the repository at this point in the history
  • Loading branch information
spheras committed Sep 25, 2018
1 parent 6ab7b59 commit a9d98e5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/logic/DesktopManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@ public class DesktopFolder.DesktopManager : DesktopFolder.FolderManager {
* we must create a .nopanel inside to avoid creating a panel from this folder
*/
protected override void create_new_folder_inside (string folder_path) {
debug ("esta si que si");
File nopanel = File.new_for_path (folder_path + "/.nopanel");
try {
if(!nopanel.query_exists()){
nopanel.create (FileCreateFlags.NONE);
}
} catch (Error e) {
stderr.printf ("Error: %s\n", e.message);
Util.show_error_dialog ("Error", e.message);
Expand Down
1 change: 1 addition & 0 deletions src/utils/RenameDialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class RenameDialog : Gtk.Dialog {
set_default_size (350, 100);
this.get_style_context ().add_class ("df_dialog");
this.set_decorated (true);
this.window_position=Gtk.WindowPosition.MOUSE;

create_widgets (label_message, entry_text);
connect_signals ();
Expand Down
18 changes: 18 additions & 0 deletions src/utils/Util.vala
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,15 @@ namespace DesktopFolder.Util {
DirUtils.create (folder_name, 0755);
File file = File.new_for_path (folder_name + "/.desktopfolder");
DesktopFolder.FolderSettings fs = new DesktopFolder.FolderSettings (new_name);

//lets put the panel at the mouse place
var device=Gtk.get_current_event_device();
int x=0;
int y=0;
window.get_window().get_device_position(device,out x,out y,null);
fs.x=x;
fs.y=y;

fs.save_to_file (file);
}
});
Expand Down Expand Up @@ -311,6 +320,15 @@ namespace DesktopFolder.Util {
DesktopFolder.Util.show_file_exists_error_dialog (window, sanitized_name, _("Note"),eae);
} else {
NoteSettings ns = new NoteSettings (sanitized_name);

//lets put the note at the mouse place
var device=Gtk.get_current_event_device();
int x=0;
int y=0;
window.get_window().get_device_position(device,out x,out y,null);
ns.x=x;
ns.y=y;

ns.save_to_file (file);
}
});
Expand Down

0 comments on commit a9d98e5

Please sign in to comment.