Skip to content
Snippets Groups Projects
Commit a1440388 authored by steve-e's avatar steve-e
Browse files

Feature window cleanup, first part . See #2783

parent 3d85b011
No related branches found
No related tags found
No related merge requests found
<?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.0 on Tue Jun 26 23:59:52 2007 by asterix@obelix--> <!--Generated with glade3 3.2.2 on Wed Jun 27 14:25:13 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">200</property> <property name="default_width">300</property>
<property name="default_height">350</property> <property name="default_height">525</property>
<child> <child>
<widget class="GtkVBox" id="vbox1"> <widget class="GtkVBox" id="vbox1">
<property name="visible">True</property> <property name="visible">True</property>
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
<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="label" translatable="yes">List of possible features in Gajim:</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>
</widget> </widget>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -30,6 +31,7 @@ ...@@ -30,6 +31,7 @@
<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="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="shadow_type">GTK_SHADOW_OUT</property>
<child> <child>
<widget class="GtkTreeView" id="features_treeview"> <widget class="GtkTreeView" id="features_treeview">
<property name="visible">True</property> <property name="visible">True</property>
...@@ -44,6 +46,42 @@ ...@@ -44,6 +46,42 @@
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child>
<widget class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="border_width">3</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
<widget class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkLabel" id="feature_desc_label">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="wrap">True</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Description&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">3</property>
</packing>
</child>
<child> <child>
<widget class="GtkHButtonBox" id="hbuttonbox1"> <widget class="GtkHButtonBox" id="hbuttonbox1">
<property name="visible">True</property> <property name="visible">True</property>
...@@ -57,12 +95,14 @@ ...@@ -57,12 +95,14 @@
<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="label" translatable="yes">gtk-close</property> <property name="label" translatable="yes">gtk-close</property>
<property name="use_stock">True</property> <property name="use_stock">True</property>
<property name="response_id">0</property>
<signal name="clicked" handler="on_close_button_clicked"/> <signal name="clicked" handler="on_close_button_clicked"/>
</widget> </widget>
</child> </child>
</widget> </widget>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="pack_type">GTK_PACK_END</property>
<property name="position">2</property> <property name="position">2</property>
</packing> </packing>
</child> </child>
......
...@@ -29,6 +29,7 @@ class FeaturesWindow: ...@@ -29,6 +29,7 @@ class FeaturesWindow:
self.xml = gtkgui_helpers.get_glade('features_window.glade') self.xml = gtkgui_helpers.get_glade('features_window.glade')
self.window = self.xml.get_widget('features_window') self.window = self.xml.get_widget('features_window')
treeview = self.xml.get_widget('features_treeview') treeview = self.xml.get_widget('features_treeview')
self.desc_label = self.xml.get_widget('feature_desc_label')
# {name: (available_function, unix_text, windows_text)} # {name: (available_function, unix_text, windows_text)}
self.features = { self.features = {
...@@ -64,7 +65,7 @@ class FeaturesWindow: ...@@ -64,7 +65,7 @@ class FeaturesWindow:
_('This feature is not available under Windows.')), _('This feature is 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.'), _('You need to install python-gnome2-extras or compile trayicon module from Gajim sources to use the trayicon.'),
_('You need PyGTK > 2.10 to use the trayicon.')), _('You need PyGTK >= 2.10 to use the trayicon.')),
_('Idle'): (self.idle_available, _('Idle'): (self.idle_available,
_('You need to compile idle module from Gajim sources to use it.'), _('You need to compile idle module from Gajim sources to use it.'),
_('You need to compile idle module from Gajim sources to use it.')), _('You need to compile idle module from Gajim sources to use it.')),
...@@ -83,6 +84,7 @@ class FeaturesWindow: ...@@ -83,6 +84,7 @@ class FeaturesWindow:
col = gtk.TreeViewColumn(_('Available')) col = gtk.TreeViewColumn(_('Available'))
treeview.append_column(col) treeview.append_column(col)
cell = gtk.CellRendererToggle() cell = gtk.CellRendererToggle()
cell.set_property('sensitive', False)
col.pack_start(cell) col.pack_start(cell)
col.set_attributes(cell, active = 1) col.set_attributes(cell, active = 1)
...@@ -100,14 +102,12 @@ class FeaturesWindow: ...@@ -100,14 +102,12 @@ class FeaturesWindow:
def on_features_treeview_row_activated(self, widget, path, col): def on_features_treeview_row_activated(self, widget, path, col):
available = self.model[path][1] available = self.model[path][1]
if available:
return
feature = self.model[path][0] feature = self.model[path][0]
if os.name == 'nt': if os.name == 'nt':
text = self.features[feature][2] text = self.features[feature][2]
else: else:
text = self.features[feature][1] text = self.features[feature][1]
dialogs.InformationDialog(_('Feature not available'), text) self.desc_label.set_text(text)
def pyopenssl_available(self): def pyopenssl_available(self):
try: try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment