IGN:Add hostname option for GUI server

This commit is contained in:
Kovid Goyal 2008-11-13 15:26:21 -08:00
parent de679ed342
commit 12561e8306
2 changed files with 19 additions and 1 deletions

View File

@ -113,6 +113,7 @@ class ConfigDialog(QDialog, Ui_Dialog):
self.port.setValue(opts.port) self.port.setValue(opts.port)
self.username.setText(opts.username) self.username.setText(opts.username)
self.password.setText(opts.password if opts.password else '') self.password.setText(opts.password if opts.password else '')
self.hostname.setText(opts.hostname)
self.auto_launch.setChecked(config['autolaunch_server']) self.auto_launch.setChecked(config['autolaunch_server'])
def up_column(self): def up_column(self):
@ -218,6 +219,7 @@ class ConfigDialog(QDialog, Ui_Dialog):
sc = server_config() sc = server_config()
sc.set('username', unicode(self.username.text()).strip()) sc.set('username', unicode(self.username.text()).strip())
sc.set('password', unicode(self.password.text()).strip()) sc.set('password', unicode(self.password.text()).strip())
sc.set('hostname', unicode(self.hostname.text()).strip())
sc.set('port', self.port.value()) sc.set('port', self.port.value())
of = str(self.output_format.currentText()) of = str(self.output_format.currentText())
fmts = [] fmts = []

View File

@ -72,7 +72,7 @@
<item> <item>
<widget class="QStackedWidget" name="stackedWidget" > <widget class="QStackedWidget" name="stackedWidget" >
<property name="currentIndex" > <property name="currentIndex" >
<number>0</number> <number>3</number>
</property> </property>
<widget class="QWidget" name="page_3" > <widget class="QWidget" name="page_3" >
<layout class="QVBoxLayout" name="verticalLayout" > <layout class="QVBoxLayout" name="verticalLayout" >
@ -692,6 +692,22 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QLabel" name="label_13" >
<property name="text" >
<string>If you plan to use the content server to access your ebook collection on an iphone using the stanza reader, you will need to enter either the fully qualified &amp;hostname or the IP address for your computer below. You can then browse your books by adding the URL http://myhostname/stanza as a custom catalog in the stanza reader on your iphone.</string>
</property>
<property name="wordWrap" >
<bool>true</bool>
</property>
<property name="buddy" >
<cstring>hostname</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="hostname" />
</item>
<item> <item>
<spacer name="verticalSpacer" > <spacer name="verticalSpacer" >
<property name="orientation" > <property name="orientation" >