[gnome-devel-docs] Replaced tabs with spaces and removed trailing white space.
- From: Tiffany Antopolski <antopolski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-devel-docs] Replaced tabs with spaces and removed trailing white space.
- Date: Tue, 29 May 2012 03:30:50 +0000 (UTC)
commit 49b590e984c34907b3a281c50aeafc5a0eecd2a3
Author: Tiffany Antopolski <tiffany antopolski gmail com>
Date: Mon May 28 23:29:59 2012 -0400
Replaced tabs with spaces and removed trailing white space.
platform-demos/C/samples/GtkApplicationWindow.js | 4 +-
platform-demos/C/samples/button.js | 78 ++++----
platform-demos/C/samples/gmenu.js | 2 +-
platform-demos/C/samples/grid.js | 84 +++++-----
platform-demos/C/samples/label.js | 66 ++++----
platform-demos/C/samples/messagedialog.js | 202 +++++++++++-----------
platform-demos/C/samples/window.js | 2 +-
7 files changed, 219 insertions(+), 219 deletions(-)
---
diff --git a/platform-demos/C/samples/GtkApplicationWindow.js b/platform-demos/C/samples/GtkApplicationWindow.js
index 3c593bd..10c797a 100644
--- a/platform-demos/C/samples/GtkApplicationWindow.js
+++ b/platform-demos/C/samples/GtkApplicationWindow.js
@@ -7,14 +7,14 @@ const Lang = imports.lang;
const Application = new Lang.Class ({
Name: 'Application',
-
+
//create the application
_init: function () {
this.application = new Gtk.Application ({
application_id: 'org.example.myapp',
flags: Gio.ApplicationFlags.FLAGS_NONE
});
-
+
//connect to 'activate' and 'startup' signals to the callback functions
this.application.connect('activate', Lang.bind(this, this._onActivate));
this.application.connect('startup', Lang.bind(this, this._onStartup));
diff --git a/platform-demos/C/samples/button.js b/platform-demos/C/samples/button.js
index 44be8b3..09994ee 100644
--- a/platform-demos/C/samples/button.js
+++ b/platform-demos/C/samples/button.js
@@ -6,59 +6,59 @@ const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
const ButtonExample = new Lang.Class ({
- Name: 'Button Example',
+ Name: 'Button Example',
- /* Create the application itself
- This boilerplate code is needed to build any GTK+ application. */
+ /* Create the application itself
+ This boilerplate code is needed to build any GTK+ application. */
_init: function () {
- this.application = new Gtk.Application ({
- application_id: 'org.example.jsbutton',
- flags: Gio.ApplicationFlags.FLAGS_NONE
- });
+ this.application = new Gtk.Application ({
+ application_id: 'org.example.jsbutton',
+ flags: Gio.ApplicationFlags.FLAGS_NONE
+ });
- // Connect 'activate' and 'startup' signals to the callback functions
- this.application.connect('activate', Lang.bind(this, this._onActivate));
- this.application.connect('startup', Lang.bind(this, this._onStartup));
- },
+ // Connect 'activate' and 'startup' signals to the callback functions
+ this.application.connect('activate', Lang.bind(this, this._onActivate));
+ this.application.connect('startup', Lang.bind(this, this._onStartup));
+ },
- // Callback function for 'activate' signal presents windows when active
- _onActivate: function () {
- this._window.present ();
- },
+ // Callback function for 'activate' signal presents windows when active
+ _onActivate: function () {
+ this._window.present ();
+ },
- // Callback function for 'startup' signal initializes menus and builds the UI
- _onStartup: function () {
- this._buildUI ();
- },
+ // Callback function for 'startup' signal initializes menus and builds the UI
+ _onStartup: function () {
+ this._buildUI ();
+ },
- // Build the application's UI
- _buildUI: function () {
+ // Build the application's UI
+ _buildUI: function () {
- // Create the application window
- this._window = new Gtk.ApplicationWindow ({ application: this.application,
- window_position: Gtk.WindowPosition.CENTER,
- title: "GNOME Button",
- default_height: 50,
- default_width: 250 });
+ // Create the application window
+ this._window = new Gtk.ApplicationWindow ({ application: this.application,
+ window_position: Gtk.WindowPosition.CENTER,
+ title: "GNOME Button",
+ default_height: 50,
+ default_width: 250 });
- // Create the button
- this.Button = new Gtk.Button ({label: "Click Me"});
- this._window.add (this.Button);
+ // Create the button
+ this.Button = new Gtk.Button ({label: "Click Me"});
+ this._window.add (this.Button);
- // Bind it to a function that says what to do when the button is clicked
- this.Button.connect ("clicked", Lang.bind(this, this._clickHandler));
+ // Bind it to a function that says what to do when the button is clicked
+ this.Button.connect ("clicked", Lang.bind(this, this._clickHandler));
- // Show the window and all child widgets
- this._window.show_all();
- },
+ // Show the window and all child widgets
+ this._window.show_all();
+ },
- // Here's the function that says what happens when the button is clicked
- _clickHandler: function () {
- this.Button.set_label ("Clicked!");
- }
+ // Here's the function that says what happens when the button is clicked
+ _clickHandler: function () {
+ this.Button.set_label ("Clicked!");
+ }
});
diff --git a/platform-demos/C/samples/gmenu.js b/platform-demos/C/samples/gmenu.js
index c106308..b218513 100644
--- a/platform-demos/C/samples/gmenu.js
+++ b/platform-demos/C/samples/gmenu.js
@@ -34,7 +34,7 @@ const Application = new Lang.Class ({
},
_showNew: function() {
- print ("This doesn't do anything. It is only a demonstration.");
+ print ("This doesn't do anything. It is only a demonstration.");
},
_showAbout: function() {
diff --git a/platform-demos/C/samples/grid.js b/platform-demos/C/samples/grid.js
index 6a23b2b..3846706 100644
--- a/platform-demos/C/samples/grid.js
+++ b/platform-demos/C/samples/grid.js
@@ -6,63 +6,63 @@ const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
const GridExample = new Lang.Class ({
- Name: 'Grid Example',
+ Name: 'Grid Example',
- /* Create the application itself
- This boilerplate code is needed to build any GTK+ application. */
+ /* Create the application itself
+ This boilerplate code is needed to build any GTK+ application. */
_init: function () {
- this.application = new Gtk.Application ({
- application_id: 'org.example.jsgrid',
- flags: Gio.ApplicationFlags.FLAGS_NONE
- });
+ this.application = new Gtk.Application ({
+ application_id: 'org.example.jsgrid',
+ flags: Gio.ApplicationFlags.FLAGS_NONE
+ });
- // Connect 'activate' and 'startup' signals to the callback functions
- this.application.connect('activate', Lang.bind(this, this._onActivate));
- this.application.connect('startup', Lang.bind(this, this._onStartup));
- },
+ // Connect 'activate' and 'startup' signals to the callback functions
+ this.application.connect('activate', Lang.bind(this, this._onActivate));
+ this.application.connect('startup', Lang.bind(this, this._onStartup));
+ },
- // Callback function for 'activate' signal presents windows when active
- _onActivate: function () {
- this._window.present ();
- },
+ // Callback function for 'activate' signal presents windows when active
+ _onActivate: function () {
+ this._window.present ();
+ },
- // Callback function for 'startup' signal initializes menus and builds the UI
- _onStartup: function () {
- this._buildUI ();
- },
+ // Callback function for 'startup' signal initializes menus and builds the UI
+ _onStartup: function () {
+ this._buildUI ();
+ },
- // Build the application's UI
- _buildUI: function () {
+ // Build the application's UI
+ _buildUI: function () {
- // Create the application window
- this._window = new Gtk.ApplicationWindow ({ application: this.application,
- window_position: Gtk.WindowPosition.CENTER,
- title: "Grid Example"});
+ // Create the application window
+ this._window = new Gtk.ApplicationWindow ({ application: this.application,
+ window_position: Gtk.WindowPosition.CENTER,
+ title: "Grid Example"});
- // Create the grid
- this.Grid = new Gtk.Grid ();
+ // Create the grid
+ this.Grid = new Gtk.Grid ();
- // Create the widgets inside the grid
- this.progressBar = new Gtk.ProgressBar ();
- this.Button = new Gtk.Button ({ label: "Button" });
- this.Button.connect ("clicked", Lang.bind(this, this._clickHandler));
+ // Create the widgets inside the grid
+ this.progressBar = new Gtk.ProgressBar ();
+ this.Button = new Gtk.Button ({ label: "Button" });
+ this.Button.connect ("clicked", Lang.bind(this, this._clickHandler));
- // Assemble the grid
- this._window.add (this.Grid);
- this.Grid.attach (this.Button, 1, 1, 1, 1);
- this.Grid.attach_next_to (this.progressBar, this.Button, Gtk.PositionType.BOTTOM, 1, 1);
+ // Assemble the grid
+ this._window.add (this.Grid);
+ this.Grid.attach (this.Button, 1, 1, 1, 1);
+ this.Grid.attach_next_to (this.progressBar, this.Button, Gtk.PositionType.BOTTOM, 1, 1);
- // Show the window and all child widgets
- this._window.show_all();
- },
+ // Show the window and all child widgets
+ this._window.show_all();
+ },
- // Here's the function that says what happens when the button is clicked
- _clickHandler: function () {
- this.progressBar.pulse ();
- }
+ // Here's the function that says what happens when the button is clicked
+ _clickHandler: function () {
+ this.progressBar.pulse ();
+ }
});
diff --git a/platform-demos/C/samples/label.js b/platform-demos/C/samples/label.js
index 5f01e2b..b6959d7 100644
--- a/platform-demos/C/samples/label.js
+++ b/platform-demos/C/samples/label.js
@@ -6,51 +6,51 @@ const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
const LabelExample = new Lang.Class ({
- Name: 'Label Example',
+ Name: 'Label Example',
- /* Create the application itself
- This boilerplate code is needed to build any GTK+ application. */
+ /* Create the application itself
+ This boilerplate code is needed to build any GTK+ application. */
_init: function () {
- this.application = new Gtk.Application ({
- application_id: 'org.example.jslabel',
- flags: Gio.ApplicationFlags.FLAGS_NONE
- });
+ this.application = new Gtk.Application ({
+ application_id: 'org.example.jslabel',
+ flags: Gio.ApplicationFlags.FLAGS_NONE
+ });
- // Connect 'activate' and 'startup' signals to the callback functions
- this.application.connect('activate', Lang.bind(this, this._onActivate));
- this.application.connect('startup', Lang.bind(this, this._onStartup));
- },
+ // Connect 'activate' and 'startup' signals to the callback functions
+ this.application.connect('activate', Lang.bind(this, this._onActivate));
+ this.application.connect('startup', Lang.bind(this, this._onStartup));
+ },
- // Callback function for 'activate' signal presents windows when active
- _onActivate: function () {
- this._window.present ();
- },
+ // Callback function for 'activate' signal presents windows when active
+ _onActivate: function () {
+ this._window.present ();
+ },
- // Callback function for 'startup' signal initializes menus and builds the UI
- _onStartup: function () {
- this._buildUI ();
- },
+ // Callback function for 'startup' signal initializes menus and builds the UI
+ _onStartup: function () {
+ this._buildUI ();
+ },
- // Build the application's UI
- _buildUI: function () {
+ // Build the application's UI
+ _buildUI: function () {
- // Create the application window
- this._window = new Gtk.ApplicationWindow ({ application: this.application,
- window_position: Gtk.WindowPosition.CENTER,
- title: "Welcome to GNOME",
- default_height: 100,
- default_width: 200 });
+ // Create the application window
+ this._window = new Gtk.ApplicationWindow ({ application: this.application,
+ window_position: Gtk.WindowPosition.CENTER,
+ title: "Welcome to GNOME",
+ default_height: 100,
+ default_width: 200 });
- // Create the label
- this.label = new Gtk.Label ({label: "Hello GNOME!"});
- this._window.add (this.label);
+ // Create the label
+ this.label = new Gtk.Label ({label: "Hello GNOME!"});
+ this._window.add (this.label);
- // Show the window and all child widgets
- this._window.show_all();
- }
+ // Show the window and all child widgets
+ this._window.show_all();
+ }
});
diff --git a/platform-demos/C/samples/messagedialog.js b/platform-demos/C/samples/messagedialog.js
index e81c6b4..e625775 100644
--- a/platform-demos/C/samples/messagedialog.js
+++ b/platform-demos/C/samples/messagedialog.js
@@ -6,109 +6,109 @@ const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
const MessageExample = new Lang.Class ({
- Name: 'Message Example',
+ Name: 'Message Example',
- // Create the application itself
+ // Create the application itself
_init: function () {
- this.application = new Gtk.Application ({
- application_id: 'org.example.jsmessagedialog',
- flags: Gio.ApplicationFlags.FLAGS_NONE
- });
-
- // Connect 'activate' and 'startup' signals to the callback functions
- this.application.connect('activate', Lang.bind(this, this._onActivate));
- this.application.connect('startup', Lang.bind(this, this._onStartup));
- },
-
- // Callback function for 'activate' signal presents windows when active
- _onActivate: function () {
- this._window.present ();
- },
-
- // Callback function for 'startup' signal initializes menus and builds the UI
- _onStartup: function () {
- this._initMenus();
- this._buildUI ();
- },
-
-
-
- // Build the application menu, including the button that calls the dialog
- _initMenus: function() {
- let menu = new Gio.Menu();
- menu.append("Message",'app.message');
- menu.append("Quit",'app.quit');
- this.application.set_app_menu(menu);
-
- // This pops up a MessageDialog when the menu item is clicked
- let messageAction = new Gio.SimpleAction ({ name: 'message' });
- messageAction.connect('activate', Lang.bind(this,
- function() {
- this._showMessageDialog();
- }));
- this.application.add_action(messageAction);
-
- let quitAction = new Gio.SimpleAction ({ name: 'quit' });
- quitAction.connect('activate', Lang.bind(this,
- function() {
- this._window.destroy();
- }));
- this.application.add_action(quitAction);
- },
-
-
-
- // Build the application's UI, including the MessageDialog
- _buildUI: function () {
-
- // Create the application window and a "warning message"
- this._window = new Gtk.ApplicationWindow ({ application: this.application,
- window_position: Gtk.WindowPosition.CENTER,
- title: "Gtk.MessageDialog Example",
- default_height: 200,
- default_width: 400 });
-
- this.warningLabel = new Gtk.Label ({label: "This application goes boom! (Not really.)"});
- this._window.add (this.warningLabel);
-
- // Show the window and all child widgets
- this._window.show_all();
- },
-
-
-
- _showMessageDialog: function () {
-
- // Create a modal MessageDialog whose parent is the window
- this._messageDialog = new Gtk.MessageDialog ({ transient_for: this._window,
- modal: true,
- buttons: Gtk.ButtonsType.OK_CANCEL,
- message_type: Gtk.MessageType.WARNING,
- text: "This action will cause the universe to stop existing." });
-
- this._messageDialog.connect ("response", Lang.bind(this, this._response_cb));
- this._messageDialog.show();
- },
-
-
-
- // Callback function (aka signal handler) for the response signal
- _response_cb: function (messagedialog, response_id) {
-
- // A simple switch that changes the main window's label
- switch (response_id) {
- case Gtk.ResponseType.OK:
- this.warningLabel.set_label ("*BOOM*\n");
- break;
- case Gtk.ResponseType.CANCEL:
- this.warningLabel.set_label ("Good choice!\n");
- break;
- case Gtk.ResponseType.DELETE_EVENT:
- this.warningLabel.set_label ("Dialog closed or cancelled.\n");
- break;
- }
- this._messageDialog.destroy();
- }
+ this.application = new Gtk.Application ({
+ application_id: 'org.example.jsmessagedialog',
+ flags: Gio.ApplicationFlags.FLAGS_NONE
+ });
+
+ // Connect 'activate' and 'startup' signals to the callback functions
+ this.application.connect('activate', Lang.bind(this, this._onActivate));
+ this.application.connect('startup', Lang.bind(this, this._onStartup));
+ },
+
+ // Callback function for 'activate' signal presents windows when active
+ _onActivate: function () {
+ this._window.present ();
+ },
+
+ // Callback function for 'startup' signal initializes menus and builds the UI
+ _onStartup: function () {
+ this._initMenus();
+ this._buildUI ();
+ },
+
+
+
+ // Build the application menu, including the button that calls the dialog
+ _initMenus: function() {
+ let menu = new Gio.Menu();
+ menu.append("Message",'app.message');
+ menu.append("Quit",'app.quit');
+ this.application.set_app_menu(menu);
+
+ // This pops up a MessageDialog when the menu item is clicked
+ let messageAction = new Gio.SimpleAction ({ name: 'message' });
+ messageAction.connect('activate', Lang.bind(this,
+ function() {
+ this._showMessageDialog();
+ }));
+ this.application.add_action(messageAction);
+
+ let quitAction = new Gio.SimpleAction ({ name: 'quit' });
+ quitAction.connect('activate', Lang.bind(this,
+ function() {
+ this._window.destroy();
+ }));
+ this.application.add_action(quitAction);
+ },
+
+
+
+ // Build the application's UI, including the MessageDialog
+ _buildUI: function () {
+
+ // Create the application window and a "warning message"
+ this._window = new Gtk.ApplicationWindow ({ application: this.application,
+ window_position: Gtk.WindowPosition.CENTER,
+ title: "Gtk.MessageDialog Example",
+ default_height: 200,
+ default_width: 400 });
+
+ this.warningLabel = new Gtk.Label ({label: "This application goes boom! (Not really.)"});
+ this._window.add (this.warningLabel);
+
+ // Show the window and all child widgets
+ this._window.show_all();
+ },
+
+
+
+ _showMessageDialog: function () {
+
+ // Create a modal MessageDialog whose parent is the window
+ this._messageDialog = new Gtk.MessageDialog ({ transient_for: this._window,
+ modal: true,
+ buttons: Gtk.ButtonsType.OK_CANCEL,
+ message_type: Gtk.MessageType.WARNING,
+ text: "This action will cause the universe to stop existing." });
+
+ this._messageDialog.connect ("response", Lang.bind(this, this._response_cb));
+ this._messageDialog.show();
+ },
+
+
+
+ // Callback function (aka signal handler) for the response signal
+ _response_cb: function (messagedialog, response_id) {
+
+ // A simple switch that changes the main window's label
+ switch (response_id) {
+ case Gtk.ResponseType.OK:
+ this.warningLabel.set_label ("*BOOM*\n");
+ break;
+ case Gtk.ResponseType.CANCEL:
+ this.warningLabel.set_label ("Good choice!\n");
+ break;
+ case Gtk.ResponseType.DELETE_EVENT:
+ this.warningLabel.set_label ("Dialog closed or cancelled.\n");
+ break;
+ }
+ this._messageDialog.destroy();
+ }
});
diff --git a/platform-demos/C/samples/window.js b/platform-demos/C/samples/window.js
index 9acf741..320405e 100644
--- a/platform-demos/C/samples/window.js
+++ b/platform-demos/C/samples/window.js
@@ -7,7 +7,7 @@ const Lang = imports.lang;
const Application = new Lang.Class ({
Name: 'Application',
-
+
//create the application
_init: function () {
this.application = new Gtk.Application ({
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]