Re: [Geany-Devel] [Geany-devel] Remove MSYS dependency of Geany on Win~1 - VirtualStore data files

2012-12-12 Thread Nick Treleaven

On 11/12/2012 19:20, Dimitar Zhekov wrote:

On Tue, 11 Dec 2012 17:44:20 +
Nick Treleaven  wrote:


On 10/07/2012 12:55, Nick Treleaven wrote:

2. A weird problem. Installing from cmd.exe doesn't overwrite
geany.glade (and maybe some other files) even though it appears to
succeed. [...]


So, I did a search for geany.glade and discovered it in:
c:\Users\Nick\AppData\Local\VirtualStore\Program Files\Geany\data

reading up on the VirtualStore path, I found it gets created when an
application tries to write to a system path like Program Files, without
the correct privileges. The application then silently receives the
VirtualStore versions of files instead. [...]


Now that's a... a system designed without security, attempting to
provide "compatibility" with weird tricks.

What's the situation with geany.exe in this case - doesn't it create
even more problems? The newest win~1 versions are very sinsitive about
replacing executables.


To be honest I don't understand exactly when the VirtualStore path gets 
written to, but for Geany I think we probably want to just disable it 
altogether. I think this requires a 'manifest' XML file, referenced in 
the .rc file:


http://msdn.microsoft.com/en-us/library/bb756929.aspx

Yet another Windows build file with a version and metadata to update on 
release :-/

___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] [Geany-devel] Remove MSYS dependency of Geany on Win~1 - VirtualStore data files

2012-12-12 Thread Nick Treleaven

On 11/12/2012 23:13, Matthew Brush wrote:

So, I did a search for geany.glade and discovered it in:
c:\Users\Nick\AppData\Local\VirtualStore\Program Files\Geany\data

reading up on the VirtualStore path, I found it gets created when an
application tries to write to a system path like Program Files, without
the correct privileges. The application then silently receives the
VirtualStore versions of files instead. I must have once tried to
install geany without admin privileges, or manually copy over the data
dir or something like that.

This behaviour is really confusing if you're not aware of it. I think
there is a way to tell Windows not to use VirtualStore for an specific
application though, I'll have to look into it. In the meantime I just
deleted the Geany dir under VirtualStore, all is now working correctly.


FYI, there was a related bug a while back about this:
https://sourceforge.net/tracker/index.php?func=detail&aid=3566329&group_id=153444&atid=787791


OK, thanks for the info. Hopefully we can disable VirtualStore for Geany 
executables sometime.


___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] [Geany-devel] Remove MSYS dependency of Geany on Win~1 - VirtualStore data files

2012-12-12 Thread Matthew Brush

On 12-12-12 05:25 AM, Nick Treleaven wrote:

On 11/12/2012 19:20, Dimitar Zhekov wrote:

On Tue, 11 Dec 2012 17:44:20 +
Nick Treleaven  wrote:


On 10/07/2012 12:55, Nick Treleaven wrote:

2. A weird problem. Installing from cmd.exe doesn't overwrite
geany.glade (and maybe some other files) even though it appears to
succeed. [...]


So, I did a search for geany.glade and discovered it in:
c:\Users\Nick\AppData\Local\VirtualStore\Program Files\Geany\data

reading up on the VirtualStore path, I found it gets created when an
application tries to write to a system path like Program Files, without
the correct privileges. The application then silently receives the
VirtualStore versions of files instead. [...]


Now that's a... a system designed without security, attempting to
provide "compatibility" with weird tricks.

What's the situation with geany.exe in this case - doesn't it create
even more problems? The newest win~1 versions are very sinsitive about
replacing executables.


To be honest I don't understand exactly when the VirtualStore path gets
written to, but for Geany I think we probably want to just disable it


IIUC it's whenever Geany writes out to files in %PROGRAM_FILES% et al. 
So if you open C:\Program Files\Geany\data\filetypes.foo, edit it, and 
save it, it'll go into that phony directory.



altogether. I think this requires a 'manifest' XML file, referenced in
the .rc file:

http://msdn.microsoft.com/en-us/library/bb756929.aspx

Yet another Windows build file with a version and metadata to update on
release :-/


I actually have a patch sitting on my Win7 laptop that adds an XML 
manifest file to the resource. I made it because it allows the native 
dialogs to look more "native" and less win95-ish by using the current 
Windows theme. If you want I can dig up that patch and commit it and 
then we can just add whatever else to it.


Cheers,
Matthew Brush
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] [Geany-devel] Remove MSYS dependency of Geany on Win~1 - VirtualStore data files

2012-12-12 Thread Nick Treleaven

On 12/12/2012 15:24, Matthew Brush wrote:

altogether. I think this requires a 'manifest' XML file, referenced in
the .rc file:

http://msdn.microsoft.com/en-us/library/bb756929.aspx

Yet another Windows build file with a version and metadata to update on
release :-/


I actually have a patch sitting on my Win7 laptop that adds an XML
manifest file to the resource. I made it because it allows the native
dialogs to look more "native" and less win95-ish by using the current
Windows theme. If you want I can dig up that patch and commit it and
then we can just add whatever else to it.


Yes please.
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


[Geany-Devel] TreeBrowser navigation

2012-12-12 Thread Steven Blatnick
LOL, I guess I'm obsessed with using the backspace to move up a 
directory.  Is this where I email the patches for geany-plugins too?


I've attached a patch to allow the Tree Browser plugin to go up a 
directory when you hit backspace.


I noticed that my previous patch for the File Browser plugin was never 
applied to master.  I was just curious if it will be or how that 
workflow goes about.


Thanks,

Steven Blatnick
>From 67130ada8558c997fc6f30a95e9ce48d2232e785 Mon Sep 17 00:00:00 2001
From: Steven Blatnick 
Date: Wed, 12 Dec 2012 15:07:05 -0700
Subject: [PATCH] Added backspace to treebrowser plugin to browse up a directory.

---
 treebrowser/src/treebrowser.c |   14 ++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/treebrowser/src/treebrowser.c b/treebrowser/src/treebrowser.c
index c5928f0..f8be3cd 100644
--- a/treebrowser/src/treebrowser.c
+++ b/treebrowser/src/treebrowser.c
@@ -14,6 +14,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "geany.h"
 #include "geanyplugin.h"
@@ -1418,6 +1419,18 @@ on_treeview_mouseclick(GtkWidget *widget, GdkEventButton *event, GtkTreeSelectio
 	return FALSE;
 }
 
+static gboolean
+on_treeview_keypress(GtkWidget *widget, GdkEventKey *event)
+{
+	if (event->keyval == GDK_KEY_BackSpace)
+	{
+		on_button_go_up();
+		return TRUE;
+	}
+
+	return FALSE;
+}
+
 static void
 on_treeview_changed(GtkWidget *widget, gpointer user_data)
 {
@@ -1721,6 +1734,7 @@ create_sidebar(void)
 	g_signal_connect(treeview, 			"row-activated", 		G_CALLBACK(on_treeview_row_activated), 			NULL);
 	g_signal_connect(treeview, 			"row-collapsed", 		G_CALLBACK(on_treeview_row_collapsed), 			NULL);
 	g_signal_connect(treeview, 			"row-expanded", 		G_CALLBACK(on_treeview_row_expanded), 			NULL);
+	g_signal_connect(treeview, 			"key-release-event", 		G_CALLBACK(on_treeview_keypress), 			NULL);
 	g_signal_connect(addressbar, 		"activate", 			G_CALLBACK(on_addressbar_activate), 			NULL);
 	g_signal_connect(filter, 			"activate", 			G_CALLBACK(on_filter_activate), NULL);
 
-- 
1.7.4.1

___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel