Jump to content

Photo

Classic-menu module for Moksha

moksha module desktop menu

  • Please log in to reply
7 replies to this topic

#1 ylee

ylee

    King of the Software Page

  • Moderators
  • 1584 posts
  • LocationSouth Carolina, USA

Posted 24 September 2015 - 06:08 PM

A few of you know this but most don't. I have created a new module for Moksha. The Module, Classic-Menu restores some menu items to Moksha's main menu that used to exist in previous versions of Bodhi and one still finds in current versions of enlightenment. This is the first enlightenment/Moksha module I coded and was an educational experience for me which has made me somewhat eager to learn more about enlightenment module programming.
 
But anyway some of you may have noticed the main menu for Moksha differs somewhat from the previous menus found in Bodhi or in Enlightenment. I am referring to the missing menu entries for Desktop and Windows. I first looked into this because of Elw3's  forum post, Windows entry in menu?  It has also been mentioned a few other places on the forums, see an even earlier post, Desktop settings missing from menu?
 
I actually use the Windows menu item alot and btw don't mention alternatives here to me as I know them and I know my way around e17, e19, Moksha very well and plus they are documented here on the forums and should be somewhat in our Bodhis guide to Moksha/Enlightenment. So to make a long story short I followed Jeffs advice:
 

This is a menu entry most people have no need for so it was removed. If someone wants to pack it up as a third party module that would be OK to include in the repos.

You can create key bindings for showing a current window list or just use a taskbar like a normal person :P


and tried my hand at created a module to restore the missing menu items. Earlier today I added debs for the module to the main repo so if you wish to try it, test it, use it simply install it by the usual:

sudo apt-get update
sudo apt-get install classicmenu-moksha

Load the Module as any other and you are good to go :)

 

The module is sorta pointless if you are using Enlightenment and not Moksha. So I added moksha as a dependency  so it shouldn't install on enlightenment or at least give you a chance to 'chicken ' out.

 

Currently the Module is english only but I hope to eventually add support for other languages :) Anyone wishing to translate stuff for it don't post here instead IM or email me.

 

But please report any problems or successes here.

 

I hope this module is of some use to those Bodhi users that miss these menu items B)


"No technology can ever be too arcane or complicated for the black t-shirt crowd."




A big thank you to everyone who contributes to Bodhi Linux


#2 Kev

Kev

    An Aged Technophile

  • Members
  • 324 posts
  • LocationMichigan USA

Posted 25 September 2015 - 10:16 AM

Thanks Ylee :)  !

 

Also I think it would be an interesting read on what you had to do to get up to speed on module programming.  What you had to set up, what dependencies, etc...


- Kevin

#3 ylee

ylee

    King of the Software Page

  • Moderators
  • 1584 posts
  • LocationSouth Carolina, USA

Posted 25 September 2015 - 08:40 PM

Thanks Ylee :)  !
 
Also I think it would be an interesting read on what you had to do to get up to speed on module programming.  What you had to set up, what dependencies, etc...

 
I would like to and probably will write it all up kevision. Just don't know where to put it and have serious time restraint issues now and a very long to do list. The coding and linux stuff on my todo list takes an unknown and hard to estimate amount of time. Sometimes something seems simple till I try to do it and then I run into all kinds of issues some of them 'ungoogle-able" and other times somethings sound hard but turn out to not be bad at all. My judgment and time estimation skills on these kinds of problems seems borked :(
 
Anyways this module was easy as a module gets :) Almost all the needed module functions, callbacks and stuff already existed in Enlightenment/Moskhas menu code, the file e_int_menu.c specifically. All I had to do was use it in my module.  Only had to use two functions from e_inti_menu.c, e_int_menus_desktops_new and e_int_menus_clients_new. I could ignore how they were implemented and the long list of stuff that ends up being called in e_int_menu.c. Basically all functions that start with _e_int_menus_windows or  _e_int_menus_clients in e_int_menu.c end up being called.
 
However I didn't ignore how all this worked and kinda went over the code until I half way understood it. That was because I had a weird bug/issue I was trying to debug. Not worth going into but a short chat one morning before leaving for work with Kai Huuhko clarified one important point for me and adding one statement to the module and the bug was gone.
 
Sadly as far as I know kevision there is no documentation on writing modules in e17 or above that are up to date. I found a couple of badly dated blog posts but so out of date as to be little use. What I learned about module programming I learned from looking at working modules and from trying to take broken modules and try to fix them. That is what I have currently been working on trying to fix a couple of old modules that no longer work. Not sure if I will complete this or getting bored or frustrated and move on. These days I only have a few hours now and then to code, maybe once or twice a week. It is hard to code much in that amount of time and a bit hard to keep it fresh in your mind during periods of 'downtime.'
 
As far as dependencies go I would say modules need at least everything enlightenment itself needs to compile. enlighenment.org has a list somewhere but for debian based distros I just use Jeffs installdeps.sh script as a reference. I am not sure why he has fish or vim as dependencies pretty sure they are not, everything else probably is tho. Install all that and most if not all modules will compile with no issues. BTW I usually also install subversion cause I get some warnings here or there without it. I suppose some of the make files or autogen files or something still have subversion in them from back in day when enlightenment was using svn. I don't like warnings even harmless ones ;)
 
Now from a programmers point of view you merely stick
 

#include "e.h"

 
in your module code and you are good to go. At least for the enlightenment stuff. From a programmers point of view once you include e.h you have access to all the functions data structures defines and whatnot in all the libraries included in e.h. And since e.h includes e_includes.h you have access to all those libraries also.

But anyway kevision before anyone can contemplate enlightenment module programming they need to have a good background in C programming. And I do mean good. Enlightenment code makes very heavy use of pointers particularly function pointers and this is considered an Advanced C programming skill. In fact entire books have been written on the subject, some great and some piss poor. This is not something one can learn quickly unless of course one has some experience in doing the same thing in ASM. So I would think maybe 4 or 5 years experience in C with at least some programs using pointers, pointers to pointers, function pointers and pointers to pointers which point to functions. And so on, it and the syntax  gets complex fast :(

 

To make it short C is NOT a language one if they are smart and motivated can learn in a few weeks like for example python is for a programmer that already knows a couple other languages. I have at least a decades experience coding in C, altho I mostly avoid it these days. And have ever since i started coding in python.


  • Kev likes this

"No technology can ever be too arcane or complicated for the black t-shirt crowd."


#4 Jeff

Jeff

    Lead Developer

  • Developer
  • 12517 posts
  • LocationBloomington, IL

Posted 25 September 2015 - 10:32 PM

Yea... The more I edit / do thing for moksha the more I hate C and appreciate python. At some point when time allows I am going to see if I can work with the creator of the "edgar" module to get it backported to Moksha - this is a tool that allows you to write modules in python.

 

I know Kai started work on porting it, but he hit some sort of snag with E versions older than E18.



#5 ylee

ylee

    King of the Software Page

  • Moderators
  • 1584 posts
  • LocationSouth Carolina, USA

Posted 25 September 2015 - 11:00 PM

<offtopic>

 

Yea... The more I edit / do thing for moksha the more I hate C and appreciate python.

 

...

 

I can't say I hate C but it can be hard work. But I adore python, absolutely one of the most beautiful and expressive languages I have learned B)

 

And oh btw the "edgar" module would be fantastic. I haven't looked at it recently. and had issues with it the last time I tried to play with it.

</offtopic>


"No technology can ever be too arcane or complicated for the black t-shirt crowd."


#6 The waiter

The waiter

    Module Master

  • Developer
  • 1655 posts
  • LocationBanska Bystrica, Slovakia

Posted 26 September 2015 - 07:43 AM

Yes, I read somewhere the Python authors really hated C. Anyway C apps starts and run much faster than Python ones. Its apparently a matter of compromise. 

And yes, if I want make a new module, there is no decent manual for a programmer. I just modify module code and use trial-and-error procedure often with a logical imitation code parts in working modules. Really hard and time consuming job. 

I can remember on university how we were frightened of object-oriented programming. And pointers? Pointers were a hell. Only few of us really understood OOP in C++ (I was not among them :) ). Unfortunately neither some teachers knew it deeply. 

By all means, I would like to encourage every user on this forum not to give up, try it and help community as ylee did.



#7 Kev

Kev

    An Aged Technophile

  • Members
  • 324 posts
  • LocationMichigan USA

Posted 28 September 2015 - 12:56 PM

Thanks ylee! I started off programming in assembly language(Motorola, Microsoft, etc...) then moved to C then C/C++(Microsoft and Borland) then to VB now C#(Microsoft).  I kind of agree about C though... not a huge fan, pointers were a problem if you were forgetful among other things... but I do have a few years of it though I'm rusty as to not having done any coding in C/C++ in the last few years.  

 

Python I do not know yet.  Haven't had a contract or job come up where I needed to learn it, but I am curious about it as I notice a lot of python coders out there and especially their apps.

 

I haven't found much docs in app development for enlightenment either... its like digging for gold.   I am hoping by the time Christmas gets here my current project will slow down enough to do some side line coding... maybe take a look at doing modules for "e".  I should probably take a look at the edgar software ya'll mentioned.


- Kevin

#8 ylee

ylee

    King of the Software Page

  • Moderators
  • 1584 posts
  • LocationSouth Carolina, USA

Posted 10 November 2016 - 11:48 AM

Updated deb file for Bodhi 4.0.

To install on 4.0:
 

sudo apt-get update
sudo apt-get install moksha-classicmenu

0QguUFM.png


"No technology can ever be too arcane or complicated for the black t-shirt crowd."






Also tagged with one or more of these keywords: moksha, module, desktop, menu

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users