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.
launch : function() {
this._appInfo.launch([], Main.create_app_launch_context());
this._appInfo.launch([], Main.createAppLaunchContext());
},
//// Protected method overrides ////
@ -120,8 +120,8 @@ const MENU_UNSELECTED = 0;
const MENU_SELECTED = 1;
const MENU_ENTERED = 2;
function MenuItem(name, id, icon_name) {
this._init(name, id, icon_name);
function MenuItem(name, id, iconName) {
this._init(name, id, iconName);
}
/**
@ -129,7 +129,7 @@ function MenuItem(name, id, icon_name) {
* Shows the list of menus in the sidebar.
*/
MenuItem.prototype = {
_init: function(name, id, icon_name) {
_init: function(name, id, iconName) {
this.id = id;
this.actor = new Big.Box({ orientation: Big.BoxOrientation.HORIZONTAL,
@ -147,7 +147,7 @@ MenuItem.prototype = {
height: MENU_ICON_SIZE });
// Wine manages not to have an icon
try {
pixbuf = iconTheme.load_icon(icon_name, MENU_ICON_SIZE, 0 /* flags */);
pixbuf = iconTheme.load_icon(iconName, MENU_ICON_SIZE, 0 /* flags */);
} catch (e) {
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
// StartupNotify=true in it. So, despite passing the app launch context,
// no startup notification occurs.
appInfo.launch([], Main.create_app_launch_context());
appInfo.launch([], Main.createAppLaunchContext());
} else {
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.
if (!runDialog) {
runDialog = new RunDialog.RunDialog();
let end_handler = function() {
let endHandler = function() {
runDialog.destroy();
runDialog = null;
};
runDialog.connect('run', end_handler);
runDialog.connect('cancel', end_handler);
runDialog.connect('run', endHandler);
runDialog.connect('cancel', endHandler);
if (!runDialog.show())
end_handler();
endHandler();
}
});
@ -69,9 +69,9 @@ function start() {
let display = global.screen.get_display();
let toggleOverlay = function(display) {
if (overlay.visible) {
hide_overlay();
hideOverlay();
} else {
show_overlay();
showOverlay();
}
};
@ -154,20 +154,20 @@ function endModal() {
inModal = false;
}
function show_overlay() {
function showOverlay() {
if (startModal()) {
overlayActive = true;
overlay.show();
}
}
function hide_overlay() {
function hideOverlay() {
overlay.hide();
overlayActive = false;
endModal();
}
function create_app_launch_context() {
function createAppLaunchContext() {
let global = Shell.Global.get();
let screen = global.screen;
let display = screen.get_display();

View File

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

View File

@ -152,9 +152,9 @@ Panel.prototype = {
this.button.button.connect('button-press-event',
function(o, event) {
if (Main.overlay.visible)
Main.hide_overlay();
Main.hideOverlay();
else
Main.show_overlay();
Main.showOverlay();
return true;
});
@ -211,15 +211,15 @@ Panel.prototype = {
_updateClock: function() {
let me = this;
let display_date = new Date();
let msec_remaining = 60000 - (1000 * display_date.getSeconds() +
display_date.getMilliseconds());
if (msec_remaining < 500) {
display_date.setMinutes(display_date.getMinutes() + 1);
msec_remaining += 60000;
let displayDate = new Date();
let msecRemaining = 60000 - (1000 * displayDate.getSeconds() +
displayDate.getMilliseconds());
if (msecRemaining < 500) {
displayDate.setMinutes(displayDate.getMinutes() + 1);
msecRemaining += 60000;
}
this._clock.set_text(display_date.toLocaleFormat("%a %b %e, %l:%M %p"));
Mainloop.timeout_add(msec_remaining, function() {
this._clock.set_text(displayDate.toLocaleFormat("%a %b %e, %l:%M %p"));
Mainloop.timeout_add(msecRemaining, function() {
me._updateClock();
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)) {
this._shellwm.completed_maximize(actor);
return;
@ -155,17 +155,17 @@ WindowManager.prototype = {
* window contents doesn't produce anything like the same results as
* actually maximizing the window.
*/
let scale_x = target_width / actor.width;
let scale_y = target_height / actor.height;
let anchor_x = (actor.x - target_x) * actor.width/(target_width - actor.width);
let anchor_y = (actor.y - target_y) * actor.height/(target_height - actor.height);
let scaleX = targetWidth / actor.width;
let scaleY = targetHeight / actor.height;
let anchorX = (actor.x - targetX) * actor.width/(targetWidth - actor.width);
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);
Tweener.addTween(actor,
{ scale_x: scale_x,
scale_y: scale_y,
{ scale_x: scaleX,
scale_y: scaleY,
time: WINDOW_ANIMATION_TIME,
transition: "easeOutQuad",
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);
},

View File

@ -292,7 +292,7 @@ Workspace.prototype = {
Lang.bind(this,
function(clone, time) {
this._metaWorkspace.activate(time);
Main.hide_overlay();
Main.hideOverlay();
}));
this.actor.add_actor(this._desktop.actor);
@ -721,7 +721,7 @@ Workspace.prototype = {
workspace.activate_with_focus(clone.metaWindow, time);
} else
clone.metaWindow.activate(time);
Main.hide_overlay();
Main.hideOverlay();
},
_removeSelf : function(actor, event) {
@ -1040,9 +1040,9 @@ Workspaces.prototype = {
// Create a SpecialPropertyModifier to let us move windows in a
// straight line on the screen even though their containing workspace
// 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;
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();
}