Ticket #1109 (closed defect: worksforme)

Opened 7 years ago

Last modified 6 years ago

toggleActionIsActive in ToggleActionEntry not changed when user checks or unchecks menu item

Reported by: guest Owned by: axel
Priority: normal Milestone:
Component: general (Gtk+, Glib) Version: 0.9.12
Keywords: menu, toolbar,ToggleActionEntry Cc:

Description

Using the package ghc682-gtk2hs - 0.9.12.1-6.fc8.i386 for Fedora 8, the field

toggleActionIsActive

is not changed when the user checks or unchecks a menu item.

data ToggleActionEntry = ToggleActionEntry {
toggleActionName :: String
toggleActionLabel :: String
toggleActionStockId :: (Maybe String)
toggleActionAccelerator :: (Maybe String)
toggleActionTooltip :: (Maybe String)
toggleActionCallback :: (IO ())
toggleActionIsActive :: Bool
}

There is a workaround, because the toggleActionCallback function does work when the user checks or unchecks an item. This can be used to set or unset an IORef. Example:

myTog :: IORef Bool -> IO ()
myTog chk = do old <- readIORef chk
               writeIORef chk (not old)

in:

duptogg = ToggleActionEntry "DupCheck" "Check Data" (Just stockConvert) Nothing 
                             (Just "Check facts for duplicates") (myTog dupcheck) True

Change History

Changed 7 years ago by axel

  • owner changed from somebody to axel

I don't quite understand what you're talking about and where the ToggleActionEntry data structure comes that you define above. Is this in the context of the SOE modules or Glade? This isn't anywhere in the Gtk modules.

Changed 6 years ago by axel

  • status changed from new to closed
  • resolution set to worksforme

Changed 6 years ago by Alvaro

"Right now I'm having amnesia and deja vu at the same time."

-- Steven Wright

ordina viagra on line fioricet uk cialis e kamagra tramadol online pain

Note: See TracTickets for help on using tickets.