Re: Customizable user interface : "e-mail the link" toolbar button is missing



thibaut bethune wrote:
> Hello,
> 
> I enjoy very much Epiphany (Gecko, GTK, smart bookmarks and bookmark
> tags
> are an impressive combination) though i regret the lack of an "e-mail
> the
> link" toolbar button.
> 
> The option does exist in menu bar (File) but doesn't have a toolbar
> button.
> 
> Could you propose such a button ?

I have attached a small Epiphany extension that makes such a button
available in the Epiphany toolbar editor.

To install, put the attached emaillinkfromtoolbar.ephy-extension and
emaillinkfromtoolbar.py files in the ~/.gnome2/epiphany/extensions/
directory (make it if it doesn't exists), and enable the extension in
the Epiphany extensions manager (Tools > Extensions... -- if there's no
such item in the menu, make sure that you have epiphany-extensions
installed.).

> Thanks for this soft
> 
> Thibaut,
> 30'
> France
> Ubuntu user since 1 year 1/2 (windows user before that)

Stefan
[Epiphany Extension]
Name=Send Link by Email - toolbar button
Description=Makes the Send Link by Email action available as a toolbar button
Authors=Stefan Stuhr
Version=1
URL=http://www.sstuhr.dk/epiphany-extensions/


[Loader]
Type=python
Module=emaillinkfromtoolbar
#!/usr/bin/env python
#
#   Send Link by Email - Epiphany Extension
#   Copyright (C) 2007  Stefan Stuhr
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.
#
#   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, write to the Free Software Foundation, Inc.,
#   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.


import gtk
import epiphany

EGG_TB_MODEL_NAME_KNOWN = 1 << 2

class EmailLinkFromToolbar:
	def __init__(self):
		# Make the toolbar button available in the editor
		shell = epiphany.ephy_shell_get_default()
		model = shell.get_toolbars_model(False)
		name_flags = model.get_name_flags("FileSendTo")
		model.set_name_flags("FileSendTo", name_flags | EGG_TB_MODEL_NAME_KNOWN)

	# Not supported by Epiphany - but may be supported in the future
	def finalize_extension(self):
		# Remove the toolbar button from the available buttons in the editor
		shell = epiphany.ephy_shell_get_default()
		model = shell.get_toolbars_model(False)
		name_flags = model.get_name_flags("FileSendTo")
		model.set_name_flags("FileSendTo", name_flags & ~EGG_TB_MODEL_NAME_KNOWN)

elft_extension = EmailLinkFromToolbar()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]