Help! Trying (unsuccesfully) to code a new feature



Hi!

I have spent a couple of days looking at the Nautilus 2 code to try to
add a new feature that I would really like to see in Nautilus, but I
haven't had much luck.

The feature I am trying to add is this: I want to temporarily change 
the setting of the preference "Open each file or folder in a new
window" when I open a file or folder and I am pressing the Control
key.

In other words, if "Open each file or folder in a new window" is
checked, and I double-click on a folder while having the Control key
pressed, I want Nautilus to open the folder I double-clicked on in the
_same_ window, and not in a new one (as would normally be the case
because of the setting of this variable.)

Since you can also open a folder or file by hitting the Enter or
Return key, I'd like to do the same if Enter or Return are pressed
while the Control key is pressed.

Now, I have been playing with the code a bit, but since I have never
hacked Nautilus I am not sure about the best way to implement this.

The variable use_new_window_auto_value in
src/file-manager/fm-directory-view.c is the one that controls the
behavior, and I have tried to change its value in key_press_event and
button_press_event callbacks, but I have been unsuccessful.

Can someone give me a hand here? I would really appreciate any kind of
help/suggestions. I am a bit frustrated that I haven't been able to
accomplish anything yet.

Thanks!

Eloy.-



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]