From a1440388da5f6b78341cde9c1a69cf29984f9583 Mon Sep 17 00:00:00 2001 From: Stephan Erb <steve-e@h3c.de> Date: Wed, 27 Jun 2007 12:38:00 +0000 Subject: [PATCH] Feature window cleanup, first part . See #2783 --- data/glade/features_window.glade | 48 +++++++++++++++++++++++++++++--- src/features_window.py | 8 +++--- 2 files changed, 48 insertions(+), 8 deletions(-) diff --git a/data/glade/features_window.glade b/data/glade/features_window.glade index 0e06e27177..cff37256c1 100644 --- a/data/glade/features_window.glade +++ b/data/glade/features_window.glade @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!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> <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="border_width">12</property> <property name="title" translatable="yes">Features</property> - <property name="default_width">200</property> - <property name="default_height">350</property> + <property name="default_width">300</property> + <property name="default_height">525</property> <child> <widget class="GtkVBox" id="vbox1"> <property name="visible">True</property> @@ -17,7 +17,8 @@ <widget class="GtkLabel" id="label1"> <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="label" translatable="yes">List of possible features in Gajim:</property> + <property name="label" translatable="yes"><b>List of possible features in Gajim:</b></property> + <property name="use_markup">True</property> </widget> <packing> <property name="expand">False</property> @@ -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="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="shadow_type">GTK_SHADOW_OUT</property> <child> <widget class="GtkTreeView" id="features_treeview"> <property name="visible">True</property> @@ -44,6 +46,42 @@ <property name="position">1</property> </packing> </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"><b>Description</b></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> <widget class="GtkHButtonBox" id="hbuttonbox1"> <property name="visible">True</property> @@ -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="label" translatable="yes">gtk-close</property> <property name="use_stock">True</property> + <property name="response_id">0</property> <signal name="clicked" handler="on_close_button_clicked"/> </widget> </child> </widget> <packing> <property name="expand">False</property> + <property name="pack_type">GTK_PACK_END</property> <property name="position">2</property> </packing> </child> diff --git a/src/features_window.py b/src/features_window.py index 0197b6803d..5f7d9a9c94 100644 --- a/src/features_window.py +++ b/src/features_window.py @@ -29,6 +29,7 @@ class FeaturesWindow: self.xml = gtkgui_helpers.get_glade('features_window.glade') self.window = self.xml.get_widget('features_window') treeview = self.xml.get_widget('features_treeview') + self.desc_label = self.xml.get_widget('feature_desc_label') # {name: (available_function, unix_text, windows_text)} self.features = { @@ -64,7 +65,7 @@ class FeaturesWindow: _('This feature is not available under Windows.')), _('Trayicon'): (self.trayicon_available, _('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, _('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: 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) @@ -100,14 +102,12 @@ class FeaturesWindow: def on_features_treeview_row_activated(self, widget, path, col): available = self.model[path][1] - if available: - return feature = self.model[path][0] if os.name == 'nt': text = self.features[feature][2] else: text = self.features[feature][1] - dialogs.InformationDialog(_('Feature not available'), text) + self.desc_label.set_text(text) def pyopenssl_available(self): try: -- GitLab