WebGadget: How to use???

Linux specific forum
kake26
Enthusiast
Enthusiast
Posts: 157
Joined: Sun Jan 25, 2004 7:21 pm
Contact:

Post by kake26 »

Hi all,

I've tried it out myself. It certainly works. Here is the resulting little demo I came up with. This was built and tested on a Fedora Core 3 system. Please note, I updated the GTK2 stuff for my pb from the /beta/linux directory. See one of the posts above for a link. It did not work prior to the GTK2 update so you kind of need it.

Code: Select all

If OpenWindow(0,0,0,800,450,#PB_Window_SystemMenu | #PB_Window_MinimizeGadget |#PB_Window_MaximizeGadget,"Linux Browser Demo")  
; Written by Paul Malcher
; Just thought it be fun to try this
; Does it work yes it does
; if you have problems getting it to compile or work
; Please see the following thread on the PB forums, which I used to make sure my system could build and use it

; http://forums.purebasic.com/english/viewtopic.php?t=14389&highlight=webgadget

If CreateGadgetList(WindowID())
ButtonGadget(2, 10, 10, 100, 30, "Back")
ButtonGadget(3, 120, 10, 100, 30, "Forward")
ButtonGadget(4, 230, 10, 100, 30, "Stop")
StringGadget(5,340, 10,150,30,"")
ButtonGadget(6, 500, 10, 100, 30, "Go")
test = WebGadget(1,10,50,790,390,"http://www.google.com")
Endif
  
Repeat 
Event = WaitWindowEvent()
Select Event
     
       Case #PB_Event_Gadget
         Select EventGadgetID()
           Case 2 : SetGadgetState(1,#PB_Web_Back)
           Case 3 : SetGadgetState(1,#PB_Web_Forward)
           Case 4 : SetGadgetState(1,#PB_Web_Stop)
	   Case 6 : SetGadgetText(1,GetGadgetText(5))
         EndSelect
       
      EndSelect
Delay(1)      
Until Event=#PB_Event_CloseWindow
EndIf 
scurrier
Enthusiast
Enthusiast
Posts: 169
Joined: Sat May 03, 2003 4:10 am

Ubuntu and the WebGadget?

Post by scurrier »

Does anyone know what steps are required to get the WebGadget to work under Ubuntu? I just get a blank window with no sign of the gadget...

Thanks
frederic
User
User
Posts: 56
Joined: Thu Jan 05, 2006 11:22 pm

Post by frederic »

hello,
under ubuntu follow this steps :
sudo gedit /etc/ld.so.conf
add /usr/lib/mozilla-firefox/ to this file
then sudo ldconfig
that's all
Post Reply