gnome-specimen r11 - in branches/import-from-bzr: . glade
- From: wbolster svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-specimen r11 - in branches/import-from-bzr: . glade
- Date: Tue, 17 Jun 2008 18:52:01 +0000 (UTC)
Author: wbolster
Date: Tue Jun 17 18:52:01 2008
New Revision: 11
URL: http://svn.gnome.org/viewvc/gnome-specimen?rev=11&view=rev
Log:
* glade/gnome-specimen.glade:
- Add (again) an EventBox to be able to set the labels
* specimenwindow.py:
- Split initialization code into separate methods.
Modified:
branches/import-from-bzr/ (props changed)
branches/import-from-bzr/glade/gnome-specimen.glade
branches/import-from-bzr/specimenwindow.py
Modified: branches/import-from-bzr/glade/gnome-specimen.glade
==============================================================================
--- branches/import-from-bzr/glade/gnome-specimen.glade (original)
+++ branches/import-from-bzr/glade/gnome-specimen.glade Tue Jun 17 18:52:01 2008
@@ -391,28 +391,35 @@
</child>
<child>
- <widget class="GtkLabel" id="preview-label">
+ <widget class="GtkEventBox" id="eventbox1">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">This is some sample text.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">True</property>
- <property name="selectable">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
+ <property name="visible_window">True</property>
+ <property name="above_child">False</property>
+
+ <child>
+ <widget class="GtkLabel" id="preview-label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">This is some sample text.</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">True</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
</packing>
</child>
Modified: branches/import-from-bzr/specimenwindow.py
==============================================================================
--- branches/import-from-bzr/specimenwindow.py (original)
+++ branches/import-from-bzr/specimenwindow.py Tue Jun 17 18:52:01 2008
@@ -28,22 +28,13 @@
# main window
self.window = tree.get_widget('main-window')
- # font list widgets
- self.fonts_treeview = tree.get_widget('fonts-treeview')
- self.fonts_treeview_window = tree.get_widget('fonts-treeview-window')
-
- # preview widgets
- self.preview_treeview = tree.get_widget('preview-treeview')
- self.preview_size_spinbutton = tree.get_widget('preview-size-spinbutton')
- self.preview_text_entry = tree.get_widget('preview-text-entry')
- self.preview_label = tree.get_widget('preview-label')
+ # initialize
+ self.initialize_fonts_pane(tree)
+ self.initialize_previews_pane(tree)
# update
self.on_preview_size_changed(self.preview_size_spinbutton)
self.on_preview_text_changed(self.preview_text_entry)
-
- # populate the UI
- self.load_fonts()
self.schedule_update_previews()
# show the window
@@ -56,6 +47,15 @@
# font loading
+ def initialize_fonts_pane(self, glade_tree):
+ 'Initializes the fonts pane'
+ # font list widgets
+ self.fonts_treeview = glade_tree.get_widget('fonts-treeview')
+ self.fonts_treeview_window = glade_tree.get_widget('fonts-treeview-window')
+
+ # populate the UI
+ self.load_fonts()
+
def load_fonts(self):
'Loads all fonts and updates the fonts treeview'
@@ -112,6 +112,14 @@
# previews
+ def initialize_previews_pane(self, glade_tree):
+ 'Initializes the preview pane'
+ # preview widgets
+ self.preview_treeview = glade_tree.get_widget('preview-treeview')
+ self.preview_size_spinbutton = glade_tree.get_widget('preview-size-spinbutton')
+ self.preview_text_entry = glade_tree.get_widget('preview-text-entry')
+ self.preview_label = glade_tree.get_widget('preview-label')
+
def schedule_update_previews(self):
'Schedules an update of the previews'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]