[sushi] all: use document-open-symbolic for run/open toolbar buttons
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sushi] all: use document-open-symbolic for run/open toolbar buttons
- Date: Wed, 13 Jul 2011 14:53:25 +0000 (UTC)
commit 591233a18956692dd083257defad925ae02dc56d
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Jul 13 10:52:10 2011 -0400
all: use document-open-symbolic for run/open toolbar buttons
src/js/ui/utils.js | 55 ++++++++++++++---------------------------------
src/js/viewers/html.js | 2 +-
src/js/viewers/text.js | 2 +-
3 files changed, 19 insertions(+), 40 deletions(-)
---
diff --git a/src/js/ui/utils.js b/src/js/ui/utils.js
index 109083b..78e9a8c 100644
--- a/src/js/ui/utils.js
+++ b/src/js/ui/utils.js
@@ -112,45 +112,24 @@ function createFullScreenButton(mainWindow) {
return toolbarZoom;
}
-function createRunButton(file, mainWindow) {
- let toolbarRun = new Gtk.ToolButton({ expand: false,
- "icon-name": "system-run-symbolic" });
- toolbarRun.show();
- toolbarRun.connect("clicked",
- function () {
- let timestamp = Gtk.get_current_event_time();
- try {
- Gtk.show_uri(toolbarRun.get_screen(),
- file.get_uri(),
- timestamp);
-
- mainWindow.close();
- } catch (e) {
- }
- });
-
- return toolbarRun;
-}
+function createOpenButton(file, mainWindow) {
+ let toolbarOpen = new Gtk.ToolButton({ expand: false,
+ "icon-name": "document-open-symbolic" });
+ toolbarOpen.show();
+ toolbarOpen.connect("clicked",
+ function () {
+ let timestamp = Gtk.get_current_event_time();
+ try {
+ Gtk.show_uri(toolbarRun.get_screen(),
+ file.get_uri(),
+ timestamp);
+
+ mainWindow.close();
+ } catch (e) {
+ }
+ });
-function createEditButton(file, mainWindow) {
- // FIXME: needs better icon
- let toolbarRun = new Gtk.ToolButton({ expand: false,
- "icon-name": "edit-cut-symbolic" });
- toolbarRun.show();
- toolbarRun.connect("clicked",
- function () {
- let timestamp = Gtk.get_current_event_time();
- try {
- Gtk.show_uri(toolbarRun.get_screen(),
- file.get_uri(),
- timestamp);
-
- mainWindow.close();
- } catch (e) {
- }
- });
-
- return toolbarRun;
+ return toolbarOpen;
}
function formatTimeString(timeVal) {
diff --git a/src/js/viewers/html.js b/src/js/viewers/html.js
index 1fdf4c1..f507d59 100644
--- a/src/js/viewers/html.js
+++ b/src/js/viewers/html.js
@@ -87,7 +87,7 @@ HTMLRenderer.prototype = {
separator.show();
this._mainToolbar.insert(separator, 1);
- this._toolbarRun = Utils.createRunButton(this._file, this._mainWindow);
+ this._toolbarRun = Utils.createOpenButton(this._file, this._mainWindow);
this._mainToolbar.insert(this._toolbarRun, 2);
this._mainToolbar.show();
diff --git a/src/js/viewers/text.js b/src/js/viewers/text.js
index bccabed..70b89f3 100644
--- a/src/js/viewers/text.js
+++ b/src/js/viewers/text.js
@@ -102,7 +102,7 @@ TextRenderer.prototype = {
this._mainToolbar.get_style_context().add_class("np-toolbar");
this._mainToolbar.set_show_arrow(false);
- this._toolbarRun = Utils.createEditButton(this._file, this._mainWindow);
+ this._toolbarRun = Utils.createOpenButton(this._file, this._mainWindow);
this._mainToolbar.insert(this._toolbarRun, 0);
this._mainToolbar.show();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]