[gevice] setting new style of ToolBar



commit ff085def39d21aeb51d0a80a5470ea6148320699
Author: Alejandro Valdes Jimenez <avaldes gnome org>
Date:   Sat Oct 8 21:06:13 2011 -0300

    setting new style of ToolBar

 ChangeLog           |    4 ++++
 data/ui/Makefile.am |    3 +--
 data/ui/gevice.css  |    8 --------
 data/ui/menu.xml    |    1 -
 src/gevice.py       |   17 ++++++-----------
 5 files changed, 11 insertions(+), 22 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1068fed..d7bc0b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-10-08  Alejandro Valdes Jimenez  <avaldes gnome org>
+	* data/ui/gevice.css: remove file
+  * src/gevice.py: setting new style of ToolBar
+
 2011-10-07  Alejandro Valdes Jimenez  <avaldes gnome org>
 	* src/gevice.py: Open terminal olny one device is selected (except local)
 
diff --git a/data/ui/Makefile.am b/data/ui/Makefile.am
index 9502c10..30efb68 100644
--- a/data/ui/Makefile.am
+++ b/data/ui/Makefile.am
@@ -16,7 +16,6 @@ ui_DATA = \
 	edifice.xml\
 	maintainer.xml\
 	maintainer1.xml\
-	model.xml\
-	gevice.css
+	model.xml
 
 EXTRA_DIST = $(ui_DATA)
diff --git a/data/ui/menu.xml b/data/ui/menu.xml
index d98eb08..564589c 100644
--- a/data/ui/menu.xml
+++ b/data/ui/menu.xml
@@ -55,7 +55,6 @@
       <toolitem action="Decrease" />
       <separator/>
       <toolitem action="Dual" />
-      <separator/>
       <toolitem action="Connect" />
       <separator/>
       <toolitem action="Quit" />      
diff --git a/src/gevice.py b/src/gevice.py
index a2302c3..8ce79e4 100755
--- a/src/gevice.py
+++ b/src/gevice.py
@@ -16,7 +16,7 @@
 # You should have received a copy of the GNU General Public License along
 # with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-from gi.repository import Gtk, GdkPixbuf, Vte, GLib, Gio, Gdk
+from gi.repository import Gtk, GdkPixbuf, Vte, GLib
 
 import os
 import os.path
@@ -74,14 +74,7 @@ class Gevice:
     self.window_main.set_icon (GdkPixbuf.Pixbuf.new_from_file(os.path.join (config.ARTDIR,"gevice.png")))
     self.window_main.set_title(config.PACKAGE)
     self.window_main.connect ("delete_event",self.on_delete_event)
-
-    # style
-    self.default_style = Gtk.CssProvider()
-    self.default_style.load_from_file(Gio.file_new_for_path(os.path.join(config.UIDIR,"gevice.css")))
-    Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), 
-      self.default_style, 
-      Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION + 1)
-    
+   
     self.context_id = self.statusbar.get_context_id("status")
     
     # create UIManager instance
@@ -98,11 +91,13 @@ class Gevice:
     
     # create MenuBar
     self.menubar = self.uimanager.get_widget ('/MainMenu')
+    #self.vbox_main.pack_start (self.menubar,False,False,0)
     self.vbox_main.pack_start (self.menubar,False,False,0)
     
-    # create a Toolbar
+    # create a Toolbar and set style
     self.maintoolbar = self.uimanager.get_widget ('/MainToolbar')
-    self.maintoolbar.set_style (Gtk.ShadowType.ETCHED_IN)
+    style_context = self.maintoolbar.get_style_context()
+    Gtk.StyleContext.add_class (style_context,Gtk.STYLE_CLASS_PRIMARY_TOOLBAR)
     
     # create horizontal container for toolbar and users combobox
     self.hbox = Gtk.HBox(homogeneous=False, spacing=0)



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