News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

DragScroll plugin (was: new scintilla 2.0 was released)

Started by Pecan, August 22, 2009, 01:57:36 PM

Previous topic - Next topic

Pecan

Quote from: mariocup on August 22, 2009, 12:26:48 PM
...If I select a text in CB with the left mouse (holding the mouse) I can scroll one turn with the mouse wheel within the editor and then drop it at this position. It is not possible to scroll in continous mode.
...

The cbMouseSap plugin at  http://code.google.com/p/cbkeymacs/downloads/list is an emulation of the Linux MiddleMouse key cut and paste.

For example, mark some text, scroll to the target position and press the MiddleMouse key to paste it.

Or; press the MiddleMouse key over marked text to copy it to the clipboard, scroll to any number of locations and paste it by depressing the MiddleMouse key.

The above also works between editors.


mariocup

Hi Pecan,

cool it works and is very helpful. Why is this plugin not part of the contrib?


killerbot

I already downloaded the source.
In case there are no objections, I can add it to the contrib plugins .... ?

mariocup

Hi killerbot,

I tested it under windows and it works nice. Did you or one of the other devs test it under Linux?
Any objections of the devs in adding it to the contrib plugin?


killerbot

Well the first thing we need is the approval of Pecan, the author.

@Mister Pecan : may we add it to the contrib plug-ins ?

Pecan

Quote from: killerbot on August 30, 2009, 07:55:22 AM
Well the first thing we need is the approval of Pecan, the author.

@Mister Pecan : may we add it to the contrib plug-ins ?

Well, of course. It just never occured to me that this piece of "after-thought" would become a distributed plugin.

Just goes to show that little things can count, I guess.

killerbot

I prepared everything. Commit will happen tomorrow evening. Go to run to a football game now ;-)

killerbot

#7
Allright, the code has been committed, breaking the build :-(
Seems I moved to fast forward.  :?

Issues with the gtk function calls. Will have to look around on how to fix it, or to find my mistake during the fix of the Makefile.

EDIT : in case we need the gtk development files to be installed 'extra', it might not be such a good idea to use those methods ? Are their other possibilities ?

Jenna

Quote from: killerbot on August 31, 2009, 09:37:02 PM
EDIT : in case we need the gtk development files to be installed 'extra', it might not be such a good idea to use those methods ? Are their other possibilities ?

At least codesnippets also use gtk dev-files, so it should not be so hard to integrate.
The configure script already checks, if they are available.

I can have a look into this problem.
What about windows, does it build without problems ?

killerbot

#9
I think I have fixed the gtk issues, and on linux it builds
Currently looking into cbMouseSap <-----------> MouseSap. Currently the apply of the config is hacked.

Jenna

If I see right neither the MouseSapcfg-files, nor the dragscrollevent-files are used.
The drgscroll-stuff is not icnluded in the cbp-file, and MouseSapcfg can be removed, also the include of dragscrollevent.h.

Seems to work fine here without them.

I'm just building vi automake to see what happens.

This is the Makefile.am I use:

INCLUDES = $(WX_CXXFLAGS) \
$(WX_GTK2_CFLAGS) \
-I$(top_srcdir)/src/include \
-I$(top_srcdir)/src/include/wxscintilla/include

pluginlibdir = $(pkglibdir)/plugins

pluginlib_LTLIBRARIES = libMouseSap.la

libMouseSap_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version

libMouseSap_la_LIBADD = $(PLUGIN_WX_LIBS) ../../../sdk/libcodeblocks.la

libMouseSap_la_SOURCES = MouseSap.cpp

noinst_HEADERS = MouseSap.h

EXTRA_DIST = $(srcdir)/*.cbp \
manifest.xml

pkgdata_DATA = MouseSap.zip

CLEANFILES = $(pkgdata_DATA)

MouseSap.zip: manifest.xml
PWD=`pwd` cd $(srcdir) && zip $(PWD)/MouseSap.zip manifest.xml > /dev/null


I think the cfg-files and the dragscrollevent-files can be safely removed from the project-files, the Makefiles and (if I am right) from svn.

Jenna

Seems to work this way, I committed the changes and also removed the MouseSapcfg-files from the projects.
Replaced the global cb-variable on windows, it's not used in our svn-sources since several months.
I also added a hack to avoid a nameconflict between wxWidgets2.8 and newer glib-versions.

I tested it on debian 64-bit (with automake and C::B) and on w2k with C::B.

By the way:
I guess the *cfg-files and the dragscrollevent-files are there because the plugin was initially copied from the dragscroll-plugin.
You can see this, if you compare MouseSapcfg.cpp and dragscrollcfg.cpp .

MortenMacFly

...my mistake:
The topic should have been named "MouseSap plugin", not DragScroll. Jens' post with the DragScrollEvent confused me a bit. :lol:
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Pecan

Quote from: jens on September 01, 2009, 07:45:01 AM
...
By the way:
I guess the *cfg-files and the dragscrollevent-files are there because the plugin was initially copied from the dragscroll-plugin.
You can see this, if you compare MouseSapcfg.cpp and dragscrollcfg.cpp .


Correct. I "dragged" DragScroll over to a new directory and hacked it up.

If someone would give me SVN permissions to modify MouseSap, I'd appreciate it.

MortenMacFly

Quote from: Pecan on September 01, 2009, 01:49:31 PM
If someone would give me SVN permissions to modify MouseSap, I'd appreciate it.
...Yiannis, please?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]