Content server: Show a best guess for the IP address the content server is currently listening at in the connect/share menu. Fixes #1024128 ([Enhancement] Display IP Address)

This commit is contained in:
Kovid Goyal 2012-07-13 09:52:25 +05:30
parent 33f990c075
commit 48a978cd70

View File

@ -74,9 +74,10 @@ class ShareConnMenu(QMenu): # {{{
action=self.toggle_server_action, group=gr)
def server_state_changed(self, running):
from calibre.utils.mdns import get_external_ip
text = _('Start Content Server')
if running:
text = _('Stop Content Server')
text = _('Stop Content Server') + ' [%s]'%get_external_ip()
self.toggle_server_action.setText(text)
def build_email_entries(self, sync_menu):