Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 22 Dec 2014, 22:22
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
GtkBasic Panel - a Toolbar - beta version March 05 2008
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [14 Posts]  
Author Message
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Wed 13 Feb 2008, 04:00    Post subject:  GtkBasic Panel - a Toolbar - beta version March 05 2008  

This is a panel on top of your screen.
See a screenshot attached in the end of this message.
Works better in Icewm than in JWM.

Description

You can drag files from your filemanager on the "drop-area" in the top left corner.
Then that file is added as a button to the Panel.
To remove a button, right-click on it.

The icons for that file are automatically detected by their mime-types.
Also the run-action is determined by mime-types, so you also can drag documents, not only executables.


Self-scripted Plugings

A special thing about this Panel is, that it can be extended by selfwritten plugins.
Look at /usr/local/GtkBasic-Panel/panel/
You have a folder "MyButtons"
The file in it looks like this:
Code:

//-- this adds some space before your Box
addexpander_MAIN()

//-- this box will hold your buttons --
createbox_MAIN("box_MyButtons")


msg1_MyButtons = "show calendar"

//-- button 1 -- arguments:  box , name , imagefile , tooltip --

createbutton_MAIN("box_MyButtons" , "button1_MyButtons" , "panel/MyButtons/date.png" , msg1_MyButtons)


sub MyButtons_mainsub()

   if event = "GDK_BUTTON_RELEASE" then

      if widget = "button1_MyButtons" then

         print "button1_MyButtons was clicked"
         runprog_MAIN("minixcal")

      end if

   end if

end sub



It creates the "Calendar" button beside the clock.
To use it as a base for an own plugin, copy that folder as "Whatever".
Then rename MyButtons.gtb" to "Whatever.gtb".
And in this file, replace all words "MyButtons" with "Whatever".
Now your Plugin will work after a restart of the Panel (you must kill it to stop).

Important: every variable must have a unique name to avoid problems with variables from other plugings.
So you should use:
for n_MyPlugin = 0 to 10
instead of
for n = 0 to 10

The Plugin "MessageLabel" is also quite simple.
It is a replacement for "Freememapplett".
Look at it to see, how to run external commands and receive their return-values (like the free diskspace).

So you could quickly build your own information-label, that updates every minute or so.


Download

I attach a dotpup of the Panel.
You also will need GtkBasic:
http://dotpups.de/puppy3/dotpups/Programming/GtkBasic003/Gtkbasic-003.pup

Tip
to force to use a different Gtk-Theme, edit the file:
/root/.GtkBasic-Panel/gtkrcenv

If you prefer black, set it to:
Code:
export GTK2_RC_FILES="/usr/share/themes/Black Plastic/gtk-2.0/gtkrc"


That is this theme:
http://www.gnome-look.org/content/show.php/Black+Plastic?content=74078

Mark
GtkBasic-Panel.pup
Description 
pup

 Download 
Filename  GtkBasic-Panel.pup 
Filesize  72.12 KB 
Downloaded  858 Time(s) 
GtkBasic-Panel.jpg
 Description   
 Filesize   43.28 KB
 Viewed   2682 Time(s)

GtkBasic-Panel.jpg


_________________
my recommended links

Last edited by MU on Wed 05 Mar 2008, 06:00; edited 5 times in total
Back to top
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Thu 14 Feb 2008, 02:15    Post subject:  

There was an error that broke the detection of correct icons.
Fixed it now.

I also replaced the buttons with eventboxes that display images.

This solves that parts of the icons were "cut off" with several Gtk-themes.
You can see it in the screenshot, that shows the old, uncorrected version.
The red Adobe-icon should be quadratic, but top and bottom are not visible, so it looks rectangular.

Another Theme-related issue was, that with some the button to show the panel was invisible.
I could fix this by resizing some elements.

And Icons now are generally scaled down to 16x16, even if a larger one is detected.

Mark

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Thu 14 Feb 2008, 03:47    Post subject:  

there still was a small bug in masking the icon-pictures. Fixed now.
And the eventboxes allowed to make the hide-button smaller again after adding some lines of code.
Sorry for the inconvenience, but the gdk-pixbuf-library is a bit complicated Embarassed

Mark

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Thu 14 Feb 2008, 09:23    Post subject:  

Uploaded new version.

Fixed:
Icons had a pink border after scaling.

New:
only very few themes have a nice looking toolbar.
So you now can add "skins".

Look in
/root/.GtkBasic-Panel/Panelstyles/

You can change the symlink "activestyle" to one of the included ones.
I later will add a dialog for this.

If you want no skin, delete or rename it.

The screenshot shows a skin, the bar now has a nice shiny rounded look, even if you use a Puppy standard theme.

Mark
GtkBasic-Panel2.jpg
 Description   
 Filesize   28.25 KB
 Viewed   2636 Time(s)

GtkBasic-Panel2.jpg


_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
willhunt


Joined: 05 Oct 2005
Posts: 495

PostPosted: Sat 16 Feb 2008, 03:02    Post subject:  

Is there a way to make it thicker? like twice as thick?
_________________
176 Icewm Themes Exclamation
vlc-0.8.6c-i586.pet
vlc-0.8.6c-i586.pet
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Sat 16 Feb 2008, 04:09    Post subject:  

No, currently not.
I will add an option for scaling.

This can take some days, as I currently overwork the Gtk-Basic interpreter, and must fix some final bugs now.

Mark

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
willhunt


Joined: 05 Oct 2005
Posts: 495

PostPosted: Sat 16 Feb 2008, 05:09    Post subject:  

I really like it but with my screen size the bar is to small
to hold my fonts. The icons are not to small Smile

I must take a refresher basic course the last time I did
basic it was 8k rom basic Embarassed

_________________
176 Icewm Themes Exclamation
vlc-0.8.6c-i586.pet
vlc-0.8.6c-i586.pet
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Wed 05 Mar 2008, 02:56    Post subject:  

I updated the dotpup (get the attachment in first message).
You also must install GtkBasic003 again, as I had to extend it:
http://puppyfiles.ca/dotpupsde/puppy3/dotpups/Programming/GtkBasic003/Gtkbasic-003.pup

Not done yet:
choosing the size.
But I work on it, see the

- Configuration:
Screenshot further down.
You now can choose different themes from a dialog

- translation:
Localization is supported now, german is included

- droparea:
now just visible, if you click on the "+" button.
The Panel looks nicer like this.

- Menu:
My new menusystem is integrated now.

This is a beta-version.
Should work ok so far, but will need some final polishing and some more tweaks like choosing the size.

Mark
gtbp3.jpg
 Description   the new menu
 Filesize   84.05 KB
 Viewed   1228 Time(s)

gtbp3.jpg

gtbp2.jpg
 Description   the theme-selection
 Filesize   25.64 KB
 Viewed   2364 Time(s)

gtbp2.jpg

gtbp1.jpg
 Description   here you can drop a file to create a new quicklaunch-button
 Filesize   20.56 KB
 Viewed   2407 Time(s)

gtbp1.jpg


_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
magerlab

Joined: 08 Jul 2007
Posts: 731

PostPosted: Wed 05 Mar 2008, 14:55    Post subject:  

the menu editor is empty
_________________
skype: desafimager
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Wed 05 Mar 2008, 15:12    Post subject:  

magerlab,
the whole menu?
I think you need:
http://murga-linux.com/puppy/viewtopic.php?mode=attach&id=7899

This is a "/etc/xdg/menus/applications.menu" required for the categories.
Infos about it can be read here:
http://murga-linux.com/puppy/viewtopic.php?t=25925

Forgot to mention it in this thread.
Does that fix it?
Mark

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
trapster


Joined: 28 Nov 2005
Posts: 2030
Location: Maine, USA

PostPosted: Sat 03 Oct 2009, 17:24    Post subject:  

This works really well with the dwm window manager. The minimize function is really nice.

puppy3.0 / dwm window manager /xmms / mrxvt / GtkBasic-Panel

Fullsize

_________________
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Puppeee4.31 + 1.0, Puppy4.10 + Lupu52
Currently using Slacko AND lupu52 w/ fluxbox
Back to top
View user's profile Send private message Visit poster's website 
sunburnt


Joined: 08 Jun 2005
Posts: 5043
Location: Arizona, U.S.A.

PostPosted: Thu 08 Oct 2009, 23:02    Post subject:  

Hi Mark, very nice, we were just "talking" about using panels to clean up the desktop.
Your web site said gtkBasic was not there for download.
No worry, I`ll get it in a little while and take a look at it...

I suggested many vertical colored strips on the screen sides with vertical labels.
The same could be done for the top and bottom of the screen too of course.
To hover over one causes it`s panel to slide out from that side of the screen.
Many different special purpose panels could slide out from the screen sides.
I failed at making an example pix in MtPaint, but I think you probably get the idea.

The panels would clear the desktop by creating groups of similar icons.
Like a colored strip labeled "Drives" that pops out a panel with the HotPup icons.

I think the new V.B. IDE has something like it, it`d go great as part of gtkBasic`s IDE.
One for the widgets, one for properties, one for project control, & one for run time.

Just a train of thought I had about making panels really useful... Terry
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Fri 09 Oct 2009, 15:28    Post subject:  

Gtkbasic is using several depreciated methods from Gtk2.
They will be no longer available in Gtk3 (2010).

This means, that Gtkbasic will not work with Gtk3.
It would be too timeconsuming to update Gtkbasic, so see it as a "dead" project.

I think the most interesting Panel at moment is the "lxpanel".
It is part of the slim LXDE Desktop, but also can be used standalone:
Newyearspup and Ultrapup use it by default.

http://www.murga-linux.com/puppy/viewtopic.php?t=25118
http://www.murga-linux.com/puppy/viewtopic.php?p=230812
http://puppylinux.com/blog/?viewDetailed=00528

Mark

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
pankajnagarkoti85

Joined: 11 Oct 2009
Posts: 2

PostPosted: Sun 11 Oct 2009, 20:04    Post subject:  

There was an error that broke the detection of correct icons.
Fixed it now.

I also replaced the buttons with eventboxes that display images.

_________________
Best hosting | Website worth calculater
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [14 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0938s ][ Queries: 13 (0.0046s) ][ GZIP on ]