Clean up underscores in function and variable names

Try to fix all places where we accidentally used foo_bar instead
of fooBar for function names, function parameters, and variables.

(Lucas Rocha pointed out one example.)

http://bugzilla.gnome.org/show_bug.cgi?id=581141
This commit is contained in:
Owen W. Taylor 2009-05-02 18:33:13 -04:00
parent 63eea7dc20
commit 20e755023b
7 changed files with 40 additions and 40 deletions

View File

@ -85,7 +85,7 @@ AppDisplayItem.prototype = {
// Opens an application represented by this display item. // Opens an application represented by this display item.
launch : function() { launch : function() {
this._appInfo.launch([], Main.create_app_launch_context()); this._appInfo.launch([], Main.createAppLaunchContext());
}, },
//// Protected method overrides //// //// Protected method overrides ////
@ -120,8 +120,8 @@ const MENU_UNSELECTED = 0;
const MENU_SELECTED = 1; const MENU_SELECTED = 1;
const MENU_ENTERED = 2; const MENU_ENTERED = 2;
function MenuItem(name, id, icon_name) { function MenuItem(name, id, iconName) {
this._init(name, id, icon_name); this._init(name, id, iconName);
} }
/** /**
@ -129,7 +129,7 @@ function MenuItem(name, id, icon_name) {
* Shows the list of menus in the sidebar. * Shows the list of menus in the sidebar.
*/ */
MenuItem.prototype = { MenuItem.prototype = {
_init: function(name, id, icon_name) { _init: function(name, id, iconName) {
this.id = id; this.id = id;
this.actor = new Big.Box({ orientation: Big.BoxOrientation.HORIZONTAL, this.actor = new Big.Box({ orientation: Big.BoxOrientation.HORIZONTAL,
@ -147,7 +147,7 @@ MenuItem.prototype = {
height: MENU_ICON_SIZE }); height: MENU_ICON_SIZE });
// Wine manages not to have an icon // Wine manages not to have an icon
try { try {
pixbuf = iconTheme.load_icon(icon_name, MENU_ICON_SIZE, 0 /* flags */); pixbuf = iconTheme.load_icon(iconName, MENU_ICON_SIZE, 0 /* flags */);
} catch (e) { } catch (e) {
pixbuf = iconTheme.load_icon('gtk-file', MENU_ICON_SIZE, 0); pixbuf = iconTheme.load_icon('gtk-file', MENU_ICON_SIZE, 0);
} }

View File

@ -86,7 +86,7 @@ DocDisplayItem.prototype = {
// reading the application's desktop file, and thus don't find the // reading the application's desktop file, and thus don't find the
// StartupNotify=true in it. So, despite passing the app launch context, // StartupNotify=true in it. So, despite passing the app launch context,
// no startup notification occurs. // no startup notification occurs.
appInfo.launch([], Main.create_app_launch_context()); appInfo.launch([], Main.createAppLaunchContext());
} else { } else {
log("Failed to get application info for " + this._docInfo.get_uri()); log("Failed to get application info for " + this._docInfo.get_uri());
} }

View File

@ -50,14 +50,14 @@ function start() {
// Make sure not more than one run dialog is shown. // Make sure not more than one run dialog is shown.
if (!runDialog) { if (!runDialog) {
runDialog = new RunDialog.RunDialog(); runDialog = new RunDialog.RunDialog();
let end_handler = function() { let endHandler = function() {
runDialog.destroy(); runDialog.destroy();
runDialog = null; runDialog = null;
}; };
runDialog.connect('run', end_handler); runDialog.connect('run', endHandler);
runDialog.connect('cancel', end_handler); runDialog.connect('cancel', endHandler);
if (!runDialog.show()) if (!runDialog.show())
end_handler(); endHandler();
} }
}); });
@ -69,9 +69,9 @@ function start() {
let display = global.screen.get_display(); let display = global.screen.get_display();
let toggleOverlay = function(display) { let toggleOverlay = function(display) {
if (overlay.visible) { if (overlay.visible) {
hide_overlay(); hideOverlay();
} else { } else {
show_overlay(); showOverlay();
} }
}; };
@ -154,20 +154,20 @@ function endModal() {
inModal = false; inModal = false;
} }
function show_overlay() { function showOverlay() {
if (startModal()) { if (startModal()) {
overlayActive = true; overlayActive = true;
overlay.show(); overlay.show();
} }
} }
function hide_overlay() { function hideOverlay() {
overlay.hide(); overlay.hide();
overlayActive = false; overlayActive = false;
endModal(); endModal();
} }
function create_app_launch_context() { function createAppLaunchContext() {
let global = Shell.Global.get(); let global = Shell.Global.get();
let screen = global.screen; let screen = global.screen;
let display = screen.get_display(); let display = screen.get_display();

View File

@ -922,7 +922,7 @@ Overlay.prototype = {
}, },
_deactivate : function() { _deactivate : function() {
Main.hide_overlay(); Main.hideOverlay();
} }
}; };

View File

@ -152,9 +152,9 @@ Panel.prototype = {
this.button.button.connect('button-press-event', this.button.button.connect('button-press-event',
function(o, event) { function(o, event) {
if (Main.overlay.visible) if (Main.overlay.visible)
Main.hide_overlay(); Main.hideOverlay();
else else
Main.show_overlay(); Main.showOverlay();
return true; return true;
}); });
@ -211,15 +211,15 @@ Panel.prototype = {
_updateClock: function() { _updateClock: function() {
let me = this; let me = this;
let display_date = new Date(); let displayDate = new Date();
let msec_remaining = 60000 - (1000 * display_date.getSeconds() + let msecRemaining = 60000 - (1000 * displayDate.getSeconds() +
display_date.getMilliseconds()); displayDate.getMilliseconds());
if (msec_remaining < 500) { if (msecRemaining < 500) {
display_date.setMinutes(display_date.getMinutes() + 1); displayDate.setMinutes(displayDate.getMinutes() + 1);
msec_remaining += 60000; msecRemaining += 60000;
} }
this._clock.set_text(display_date.toLocaleFormat("%a %b %e, %l:%M %p")); this._clock.set_text(displayDate.toLocaleFormat("%a %b %e, %l:%M %p"));
Mainloop.timeout_add(msec_remaining, function() { Mainloop.timeout_add(msecRemaining, function() {
me._updateClock(); me._updateClock();
return false; return false;
}); });

View File

@ -145,7 +145,7 @@ WindowManager.prototype = {
} }
}, },
_maximizeWindow : function(actor, target_x, target_y, target_width, target_height) { _maximizeWindow : function(actor, targetX, targetY, targetWidth, targetHeight) {
if (!this._shouldAnimate(actor)) { if (!this._shouldAnimate(actor)) {
this._shellwm.completed_maximize(actor); this._shellwm.completed_maximize(actor);
return; return;
@ -155,17 +155,17 @@ WindowManager.prototype = {
* window contents doesn't produce anything like the same results as * window contents doesn't produce anything like the same results as
* actually maximizing the window. * actually maximizing the window.
*/ */
let scale_x = target_width / actor.width; let scaleX = targetWidth / actor.width;
let scale_y = target_height / actor.height; let scaleY = targetHeight / actor.height;
let anchor_x = (actor.x - target_x) * actor.width/(target_width - actor.width); let anchorX = (actor.x - targetX) * actor.width/(targetWidth - actor.width);
let anchor_y = (actor.y - target_y) * actor.height/(target_height - actor.height); let anchorY = (actor.y - targetY) * actor.height/(targetHeight - actor.height);
actor.move_anchor_point(anchor_x, anchor_y); actor.move_anchor_point(anchorX, anchorY);
this._maximizing.push(actor); this._maximizing.push(actor);
Tweener.addTween(actor, Tweener.addTween(actor,
{ scale_x: scale_x, { scale_x: scaleX,
scale_y: scale_y, scale_y: scaleY,
time: WINDOW_ANIMATION_TIME, time: WINDOW_ANIMATION_TIME,
transition: "easeOutQuad", transition: "easeOutQuad",
onComplete: this._maximizeWindowDone, onComplete: this._maximizeWindowDone,
@ -192,7 +192,7 @@ WindowManager.prototype = {
} }
}, },
_unmaximizeWindow : function(actor, target_x, target_y, target_width, target_height) { _unmaximizeWindow : function(actor, targetX, targetY, targetWidth, targetHeight) {
this._shellwm.completed_unmaximize(actor); this._shellwm.completed_unmaximize(actor);
}, },

View File

@ -292,7 +292,7 @@ Workspace.prototype = {
Lang.bind(this, Lang.bind(this,
function(clone, time) { function(clone, time) {
this._metaWorkspace.activate(time); this._metaWorkspace.activate(time);
Main.hide_overlay(); Main.hideOverlay();
})); }));
this.actor.add_actor(this._desktop.actor); this.actor.add_actor(this._desktop.actor);
@ -721,7 +721,7 @@ Workspace.prototype = {
workspace.activate_with_focus(clone.metaWindow, time); workspace.activate_with_focus(clone.metaWindow, time);
} else } else
clone.metaWindow.activate(time); clone.metaWindow.activate(time);
Main.hide_overlay(); Main.hideOverlay();
}, },
_removeSelf : function(actor, event) { _removeSelf : function(actor, event) {
@ -1040,9 +1040,9 @@ Workspaces.prototype = {
// Create a SpecialPropertyModifier to let us move windows in a // Create a SpecialPropertyModifier to let us move windows in a
// straight line on the screen even though their containing workspace // straight line on the screen even though their containing workspace
// is also moving. // is also moving.
Tweener.registerSpecialPropertyModifier("workspace_relative", _workspace_relative_modifier, _workspace_relative_get); Tweener.registerSpecialPropertyModifier("workspace_relative", _workspaceRelativeModifier, _workspaceRelativeGet);
function _workspace_relative_modifier(workspace) { function _workspaceRelativeModifier(workspace) {
let endX, endY; let endX, endY;
if (!workspace) if (!workspace)
@ -1065,6 +1065,6 @@ function _workspace_relative_modifier(workspace) {
]; ];
} }
function _workspace_relative_get(begin, end, time, params) { function _workspaceRelativeGet(begin, end, time, params) {
return (begin + params.begin) + time * (end + params.end - (begin + params.begin)) - params.cur(); return (begin + params.begin) + time * (end + params.end - (begin + params.begin)) - params.cur();
} }