Author Topic: CBIL project: ShellExtension plugin warning  (Read 10504 times)

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
CBIL project: ShellExtension plugin warning
« on: July 31, 2007, 04:51:28 am »
don't update to revision 94 or later if you want to keep your current command settings for the ShellExtensions (or InterpretedLangs) plugin (you won't lose them, they just won't be accessible from the newest version of the plugin). I have changed the way custom shell commands are handled by the plugin to allow better menu customization of the commands. As a result, I had to change the way the commands are stored in the configuration files. If there is any interest i will write an automatic importer for the old style commands.

rev91 is the last commit to trunk that uses the old style command structure. (revs 92 and 93 add a tag for the state of the plugins as at that time)
« Last Edit: July 31, 2007, 05:13:14 am by dmoore »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: CBIL project: ShellExtension plugin warning
« Reply #1 on: July 31, 2007, 08:34:56 am »
don't update to revision 94 or later [...]
I get a bunch of errors if I try to do so:
Code: [Select]
mingw32-g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DBUILDING_PLUGIN -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DTIXML_USE_STL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE  -IC:\Devel\CodeBlocks\src\include -IC:\Devel\CodeBlocks\src\include\wxscintilla\include -IC:\Devel\CodeBlocks\src\include\wxFlatNotebook\include -IC:\Devel\wxWidgets\include -IC:\Devel\wxWidgets\lib\gcc_dllUnicode\mswu -IC:\Devel\GCC345\include  -c C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp -o C:\Devel\CodeBlocks\src\.objs\plugins\contrib\ShellExtensions\ConfigDialog.o
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:4: error: expected unqualified-id before numeric constant
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:5: error: expected unqualified-id before numeric constant
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:6: error: expected unqualified-id before numeric constant
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:7: error: expected unqualified-id before numeric constant
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:8: error: expected unqualified-id before numeric constant
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp: In member function `void ConfigDialog::SetDialogItems()':
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:184: error: 'struct ShellCommand' has no member named 'exec'
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:185: error: 'struct ShellCommand' has no member named 'extensions'
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:187: error: 'struct ShellCommand' has no member named 'actions'
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:188: error: 'struct ShellCommand' has no member named 'actions'
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:188: error: 'struct ShellCommand' has no member named 'actions'
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:189: error: 'struct ShellCommand' has no member named 'actions'
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:189: error: 'struct ShellCommand' has no member named 'actions'
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:190: error: 'struct ShellCommand' has no member named 'actions'
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp: In member function `void ConfigDialog::GetDialogItems()':
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:208: error: 'struct ShellCommand' has no member named 'exec'
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:209: error: 'struct ShellCommand' has no member named 'extensions'
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:211: error: `ShellCommandAction' was not declared in this scope
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:211: error: expected `;' before "act"
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:212: error: 'struct ShellCommand' has no member named 'actions'
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:216: error: `act' was not declared in this scope
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:225: error: 'struct ShellCommand' has no member named 'actions'
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:211: warning: unused variable 'ShellCommandAction'
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp: In member function `void ConfigDialog::New(wxCommandEvent&)':
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:237: error: `ShellCommandAction' was not declared in this scope
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:237: error: expected `;' before "act"
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:238: error: `act' was not declared in this scope
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:242: error: 'struct ShellCommand' has no member named 'actions'
C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ConfigDialog.cpp:237: warning: unused variable 'ShellCommandAction'
Process terminated with status 1 (0 minutes, 28 seconds)
24 errors, 3 warnings
Build log saved as: C:\Devel\CodeBlocks\src\plugins\contrib\ShellExtensions\ShellExtensions_build_log.html
...for your reference! ;-)

With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: CBIL project: ShellExtension plugin warning
« Reply #2 on: July 31, 2007, 11:48:47 am »
thanks... i haven't changed the windows project file yet - you need to remove configdialog.h/.cpp and replace with cmdconfigdialog.h/.cpp.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: CBIL project: ShellExtension plugin warning
« Reply #3 on: August 01, 2007, 05:24:59 am »
turns out it wasn't so hard to import the old Interpreter/Action settings so I've done that in recent revisions.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: CBIL project: ShellExtension plugin warning
« Reply #4 on: August 01, 2007, 08:27:40 am »
turns out it wasn't so hard to import the old Interpreter/Action settings so I've done that in recent revisions.
Warning: In bool FileExplorer::AddTreeItems(const wxTreeItemId &ti) you do the m_Tree->Freeze(); twice, but only one m_Tree->Thaw();. This cannot be good... ;-)

In addtion two minor remarks on the Python plugin:
1.) You might want to consider the patch attached.
2.) The project file can be done a lot more "generic". You have a lot compiler/linker switches and includes that appear twice. I'd say it's "nicer" to put them on ptoject level and leave the different settings on target level only.

Anyway: I'm pretty sure you know that I like your work! ;-)

With regards, Morten.

Edit: BTW: After removing the duplicated Thaw I was able to see the files in the file explorer again.

[attachment deleted by admin]
« Last Edit: August 01, 2007, 10:03:48 am by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: CBIL project: ShellExtension plugin warning
« Reply #5 on: August 01, 2007, 01:41:07 pm »
damn svn update  :lol:

strangely doesn't seem to affect linux - i guess freeze/thaw isn't doing a lot there

thanks morten. i'll look at the python patch
« Last Edit: August 01, 2007, 01:42:38 pm by dmoore »

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: CBIL project: ShellExtension plugin warning
« Reply #6 on: August 02, 2007, 04:10:19 pm »
In addtion two minor remarks on the Python plugin:
1.) You might want to consider the patch attached.

you or someone you know want to debug read-only/"protected" files?

Quote
2.) The project file can be done a lot more "generic". You have a lot compiler/linker switches and includes that appear twice. I'd say it's "nicer" to put them on ptoject level and leave the different settings on target level only.

yeah, all of my project files are a bit sloppy, I will fix them, I promise... :)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: CBIL project: ShellExtension plugin warning
« Reply #7 on: August 02, 2007, 08:51:04 pm »
In addtion two minor remarks on the Python plugin:
1.) You might want to consider the patch attached.
you or someone you know want to debug read-only/"protected" files?
Nope. You got that part wrong. It fixes issues with wx26 where at the file open dialog a checkbox is shown meaning "open read only". Hence this does *not* work. The patch operates the same way as on all other places accross the C::B sources: It simply disables the checkbox.
Very, very, very minor... just for consistency.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: CBIL project: ShellExtension plugin warning
« Reply #8 on: August 03, 2007, 03:04:32 am »
fair enough. (i hadn't look at prep.h before i posted...)

Offline mariocup

  • Developer
  • Lives here!
  • *****
  • Posts: 587
Re: CBIL project: ShellExtension plugin warning
« Reply #9 on: August 04, 2007, 10:29:52 pm »
Hi dmoore,

I update to SVN 109 and I get the following error, while compiling the sources under windows with mingw 3.4.5. Is this a non working revision?

Code: [Select]
\ShellExtensions.dll
Info: resolving _wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSING by linking to __imp__wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSING (auto-import)
.objs\FileExplorer.o: In function `ZN12FileExplorerC2EP8wxWindowiRK7wxPointRK6wxSizelRK8wxString':
D:/eigene_dateien/codeblocks-trunk/src/plugins/contrib/cbilplugin/ShellExtensions/FileExplorer.cpp:163: undefined reference to `FavoriteDirs::~FavoriteDirs()'
.objs\FileExplorer.o: In function `ZN12FileExplorerC1EP8wxWindowiRK7wxPointRK6wxSizelRK8wxString':
D:/eigene_dateien/codeblocks-trunk/src/plugins/contrib/cbilplugin/ShellExtensions/FileExplorer.cpp:163: undefined reference to `FavoriteDirs::~FavoriteDirs()'
.objs\FileExplorer.o: In function `ZN12FileExplorer10ReadConfigEv':
D:/eigene_dateien/codeblocks-trunk/src/plugins/contrib/cbilplugin/ShellExtensions/FileExplorer.cpp:448: undefined reference to `FavoriteDirs::Add(FavoriteDir const&, unsigned int)'
.objs\FileExplorer.o: In function `ZN12FileExplorer13OnAddFavoriteER14wxCommandEvent':
D:/eigene_dateien/codeblocks-trunk/src/plugins/contrib/cbilplugin/ShellExtensions/FileExplorer.cpp:764: undefined reference to `FavoriteDirs::Insert(FavoriteDir const&, unsigned int, unsigned int)'
.objs\FileExplorer.o: In function `ZN12FileExplorer10OnSettingsER14wxCommandEvent':
D:/eigene_dateien/codeblocks-trunk/src/plugins/contrib/cbilplugin/ShellExtensions/FileExplorer.cpp:978: undefined reference to `FileBrowserSettings::FileBrowserSettings(FavoriteDirs const&, wxWindow*, int, wxPoint, wxSize, int)'
D:/eigene_dateien/codeblocks-trunk/src/plugins/contrib/cbilplugin/ShellExtensions/FileExplorer.cpp:984: undefined reference to `FavoriteDirs::operator=(FavoriteDirs const&)'
.objs\FileExplorer.o: In function `ZNK12wxWindowBase10IsRetainedEv':
D:/science/wxwidgets/include/wx/window.h:(.text$_ZN19FileBrowserSettingsD1Ev[FileBrowserSettings::~FileBrowserSettings()]+0x3a): undefined reference to `vtable for FileBrowserSettings'
D:/science/wxwidgets/include/wx/window.h:(.text$_ZN19FileBrowserSettingsD1Ev[FileBrowserSettings::~FileBrowserSettings()]+0x51): undefined reference to `FavoriteDirs::~FavoriteDirs()'
.objs\FileExplorer.o: In function `ZN13VCSstatearrayD2Ev':
D:/eigene_dateien/codeblocks-trunk/src/plugins/contrib/cbilplugin/ShellExtensions/FileExplorer.cpp:9: undefined reference to `FavoriteDirs::~FavoriteDirs()'
D:/eigene_dateien/codeblocks-trunk/src/plugins/contrib/cbilplugin/ShellExtensions/FileExplorer.cpp:9: undefined reference to `FavoriteDirs::~FavoriteDirs()'
D:/eigene_dateien/codeblocks-trunk/src/plugins/contrib/cbilplugin/ShellExtensions/FileExplorer.cpp:9: undefined reference to `FavoriteDirs::~FavoriteDirs()'
D:/eigene_dateien/codeblocks-trunk/src/plugins/contrib/cbilplugin/ShellExtensions/FileExplorer.cpp:9: undefined reference to `FavoriteDirs::~FavoriteDirs()'
collect2: ld returned 1 exit status

As sometimes I close the Management window  (to have more space on my laptop), it would be cool to have the shell extension feature available from the editor. E.g. you have a open file and want to get the svn history of this file. So you just select the menu SVN/Status and the you get all you need. What do you think if a current active file in the editor supports the shell extension.

Another useful features is the $fname and $fext variables. Is it possible to select a file and replace the extension but a different one. Example: I want to select a C-File foo.c. The executable is foo.elf. So if I select foo.c in the editor I want to call a shell command for foo.elf.

P.S.: Hope to be able to update the docu the next week

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: CBIL project: ShellExtension plugin warning
« Reply #10 on: August 04, 2007, 10:51:47 pm »
Hi dmoore,

I update to SVN 109 and I get the following error, while compiling the sources under windows with mingw 3.4.5. Is this a non working revision?

I didn't update the win32 project file so rev109 works on linux only... I just submitted rev 110 and that should work fine on win32. (you might want to test the new favorite directories feature: right click on any directory and select add to favorites then give it an alias. favorites will alway populate the top of the drop down list. to manage the list of favorites right click anywhere in the tree, select "view->manage favorite directories" (those menu names will change soon))

Quote
As sometimes I close the Management window  (to have more space on my laptop), it would be cool to have the shell extension feature available from the editor. E.g. you have a open file and want to get the svn history of this file. So you just select the menu SVN/Status and the you get all you need. What do you think if a current active file in the editor supports the shell extension.

currently you right click in the editor pane. but i agree that the Extensions menu could and should offer the same...

Quote
Another useful features is the $fname and $fext variables. Is it possible to select a file and replace the extension but a different one.
Example: I want to select a C-File foo.c. The executable is foo.elf. So if I select foo.c in the editor I want to call a shell command for foo.elf.

yes, that should work for any reasonably recent revision (I put them in so I could view dvi's produced from a tex source). the command line would be "$fname.elf" -- if that doesn't work let me know.

Quote
P.S.: Hope to be able to update the docu the next week

good stuff. I should get a chance to compile those sources later in the week and contribute to your documentation efforts.


Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: CBIL project: ShellExtension plugin warning
« Reply #11 on: August 04, 2007, 11:00:07 pm »
btw. I almost have command import / export ready to go which will make sharing commands across personalities or different users much easier. It will be nice to supply a default set of useful commands with the plugin (for example, a bunch of version control related commands, a set of interpreted language commands, latex commands etc)

Offline mariocup

  • Developer
  • Lives here!
  • *****
  • Posts: 587
Re: CBIL project: ShellExtension plugin warning
« Reply #12 on: August 04, 2007, 11:09:22 pm »
Works with the new revision :D

It is incredible how fast you are going on with the shell extension plugin.

I am glad that the personality feature is now availabe for shell extension plugin. As I use different personalities for building and testing of Codeblocks, I find the feature really helpful.

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: CBIL project: ShellExtension plugin warning
« Reply #13 on: August 04, 2007, 11:10:11 pm »
Hi Damien !

Do you think you're still at planning stage on Berlios at rev 110 ? :wink:

Dje

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: CBIL project: ShellExtension plugin warning
« Reply #14 on: August 04, 2007, 11:38:41 pm »
you're always in planning when the plan is world domination :)

Offline mariocup

  • Developer
  • Lives here!
  • *****
  • Posts: 587
Re: CBIL project: ShellExtension plugin warning
« Reply #15 on: August 05, 2007, 02:04:26 am »
Hi Damien,

just a new idea: Is it possible to add support for to select the extension menu with the keyboard. User can define shortcuts for the entries in the menu extensions but what I would prefer is something like:
Use Alt-X to select the menu, then press S and then A on the keyboard. This should select Extensions->SVN->Add. This would be also cool for the context menu, because sometimes it is faster to work with the keyboard then using a mouse.

What do you think about it.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: CBIL project: ShellExtension plugin warning
« Reply #16 on: August 05, 2007, 02:27:03 am »
Mario: I think it should sort of work now because of default wxWidgets behavior - when you specify the menu structure you can use an "&" before the characters you want to use as hotkey: e.g. "&SVN/&add" would make S then A the hotkey combo (this also works for context menus, in that case you need to press (and maybe hold) the context menu button, next to the right alt on my keyboard, before you start). there may be issues maintaining the keyboard focus on the file explorer after each command. you will also need to be consistent with your menu naming - e.g. all SVN submenu entries should be specified as "&SVN"

Offline mariocup

  • Developer
  • Lives here!
  • *****
  • Posts: 587
Re: CBIL project: ShellExtension plugin warning
« Reply #17 on: August 06, 2007, 10:55:57 pm »
Hi Damien,

thx for the info.

I found a strange behaviour with the shell extension plugin (svn 110). If I close the message console (F2) and edit Environment->Shell Extensions and press ok the message console will be opened. Is this a bug in codeblocks or in your plugin? Can you reproduce the problem?

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: CBIL project: ShellExtension plugin warning
« Reply #18 on: August 07, 2007, 12:14:44 am »
seems to happen with or without either of my plugins. must be a cb behavior. easily fixed i would imagine.