/usr/share/kde4/apps/plasma-desktop/updates/50-renameKTpApplets.js is in kde-telepathy-desktop-applets 0.8.0-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | /*
* KTp Applets Migration Script
*
* Copyright (C) 2013 Dan Vrátil <dvratil@redhat.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*
*
* After migrating all Plasma applets to ktp-desktop-applets repository,
* we renamed the to conform our naming policy. All applets are now called
* org.kde.ktp-%appletname%.
* This scripts replaces the old applets by new ones in order to make this
* transition seemless for users.
*/
var template = loadTemplate('org.kde.plasma-desktop.findWidgets')
function createWidget(widget, containment, newWidgetType)
{
var wasLocked = containment.locked;
containment.locked = false;
var newWidget = containment.addWidget(newWidgetType);
newWidget.geometry = widget.geometry;
newWidget.index = widget.index;
newWidget.globalShortcut = widget.shortcut;
for (i = 0; i < widget.configKeys.length; i++) {
var key = widget.configKeys[i];
newWidget.writeConfig(key, widget.readConfig(key));
}
newWidget.locked = widget.locked;
widget.locked = false;
widget.remove();
containment.locked = wasLocked;
}
/* Unlock widgets */
var wasLocked = locked;
locked = false;
template.findWidgets("org.kde.ktp-chatplasmoid", replaceChatPlasmoid);
template.findWidgets("org.kde.ktp.contactlist", replaceContactlist);
template.findWidgets("ktp_presence", replacePresence);
template.findWidgets("ktp_contact", replaceContact);
function replaceChatPlasmoid(widget, containment)
{
createWidget(widget, containment, "org.kde.ktp-chat");
}
function replaceContactlist(widget, containment)
{
createWidget(widget, containment, "org.kde.ktp-contactlist");
}
function replacePresence(widget, containment)
{
createWidget(widget, containment, "org.kde.ktp-presence");
}
function replaceContact(widget, containment)
{
createWidget(widget, containment, "org.kde.ktp-contact");
}
locked = wasLocked;
|