[KSS-checkins] r42433 - in kukit/firekiss: . trunk trunk/content trunk/locale trunk/locale/en-US trunk/skin

gotcha at codespeak.net gotcha at codespeak.net
Sun Apr 29 18:55:56 CEST 2007


Author: gotcha
Date: Sun Apr 29 18:55:55 2007
New Revision: 42433

Added:
   kukit/firekiss/
   kukit/firekiss/trunk/
   kukit/firekiss/trunk/chrome.manifest   (contents, props changed)
   kukit/firekiss/trunk/content/
   kukit/firekiss/trunk/content/firebugOverlay.xul   (contents, props changed)
   kukit/firekiss/trunk/content/firekiss-panel.js
   kukit/firekiss/trunk/content/firekiss.xul
   kukit/firekiss/trunk/install.rdf   (contents, props changed)
   kukit/firekiss/trunk/locale/
   kukit/firekiss/trunk/locale/en-US/
   kukit/firekiss/trunk/locale/en-US/firekiss.properties
   kukit/firekiss/trunk/locale/en-US/hello.dtd   (contents, props changed)
   kukit/firekiss/trunk/locale/en-US/overlay.dtd   (contents, props changed)
   kukit/firekiss/trunk/skin/
   kukit/firekiss/trunk/skin/overlay.css   (contents, props changed)
Log:
first import


Added: kukit/firekiss/trunk/chrome.manifest
==============================================================================
--- (empty file)
+++ kukit/firekiss/trunk/chrome.manifest	Sun Apr 29 18:55:55 2007
@@ -0,0 +1,6 @@
+content	firekiss	content/
+overlay chrome://firebug/content/firebugOverlay.xul chrome://firekiss/content/firebugOverlay.xul 
+
+locale	firekiss	en-US	locale/en-US/
+
+skin	firekiss	classic/1.0	skin/

Added: kukit/firekiss/trunk/content/firebugOverlay.xul
==============================================================================
--- (empty file)
+++ kukit/firekiss/trunk/content/firebugOverlay.xul	Sun Apr 29 18:55:55 2007
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://firekiss/skin/overlay.css" type="text/css"?>
+<!DOCTYPE overlay SYSTEM "chrome://firekiss/locale/overlay.dtd">
+<overlay id="firekiss-overlay"
+         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+  <script src="firekiss-panel.js"/>
+
+  <stringbundleset id="stringbundleset"> 
+        <stringbundle id="strings_firekiss" src="chrome://firekiss/locale/firekiss.properties"/>
+  </stringbundleset>
+    
+    <commandset id="mainCommandSet">
+        <command id="cmd_openFirekissSeparate"
+                 oncommand="Firekiss.separateWindow()"/>
+    </commandset>
+
+    <toolbar id="fbToolbar" align="center">
+        <hbox id="fbToolbarInner">            
+            <hbox id="fbKSSButtons" insertafter="fbNetButtons">
+                <toolbarbutton label="&fkButton;" class="toolbar-text-button"
+                               tooltiptext="&fkTooltip;" command="cmd_openFirekissSeparate"/>
+            </hbox>
+        </hbox>
+    </toolbar>
+
+</overlay>

Added: kukit/firekiss/trunk/content/firekiss-panel.js
==============================================================================
--- (empty file)
+++ kukit/firekiss/trunk/content/firekiss-panel.js	Sun Apr 29 18:55:55 2007
@@ -0,0 +1,236 @@
+/*
+* Copyright (c) 2005-2006
+* Authors:
+*   Godefroid Chapelle <gotcha at bubblenet.be>
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License version 2 as published
+* by the Free Software Foundation.
+*
+* This program 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+* 02111-1307, USA.
+*/
+
+function FK$STR(name)
+{
+    try {
+        result = document.getElementById("strings_firebug").getString(name);
+    }
+    catch(e) {
+        result = document.getElementById("strings_firekiss").getString(name);
+    }
+    return result;
+}
+
+top.Firekiss =
+{
+    separateWindow : function()
+    {
+    window.open("chrome://firekiss/content/firekiss.xul", "", "chrome");
+    },
+}
+
+
+FBL.$STR = FK$STR;
+
+FBL.ns(function() { with (FBL) {
+
+// ************************************************************************************************
+
+Firebug.Firekiss = extend(Firebug.Module,
+{
+
+    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
+    // extends Module
+
+    showContext: function(browser, context)
+    {
+    },
+
+    showPanel: function(browser, panel)
+    {
+        var kssButtons = browser.chrome.$("fbKSSButtons");
+        collapse(kssButtons, !panel || panel.name != "kss");
+    },
+    
+    initialize: function() 
+    {
+    	dump("firebug-kss-panel.Module.initialize()\n");
+    }
+});
+
+// ************************************************************************************************
+
+function KSSheet(href) {
+    this.href = href;
+}
+
+KSSheet.prototype = {
+}   
+
+// ************************************************************************************************
+
+function KSSPanel() {
+    this.kineticSheets = [];
+}
+
+KSSPanel.prototype = domplate(Firebug.Panel,
+{
+    kssTag: H1($STR('Kiss')),
+	name: "kss", 
+	title: "KSS", 
+
+    kiss: function()
+    {
+    Firekiss.separateWindow();
+    },
+
+
+    initializeKineticSheets: function()
+    {
+        this.kineticSheets = [];
+        var kukit =
+            this.context.window.kukit;
+        if (!kukit || !kukit.engine)
+            return [];
+        else
+            {
+            var kineticSheets =
+                this.context.window.kukit.engine.getRuleSheetLinks();
+            for (var i = 0; i < kineticSheets.length; ++i)
+                this.addSheet(new KSSheet(kineticSheets[i].href));
+            }
+    },
+
+    addSheet: function(sheet)
+    {
+            this.kineticSheets.push(sheet);
+            
+            /*for (var i = 0; i < sheet.cssRules.length; ++i)
+            {
+                var rule = sheet.cssRules[i];
+                if (rule instanceof CSSImportRule)
+                    addSheet(rule.styleSheet);
+            }*/
+    },
+
+
+    
+    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *    
+    // extends Panel
+    
+    searchable: true,
+    editable: false,
+    
+    /*initialize: function()
+    {
+        Firebug.Panel.initialize.apply(this, arguments);
+    },*/
+    
+    
+    show: function(state)
+    {
+        if (this.context.loaded && !this.location)
+        {
+            restoreObjects(this, state);
+
+            if (state && state.scrollTop)
+                this.panelNode.scrollTop = state.scrollTop;
+        }
+        
+        this.kss = this.kssTag.replace({}, this.panelNode, this);
+    },
+    
+    hide: function()
+    {
+    },
+
+    getContextMenuItems: function(object, target)
+    {
+        var items = [];
+        
+        items.push(
+            {label: "Kiss", command: bindFixed(this.kiss, this) }
+        );
+        
+        return items;
+    },
+
+    getOptionsMenuItems: function()
+    {
+        return [
+        ];
+    },
+    
+    getLocationList: function()
+    {
+        this.initializeKineticSheets();
+        return this.kineticSheets;
+    },
+
+    getDefaultLocation: function()
+    {
+   /*     if (!this.kssLoaded)
+            return null; */
+
+        this.initializeKineticSheets();
+        return this.kineticSheets[0];
+    },
+
+    getObjectLocation: function(kineticSheet)
+    {
+        return kineticSheet.href;
+    },
+    
+    updateLocation: function(kineticSheet)
+    {
+        /*if (styleSheet.editStyleSheet)
+            styleSheet = styleSheet.editStyleSheet.sheet;
+        
+        var rules = this.getStyleSheetRules(this.context, styleSheet);
+        if (rules.length)
+            this.template.tag.replace({rules: rules}, this.panelNode);
+        else
+            FirebugReps.Warning.tag.replace({object: "EmptyStyleSheet"}, this.panelNode);*/
+    },
+    
+    updateSelection: function(object)
+    {
+        this.selection = null;
+        
+        this.navigate();
+
+        /*if (object instanceof CSSStyleRule)
+        {
+            this.navigate(object.parentStyleSheet);
+            this.highlightRule(object);
+        }
+        else if (object instanceof CSSStyleSheet)
+        {
+            this.navigate(object);
+        }
+        else if (object instanceof SourceLink)
+        {
+            var styleSheet = getStyleSheetByHref(object.href, this.context);
+            this.navigate(styleSheet);
+
+            var rule = this.getRuleByLine(styleSheet, object.line);
+            if (rule)
+                this.highlightRule(rule);                
+        }*/
+    },
+    
+    
+});
+
+Firebug.registerModule(Firebug.Firekiss);
+Firebug.registerPanel(KSSPanel);
+
+}});

Added: kukit/firekiss/trunk/content/firekiss.xul
==============================================================================
--- (empty file)
+++ kukit/firekiss/trunk/content/firekiss.xul	Sun Apr 29 18:55:55 2007
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
+<!DOCTYPE window SYSTEM "chrome://firekiss/locale/hello.dtd">
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 
+        title="&title.label;">
+
+<hbox align="center">
+  <description flex="1">&separate.label;</description>
+  <button label="&close.label;" oncommand="close();"/>
+</hbox>
+
+</window>

Added: kukit/firekiss/trunk/install.rdf
==============================================================================
--- (empty file)
+++ kukit/firekiss/trunk/install.rdf	Sun Apr 29 18:55:55 2007
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
+     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+
+  <Description about="urn:mozilla:install-manifest">
+  
+    <em:id>firekiss at kssproject.org</em:id>
+    <em:name>FireKiSS</em:name>
+    <em:version>1.0</em:version>
+    <em:description>KSS development extension with Firebug</em:description>
+    <em:creator>Godefroid Chapelle</em:creator>
+    <!-- optional items -->
+    <!--em:contributor>A person who helped you</em:contributor>
+    <em:contributor>Another one</em:contributor-->
+    <em:homepageURL>http://kssproject.org</em:homepageURL>
+    <!--em:optionsURL>chrome://sampleext/content/settings.xul</em:optionsURL>
+    <em:aboutURL>chrome://sampleext/content/about.xul</em:aboutURL>
+    <em:iconURL>chrome://sampleext/skin/mainicon.png</em:iconURL>
+    <em:updateURL>http://sampleextension.mozdev.org/update.rdf</em:updateURL-->
+
+    <!-- Firefox -->
+    <em:targetApplication>
+      <Description>
+        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+        <em:minVersion>1.5</em:minVersion>
+        <em:maxVersion>2.0.*</em:maxVersion>
+      </Description>
+    </em:targetApplication>
+
+  </Description>
+
+</RDF>

Added: kukit/firekiss/trunk/locale/en-US/firekiss.properties
==============================================================================
--- (empty file)
+++ kukit/firekiss/trunk/locale/en-US/firekiss.properties	Sun Apr 29 18:55:55 2007
@@ -0,0 +1 @@
+Kiss=Kiss Fire

Added: kukit/firekiss/trunk/locale/en-US/hello.dtd
==============================================================================
--- (empty file)
+++ kukit/firekiss/trunk/locale/en-US/hello.dtd	Sun Apr 29 18:55:55 2007
@@ -0,0 +1,3 @@
+<!ENTITY title.label "Firekiss">
+<!ENTITY separate.label "Debug KSS">
+<!ENTITY close.label "Close">

Added: kukit/firekiss/trunk/locale/en-US/overlay.dtd
==============================================================================
--- (empty file)
+++ kukit/firekiss/trunk/locale/en-US/overlay.dtd	Sun Apr 29 18:55:55 2007
@@ -0,0 +1,2 @@
+<!ENTITY fkButton "Open">
+<!ENTITY fkTooltip "Open separate window">

Added: kukit/firekiss/trunk/skin/overlay.css
==============================================================================
--- (empty file)
+++ kukit/firekiss/trunk/skin/overlay.css	Sun Apr 29 18:55:55 2007
@@ -0,0 +1 @@
+/* empty for now */


More information about the Kukit-checkins mailing list