gnome-specimen r9 - in trunk-from-bzr: . glade



Author: wbolster
Date: Tue Jun 17 18:41:22 2008
New Revision: 9
URL: http://svn.gnome.org/viewvc/gnome-specimen?rev=9&view=rev

Log:
* glade/gnome-specimen.glade:
  - Added buttons
  - Removed toolbar from VBox

* specimenwindow.py:
  - Set foreground and background color on preview label
  - Add callback stubs for buttons


Modified:
   trunk-from-bzr/   (props changed)
   trunk-from-bzr/glade/gnome-specimen.glade
   trunk-from-bzr/specimenwindow.py

Modified: trunk-from-bzr/glade/gnome-specimen.glade
==============================================================================
--- trunk-from-bzr/glade/gnome-specimen.glade	(original)
+++ trunk-from-bzr/glade/gnome-specimen.glade	Tue Jun 17 18:41:22 2008
@@ -206,21 +206,6 @@
       </child>
 
       <child>
-	<widget class="GtkToolbar" id="toolbar1">
-	  <property name="visible">True</property>
-	  <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
-	  <property name="toolbar_style">GTK_TOOLBAR_BOTH_HORIZ</property>
-	  <property name="tooltips">True</property>
-	  <property name="show_arrow">True</property>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
 	<widget class="GtkHPaned" id="hpaned1">
 	  <property name="visible">True</property>
 	  <property name="can_focus">True</property>
@@ -430,6 +415,70 @@
 		  <property name="fill">False</property>
 		</packing>
 	      </child>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox1">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">3</property>
+
+		  <child>
+		    <widget class="GtkButton" id="button1">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label">gtk-add</property>
+		      <property name="use_stock">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_add_button_clicked" last_modification_time="Sun, 30 Apr 2006 20:31:42 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="button2">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label">gtk-remove</property>
+		      <property name="use_stock">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_remove_button_clicked" last_modification_time="Sun, 30 Apr 2006 20:31:57 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="button3">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label">gtk-clear</property>
+		      <property name="use_stock">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_clear_button_clicked" last_modification_time="Sun, 30 Apr 2006 20:32:09 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 	    </widget>
 	    <packing>
 	      <property name="shrink">True</property>

Modified: trunk-from-bzr/specimenwindow.py
==============================================================================
--- trunk-from-bzr/specimenwindow.py	(original)
+++ trunk-from-bzr/specimenwindow.py	Tue Jun 17 18:41:22 2008
@@ -177,8 +177,29 @@
             pass
 
         attrlist.insert(pango.AttrSize(self.preview_size, 0, -1))
+
+        black = pango.Color('black')
+        attrlist.insert(pango.AttrForeground(black.red, black.green, black.blue, 0, -1))
+
+        color = gtk.gdk.color_parse('white')
+        self.preview_label.parent.modify_bg(gtk.STATE_NORMAL, color)
+
         self.preview_label.set_attributes(attrlist)
 
+    # user interaction callbacks
+
+    def on_add_button_clicked(self, widget, data=None):
+        print 'add'
+        pass
+
+    def on_remove_button_clicked(self, widget, data=None):
+        print 'remove'
+        pass
+
+    def on_clear_button_clicked(self, widget, data=None):
+        print 'clear'
+        pass
+
     def on_about_clicked(self, widget, data=None):
         'Callback for the Help->About menu item'
         name = 'GNOME Specimen'



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]