Convert plugin actions to GMenu and GAction

Review Request #1408 — Created April 30, 2022 and submitted

Information

pidgin/pidgin
default

Reviewers

Convert plugin actions to GMenu and GAction

Also ported the idle maker plugin to the new api.

Made sure all of the actions for the idle maker plugin worked.

Summary ID
Convert plugin actions to GMenu and GAction
365f264e966a1de79ebf86e68a1e45238f222b16
Description From Last Updated

I wouldn't intersperse the g_menu_new up here, when the action group is done later.

QuLogicQuLogic

Would calling the action directly not work?

QuLogicQuLogic

I would say "action group"

QuLogicQuLogic

And "menu model"

QuLogicQuLogic

Flip order, just to match args.

QuLogicQuLogic

Do we have to worry about removing these on plugin unload?

QuLogicQuLogic

Given the if above, is this guaranteed non-NULL?

QuLogicQuLogic

Do you have to check if either of these are NULL?

QuLogicQuLogic

caller is interested

QuLogicQuLogic

Isn't this guaranteed by pidgin_plugins_menu_add_item?

QuLogicQuLogic
grim
  1. 
      
  2. I'm not super happy with the plugin interface for this, but it does work.

    1. Much happier with the interface now that the ui is controlling the namespace/prefix and the plugin doesn't need to care about it. We should probably do some normalization on this, but it works for now.

  3. 
      
grim
grim
grim
grim
grim
QuLogic
  1. 
      
  2. libpurple/plugins/idle.c (Diff revision 5)
     
     
    Show all issues

    I wouldn't intersperse the g_menu_new up here, when the action group is done later.

  3. libpurple/plugins/idle.c (Diff revision 5)
     
     
    Show all issues

    Would calling the action directly not work?

  4. libpurple/purpleplugininfo.c (Diff revision 5)
     
     
    Show all issues

    I would say "action group"

  5. libpurple/purpleplugininfo.c (Diff revision 5)
     
     
    Show all issues

    And "menu model"

  6. pidgin/pidginpluginsmenu.c (Diff revision 5)
     
     
     
    Show all issues

    Flip order, just to match args.

    1. Let's not, because if we do, then it goes "GPlugin, Pidgin, GPlugin" for the type names.

  7. pidgin/pidginpluginsmenu.c (Diff revision 5)
     
     
     
    Show all issues

    Do we have to worry about removing these on plugin unload?

  8. pidgin/pidginpluginsmenu.c (Diff revision 5)
     
     
    Show all issues

    Given the if above, is this guaranteed non-NULL?

  9. pidgin/pidginpluginsmenu.c (Diff revision 5)
     
     
    Show all issues

    caller is interested

  10. pidgin/pidginpluginsmenu.c (Diff revision 5)
     
     
    Show all issues

    Isn't this guaranteed by pidgin_plugins_menu_add_item?

    1. Yes, but someone else could find the menu model and attempt to add stuff to it.

    2. But this is the menu model implementation, and its internals are not exposed, are they?

    3. ah ha! I forgot that the model is read-only, so yes this should be fine.

  11. 
      
grim
QuLogic
  1. 
      
  2. pidgin/pidginpluginsmenu.c (Diff revisions 5 - 6)
     
     
     
    Show all issues

    Do you have to check if either of these are NULL?

  3. 
      
grim
QuLogic
  1. Ship It!
  2. 
      
grim
Review request changed
Status:
Completed