[gnome-documents] selections: remove "Select All"
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] selections: remove "Select All"
- Date: Wed, 2 Nov 2011 22:05:25 +0000 (UTC)
commit 9c6f8272a53a3f138ee8aff29c62a6598b1e44b4
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Nov 2 18:04:54 2011 -0400
selections: remove "Select All"
After talking with Jon, we agreed it's not such a good idea after all.
src/mainToolbar.js | 19 ++-----------------
src/selections.js | 4 ----
src/view.js | 8 --------
3 files changed, 2 insertions(+), 29 deletions(-)
---
diff --git a/src/mainToolbar.js b/src/mainToolbar.js
index 5684a94..56607a3 100644
--- a/src/mainToolbar.js
+++ b/src/mainToolbar.js
@@ -91,36 +91,21 @@ MainToolbar.prototype = {
// don't show icons in selection mode
this.widget.set_style(Gtk.ToolbarStyle.TEXT);
- let selectAll = new Gtk.ToolButton({ stock_id: 'gtk-select-all' });
- selectAll.get_style_context().add_class('raised');
- this.widget.insert(selectAll, 0);
-
- selectAll.connect('clicked', Lang.bind(this,
- function() {
- Global.selectionController.selectAll();
- }));
-
this._selectionLabel = new Gtk.Label();
let labelItem = new Gtk.ToolItem({ child: this._selectionLabel });
labelItem.set_expand(true);
- this.widget.insert(labelItem, 1);
+ this.widget.insert(labelItem, 0);
let cancel = new Gtk.ToolButton({ stock_id: 'gtk-cancel' });
cancel.get_style_context().add_class('raised');
- this.widget.insert(cancel, 2);
+ this.widget.insert(cancel, 1);
cancel.connect('clicked', Lang.bind(this,
function() {
Global.selectionController.setSelectionMode(false);
}));
- // put the first and the last buttons in a size group, so that
- // the label stays center-aligned
- let sizeGroup = new Gtk.SizeGroup();
- sizeGroup.add_widget(cancel);
- sizeGroup.add_widget(selectAll);
-
// connect to selection changes while in this mode
this._selectionChangedId =
Global.selectionController.connect('selection-changed',
diff --git a/src/selections.js b/src/selections.js
index 0c4f1f6..4f59619 100644
--- a/src/selections.js
+++ b/src/selections.js
@@ -39,10 +39,6 @@ SelectionController.prototype = {
this._selectionMode = false;
},
- selectAll: function() {
- this.emit('select-all');
- },
-
setSelection: function(selection) {
if (this._isFrozen)
return;
diff --git a/src/view.js b/src/view.js
index a5894a2..e1a1710 100644
--- a/src/view.js
+++ b/src/view.js
@@ -125,9 +125,6 @@ View.prototype = {
this._selectionModeId =
Global.selectionController.connect('selection-mode-changed',
Lang.bind(this, this._onSelectionModeChanged));
- this._selectAllId =
- Global.selectionController.connect('select-all',
- Lang.bind(this, this._onSelectAll));
this._queryId =
Global.trackerController.connect('query-status-changed',
Lang.bind(this, this._onQueryStatusChanged));
@@ -146,7 +143,6 @@ View.prototype = {
Global.trackerController.disconnect(this._queryId);
Global.selectionController.disconnect(this._selectionModeId);
- Global.selectionController.disconnect(this._selectAllId);
}));
// this will create the model if we're done querying
@@ -216,10 +212,6 @@ View.prototype = {
}));
},
- _onSelectAll: function() {
- this.getSelectionObject().select_all();
- },
-
_onSelectionModeChanged: function(controller, selectionMode) {
// setup the GtkSelectionMode of the view according to whether or not
// the view is in "selection mode"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]