No events from the CalendarGadget

Linux specific forum
Beach
Enthusiast
Enthusiast
Posts: 677
Joined: Mon Feb 02, 2004 3:16 am
Location: Beyond the sun...

No events from the CalendarGadget

Post by Beach »

I am unable to get events from the CalendarGadget. Anyone else having trouble with them? Here is an example:

Code: Select all

OpenWindow(0, 400, 160, 300, 275, "Calendar", #PB_Window_SystemMenu)
If CreateGadgetList(WindowID(0))
  Calendar = CalendarGadget(#PB_Any, 25, 10, 245, 200)
  DateStr = StringGadget(#PB_Any, 25, 230, 240, 30, "")
EndIf

;-this works
CurrentDate$ = FormatDate("%yyyy-%mm-%dd",GetGadgetState(Calendar))
SetGadgetText(DateStr,CurrentDate$)

Repeat
  Event = WaitWindowEvent()
  Select Event
    
    Case #PB_Event_CloseWindow
        Break
      
    Case #PB_Event_Gadget 
      If EventGadget() = Calendar
        ;-does nothing
        NewDate$ = FormatDate("%yyyy-%mm-%dd",GetGadgetState(Calendar))
        SetGadgetText(DateStr,NewDate$)
      EndIf
      
  EndSelect
  
ForEver
-Beach
milan1612
Addict
Addict
Posts: 894
Joined: Thu Apr 05, 2007 12:15 am
Location: Nuremberg, Germany
Contact:

Post by milan1612 »

EDIT: My failure...removed
Last edited by milan1612 on Sun May 06, 2007 4:27 pm, edited 1 time in total.
Windows 7 & PureBasic 4.4
Beach
Enthusiast
Enthusiast
Posts: 677
Joined: Mon Feb 02, 2004 3:16 am
Location: Beyond the sun...

Post by Beach »

I was afraid this would be the answer. I'm not sure why mine is not responding then. I am running Ubuntu 7.04 with all the required libs. What distro are you working with?

Also, does SetGadgetColor work with your calendar?

Code: Select all

SetGadgetColor(Calendar,#PB_Gadget_TitleBackColor,$000000)
SetGadgetColor(Calendar,#PB_Gadget_TitleFrontColor,$0000FF)
-Beach
Beach
Enthusiast
Enthusiast
Posts: 677
Joined: Mon Feb 02, 2004 3:16 am
Location: Beyond the sun...

Post by Beach »

I just tried this example on Ubuntu 6.10 and I have the same issue. I am willing to try anything at this point.
-Beach
milan1612
Addict
Addict
Posts: 894
Joined: Thu Apr 05, 2007 12:15 am
Location: Nuremberg, Germany
Contact:

Post by milan1612 »

Oh shit, I forgot being in the "Linux"-Forum.
I'm so sorry, I tested on Windows :oops:
Shame on me...
Windows 7 & PureBasic 4.4
Beach
Enthusiast
Enthusiast
Posts: 677
Joined: Mon Feb 02, 2004 3:16 am
Location: Beyond the sun...

Post by Beach »

Posted in the "Bug Reports" forum. I hope it can be resolved, its all that is standing in the way of a pretty cool wallpaper changer for Gnome.
-Beach
User avatar
bembulak
Enthusiast
Enthusiast
Posts: 576
Joined: Mon Mar 06, 2006 3:53 pm
Location: Austria

Post by bembulak »

confirmed. It does not fire an event. Strange, because I've used the calender-gadget successfully in beta(1)-stage.

See here:
http://www.purebasic.fr/english/viewtop ... ight=pinda
http://www.purearea.net/pb/showcase/sho ... 1fa99ad42b

edit: Xubuntu Feisty Fawn 7.04
User avatar
oryaaaaa
Addict
Addict
Posts: 831
Joined: Mon Jan 12, 2004 11:40 pm
Location: Okazaki, JAPAN

Post by oryaaaaa »

I post reply bug-forum.

CalendarGadget=GtkCalendar

Code: Select all

GObject
   +----GtkObject
         +----GtkWidget
               +----GtkCalendar
But PB dont get ALL EVENT
"day-selected" signal is no sensor.
GtkCalendar dont use "clicked" signal.

This is PB BUG.
Post Reply