|
From: <kro...@us...> - 2011-03-27 19:59:09
|
Revision: 4154
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4154&view=rev
Author: kroko_koenig
Date: 2011-03-27 19:59:02 +0000 (Sun, 27 Mar 2011)
Log Message:
-----------
add chrome import
Modified Paths:
--------------
trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BrowseTheWeb.csproj
trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BrowseTheWeb.csproj.user
trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Setup.Designer.cs
trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Setup.cs
trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Setup.resx
Added Paths:
-----------
trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/ImportChrome.Designer.cs
trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/ImportChrome.cs
trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/ImportChrome.resx
Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BrowseTheWeb.csproj
===================================================================
--- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BrowseTheWeb.csproj 2011-03-26 09:50:29 UTC (rev 4153)
+++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BrowseTheWeb.csproj 2011-03-27 19:59:02 UTC (rev 4154)
@@ -22,7 +22,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
- <PlatformTarget>x86</PlatformTarget>
+ <PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -113,6 +113,12 @@
<Compile Include="ImportFF.Designer.cs">
<DependentUpon>ImportFF.cs</DependentUpon>
</Compile>
+ <Compile Include="ImportChrome.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="ImportChrome.Designer.cs">
+ <DependentUpon>ImportChrome.cs</DependentUpon>
+ </Compile>
<Compile Include="Mouse.cs">
<SubType>UserControl</SubType>
</Compile>
@@ -183,6 +189,10 @@
<DependentUpon>ImportFF.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
+ <EmbeddedResource Include="ImportChrome.resx">
+ <DependentUpon>ImportChrome.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
<EmbeddedResource Include="Mouse.resx">
<DependentUpon>Mouse.cs</DependentUpon>
<SubType>Designer</SubType>
Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BrowseTheWeb.csproj.user
===================================================================
--- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BrowseTheWeb.csproj.user 2011-03-26 09:50:29 UTC (rev 4153)
+++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BrowseTheWeb.csproj.user 2011-03-27 19:59:02 UTC (rev 4154)
@@ -1,9 +1,9 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<StartAction>Program</StartAction>
- <StartProgram>C:\Program Files\Team MediaPortal\MediaPortal\MediaPortal.exe</StartProgram>
+ <StartProgram>C:\Program Files\Team MediaPortal\MediaPortal\Configuration.exe</StartProgram>
</PropertyGroup>
<PropertyGroup>
- <ProjectView>ShowAllFiles</ProjectView>
+ <ProjectView>ProjectFiles</ProjectView>
</PropertyGroup>
</Project>
\ No newline at end of file
Added: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/ImportChrome.Designer.cs
===================================================================
--- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/ImportChrome.Designer.cs (rev 0)
+++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/ImportChrome.Designer.cs 2011-03-27 19:59:02 UTC (rev 4154)
@@ -0,0 +1,143 @@
+namespace BrowseTheWeb
+{
+ partial class ImportChrome
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.listBox1 = new System.Windows.Forms.ListBox();
+ this.btnImport = new System.Windows.Forms.Button();
+ this.label1 = new System.Windows.Forms.Label();
+ this.btnSelect = new System.Windows.Forms.Button();
+ this.btnCancel = new System.Windows.Forms.Button();
+ this.prgState = new System.Windows.Forms.ProgressBar();
+ this.chkThumbs = new System.Windows.Forms.CheckBox();
+ this.SuspendLayout();
+ //
+ // listBox1
+ //
+ this.listBox1.FormattingEnabled = true;
+ this.listBox1.Location = new System.Drawing.Point(12, 35);
+ this.listBox1.Name = "listBox1";
+ this.listBox1.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
+ this.listBox1.Size = new System.Drawing.Size(502, 225);
+ this.listBox1.TabIndex = 0;
+ //
+ // btnImport
+ //
+ this.btnImport.Location = new System.Drawing.Point(12, 341);
+ this.btnImport.Name = "btnImport";
+ this.btnImport.Size = new System.Drawing.Size(139, 31);
+ this.btnImport.TabIndex = 1;
+ this.btnImport.Text = "Import";
+ this.btnImport.UseVisualStyleBackColor = true;
+ this.btnImport.Click += new System.EventHandler(this.btnImport_Click);
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(12, 9);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(135, 13);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "Select bookmarks to import";
+ //
+ // btnSelect
+ //
+ this.btnSelect.Location = new System.Drawing.Point(12, 266);
+ this.btnSelect.Name = "btnSelect";
+ this.btnSelect.Size = new System.Drawing.Size(139, 23);
+ this.btnSelect.TabIndex = 3;
+ this.btnSelect.Text = "select / deselect all";
+ this.btnSelect.UseVisualStyleBackColor = true;
+ this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click);
+ //
+ // btnCancel
+ //
+ this.btnCancel.Location = new System.Drawing.Point(375, 341);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(139, 31);
+ this.btnCancel.TabIndex = 4;
+ this.btnCancel.Text = "Cancel";
+ this.btnCancel.UseVisualStyleBackColor = true;
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // prgState
+ //
+ this.prgState.Location = new System.Drawing.Point(12, 302);
+ this.prgState.Name = "prgState";
+ this.prgState.Size = new System.Drawing.Size(502, 23);
+ this.prgState.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
+ this.prgState.TabIndex = 5;
+ this.prgState.Visible = false;
+ //
+ // chkThumbs
+ //
+ this.chkThumbs.AutoSize = true;
+ this.chkThumbs.Location = new System.Drawing.Point(187, 270);
+ this.chkThumbs.Name = "chkThumbs";
+ this.chkThumbs.Size = new System.Drawing.Size(164, 17);
+ this.chkThumbs.TabIndex = 6;
+ this.chkThumbs.Text = "make thumbs (take long time)";
+ this.chkThumbs.UseVisualStyleBackColor = true;
+ //
+ // ImportChrome
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(526, 384);
+ this.Controls.Add(this.chkThumbs);
+ this.Controls.Add(this.prgState);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnSelect);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.btnImport);
+ this.Controls.Add(this.listBox1);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "ImportChrome";
+ this.ShowIcon = false;
+ this.ShowInTaskbar = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "Import Chrome";
+ this.Load += new System.EventHandler(this.ImportChr_Load);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.ListBox listBox1;
+ private System.Windows.Forms.Button btnImport;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Button btnSelect;
+ private System.Windows.Forms.Button btnCancel;
+ private System.Windows.Forms.ProgressBar prgState;
+ private System.Windows.Forms.CheckBox chkThumbs;
+ }
+}
\ No newline at end of file
Added: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/ImportChrome.cs
===================================================================
--- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/ImportChrome.cs (rev 0)
+++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/ImportChrome.cs 2011-03-27 19:59:02 UTC (rev 4154)
@@ -0,0 +1,234 @@
+#region Copyright (C) 2005-2010 Team MediaPortal
+
+/*
+ * Copyright (C) 2005-2010 Team MediaPortal
+ * http://www.team-mediaportal.com
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * 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 GNU Make; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using System.IO;
+using MediaPortal.Configuration;
+
+namespace BrowseTheWeb
+{
+ public partial class ImportChrome : Form
+ {
+ private List<BookmarkElement> EntryList = new List<BookmarkElement>();
+ private TreeView tree;
+ private bool select = true;
+
+ public ImportChrome(TreeView SetupTreeview)
+ {
+ InitializeComponent();
+ tree = SetupTreeview;
+ }
+
+ private void btnImport_Click(object sender, EventArgs e)
+ {
+ btnImport.Visible = false;
+ btnSelect.Visible = false;
+ prgState.Visible = true;
+ chkThumbs.Enabled = false;
+
+ int max = listBox1.SelectedItems.Count;
+ int imported = 0;
+ int counter = 1;
+
+ #region get parent
+ TreeNode node = null;
+ foreach (TreeNode n in tree.Nodes[0].Nodes)
+ {
+ if (n.Text == "Import Chrome")
+ {
+ node = n;
+ break;
+ }
+ }
+ #endregion
+
+ if (node != null)
+ {
+ foreach (Object item in listBox1.SelectedItems)
+ {
+ Application.DoEvents();
+ prgState.Value = (counter * 100 / max);
+
+ string name = (string)item;
+ BookmarkElement bkm = GetBookmark(name);
+
+ if (bkm != null)
+ {
+ if (!Bookmark.Exists(tree, bkm.Name))
+ {
+ imported++;
+
+ TreeNode add = node.Nodes.Add(bkm.Url, bkm.Name);
+
+ BookmarkElement addBkm = new BookmarkElement();
+ addBkm.Name = bkm.Name;
+ addBkm.Url = bkm.Url;
+ addBkm.isSubFolder = true;
+ add.Tag = addBkm;
+
+ if (chkThumbs.Checked)
+ {
+ GetThumb thumb = new GetThumb();
+ thumb.SelectedUrl = bkm.Url;
+ thumb.ShowDialog();
+ }
+
+ node.ExpandAll();
+ }
+ }
+ counter++;
+ }
+ }
+
+ MessageBox.Show("Import is done. Imported " + imported.ToString() + " links.");
+ this.Close();
+ }
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ private void ImportChr_Load(object sender, EventArgs e)
+ {
+ try
+ {
+ string path = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
+ path += "\\Google\\Chrome\\User Data\\Default";
+
+ MyLog.debug("Chrome folder is " + path);
+
+ if (Directory.Exists(path))
+ {
+ if (File.Exists(path + "\\Bookmarks"))
+ {
+ MyLog.debug("Open bookmarks");
+
+ StreamReader sr = new StreamReader(path + "\\Bookmarks");
+ string line = sr.ReadToEnd();
+ sr.Close();
+
+ MyLog.debug("Read " + line.Length + " bytes");
+
+ int x = 0;
+ int secNo = 1;
+
+ while ((x = line.IndexOf("children\": [", x + 1)) > 0)
+ {
+ int y = line.IndexOf("]", x + 12);
+ string section = line.Substring(x + 12, y - x - 12);
+
+ MyLog.debug("Read section " + secNo);
+ secNo++;
+
+ int start = 0;
+ while ((start = section.IndexOf("{", start + 1)) > 0)
+ {
+ int stop = section.IndexOf("}", start + 1);
+ string entry = section.Substring(start + 1, stop - start - 3);
+
+ string[] sep = new string[1];
+ sep[0] = "\r\n";
+ string[] lines = entry.Split(sep, StringSplitOptions.RemoveEmptyEntries);
+
+ for (int i = 0; i < lines.Length; i++)
+ {
+ lines[i] = lines[i].Replace("\"", "");
+ lines[i] = lines[i].Trim();
+ }
+
+ string name = string.Empty;
+ string url = string.Empty;
+ string typ = string.Empty;
+
+ for (int i = 0; i < lines.Length; i++)
+ {
+ if (lines[i].StartsWith("type:"))
+ {
+ typ = lines[i].Replace("type:", "").Trim();
+ if (typ.EndsWith(",")) typ = typ.Substring(0, typ.Length - 1);
+ }
+ if (lines[i].StartsWith("name:"))
+ {
+ name = lines[i].Replace("name:", "").Trim();
+ if (name.EndsWith(",")) name = name.Substring(0, name.Length - 1);
+ }
+ if (lines[i].StartsWith("url:"))
+ { // with /
+ url = lines[i].Replace("url:", "").Trim();
+ }
+ }
+
+ if ((name != "") && (typ == "url") && (url != ""))
+ {
+ MyLog.debug("Found bookmark " + name);
+
+ BookmarkElement bkm = new BookmarkElement();
+ bkm.Url = url;
+ bkm.Name = name;
+
+ EntryList.Add(bkm);
+ listBox1.Items.Add(bkm.Name);
+ }
+ }
+ }
+
+
+
+
+ }
+
+ }
+ }
+ catch (Exception ex)
+ {
+ MyLog.debug("Exception import chrome : " + ex.Message);
+ MyLog.debug("Exception import chrome : " + ex.StackTrace);
+ }
+ }
+
+ private BookmarkElement GetBookmark(string Name)
+ {
+ foreach (BookmarkElement bkm in EntryList)
+ {
+ if (bkm.Name == Name) return bkm;
+ }
+ return null;
+ }
+
+ private void btnSelect_Click(object sender, EventArgs e)
+ {
+ for (int i = 0; i < listBox1.Items.Count; i++)
+ {
+ listBox1.SetSelected(i, select);
+ }
+ select = !select;
+ }
+ }
+}
Added: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/ImportChrome.resx
===================================================================
--- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/ImportChrome.resx (rev 0)
+++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/ImportChrome.resx 2011-03-27 19:59:02 UTC (rev 4154)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Setup.Designer.cs
===================================================================
--- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Setup.Designer.cs 2011-03-26 09:50:29 UTC (rev 4153)
+++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Setup.Designer.cs 2011-03-27 19:59:02 UTC (rev 4154)
@@ -61,6 +61,8 @@
this.trkRemote = new System.Windows.Forms.TrackBar();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tabPage2 = new System.Windows.Forms.TabPage();
+ this.groupBox12 = new System.Windows.Forms.GroupBox();
+ this.cmbBookmarkView = new System.Windows.Forms.ComboBox();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.chkThumbsOnVisit = new System.Windows.Forms.CheckBox();
this.chkUseThumbs = new System.Windows.Forms.CheckBox();
@@ -131,8 +133,7 @@
this.label22 = new System.Windows.Forms.Label();
this.comboBox4 = new System.Windows.Forms.ComboBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
- this.groupBox12 = new System.Windows.Forms.GroupBox();
- this.cmbBookmarkView = new System.Windows.Forms.ComboBox();
+ this.btnImportChr = new System.Windows.Forms.Button();
this.contextMenuStrip1.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
@@ -141,6 +142,7 @@
((System.ComponentModel.ISupportInitialize)(this.trkRemote)).BeginInit();
this.groupBox3.SuspendLayout();
this.tabPage2.SuspendLayout();
+ this.groupBox12.SuspendLayout();
this.groupBox7.SuspendLayout();
this.groupBox6.SuspendLayout();
this.groupBox2.SuspendLayout();
@@ -155,7 +157,6 @@
this.groupBox11.SuspendLayout();
this.groupBox10.SuspendLayout();
this.groupBox9.SuspendLayout();
- this.groupBox12.SuspendLayout();
this.SuspendLayout();
//
// treeView1
@@ -471,6 +472,24 @@
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Appeareance";
//
+ // groupBox12
+ //
+ this.groupBox12.Controls.Add(this.cmbBookmarkView);
+ this.groupBox12.Location = new System.Drawing.Point(6, 391);
+ this.groupBox12.Name = "groupBox12";
+ this.groupBox12.Size = new System.Drawing.Size(550, 79);
+ this.groupBox12.TabIndex = 22;
+ this.groupBox12.TabStop = false;
+ this.groupBox12.Text = "Bookmarks view";
+ //
+ // cmbBookmarkView
+ //
+ this.cmbBookmarkView.FormattingEnabled = true;
+ this.cmbBookmarkView.Location = new System.Drawing.Point(26, 37);
+ this.cmbBookmarkView.Name = "cmbBookmarkView";
+ this.cmbBookmarkView.Size = new System.Drawing.Size(145, 24);
+ this.cmbBookmarkView.TabIndex = 0;
+ //
// groupBox7
//
this.groupBox7.Controls.Add(this.chkThumbsOnVisit);
@@ -618,6 +637,7 @@
// tabPage3
//
this.tabPage3.BackColor = System.Drawing.SystemColors.Control;
+ this.tabPage3.Controls.Add(this.btnImportChr);
this.tabPage3.Controls.Add(this.btnImportFF);
this.tabPage3.Controls.Add(this.btnImportIE);
this.tabPage3.Controls.Add(this.label7);
@@ -1181,24 +1201,16 @@
this.checkBox1.Text = "Show diagnose on status bar";
this.checkBox1.UseVisualStyleBackColor = true;
//
- // groupBox12
+ // btnImportChr
//
- this.groupBox12.Controls.Add(this.cmbBookmarkView);
- this.groupBox12.Location = new System.Drawing.Point(6, 391);
- this.groupBox12.Name = "groupBox12";
- this.groupBox12.Size = new System.Drawing.Size(550, 79);
- this.groupBox12.TabIndex = 22;
- this.groupBox12.TabStop = false;
- this.groupBox12.Text = "Bookmarks view";
+ this.btnImportChr.Location = new System.Drawing.Point(168, 442);
+ this.btnImportChr.Name = "btnImportChr";
+ this.btnImportChr.Size = new System.Drawing.Size(79, 23);
+ this.btnImportChr.TabIndex = 20;
+ this.btnImportChr.Text = "Import Chr";
+ this.btnImportChr.UseVisualStyleBackColor = true;
+ this.btnImportChr.Click += new System.EventHandler(this.btnImportChr_Click);
//
- // cmbBookmarkView
- //
- this.cmbBookmarkView.FormattingEnabled = true;
- this.cmbBookmarkView.Location = new System.Drawing.Point(26, 37);
- this.cmbBookmarkView.Name = "cmbBookmarkView";
- this.cmbBookmarkView.Size = new System.Drawing.Size(145, 24);
- this.cmbBookmarkView.TabIndex = 0;
- //
// Setup
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -1226,6 +1238,7 @@
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.tabPage2.ResumeLayout(false);
+ this.groupBox12.ResumeLayout(false);
this.groupBox7.ResumeLayout(false);
this.groupBox7.PerformLayout();
this.groupBox6.ResumeLayout(false);
@@ -1250,7 +1263,6 @@
this.groupBox10.PerformLayout();
this.groupBox9.ResumeLayout(false);
this.groupBox9.PerformLayout();
- this.groupBox12.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -1360,5 +1372,6 @@
private System.Windows.Forms.CheckBox chkMouse;
private System.Windows.Forms.GroupBox groupBox12;
private System.Windows.Forms.ComboBox cmbBookmarkView;
+ private System.Windows.Forms.Button btnImportChr;
}
}
\ No newline at end of file
Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Setup.cs
===================================================================
--- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Setup.cs 2011-03-26 09:50:29 UTC (rev 4153)
+++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Setup.cs 2011-03-27 19:59:02 UTC (rev 4154)
@@ -860,7 +860,30 @@
treeView1.Invalidate();
}
+ private void btnImportChr_Click(object sender, EventArgs e)
+ {
+ #region generate folder
+ if (!Bookmark.Exists(treeView1, "Import Chrome"))
+ {
+ TreeNode newNode = treeView1.Nodes[0].Nodes.Add("Import Chrome");
+ newNode.ImageIndex = 1;
+ newNode.SelectedImageIndex = 1;
+ BookmarkElement bkm = new BookmarkElement();
+ bkm.Name = "Import Chrome";
+ bkm.isFolder = true;
+ newNode.Tag = bkm;
+
+ treeView1.Nodes[0].ExpandAll();
+ }
+ #endregion
+
+ ImportChrome import = new ImportChrome(treeView1);
+ import.ShowDialog();
+
+ treeView1.Invalidate();
+ }
+
private void btnDefault_Click(object sender, EventArgs e)
{
cmbConfirmLink.SelectedItem = MediaPortal.GUI.Library.Action.ActionType.ACTION_PARENT_DIR;
Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Setup.resx
===================================================================
--- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Setup.resx 2011-03-26 09:50:29 UTC (rev 4153)
+++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Setup.resx 2011-03-27 19:59:02 UTC (rev 4154)
@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABM
- CgAAAk1TRnQBSQFMAgEBAwEAAUABAQFAAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+ CgAAAk1TRnQBSQFMAgEBAwEAAUgBAQFIAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|