solus-project / budgie-desktop-examples

Examples on how to create trivial Budgie Desktop Applets
MIT License
19 stars 11 forks source link

Not an issue but a question!!! #9

Closed cgiannakidis70 closed 6 years ago

cgiannakidis70 commented 6 years ago

I am trying to create an applet in python, following the examples here, and i want to test it. How to do this? Thanks in advance.

fossfreedom commented 6 years ago

Save the .plugin and all associated modules to .local/share/budgie-desktop/plugins/yourpluginfolder Then restart the panel to see the plugin appear in budgie settings

cgiannakidis70 commented 6 years ago

ok.Thank you.

cgiannakidis70 commented 6 years ago

With all respect can you help me to solve some problems with my applet.I am not so sure if its running .

fossfreedom commented 6 years ago

Link to the code?

cgiannakidis70 commented 6 years ago

I don't have a link.Its a python script.I followed the examples for python and it is in entry level.I made a button to open a drop down menu .But now i have only the button. Should I paste the code here? Thanks.

fossfreedom commented 6 years ago

Create a github gist or a test github repo

cgiannakidis70 commented 6 years ago

Ok. This is it. https://gist.github.com/cgiannakidis70/85d8c7390dc265f2db6a4197fccc3bd3

fossfreedom commented 6 years ago

line 35 onwards only adds a button with an image. I don't see any code here where you have connected the "clicked" event for the button and then added code to respond to that click event.

cgiannakidis70 commented 6 years ago

So, with all respect, how should I go on with the code. Thanks in advance.

fossfreedom commented 6 years ago
def _respond_to_clicked(self, *args):
     # add the code here to display or do what you want
     # it really is up to you what you want to do with the clicked event
     print ("Hi you have clicked me")

self.button.connect('clicked', self._respond_to_clicked)
cgiannakidis70 commented 6 years ago

OK .Thanks a lot.I'll continue this as you said.