Example #1
0
	def build(self):

		#----FILE MENU
		self.file_item, self.file_menu = self.create_menu(_("_File"))
		items = [actions.NEW,
				 None,
				 actions.OPEN,
		]
		self.add_items(self.file_menu, items)

		self.append(self.file_item)
Example #2
0
    def build(self):

        #----FILE MENU
        self.file_item, self.file_menu = self.create_menu(_("_File"))
        items = [
            actions.NEW,
            None,
            actions.OPEN,
        ]
        self.add_items(self.file_menu, items)

        self.append(self.file_item)
Example #3
0
#
# 	This program is distributed in the hope that it will be useful,
# 	but WITHOUT ANY WARRANTY; without even the implied warranty of
# 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# 	GNU General Public License for more details.
#
# 	You should have received a copy of the GNU General Public License
# 	along with this program.  If not, see <http://www.gnu.org/licenses/>.

import wal
from pconv import _

NEW = 101
OPEN = 102

action_text = {NEW: _("New"), OPEN: _("Open")}

action_icon = {NEW: wal.STOCK_NEW, OPEN: wal.STOCK_OPEN}

action_accelkey = {NEW: "<Control>N", OPEN: "<Control>O"}


def get_action_text(action):
    if action in action_text.keys():
        return action_text[action]
    else:
        return "???"


def get_action_tooltip_text(action):
    return get_action_text(action).replace("_", "")
Example #4
0
#	This program is distributed in the hope that it will be useful,
#	but WITHOUT ANY WARRANTY; without even the implied warranty of
#	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#	GNU General Public License for more details.
#
#	You should have received a copy of the GNU General Public License
#	along with this program.  If not, see <http://www.gnu.org/licenses/>.

import wal
from pconv import _

NEW = 101
OPEN = 102

action_text = {
NEW: _('New'),
OPEN: _('Open'),
}

action_icon = {
NEW : wal.STOCK_NEW,
OPEN: wal.STOCK_OPEN,
}

action_accelkey = {
NEW : '<Control>N',
OPEN : '<Control>O',
}

def get_action_text(action):
	if action in action_text.keys():