Refresh context menu
346096
def refresh_menu(self):
        """"""
        data = self.model.get_data()
        index = self.currentIndex()
        condition = (not isinstance(data, (tuple, set))) and index.isValid() \
                    and not self.readonly
        self.edit_action.setEnabled( condition )
        self.remove_action.setEnabled( condition )
        self.insert_action.setEnabled( not self.readonly )
        self.duplicate_action.setEnabled(condition)
        condition_rename = not isinstance(data, (tuple, list, set))
        self.rename_action.setEnabled(condition_rename)
        self.refresh_plot_entries(index)
951955
def init_with_context(self, context):
        
        from admin_tools.menu.models import Bookmark

        for b in Bookmark.objects.filter(user=context['request'].user):
            self.children.append(MenuItem(mark_safe(b.title), b.url))

        if not len(self.children):
            self.enabled = False
1351090
private void initContextMenu() {

        m_contextMenu.removeItems();
        MenuItem main = m_contextMenu.addItem("", null);
        main.setIcon(FontOpenCms.CONTEXT_MENU);
        main.setDescription(CmsVaadinUtils.getMessageText(Messages.GUI_MENU_TITLE_0));
        CmsContextMenuTreeBuilder treeBuilder = new CmsContextMenuTreeBuilder(getDialogContext());
        CmsTreeNode<I_CmsContextMenuItem> tree = treeBuilder.buildAll(
            OpenCms.getWorkplaceAppManager().getMenuItemProvider().getMenuItems());
        for (CmsTreeNode<I_CmsContextMenuItem> node : tree.getChildren()) {
            createMenuEntry(main, node, treeBuilder);
        }
    }
263791
def mk_tab_context_menu(callback_object):
    
    # Store the menu in a temp variable in terminal so that popup() is happy. See:
    #   https://stackoverflow.com/questions/28465956/
    callback_object.context_menu = Gtk.Menu()
    menu = callback_object.context_menu
    mi1 = Gtk.MenuItem(_("New Tab"))
    mi1.connect("activate", callback_object.on_new_tab)
    menu.add(mi1)
    mi2 = Gtk.MenuItem(_("Rename"))
    mi2.connect("activate", callback_object.on_rename)
    menu.add(mi2)
    mi3 = Gtk.MenuItem(_("Close"))
    mi3.connect("activate", callback_object.on_close)
    menu.add(mi3)
    menu.show_all()
    return menu
1372087
void refresh() {
		if (isCompleted()) {
			return;
		}

		if (hProcess.getCompleted().contains(plugin)) {
			status = STATUS_COMPLETED;
		} else if (hProcess.getRunning().contains(plugin)) {
			status = STATUS_RUNNING;
		}
	}
62770
protected function reload_context_info()
	{
		$this->width  = imagesx( $this->image_context );  
		$this->height = imagesy( $this->image_context );
	}
95560
def refresh(self, ctx: Context_T, *, current_arg: str = '') -> None:
        
        self.ctx = ctx
        self.current_arg = current_arg
        self._current_arg_text = None
        self._current_arg_images = None
309944
def _on_apply_button_clicked(self, *args):
        
        refresh_required = self.core_config_model.apply_preliminary_config()
        refresh_required |= self.gui_config_model.apply_preliminary_config()

        if not self.gui_config_model.config.get_config_value("SESSION_RESTORE_ENABLED"):
            import rafcon.gui.backup.session as backup_session
            logger.info("Removing current session")
            backup_session.reset_session()
        if refresh_required:
            from rafcon.gui.singleton import main_window_controller
            main_window_controller.get_controller('menu_bar_controller').on_refresh_all_activate(None, None)
        self._popup_message()
1137732
def refreshWidgets(self):
        
        if hasattr(self, '_widgets'):
            for w in self._widgets:
                w.refresh(isauto=0)
        else:
            raise RuntimeError("No widgets found")
696576
def get_context_menu(self):
        
        mnu = QtWidgets.QMenu()
        mnu.addActions(self._actions)
        mnu.addSeparator()
        for menu in self._menus:
            mnu.addMenu(menu)
        return mnu
906628
def refresh_plugin(self):
        """"""
        nb = None
        if self.tabwidget.count():
            client = self.tabwidget.currentWidget()
            nb = client.notebookwidget
            nb.setFocus()
        else:
            nb = None
        self.update_notebook_actions()
838242
public void update() {
        boolean shouldShow = shouldShow();

        if (visible != shouldShow) {
            visible = shouldShow;
            BaseUIComponent target = element.getMaskTarget();

            if (visible) {
                Menupopup contextMenu = ElementUI.getDesignContextMenu(target);
                String displayName = element.getDisplayName();
                target.addMask(displayName, contextMenu);
            } else {
                target.removeMask();
            }
        }
    }
956704
async def refresh(self):
        """"""
        raw_data = await self.request.get(self._resource_path, {"refresh": "true"})

        self._raw_data = raw_data[ATTR_SHADE]
476376
def OnUpdate(self, event):
        """"""

        if wx.ID_UNDO in self.id2menuitem:
            undo_item = self.id2menuitem[wx.ID_UNDO]
            undo_item.Enable(undo.stack().canundo())

        if wx.ID_REDO in self.id2menuitem:
            redo_item = self.id2menuitem[wx.ID_REDO]
            redo_item.Enable(undo.stack().canredo())

        event.Skip()
559975
def init_with_context(self, context):
        
        items = self._visible_models(context['request'])
        for model, perms in items:
            if not (perms['change'] or perms.get('view', False)):
                continue
            title = model._meta.verbose_name_plural
            url = self._get_admin_change_url(model, context)
            item = MenuItem(title=title, url=url)
            self.children.append(item)
387556
def OnContextMenu(self, event):
        """"""

        self.grid.PopupMenu(self.grid.contextmenu)

        event.Skip()
650718
def contextMenuEvent(self, event):
        """"""
        self.update_menu()
        self.menu.popup(event.globalPos())