Exemplo n.º 1
0
static U32  srv_fmgri_types_menu_to_bitmask(S32 menu_id)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U32 bitmask;
    U16 count, i;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if(menu_id <= 0)
        return 0;

    bitmask = 0;
    count = GetNumOfChild((U16)menu_id);
    if(count > 32)
        count = 32;
    for(i=0;i<count;i++)
    {
        if(!mmi_frm_test_menu_item_hide(GetSeqItemId((U16)menu_id, i)))
            bitmask |= (1<<i);
    }
    return bitmask;
}
Exemplo n.º 2
0
static S32 srv_fmgri_types_option_prepare(mmi_menu_id parent_opt_id, const WCHAR* filepath, const srv_fmgr_fileinfo_struct* fileinfo)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    S32         num_of_child;
    mmi_menu_id child_opt_id;
    filetypes_option_enabler_func_ptr   enabler;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/

    /* unhide all menuitem */
    srv_fmgri_types_option_reset(parent_opt_id);
    
    /* check enabler of parent*/
    enabler = srv_fmgri_types_option_get_enabler(parent_opt_id);
    if(enabler)
        enabler(parent_opt_id, filepath, fileinfo);
    else if(g_srv_fmgr_option_enabler)
        g_srv_fmgr_option_enabler(parent_opt_id, filepath, fileinfo);

    FMGR_TRACE3(TGL2, TRC_SRV_FMGR_9FB5453EC67E48AEB74843AEF21945AB, 
        "[SRV_FMGR] > Types > enabler(%d): %x,%x", parent_opt_id, enabler, srv_fmgri_types_menu_to_bitmask(parent_opt_id));

    /* check enabler of all child */
    num_of_child = GetNumOfChild(parent_opt_id);
    while(num_of_child)
    {
        child_opt_id = GetSeqItemId(parent_opt_id, (U16)(num_of_child-1));
        if(!mmi_frm_test_menu_item_hide(child_opt_id))
        {
            enabler = srv_fmgri_types_option_get_enabler(child_opt_id);
            if(enabler)
                enabler(child_opt_id, filepath, fileinfo);
            else if(g_srv_fmgr_option_enabler)
                g_srv_fmgr_option_enabler(child_opt_id, filepath, fileinfo);

            FMGR_TRACE3(TGL2, TRC_SRV_FMGR_9FB5453EC67E48AEB74843AEF21945AB, 
                "[SRV_FMGR] > Types > enabler(%d): %x,%x", child_opt_id, enabler, srv_fmgri_types_menu_to_bitmask(parent_opt_id));
        }
        num_of_child--;
    }

    /* if there is still any available */        
    return GetNumOfChild_Ext(parent_opt_id);
}
Exemplo n.º 3
0
/*****************************************************************************
 * FUNCTION
 *  mmi_rmgr_highlight_hdlr
 * DESCRIPTION
 *  Highlight handler of the rights manager main screen
 * PARAMETERS
 *  menu_idx        [IN]        Menu item index
 * RETURNS
 *  void
 *****************************************************************************/
static void mmi_rmgr_highlight_hdlr(S32 menu_idx)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    mmi_rmgr_p->rmgr_sel_idx = menu_idx;

    if (GetSeqItemId(MENU_ID_RMGR, (U16) menu_idx) != MENU_ID_RMGR_TRANS)
    {
        ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
    }

    ExecuteCurrHiliteHandler(menu_idx);
}
Exemplo n.º 4
0
static void srv_fmgri_types_option_reset(mmi_menu_id parent_menu_id)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    S32 num_of_child;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/

    /* unhide all menu under the parent */
    num_of_child = GetNumOfChild(parent_menu_id);
    if(!num_of_child)
        return;

    while(num_of_child)
    {
        mmi_frm_unhide_menu_item(GetSeqItemId(parent_menu_id, (U16)(num_of_child-1)));
        num_of_child--;
    }
}