Opened 18 years ago

Last modified 8 years ago

#661 closed bug

CannaIM deskbar replicant popup menu not working; replicant handle menu displayed instead. — at Version 17

Reported by: koki@… Owned by: korli
Priority: normal Milestone: R1
Component: - General Version: R1/Development
Keywords: Cc: bxi07354@…, jackburton
Blocked By: Blocking:
Platform: All

Description (last modified by korli)

When installing Canna input method, a replicant is loaded in the Deskbar.

Clicking on this replicant with the mouse should display a popup menu, but in Haiku it doesn't. Instead, the replicant handle menu is displayed.

Was not sure what component this belonged to; feel free to change it if necessary.

Change History (17)

comment:1 by koki@…, 18 years ago

Cc: bxi07354@… added

comment:2 by korli, 18 years ago

This is dependent on message scripting feature. It is being fixed, but could be longer than expected.

comment:3 by korli, 18 years ago

FYI, several scripts which have to work first :

hey Deskbar get Messenger of Shelf of View Status of Window Deskbar hey Deskbar get Name of Replicant 0 of Shelf of View Status of Window Deskbar hey Deskbar get View of Replicant 0 of Shelf of View Status of Window Deskbar

BTW I think Haiku input_server should be changed to simply query (doesn't work on R5 because the replicant has no name) : hey Deskbar get View of Replicant MethodReplicant of Shelf of View Status of Window Deskbar

comment:4 by korli, 18 years ago

Resolution: fixed

comment:5 by korli, 18 years ago

should be fixed in revision 17841

comment:6 by korli, 18 years ago

Status: newclosed

comment:7 by koki@…, 18 years ago

Nice improvements! We are getting close.

As tested on build 17843, CannaIM deskbar popup menu now works, but there two small oddities:

1) For some reason the submenu that should display among other things the About window when Canna is in Japanese mode appears empty.

2) The replicant handle is still being displayed; it should not.

Should I open separate bug reports for the above?

comment:8 by korli, 18 years ago

About these oddities, they must be related to our interface kit implementation: the canna method and method replicant were working on R5 last time I tried. Stefano, could you have a look at the menu oddity ?

comment:9 by korli, 18 years ago

Cc: stefano.ceccherini@… added

comment:10 by jackburton, 18 years ago

"1) For some reason the submenu that should display among other things the About window when Canna is in Japanese mode appears empty."

I'll have a look at this. Might be a bug in BShelf or BDragger.

"2) The replicant handle is still being displayed; it should not."

This could be related to #116.

comment:11 by bxi07354@…, 18 years ago

(In reply to comment #6)

"1) For some reason the submenu that should display among other things the About window when Canna is in Japanese mode appears empty."

BMenu::Archive doesn't do deep.

if (err == B_OK && deep) {

TODO store items and rects

}

comment:12 by korli, 18 years ago

Popup menu is now working somehow. Weirdly it seems to appear disabled, and I don't know why.

comment:13 by bxi07354@…, 18 years ago

The mistake was found by BMenu::InitData(BMessage *data). data->FindBool("_disable", &fEnabled);

BSeparatorItem is not displayed. status_t BSeparatorItem::Archive(BMessage* archive, bool deep) const {

if (!archive->HasString(B_CLASS_FIELD))

  • archive->AddString(B_CLASS_FIELD, "BMenuItem");

+ archive->AddString(B_CLASS_FIELD, "BSeparatorItem");

The return value(item) is not necessarily MethodMenuItem*. void MethodReplicant::MouseDown(BPoint point) {

.... BMenuItem *item = fMenu.Go(where, true, true, BRect(where - BPoint(4, 4),

where + BPoint(4, 4)));

if (item && cast_as(item, MethodMenuItem)) {

BMessage msg(IS_SET_METHOD); msg.AddInt32("cookie", ((MethodMenuItem *)item)->Cookie()); ....

comment:14 by korli, 18 years ago

This was somehow fixed in revision 18071. Is there anything still valid ?

comment:15 by korli, 18 years ago

barber, I applied the last part of your patch in revision 18093, and even tested it successfully. Thanks a lot!

comment:16 by bxi07354@…, 18 years ago

(In reply to comment #6)

"1) For some reason the submenu that should display among other things the About window when Canna is in Japanese mode appears empty."

This was solved by revision 18093. Thank you.

comment:17 by korli, 18 years ago

Description: modified (diff)
Platform: All
Resolution: fixed
Status: closedreopened

tested again in revision 18880. The menu itself is empty in the deskbar replicant.

Note: See TracTickets for help on using tickets.