GtkBasic Panel - a Toolbar - beta version March 05 2008

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

GtkBasic Panel - a Toolbar - beta version March 05 2008

#1 Post by MU »

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: Select all

//-- 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/Progra ... ic-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: Select all

export GTK2_RC_FILES="/usr/share/themes/Black Plastic/gtk-2.0/gtkrc"
That is this theme:
http://www.gnome-look.org/content/show. ... tent=74078

Mark
Attachments
GtkBasic-Panel.pup
(72.12 KiB) Downloaded 1194 times
GtkBasic-Panel.jpg
(43.28 KiB) Downloaded 2963 times
Last edited by MU on Wed 05 Mar 2008, 10:00, edited 5 times in total.
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

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
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#3 Post by MU »

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 :oops:

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#4 Post by MU »

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
Attachments
GtkBasic-Panel2.jpg
(28.25 KiB) Downloaded 2915 times
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
willhunt
Posts: 495
Joined: Wed 05 Oct 2005, 18:19

#5 Post by willhunt »

Is there a way to make it thicker? like twice as thick?
[url=http://hostfile.org/icepak.pet]176 Icewm Themes :!:[/url]
[url=http://tinyurl.com/39fl3x]vlc-0.8.6c-i586.pet[/url]
[url=http://tinyurl.com/2q7cbp]vlc-0.8.6c-i586.pet[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#6 Post by MU »

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
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
willhunt
Posts: 495
Joined: Wed 05 Oct 2005, 18:19

#7 Post by willhunt »

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

I must take a refresher basic course the last time I did
basic it was 8k rom basic :oops:
[url=http://hostfile.org/icepak.pet]176 Icewm Themes :!:[/url]
[url=http://tinyurl.com/39fl3x]vlc-0.8.6c-i586.pet[/url]
[url=http://tinyurl.com/2q7cbp]vlc-0.8.6c-i586.pet[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#8 Post by MU »

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/d ... ic-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
Attachments
gtbp3.jpg
the new menu
(84.05 KiB) Downloaded 1485 times
gtbp2.jpg
the theme-selection
(25.64 KiB) Downloaded 2624 times
gtbp1.jpg
here you can drop a file to create a new quicklaunch-button
(20.56 KiB) Downloaded 2681 times
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

magerlab
Posts: 739
Joined: Sun 08 Jul 2007, 20:08

#9 Post by magerlab »

the menu editor is empty

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#10 Post by MU »

magerlab,
the whole menu?
I think you need:
http://murga-linux.com/puppy/viewtopic. ... ch&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
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#11 Post by trapster »

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

puppy3.0 / dwm window manager /xmms / mrxvt / GtkBasic-Panel
Image
Fullsize
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#12 Post by sunburnt »

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

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#13 Post by MU »

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
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

pankajnagarkoti85
Posts: 2
Joined: Mon 12 Oct 2009, 00:02
Contact:

#14 Post by pankajnagarkoti85 »

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

I also replaced the buttons with eventboxes that display images.
[url=http://myhostingbox.com]Best hosting[/url] | [url=http://thenetinfo.com]Website worth calculater[/url]

Post Reply