[gevice] gevice.css: add new file



commit ed9726a44a1cdb880cdd080f8fa8a00a48ffc6d2
Author: Alejandro Valdes Jimenez <avaldes gnome org>
Date:   Thu Oct 6 18:29:57 2011 -0300

    gevice.css: add new file

 ChangeLog           |    3 +
 README              |   16 -------
 data/ui/Makefile.am |    3 +-
 data/ui/gevice.css  |  110 +++++++++++++++++++++++++++++++++++++++++++++++++++
 src/gevice.py       |    9 +++-
 src/gevicefind.py   |    2 +-
 6 files changed, 122 insertions(+), 21 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c4339b9..a811dcf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
 2011-10-06  Alejandro Valdes Jimenez  <avaldes gnome org>
+	* data/ui/gevice.css: add new file
+
+2011-10-06  Alejandro Valdes Jimenez  <avaldes gnome org>
 	* configure.ac: old dependence removed (pygtk)
 	* Fixed bug #660396
 
diff --git a/README b/README
index 301944d..8a2deed 100644
--- a/README
+++ b/README
@@ -1,28 +1,12 @@
 Gevice: GNOME Network Device Manager.
 ====================================
 
-Version: 0.6.1
-
 Gevice is a tool for the administration of network device. It is
 designed for being used in the GNOME Desktop.
 
 Gevice is free software, you are free and encouraged to copy it and distribute
 it. See the COPYING file for details.
 
-* Dependencies
-
-python2.4-minimal
-python-gnome2-extras
-python-gnome2
-python-gobject
-python-gtk2
-eog
-
-python-pygraphviz
-python-vte
-python-psycopg2
-
-
 * Features
 	- Allow you to draw the net model.
 	- Allow you to print the net diagram in png,gif,jpg formats.
diff --git a/data/ui/Makefile.am b/data/ui/Makefile.am
index 30efb68..9502c10 100644
--- a/data/ui/Makefile.am
+++ b/data/ui/Makefile.am
@@ -16,6 +16,7 @@ ui_DATA = \
 	edifice.xml\
 	maintainer.xml\
 	maintainer1.xml\
-	model.xml
+	model.xml\
+	gevice.css
 
 EXTRA_DIST = $(ui_DATA)
diff --git a/data/ui/gevice.css b/data/ui/gevice.css
new file mode 100644
index 0000000..b2a253a
--- /dev/null
+++ b/data/ui/gevice.css
@@ -0,0 +1,110 @@
+/* Apply round borders */
+
+.notebook,
+.button,
+.entry {
+  border-radius: 1;
+  border-style: solid;
+  border-width: 1;
+}
+
+
+/* Add some gradients */
+
+.menubar,
+.toolbar {
+  border-width: 0;
+  background-image: -gtk-gradient (linear,
+                                   left top, left bottom,
+                                   from (@bg_color),
+                                   to (shade (@bg_color, 0.95)));
+}
+
+.button:hover,
+.menu:hover,
+.menubar:hover {
+  background-image: -gtk-gradient (linear,
+                                   left top, left bottom,
+                                   from (shade (@selected_bg_color, 1.1)),
+                                   color-stop (0.55, shade (@selected_bg_color, 1.0)),
+                                   color-stop (0.55, shade (@selected_bg_color, 0.8)),
+                                   to (shade (@selected_bg_color, 0.9)));
+}
+
+/* Theme scrollbars */
+
+/* Gradient for vertical scrollbars'
+ * sliders, from left to right
+ */
+.slider.vertical {
+  background-image: -gtk-gradient (linear,
+                                   left top, right top,
+                                   from (mix (shade (@bg_color, 0.9), @selected_bg_color, 0.3)),
+                                   to (mix (@bg_color, @selected_bg_color, 0.3)));
+}
+
+.slider.vertical:hover {
+  background-image: -gtk-gradient (linear,
+                                   left top, right top,
+                                   from (shade (@selected_bg_color, 0.9)),
+                                   to (@selected_bg_color));
+}
+
+/* Now horizontal scrollbars',
+ * from top to bottom
+ */
+.slider.horizontal {
+  background-image: -gtk-gradient (linear,
+                                   left top, left bottom,
+                                   from (shade (@bg_color, 0.9)),
+                                   to (@bg_color));
+}
+
+.slider.horizontal:hover {
+  background-image: -gtk-gradient (linear,
+                                   left top, left bottom,
+                                   from (shade (@selected_bg_color, 0.9)),
+                                   to (@selected_bg_color));
+}
+
+.trough {
+  background-image: -gtk-gradient (radial,
+                                   center center, 0,
+                                   center center, 1,
+                                   from (@bg_color),
+                                   to (shade (@bg_color, 0.8)));
+}
+
+GtkScrollbar.button {
+  border-width: 0;
+
+  /* Override any background with
+   * a full transparent color
+   */
+  background-image: none;
+  background-color: rgba (0, 0, 0, 0);
+}
+
+
+/* Theme treeview rows */
+
+GtkTreeView row {
+  border-width: 0;
+  border-radius: 0;
+}
+
+GtkTreeView row:selected:focused {
+  background-image: -gtk-gradient (linear,
+                                   left top, left bottom,
+                                   from (@selected_bg_color),
+                                   to (shade (@selected_bg_color, 1.4)));
+}
+
+/* Add some animations */
+GtkButton:hover {
+  transition: 100ms linear;
+}
+
+GtkCheckButton:active {
+  transition: 250ms ease-in-out;
+}
diff --git a/src/gevice.py b/src/gevice.py
index ea4bd58..4c5b150 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
+from gi.repository import Gtk, GdkPixbuf, Vte, GLib, Gio
 
 import os
 import os.path
@@ -54,8 +54,11 @@ class Gevice:
     self.modelproto.append (["local"])
     self.modelproto.append (["vnc"])
     self.modelproto.append (["rdp"])
-    self.modelproto.append (["xdmcp"])
+    self.modelproto.append (["xdmcp"])    
     
+    # style
+    self.default_style = Gtk.CssProvider()
+    self.default_style.load_from_file(Gio.file_new_for_path(os.path.join(config.UIDIR,"gevice.css")))
     
     # model for devices
     self.gmodel = gevicemodel.GeviceModel(self)
@@ -96,7 +99,7 @@ class Gevice:
     
     # create a Toolbar
     self.maintoolbar = self.uimanager.get_widget ('/MainToolbar')
-    #self.maintoolbar.set_style(Gtk.TOOLBAR_ICONS)
+    self.maintoolbar.set_style (Gtk.ShadowType.ETCHED_IN)
     
     # create horizontal container for toolbar and users combobox
     self.hbox = Gtk.HBox(homogeneous=False, spacing=0)
diff --git a/src/gevicefind.py b/src/gevicefind.py
index 4bb8742..b8a6f43 100644
--- a/src/gevicefind.py
+++ b/src/gevicefind.py
@@ -55,7 +55,7 @@ class GeviceFind:
   def on_window_find_delete_event (self,window,event):
     self.close_window (window)
 
-  def search_in_iter (self,model,path,iter,gevice):
+  def search_in_iter (self,model,path,iter,gevice):    
     data = model.get_value(iter,self.column_find)
     res = data.find(self.sname)
 



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