Re: [Geany-devel] Default Snippets

2011-12-04 Thread Ross McKay
Lex Trotman wrote:

[...]
But if the level of interest is indicated by the responses, then not
many people use these snippets, so maybe it isn't worth the effort of
either approach and just repeat things for now and possibly over time
the definitions will diverge.

I certainly use snippets, but not the standard ones you're talking
about. I use snippets for things I can't easily remember or are
laborious to type out. e.g. I have some lorem ipsum as a default snippet
under the key lorem, cdata encapsulation for XML/HTML/PHP, and a bunch
of classic ASP stuff under HTML for when I'm forced to work on that old
crap because I can never remember how to use ADO prepared statements and
recordsets efficiently :)

So yes, from my perspective these common snippets aren't all that
interesting because they're so basic and not really all that much of a
time saver, at least for any programmer who can type as fast as they can
think. I wouldn't put too much effort into it.

As an aside, I reckon the most useful snippets would be regex search /
replace snippets, because they really do something. I've pushed a few
commonly typed regex search/replaces into (sh/sed|python) scripts that I
can call from Send Selection To, but I have too many to fit under that
list. So I still have a Cunning Plan (tm) to implement a regex snippets
plugin someday, unless some kind soul beats me to it (hint!)
-- 
Ross McKay, Toronto, NSW Australia
It doesn't matter if the Rock wants to go get diamond rings or not!
- The Rock
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Default search behavior is irritating

2011-12-04 Thread Dimitar Zhekov
On Sun, 04 Dec 2011 00:48:40 +0100
Colomban Wendling lists@herbesfolles.org wrote:

 Le 03/12/2011 20:56, Dimitar Zhekov a écrit :
 
  There is one, and only one thing, that is unquestionably better IMHO:
  separate [ ] Always wrap search and hide the Find dialog into [...]
 
 Yep, this sounds sensible to me.  It'd be better flexible and I can
 understand somebody was one and not the other.  So yeah, go ahead :)
 

It turned out to be quite easy, because the two meanings are actualy
used separately...

-- 
E-gards: Jimmy
From 85f038b6978e508c81947535a6ac099790a40d58 Mon Sep 17 00:00:00 2001
From: Dimitar Zhekov dimitar.zhe...@gmail.com
Date: Sun, 4 Dec 2011 15:15:59 +0200
Subject: [PATCH] split always wrap search and hide find dialog pref into
 always wrap search and hide find dialog

---
 geany.glade |   26 +++---
 src/document.c  |2 +-
 src/interface.c |   19 +--
 src/keyfile.c   |   19 +--
 src/search.c|4 +---
 src/search.h|3 ++-
 6 files changed, 57 insertions(+), 16 deletions(-)

diff --git a/geany.glade b/geany.glade
index ba18b6f..4037970 100644
--- a/geany.glade
+++ b/geany.glade
@@ -3841,11 +3841,31 @@
 			  property name=spacing0/property
 
 			  child
-widget class=GtkCheckButton id=check_ask_suppress_search_dialogs
+widget class=GtkCheckButton id=check_always_wrap_search
   property name=visibleTrue/property
-  property name=tooltip translatable=yesAlways wrap search around the document and hide the Find dialog after clicking Find Next/Previous/property
+  property name=tooltip translatable=yesAlways wrap search around the document/property
   property name=can_focusTrue/property
-  property name=label translatable=yesAlways wrap search and hide the Find dialog/property
+  property name=label translatable=yesAlways wrap search/property
+  property name=use_underlineTrue/property
+  property name=reliefGTK_RELIEF_NORMAL/property
+  property name=focus_on_clickTrue/property
+  property name=activeFalse/property
+  property name=inconsistentFalse/property
+  property name=draw_indicatorTrue/property
+/widget
+packing
+  property name=padding0/property
+  property name=expandFalse/property
+  property name=fillFalse/property
+/packing
+			  /child
+
+			  child
+widget class=GtkCheckButton id=check_hide_find_dialog
+  property name=visibleTrue/property
+  property name=tooltip translatable=yesHide the Find dialog after clicking Find Next/Previous/property
+  property name=can_focusTrue/property
+  property name=label translatable=yesHide the Find dialog/property
   property name=use_underlineTrue/property
   property name=reliefGTK_RELIEF_NORMAL/property
   property name=focus_on_clickTrue/property
diff --git a/src/document.c b/src/document.c
index dbc1e39..ad437da 100644
--- a/src/document.c
+++ b/src/document.c
@@ -1939,7 +1939,7 @@ gint document_find_text(GeanyDocument *doc, const gchar *text, const gchar *orig
 		}
 
 		/* we searched only part of the document, so ask whether to wraparound. */
-		if (search_prefs.suppress_dialogs ||
+		if (search_prefs.always_wrap ||
 			dialogs_show_question_full(parent, GTK_STOCK_FIND, GTK_STOCK_CANCEL,
 _(Wrap search and find again?), _(\%s\ was not found.), original_text))
 		{
diff --git a/src/interface.c b/src/interface.c
index ce9fbff..126e794 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -2574,7 +2574,8 @@ create_prefs_dialog (void)
   GtkWidget *frame36;
   GtkWidget *alignment39;
   GtkWidget *vbox36;
-  GtkWidget *check_ask_suppress_search_dialogs;
+  GtkWidget *check_always_wrap_search;
+  GtkWidget *check_hide_find_dialog;
   GtkWidget *check_search_use_current_word;
   GtkWidget *check_fif_current_dir;
   GtkWidget *label215;
@@ -3195,10 +3196,15 @@ create_prefs_dialog (void)
   gtk_widget_show (vbox36);
   gtk_container_add (GTK_CONTAINER (alignment39), vbox36);
 
-  check_ask_suppress_search_dialogs = gtk_check_button_new_with_mnemonic (_(Always wrap search and hide the Find dialog));
-  gtk_widget_show (check_ask_suppress_search_dialogs);
-  gtk_box_pack_start (GTK_BOX (vbox36), check_ask_suppress_search_dialogs, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, check_ask_suppress_search_dialogs, _(Always wrap search around the document and hide the Find dialog after clicking Find Next/Previous), NULL);
+  check_always_wrap_search = gtk_check_button_new_with_mnemonic (_(Always wrap search));
+  gtk_widget_show (check_always_wrap_search);
+  gtk_box_pack_start (GTK_BOX (vbox36), check_always_wrap_search, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, check_always_wrap_search, _(Always wrap search around the document), NULL);
+
+  check_hide_find_dialog = gtk_check_button_new_with_mnemonic (_(Hide the Find dialog));
+  gtk_widget_show (check_hide_find_dialog);
+  gtk_box_pack_start (GTK_BOX (vbox36), 

[Geany-devel] Geany-Plugins: SVN-URL on git

2011-12-04 Thread Frank Lanitz
Hi, 

I didn't found the conclusion on the discussion: What was the outcome
on this topic? Which reference to old svn shall be inserted into git
repo?

Cheers, 
Frank 
-- 
http://frank.uvena.de/en/


pgprIJqz7bQrv.pgp
Description: PGP signature
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Default search behavior is irritating

2011-12-04 Thread Nathan Broadbent
 It turned out to be quite easy, because the two meanings are actualy
 used separately...

 --
 E-gards: Jimmy

Thanks very much for the patch, it works great!


 - Make 'Wrap search' checked by default.
 
  And that'll irritate anyone who prefers not to wrap, and has to uncheck
  'Wrap search' any time (s)he starts Geany.

Sorry, I wanted to suggest changing the default for the Geany
installation. The user's preference would still be saved between
sessions

 Yep, that's a default value that will probably please 50% users and
 annoy the other 50%.  A pref's good, but changing the default doesn't
 make much sense if you ain't got no well-done statistics about most
 spread user opinion.

I've tried to collect a few statistics... Here are my sources:

* Geany feature request - search autowrap on by default
(http://sourceforge.net/tracker/?func=detailaid=2962018group_id=153444atid=787794
* Same feature request for the Bugzilla project
(https://bugzilla.mozilla.org/show_bug.cgi?id=91520)

Votes for 'Wrap search' by default (11):

Nick Treleaven, John Levon, Blake Ross, Jesse Ruderman, Neil
Becker, TGOS, Mike Stockman, Andrew Pimlott, Tom Schneider,
realgrouchy, search autowrap on by default poster (anonymous)

Votes against 'Wrap search' by default (2):

timeless, Fred

Enrico Tröger was impartial, stating I don't mind much, we can change
the default.


Everything's up to you, but I do feel that this default would make
search more friendly for new users.

Also, sorry to be all talk and no contribution yet... But I am
currently working on a HAML lexer for Scintilla, as well as
improvements to the TreeBrowser plugin.


Best regards,
Nathan
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Geany-Plugins: SVN-URL on git

2011-12-04 Thread Colomban Wendling
Le 04/12/2011 15:09, Frank Lanitz a écrit :
 Hi, 
 
 I didn't found the conclusion on the discussion: What was the outcome
 on this topic? Which reference to old svn shall be inserted into git
 repo?

IMHO (as said in my last mail on the previous thread) the best possible
would be http(s)://svn.geany.org/svnroot/geany-plugins@rev with the
appropriate SVN mirror on geany.org and a web interface capable of
displaying such SVN URL.

Enrico said he was OK to setup something on geany.org given he knew
what, so having the URL point there is better I think.  And I think that
either with the appropriate web interface and/or a shiny rewrite rule it
should not be that difficult to make such SVN URL also work on the web
interface.

Anyway if I had to choose between valid SVN and web interface URL, I
better choose SVN URL.


That's my personal conclusion, but yet again, I don't really mind what's
the final choice.

Regards,
Colomban
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Default search behavior is irritating

2011-12-04 Thread Colomban Wendling
Le 04/12/2011 14:44, Dimitar Zhekov a écrit :
 On Sun, 04 Dec 2011 00:48:40 +0100
 Colomban Wendling lists@herbesfolles.org wrote:
 
 Le 03/12/2011 20:56, Dimitar Zhekov a écrit :

 There is one, and only one thing, that is unquestionably better IMHO:
 separate [ ] Always wrap search and hide the Find dialog into [...]

 Yep, this sounds sensible to me.  It'd be better flexible and I can
 understand somebody was one and not the other.  So yeah, go ahead :)

 
 It turned out to be quite easy, because the two meanings are actualy
 used separately...

Great!

A few comments:

 * I better see the new prefs under the [serach] group, with
pref_main_ prefix stripped;

 * The GeanySearchPrefs struct change breaks the plugin ABI since it
changes the offset of the use_current_word field that is in the API
[1].  Since the prefs are not a whole anymore, just put one in place of
suppress_dialogs and add the other somewhere after use_current_word
(the only field in the API).

Apart these, the patch looks just fine and work good :)


Regards,
Colomban


[1] Although I can't find any plugin using it, neither in code Geany nor
in geany-plugins...
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Default search behavior is irritating

2011-12-04 Thread Colomban Wendling
Le 04/12/2011 16:13, Nathan Broadbent a écrit :
 [...]
 
 Yep, that's a default value that will probably please 50% users and
 annoy the other 50%.  A pref's good, but changing the default doesn't
 make much sense if you ain't got no well-done statistics about most
 spread user opinion.
 
 I've tried to collect a few statistics... Here are my sources:
 
 * Geany feature request - search autowrap on by default
 (http://sourceforge.net/tracker/?func=detailaid=2962018group_id=153444atid=787794
 * Same feature request for the Bugzilla project
 (https://bugzilla.mozilla.org/show_bug.cgi?id=91520)
 
 Votes for 'Wrap search' by default (11):
 
 Nick Treleaven, John Levon, Blake Ross, Jesse Ruderman, Neil
 Becker, TGOS, Mike Stockman, Andrew Pimlott, Tom Schneider,
 realgrouchy, search autowrap on by default poster (anonymous)
 
 Votes against 'Wrap search' by default (2):
 
 timeless, Fred
 
 Enrico Tröger was impartial, stating I don't mind much, we can change
 the default.
 
 Everything's up to you, but I do feel that this default would make
 search more friendly for new users.

I'm not sure such bug reports are really good source for stats since I'd
think it's way more likely people that do like the pre-bug state didn't
see the bug or mind commenting than people wanting the feature.

If we want real stats, maybe polling the Geany user ML would be the
thing to do.

However I don't mind much either what's the default.  If it's true that
people tend to prefer wrap by default, why not -- and when Dimitar's
patch will be applied it'll be easy to change.

 Also, sorry to be all talk and no contribution yet... But I am
 currently working on a HAML lexer for Scintilla, as well as
 improvements to the TreeBrowser plugin.

Don't worry, it's not a problem.  Giving patch is of course better, but
requesting/discussing features is fine.

Regards,
Colomban
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Default search behavior is irritating

2011-12-04 Thread Colomban Wendling
Le 04/12/2011 01:36, Nathan Broadbent a écrit :
- Make 'Wrap search' checked by default.

 And that'll irritate anyone who prefers not to wrap, and has to uncheck
 'Wrap search' any time (s)he starts Geany.

 Yep, that's a default value that will probably please 50% users and
 annoy the other 50%.  A pref's good, but changing the default doesn't
 make much sense if you ain't got no well-done statistics about most
 spread user opinion.
 
 The reason I thought of putting the 'wrap search' checkbox on the Find
 dialog, is that the 'close dialog' checkbox does remember it's state
 after closing and restarting Geany. So a user would only ever need to
 change it once.

(close dialog currently only closes the dialog for find all style
options)

Hum, you mean displaying the wrap search prefs from the pref dialog in
the find dialog too?  Why not, but I'm afraid it'd make the dialog less
readable for not much benefit.


Regards,
Colomban
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Default search behavior is irritating

2011-12-04 Thread Nathan Broadbent
 (close dialog currently only closes the dialog for find all style
 options)

This is true. However, if you look at the Add wrapped search [1]
feature request (which is still open), Nick Treleaven
and Enrico Tröger had a conversation about changing this back in 2009:

2009-10-14 05:49:13 ntrel: I suppose we could make the option 'Always
wrap' and then change the dialog 'close' checkbox to apply to all
actions. Sound OK Enrico?

2009-10-21 10:30:46 eht16: Nick, yes, sounds good.


 Hum, you mean displaying the wrap search prefs from the pref dialog in
 the find dialog too?  Why not, but I'm afraid it'd make the dialog less
 readable for not much benefit.

Well, if the Close dialog checkbox did apply to all actions, and the
wrap search checkbox was also on the Find dialog, then both of those
settings wouldn't need to be in Preferences any more.. Because they
would always be configurable on the Find dialog.

I'm a bit tired of the debate though, so I'm happy to just apply
Dimitar's patch and close all of these feature request tickets :)


Regards,
Nathan


[1] 
http://sourceforge.net/tracker/?func=detailaid=2877992group_id=153444atid=787794
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Default search behavior is irritating

2011-12-04 Thread Colomban Wendling
Le 04/12/2011 20:21, Nathan Broadbent a écrit :
 (close dialog currently only closes the dialog for find all style
 options)
 
 This is true. However, if you look at the Add wrapped search [1]
 feature request (which is still open), Nick Treleaven
 and Enrico Tröger had a conversation about changing this back in 2009:
 
 2009-10-14 05:49:13 ntrel: I suppose we could make the option 'Always
 wrap' and then change the dialog 'close' checkbox to apply to all
 actions. Sound OK Enrico?
 
 2009-10-21 10:30:46 eht16: Nick, yes, sounds good.

Hum yeah, you make me remember I saw this the other day.

However I don't agree that close should apply to all actions if it's
saved (and it should be saved), because my use-case wouldn't fit:  I
always have the close checked, but (almost) never want to close the
dialog when I click next.

What I think is that keeping the dialog when all results are in the
message panel isn't really useful;  but when searching with the find
dialog I generally use the Next button.

And final use case that wouldn't fit is to prepare a complex search
pattern (regex).  I want to try it first to check it actually matches as
I want, and then find all -- well OK, I do this more using replace
dialog than search.

 Hum, you mean displaying the wrap search prefs from the pref dialog in
 the find dialog too?  Why not, but I'm afraid it'd make the dialog less
 readable for not much benefit.
 
 Well, if the Close dialog checkbox did apply to all actions, and the
 wrap search checkbox was also on the Find dialog, then both of those
 settings wouldn't need to be in Preferences any more.. Because they
 would always be configurable on the Find dialog.
 
 I'm a bit tired of the debate though, so I'm happy to just apply
 Dimitar's patch and close all of these feature request tickets :)

Well, so let's stop here and be happy with Dimitar's patch :)

Regards,
Colomban
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel