[gnome-documents] Drop Gd.HeaderSimpleButton



commit 2cf8c9d8eaf4be95eb8d235b9480162f3979dfa2
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Jul 24 17:15:32 2014 +0200

    Drop Gd.HeaderSimpleButton
    
    A Gd.HeaderSimpleButton is a Gtk.Button that either has a 16px icon,
    tooltip text and the image-button style class; or a label and the
    text-button style class.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=733683

 src/edit.js        |    4 ++--
 src/mainToolbar.js |   30 +++++++++++++++---------------
 src/selections.js  |   12 ++++++------
 3 files changed, 23 insertions(+), 23 deletions(-)
---
diff --git a/src/edit.js b/src/edit.js
index 080a5d0..b4b47f4 100644
--- a/src/edit.js
+++ b/src/edit.js
@@ -189,8 +189,8 @@ const EditToolbar = new Lang.Class({
                 Application.documentManager.setActiveItem(null);
             }));
 
-        let viewButton = new Gd.HeaderSimpleButton({ label: _("View"),
-                                                     action_name: 'app.view-current' });
+        let viewButton = new Gtk.Button({ label: _("View"),
+                                          action_name: 'app.view-current' });
         viewButton.get_style_context().add_class('suggested-action');
         this.toolbar.pack_end(viewButton);
 
diff --git a/src/mainToolbar.js b/src/mainToolbar.js
index d7b3c9d..73cfbf8 100644
--- a/src/mainToolbar.js
+++ b/src/mainToolbar.js
@@ -83,8 +83,8 @@ const MainToolbar = new Lang.Class({
     },
 
     addBackButton: function() {
-        let backButton = new Gd.HeaderSimpleButton({ symbolic_icon_name: 'go-previous-symbolic',
-                                                     label: _("Back") });
+        let backButton = new Gtk.Button({ image: new Gtk.Image({ icon_name: 'go-previous-symbolic' }),
+                                          tooltip_text: _("Back") });
         this.toolbar.pack_start(backButton);
         return backButton;
     }
@@ -128,17 +128,17 @@ const OverviewToolbar = new Lang.Class({
         viewAsBox.get_style_context().add_class('linked');
         this.toolbar.pack_end(viewAsBox);
 
-        this._viewListButton = new Gd.HeaderSimpleButton({ symbolic_icon_name: 'view-list-symbolic',
-                                                           label: _("View items as a list"),
-                                                           no_show_all: true,
-                                                           action_name: 'app.view-as',
-                                                           action_target: GLib.Variant.new('s', 'list') });
+        this._viewListButton = new Gtk.Button({ image: new Gtk.Image ({ icon_name: 'view-list-symbolic' }),
+                                                tooltip_text: _("View items as a list"),
+                                                no_show_all: true,
+                                                action_name: 'app.view-as',
+                                                action_target: GLib.Variant.new('s', 'list') });
         viewAsBox.add(this._viewListButton);
-        this._viewGridButton = new Gd.HeaderSimpleButton({ symbolic_icon_name: 'view-grid-symbolic',
-                                                           label: _("View items as a grid of icons"),
-                                                           no_show_all: true,
-                                                           action_name: 'app.view-as',
-                                                           action_target: GLib.Variant.new('s', 'icon') });
+        this._viewGridButton = new Gtk.Button({ image: new Gtk.Image ({ icon_name: 'view-grid-symbolic' }),
+                                                tooltip_text: _("View items as a grid of icons"),
+                                                no_show_all: true,
+                                                action_name: 'app.view-as',
+                                                action_target: GLib.Variant.new('s', 'icon') });
         viewAsBox.add(this._viewGridButton);
 
         this._viewSettingsId = Application.settings.connect('changed::view-as',
@@ -194,7 +194,7 @@ const OverviewToolbar = new Lang.Class({
         this._selectionMenu.get_style_context().add_class('selection-menu');
         this.toolbar.set_custom_title(this._selectionMenu);
 
-        let selectionButton = new Gd.HeaderSimpleButton({ label: _("Cancel") });
+        let selectionButton = new Gtk.Button({ label: _("Cancel") });
         this.toolbar.pack_end(selectionButton);
         selectionButton.connect('clicked', Lang.bind(this,
             function() {
@@ -235,8 +235,8 @@ const OverviewToolbar = new Lang.Class({
         this.toolbar.set_show_close_button(true);
         this._checkCollectionBackButton();
 
-        let selectionButton = new Gd.HeaderSimpleButton({ symbolic_icon_name: 'object-select-symbolic',
-                                                          label: _("Select Items") });
+        let selectionButton = new Gtk.Button({ image: new Gtk.Image ({ icon_name: 'object-select-symbolic' 
}),
+                                               tooltip_text: _("Select Items") });
         this.toolbar.pack_end(selectionButton);
         selectionButton.connect('clicked', Lang.bind(this,
             function() {
diff --git a/src/selections.js b/src/selections.js
index 8beba01..8a1f3bc 100644
--- a/src/selections.js
+++ b/src/selections.js
@@ -744,32 +744,32 @@ const SelectionToolbar = new Lang.Class({
         this.widget.add(toolbar);
 
         // open button
-        this._toolbarOpen = new Gd.HeaderSimpleButton({ label: _("Open") });
+        this._toolbarOpen = new Gtk.Button({ label: _("Open") });
         toolbar.pack_start(this._toolbarOpen);
         this._toolbarOpen.connect('clicked', Lang.bind(this, this._onToolbarOpen));
 
         // print button
-        this._toolbarPrint = new Gd.HeaderSimpleButton({ label: _("Print") });
+        this._toolbarPrint = new Gtk.Button({ label: _("Print") });
         toolbar.pack_start(this._toolbarPrint);
         this._toolbarPrint.connect('clicked', Lang.bind(this, this._onToolbarPrint));
 
         // trash button
-        this._toolbarTrash = new Gd.HeaderSimpleButton({ label: _("Delete") });
+        this._toolbarTrash = new Gtk.Button({ label: _("Delete") });
         toolbar.pack_start(this._toolbarTrash);
         this._toolbarTrash.connect('clicked', Lang.bind(this, this._onToolbarTrash));
 
         // share button
-        this._toolbarShare = new Gd.HeaderSimpleButton({ label: _("Share") });
+        this._toolbarShare = new Gtk.Button({ label: _("Share") });
         toolbar.pack_end(this._toolbarShare);
         this._toolbarShare.connect('clicked', Lang.bind(this, this._onToolbarShare));
 
         // properties button
-        this._toolbarProperties = new Gd.HeaderSimpleButton({ label: _("Properties") });
+        this._toolbarProperties = new Gtk.Button({ label: _("Properties") });
         toolbar.pack_end(this._toolbarProperties);
         this._toolbarProperties.connect('clicked', Lang.bind(this, this._onToolbarProperties));
 
         // organize button
-        this._toolbarCollection = new Gd.HeaderSimpleButton({ label: _("Add to Collection") });
+        this._toolbarCollection = new Gtk.Button({ label: _("Add to Collection") });
         toolbar.pack_end(this._toolbarCollection);
         this._toolbarCollection.connect('clicked', Lang.bind(this, this._onToolbarCollection));
 


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