Feature window cleanup and description update. See #2783

This commit is contained in:
Stephan Erb 2007-07-06 23:51:41 +00:00
parent 51b4279a06
commit ff2fe1b503
2 changed files with 55 additions and 38 deletions

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!--Generated with glade3 3.2.2 on Wed Jun 27 14:25:13 2007 by stephan@ThinkPad--> <!--Generated with glade3 3.2.2 on Sat Jul 7 01:08:57 2007 by stephan@ThinkPad-->
<glade-interface> <glade-interface>
<widget class="GtkWindow" id="features_window"> <widget class="GtkWindow" id="features_window">
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="border_width">12</property> <property name="border_width">12</property>
<property name="title" translatable="yes">Features</property> <property name="title" translatable="yes">Features</property>
<property name="default_width">300</property> <property name="default_width">300</property>
<property name="default_height">525</property> <property name="default_height">530</property>
<child> <child>
<widget class="GtkVBox" id="vbox1"> <widget class="GtkVBox" id="vbox1">
<property name="visible">True</property> <property name="visible">True</property>
@ -17,11 +17,13 @@
<widget class="GtkLabel" id="label1"> <widget class="GtkLabel" id="label1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;List of possible features in Gajim:&lt;/b&gt;</property> <property name="label" translatable="yes">&lt;b&gt;List of possible features in Gajim:&lt;/b&gt;</property>
<property name="use_markup">True</property> <property name="use_markup">True</property>
</widget> </widget>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">False</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -56,6 +58,8 @@
<widget class="GtkAlignment" id="alignment2"> <widget class="GtkAlignment" id="alignment2">
<property name="visible">True</property> <property name="visible">True</property>
<property name="border_width">6</property> <property name="border_width">6</property>
<property name="xalign">0</property>
<property name="xscale">0.5</property>
<property name="left_padding">12</property> <property name="left_padding">12</property>
<child> <child>
<widget class="GtkLabel" id="feature_desc_label"> <widget class="GtkLabel" id="feature_desc_label">

View File

@ -34,60 +34,72 @@ class FeaturesWindow:
# {name: (available_function, unix_text, windows_text)} # {name: (available_function, unix_text, windows_text)}
self.features = { self.features = {
_('PyOpenSSL'): (self.pyopenssl_available, _('PyOpenSSL'): (self.pyopenssl_available,
_('You need to install python-pyopenssl to have a more secure connection.'), _('A library used to validate server certificates to ensure a secure connection.'),
_('You need to install python-pyopenssl to have a more secure connection.')), _('Requires python-pyopenssl.'),
_('Requires python-pyopenssl.')),
_('Bonjour / Zeroconf'): (self.zeroconf_available, _('Bonjour / Zeroconf'): (self.zeroconf_available,
_('You need to install python-avahai to use Zeroconf network.'), _('Serverless chatting with autodetected clients in a local network.'),
_('This feature is not available under Windows.')), _('Requires python-avahai.'),
_('Gajim-remote'): (self.dbus_available, _('Feature not available under Windows.')),
_('You need to install python-dbus to control gajim from a script.'), _('gajim-remote'): (self.dbus_available,
_('This feature is not available under Windows.')), _('A script to controle gajim via commandline.'),
_('Requires python-dbus.'),
_('Feature not available under Windows.')),
_('OpenGPG'): (self.gpg_available, _('OpenGPG'): (self.gpg_available,
_('You need to install gpg and python-GnuPGIntergace to use OpenGPG.'), _('Encrypting chatmessages with gpg keys.'),
_('This feature is not available under Windows.')), _('Requires gpg and python-GnuPGInterface.'),
_('Network Manager'): (self.network_manager_available, _('Feature not available under Windows.')),
_('You need to install network-manager and python-dbus to use Network Manager.'), _('network-manager'): (self.network_manager_available,
_('This feature is not available under Windows.')), _('Autodetection of network status.'),
_('Requires gnome-network-manager and python-dbus.'),
_('Feature not available under Windows.')),
_('Session Management'): (self.session_management_available, _('Session Management'): (self.session_management_available,
_('You need to install python-gnome2 to use Session Management.'), _('Gajim session is stored on logout and restored on login.'),
_('This feature is not available under Windows.')), _('Requires python-gnome2.'),
_('Gnome-Keyring'): (self.gnome_keyring_available, _('Feature not available under Windows.')),
_('You need to install python-gnome2-desktop to use Gnome Keyring.'), _('gnome-keyring'): (self.gnome_keyring_available,
_('This feature is not available under Windows.')), _('Passwords can be stored securely and not just in plaintext.'),
_('Requires gnome-keyring and python-gnome2-desktop.'),
_('Feature not available under Windows.')),
_('SRV'): (self.srv_available, _('SRV'): (self.srv_available,
_('You need to install dnsutils to have nslookup to use SRV records.'), _('Ability to connect to servers which is using SRV records.'),
_('You need to have nslookup to use SRV records.')), _('Requires dnsutils.'),
_('Requires nslookup to use SRV records.')),
_('Spell Checker'): (self.speller_available, _('Spell Checker'): (self.speller_available,
_('You need to install python-gnome2-extras or compile gtkspell module from Gajim sources to use spell checker.'), _('Spellchecking of composed messages.'),
_('This feature is not available under Windows.')), _('Requires python-gnome2-extras or compilation of gtkspell module from Gajim sources.'),
_('Feature not available under Windows.')),
_('Notification-daemon'): (self.notification_available, _('Notification-daemon'): (self.notification_available,
_('You need to have dbus available and to install notification-daemon. Another solution is to install python-notify.'), _('Passive popups notifying for new events.'),
_('This feature is not available under Windows.')), _('Requires python-notify or instead python-dbus in conjunction with notification-daemon.'),
_('Feature not available under Windows.')),
_('Trayicon'): (self.trayicon_available, _('Trayicon'): (self.trayicon_available,
_('You need to install python-gnome2-extras or compile trayicon module from Gajim sources to use the trayicon.'), _('A icon in systemtray reflecting the current presence.'),
_('You need PyGTK >= 2.10 to use the trayicon.')), _('Requires python-gnome2-extras or compiled trayicon module from Gajim sources.'),
_('Requires PyGTK >= 2.10.')),
_('Idle'): (self.idle_available, _('Idle'): (self.idle_available,
_('You need to compile idle module from Gajim sources to use it.'), _('Ability to measure idle time, in order to set auto status.'),
_('You need to compile idle module from Gajim sources to use it.')), _('Requires compilation of the idle module from Gajim sources.'),
_('Requires compilation of the idle module from Gajim sources.')),
} }
# name, supported # name, supported
self.model = gtk.ListStore(str, bool) self.model = gtk.ListStore(str, bool)
treeview.set_model(self.model) treeview.set_model(self.model)
col = gtk.TreeViewColumn(_('Available'))
treeview.append_column(col)
cell = gtk.CellRendererToggle()
cell.set_property('radio', True)
col.pack_start(cell)
col.set_attributes(cell, active = 1)
col = gtk.TreeViewColumn(_('Feature')) col = gtk.TreeViewColumn(_('Feature'))
treeview.append_column(col) treeview.append_column(col)
cell = gtk.CellRendererText() cell = gtk.CellRendererText()
col.pack_start(cell, expand = True) col.pack_start(cell, expand = True)
col.add_attribute(cell, 'text', 0) col.add_attribute(cell, 'text', 0)
col = gtk.TreeViewColumn(_('Available'))
treeview.append_column(col)
cell = gtk.CellRendererToggle()
cell.set_property('sensitive', False)
col.pack_start(cell)
col.set_attributes(cell, active = 1)
# Fill model # Fill model
for feature in self.features: for feature in self.features:
func = self.features[feature][0] func = self.features[feature][0]
@ -105,10 +117,11 @@ class FeaturesWindow:
path = selection.get_selected_rows()[1][0] path = selection.get_selected_rows()[1][0]
available = self.model[path][1] available = self.model[path][1]
feature = self.model[path][0] feature = self.model[path][0]
text = self.features[feature][1] + '\n'
if os.name == 'nt': if os.name == 'nt':
text = self.features[feature][2] text = text + self.features[feature][3]
else: else:
text = self.features[feature][1] text = text + self.features[feature][2]
self.desc_label.set_text(text) self.desc_label.set_text(text)
def pyopenssl_available(self): def pyopenssl_available(self):