[gnome-documents] Use GtkStack, GtkRevealer and GtkHeaderBar



commit f497ab72963876d947a3791dafb5e01d2eb955c0
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Apr 24 16:23:07 2013 -0400

    Use GtkStack, GtkRevealer and GtkHeaderBar
    
    Many of the occurrences can be ported with a one-to-one rename from
    their libgd equivalents.
    There are more cases where we can use a GtkRevealer for faders instead
    of Tweener, which will be handled in a separate commit.

 configure.ac       |    2 +-
 src/embed.js       |    7 +++----
 src/mainToolbar.js |    2 +-
 src/places.js      |    4 ++--
 src/preview.js     |    2 +-
 src/searchbar.js   |    6 +++---
 6 files changed, 11 insertions(+), 12 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 94862f2..33a7125 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,7 +62,7 @@ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"$ac_top_build_prefix"egg-list-box
 EVINCE_MIN_VERSION=3.7.4
 WEBKITGTK_MIN_VERSION=1.10.0
 GLIB_MIN_VERSION=2.37.0
-GTK_MIN_VERSION=3.7.7
+GTK_MIN_VERSION=3.9.0
 GOBJECT_INTROSPECTION_MIN_VERSION=1.31.6
 GDATA_MIN_VERSION=0.13.3
 GOA_MIN_VERSION=3.2.0
diff --git a/src/embed.js b/src/embed.js
index 565fa19..668de42 100644
--- a/src/embed.js
+++ b/src/embed.js
@@ -33,7 +33,6 @@ const WindowMode = imports.windowMode;
 const Documents = imports.documents;
 
 const EvView = imports.gi.EvinceView;
-const Gd = imports.gi.Gd;
 const Gdk = imports.gi.Gdk;
 const Gio = imports.gi.Gio;
 const GLib = imports.gi.GLib;
@@ -217,9 +216,9 @@ const Embed = new Lang.Class({
         this._stackOverlay = new Gtk.Overlay({ visible: true });
         this.widget.pack_end(this._stackOverlay, true, true, 0);
 
-        this._stack = new Gd.Stack({ visible: true,
-                                     homogeneous: true,
-                                     transition_type: Gd.StackTransitionType.CROSSFADE });
+        this._stack = new Gtk.Stack({ visible: true,
+                                      homogeneous: true,
+                                      transition_type: Gtk.StackTransitionType.CROSSFADE });
         this._stackOverlay.add(this._stack);
 
         // create the OSD toolbar for selected items, it's hidden by default
diff --git a/src/mainToolbar.js b/src/mainToolbar.js
index 273dcc2..44e9b03 100644
--- a/src/mainToolbar.js
+++ b/src/mainToolbar.js
@@ -43,7 +43,7 @@ const MainToolbar = new Lang.Class({
         this.widget = new Gtk.Box({ orientation: Gtk.Orientation.VERTICAL });
         this.widget.show();
 
-        this.toolbar = new Gd.HeaderBar();
+        this.toolbar = new Gtk.HeaderBar();
         this.widget.add(this.toolbar);
         this.toolbar.show();
 
diff --git a/src/places.js b/src/places.js
index eddc47b..fe5748c 100644
--- a/src/places.js
+++ b/src/places.js
@@ -69,8 +69,8 @@ const PlacesDialog = new Lang.Class({
 
         box.pack_start(this._toolbar, false, false, 0);
 
-        this._stack = new Gd.Stack({ border_width: 5,
-                                     homogeneous: true });
+        this._stack = new Gtk.Stack({ border_width: 5,
+                                      homogeneous: true });
         box.pack_start(this._stack, true, true, 0);
 
         this._linksPage = new GdPrivate.PlacesLinks();
diff --git a/src/preview.js b/src/preview.js
index bc6ed94..13354c7 100644
--- a/src/preview.js
+++ b/src/preview.js
@@ -975,7 +975,7 @@ const PreviewFullscreenToolbar = new Lang.Class({
     _init: function(previewView) {
         this.parent(previewView);
 
-        this.revealer = new Gd.Revealer({ valign: Gtk.Align.START });
+        this.revealer = new Gtk.Revealer({ valign: Gtk.Align.START });
         this.revealer.add(this.widget);
         this.revealer.show();
 
diff --git a/src/searchbar.js b/src/searchbar.js
index 6704bd2..6417e37 100644
--- a/src/searchbar.js
+++ b/src/searchbar.js
@@ -48,7 +48,7 @@ const Searchbar = new Lang.Class({
 
         this._in = false;
 
-        this.widget = new Gd.Revealer();
+        this.widget = new Gtk.Revealer();
 
         let toolbar = new Gtk.Toolbar();
         toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR);
@@ -236,8 +236,8 @@ const Dropdown = new Lang.Class({
                                     opacity: 0.9 });
         frame.get_style_context().add_class('documents-dropdown');
 
-        this.widget = new Gd.Revealer({ halign: Gtk.Align.CENTER,
-                                        valign: Gtk.Align.START });
+        this.widget = new Gtk.Revealer({ halign: Gtk.Align.CENTER,
+                                         valign: Gtk.Align.START });
         this.widget.add(frame);
 
         this._grid = new Gtk.Grid({ orientation: Gtk.Orientation.HORIZONTAL });


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