diff options
| -rw-r--r-- | CMakeLists.txt | 4 | ||||
| -rw-r--r-- | ChangeLog | 8 | ||||
| -rw-r--r-- | TODO | 43 | ||||
| -rw-r--r-- | doc/index.docbook | 616 | ||||
| -rw-r--r-- | htmls/notfound.html | 4 | ||||
| -rw-r--r-- | rekonq.SlackBuild | 2 | ||||
| -rw-r--r-- | src/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | src/bookmarks.cpp | 48 | ||||
| -rw-r--r-- | src/bookmarks.h | 17 | ||||
| -rw-r--r-- | src/download.cpp | 30 | ||||
| -rw-r--r-- | src/download.h | 4 | ||||
| -rw-r--r-- | src/findbar.cpp | 53 | ||||
| -rw-r--r-- | src/findbar.h | 5 | ||||
| -rw-r--r-- | src/main.cpp | 2 | ||||
| -rw-r--r-- | src/mainview.cpp | 8 | ||||
| -rw-r--r-- | src/mainview.h | 1 | ||||
| -rw-r--r-- | src/mainwindow.cpp | 125 | ||||
| -rw-r--r-- | src/mainwindow.h | 15 | ||||
| -rw-r--r-- | src/networkaccessmanager.cpp | 2 | ||||
| -rw-r--r-- | src/rekonq.kcfg | 2 | ||||
| -rw-r--r-- | src/rekonqui.rc | 25 | ||||
| -rw-r--r-- | src/settings.cpp | 13 | ||||
| -rw-r--r-- | src/settings_proxy.ui | 41 | ||||
| -rw-r--r-- | src/squeezelabel.cpp | 39 | ||||
| -rw-r--r-- | src/squeezelabel.h | 39 | ||||
| -rw-r--r-- | src/webview.cpp | 15 | ||||
| -rw-r--r-- | src/webview.h | 1 | 
27 files changed, 455 insertions, 711 deletions
| diff --git a/CMakeLists.txt b/CMakeLists.txt index d9ef464d..56d8f9b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ PROJECT( rekonq )  # rekonq version  SET(REKONQ_MAJOR_VERSION "0")  SET(REKONQ_MINOR_VERSION "0") -SET(REKONQ_PATCH_VERSION "2") +SET(REKONQ_PATCH_VERSION "3")  SET(REKONQ_VERSION_STRING      "${REKONQ_MAJOR_VERSION}.${REKONQ_MINOR_VERSION}.${REKONQ_PATCH_VERSION}" @@ -84,7 +84,7 @@ IF(REKONQ_CAN_BE_COMPILED)      ADD_SUBDIRECTORY( icons )      ADD_SUBDIRECTORY( data )      ADD_SUBDIRECTORY( htmls ) -    ADD_SUBDIRECTORY( doc ) +#    ADD_SUBDIRECTORY( doc )  ENDIF(REKONQ_CAN_BE_COMPILED) @@ -1,3 +1,11 @@ +0.0.3 +- ~80% ported to KDE4 +- use KConfigXT +- improved text search bar +- fixed all "web actions" +- KDE download system +- new bookmark toolbar (1st implementation) +  0.0.2  - 70% ported to KDE4  - new urlbar @@ -1,44 +1,15 @@ -Road to 0.0.1 (first release) -+ ESC event findbar -+ let findbar work -+ bookmarks (share konqueror's) -+ some porting - -ROAD to 0.0.2 (second release) -+ setting rekonq with KConfigDialog ("rekonfig") -- configure shortcuts -- better find toolbar -- fixed search bar width - -ROAD to 0.0.3 (third release) -+ mainview -+ KConfigXT -- documentation -- improve slackbuild +To 0.0.4 +- improve DOCUMENTATION +- fix docs  - autosave--  -- downloadSystem-- -- dbus, kjob, kget support +- dbus support  - new application class!! - -+ ---------------------------------------------------- - -NEXT.. -- system SELECT ALL -- better FULL SCREEN -- color progress +- improve bookmarks toolbar +- fix KConfigXT (fonts) +- color url_line_edit progress  - contextMenu in searchbar to set different search engines  - KDE proxy support -- KcookieJar -  - QWebPluginFactory subclass to load KParts into QtWebKit. - -- dbus support -    - kget support -    - kwallet support -    - kwrite support ( optional, to view HTML code ) - -- Kpart ?? -  + ------------------------ diff --git a/doc/index.docbook b/doc/index.docbook index e9b64bd5..2141c177 100644 --- a/doc/index.docbook +++ b/doc/index.docbook @@ -1,497 +1,304 @@  <?xml version="1.0" ?> -<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [ -  <!-- Define an entity for your application if it is not part of KDE -       CVS --> -  <!ENTITY kmyapplication "<application>rekonq</application>"> -  <!ENTITY kappname "&kmyapplication;"><!-- replace kmyapplication here -                                            do *not* replace kappname--> -  <!ENTITY package "kde-module"><!-- kdebase, kdeadmin, etc.  Leave -                                     this unchanged if your -                                     application is not maintained in KDE CVS --> +<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" +"dtd/kdex.dtd" [ +  <!ENTITY rekonq "Rekonq"> +  <!ENTITY Andrea.Diamantini "<personname> +                              <firstname>Andrea</firstname> +                              <surname>Diamantini</surname> +                              </personname> +                              "> +  <!ENTITY Andrea.Diamantini.mail "<email>adjam7@gmail.com</email>">    <!ENTITY % addindex "IGNORE"> -  <!ENTITY % English "INCLUDE"> <!-- ONLY If you are writing non-English -                                     original documentation, change -                                     the language here --> - -  <!-- Do not define any other entities; instead, use the entities -       from entities/general.entities and $LANG/user.entities. --> +  <!ENTITY % English "INCLUDE">   ]> -<!-- kdoctemplate v0.9 January 10 2003 -     Changes to comments to clarify entity usage January 10 2003 -     Minor update to "Credits and Licenses" section on August 24, 2000 -     Removed "Revision history" section on 22 January 2001 -     Changed to Installation/Help menu entities 18 October 2001 -     Other minor cleanup and changes 18 October 2001 -     FPI change and minor changes November 2002 --> - -<!-- -This template was designed by: David Rugge davidrugge@mindspring.com -with lots of help from: Eric Bischoff ebisch@cybercable.tm.fr -and Frederik Fouvry fouvry@sfs.nphil.uni-tuebingen.de -of the KDE DocBook team. - -You may freely use this template for writing any sort of KDE documentation. -If you have any changes or improvements, please let us know. - -Remember: -- in XML, the case of the <tags> and attributes is relevant ; -- also, quote all attributes. - -Please don't forget to remove all these comments in your final documentation, -thanks ;-). ---> - -<!-- ................................................................ --> - -<!-- The language must NOT be changed here. --> -<!-- If you are writing original documentation in a language other --> -<!-- than English, change the language above ONLY, not here --> -<book lang="&language;"> -<!-- This header contains all of the meta-information for the document such -as Authors, publish date, the abstract, and Keywords --> +<book lang="&language;">  <bookinfo> -<title>The &kmyapplication; Handbook</title> +<title>The &rekonq; Handbook</title>  <authorgroup> -<author> -<!-- This is just put in as an example.  For real documentation, please -     define a general entity in entities/contributor.entities, e.g. -<!ENTITY George.N.Ugnacious "<personname><firstname>George</firstname><othername>N.</othername><surname>Ugnacious</surname></personname>"> -<!ENTITY George.N.Ugnacious.mail "<email>gnu@kde.org</email>"> -and use `&George.N.Ugnacious; &George.N.Ugnacious.mail;' in the author element. - --> -<personname> -<firstname>George</firstname> -<othername>N.</othername> -<surname>Ugnacious</surname> -</personname> -<email>gnu@kde.org</email> -</author> +<author>&Andrea.Diamantini; &Andrea.Diamantini.mail;</author>  </authorgroup> -<!-- TRANS:ROLES_OF_TRANSLATORS --> -  <copyright>  <year>2008</year> -<holder>George N. Ugnacious</holder> +<year>2009</year> +<holder>&Andrea.Diamantini;</holder>  </copyright> -<!-- Translators: put here the copyright notice of the translation --> -<!-- Put here the FDL notice.  Read the explanation in fdl-notice.docbook -     and in the FDL itself on how to use it. --> -<legalnotice>&FDLNotice;</legalnotice> - -<!-- Date and version information of the application -Don't forget to include this last date and this last revision number, we -need them for translation coordination ! -Please respect the format of the date (YYYY-MM-DD) and of the version -(V.MM.LL), it could be used by automation scripts. -Do NOT change these in the translation. --> -<date>2008-01-10</date> -<releaseinfo>1.01.00</releaseinfo> +<legalnotice>&FDLNotice;</legalnotice> -<!-- Abstract about this handbook --> +<date>2008-11-16</date> +<releaseinfo>0.0.3</releaseinfo>  <abstract>  <para> -&kmyapplication; is an application specially designed to do nothing you would -ever want. +&rekonq; is a lightweight KDE browser based on WebKit.  </para>  </abstract> -<!-- This is a set of Keywords for indexing by search engines. -Please at least include KDE, the KDE package it is in, the name - of your application, and a few relevant keywords. --> -  <keywordset>  <keyword>KDE</keyword> -<keyword>kdeutils</keyword> -<keyword>Kapp</keyword> -<keyword>nothing</keyword> -<keyword>nothing else</keyword> +<keyword>browser</keyword> +<keyword>rekonq</keyword> +<keyword>webkit</keyword>  </keywordset>  </bookinfo> -<!-- The contents of the documentation begin here.  Label -each chapter so with the id attribute. This is necessary for two reasons: it -allows you to easily reference the chapter from other chapters of your -document, and if there is no ID, the name of the generated HTML files will vary -from time to time making it hard to manage for maintainers and for the CVS -system. Any chapter labelled (OPTIONAL) may be left out at the author's -discretion. Other chapters should not be left out in order to maintain a -consistent documentation style across all KDE apps. --> +<!-- ================== CHAPTER ==================  -->  <chapter id="introduction"> -<title>Introduction</title> -<!-- The introduction chapter contains a brief introduction for the -application that explains what it does and where to report -problems. Basically a long version of the abstract.  Don't include a -revision history. (see installation appendix comment) --> +<title>Introduction</title>  <para> -&kmyapplication; is a program that lets you do absolutely nothing. Please report -any problems or feature requests to the &kde; mailing lists. +&rekonq; is a lightweight KDE browser based on WebKit.  </para> -</chapter> -<chapter id="using-kapp"> -<title>Using &kmyapplication;</title> +<sect1 id="starting"> -<!-- This chapter should tell the user how to use your app. You should use as -many sections (Chapter, Sect1, Sect3, etc...) as is necessary to fully document -your application. --> +<title>Launching &rekonq;</title>  <para> +The Find Files tool is a useful method of searching for specific files on your +computer, or for searching for files that match a pattern. An example of +this could include searching for files of a particular type or with certain +letters in the filename. -<!-- Note that all graphics should be in .png format. Do not use gifs because of -patent issues. --> - -<screenshot> -<screeninfo>Here's a screenshot of &kmyapplication;</screeninfo> -	<mediaobject> -	  <imageobject> -	    <imagedata fileref="screenshot.png" format="PNG"/> -	  </imageobject> -	  <imageobject> -	    <imagedata fileref="screenshot.eps" format="EPS"/> -	  </imageobject> -	  <textobject> -	    <phrase>Screenshot</phrase> -	  </textobject> -	</mediaobject> -</screenshot> -</para> - - -<sect1 id="kapp-features"> -<title>More &kmyapplication; features</title> - -<para>It slices! It dices! and it comes with a free toaster!</para> -<para> -The Squiggle Tool <guiicon><inlinemediaobject> -	  <imageobject> -	    <imagedata fileref="squiggle.png" format="PNG"/> -	  </imageobject> -	  <imageobject> -	    <imagedata fileref="squiggle.eps" format="EPS"/> -	  </imageobject> -	  <textobject> -	    <phrase>Squiggle</phrase> -	  </textobject> -</inlinemediaobject></guiicon> is used to draw squiggly lines all over -the &kmyapplication; main window. It's not a bug, it's a feature! +You can load this utility by clicking on <guimenuitem>Find Files</guimenuitem>. This will +launch &rekonq;.  </para>  </sect1> +  </chapter> -<chapter id="commands"> -<title>Command Reference</title> +<!-- ================== CHAPTER ==================  --> -<!-- (OPTIONAL, BUT RECOMMENDED) This chapter should list all of the -application windows and their menubar and toolbar commands for easy reference. -Also include any keys that have a special function but have no equivalent in the -menus or toolbars. This may not be necessary for small apps or apps with no tool -or menu bars. --> +<chapter id="kfind"> +<title>Finding Files</title> -<sect1 id="kapp-mainwindow"> -<title>The main &kmyapplication; window</title> +<sect1 id="name-tab"> +<title>The Name/Location Tab</title> -<sect2> -<title>The File Menu</title>  <para> +When starting &rekonq;, you will see a quite simple window. Type in the +name of the file you are searching in the text box labeled +<guilabel>Named:</guilabel>. Choose a folder where you want to search +by typing it in the field <guilabel>Look in:</guilabel> +or by clicking <guibutton>Browse...</guibutton> and press +<keycap>Enter</keycap> or click <guibutton>Find</guibutton>. If +<guilabel>Include subfolders</guilabel> is checked all +subfolders starting from your chosen folder will be searched +too. The results will be displayed in the box below. +</para> + +<para> +You can use the following wildcards: +</para> +  <variablelist>  <varlistentry> -<term><menuchoice> -<shortcut> -<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo> -</shortcut> -<guimenu>File</guimenu> -<guimenuitem>New</guimenuitem> -</menuchoice></term> -<listitem><para><action>Creates a new document</action></para></listitem> -</varlistentry> -<varlistentry> -<term><menuchoice> -<shortcut> -<keycombo action="simul">&Ctrl;<keycap>S</keycap></keycombo> -</shortcut> -<guimenu>File</guimenu> -<guimenuitem>Save</guimenuitem> -</menuchoice></term> -<listitem><para><action>Saves the document</action></para></listitem> +<term>The Asterisk <quote><keycap>*</keycap></quote></term> +<listitem> +<para> +The asterisk stands for any number of missing characters (even zero), +that means ⪚ searching for <userinput>marc*</userinput> may find the +files <filename>marc</filename>, <filename>marc.png</filename> and +<filename> marc_must_not_read_this.kwd</filename>.  +<userinput>mar*.kwd</userinput> may find +<filename>marketplace.kwd</filename> and +<filename>marc_must_not_read_this.kwd</filename>. +</para> +</listitem>  </varlistentry> +  <varlistentry> -<term><menuchoice> -<shortcut> -<keycombo action="simul">&Ctrl;<keycap>Q</keycap></keycombo> -</shortcut> -<guimenu>File</guimenu> -<guimenuitem>Quit</guimenuitem> -</menuchoice></term> -<listitem><para><action>Quits</action> &kmyapplication;</para></listitem> -</varlistentry> -</variablelist> +<term>The Question Mark <quote><keycap>?</keycap></quote></term> +<listitem> +<para> +In contrast to the asterisk, the question mark stands for exactly one +character, so <userinput>mar?</userinput> will find +<filename>marc</filename>, but <userinput>marc?</userinput> will not find +anything, as our files are called <filename>marc</filename> and +<filename>marc.png</filename>. You can put as many question marks in the +term as you want, it will find exactly that number of characters.  </para> +</listitem> +</varlistentry> -</sect2> - -<sect2> -<title>The <guimenu>Help</guimenu> Menu</title> - -<!-- Assuming you have a standard help menu (help, what's this, about --> -<!-- &kmyapplication;, about KDE) then the documentation is already written. --> -<!-- The following entity is valid anywhere that a variablelist is --> -<!-- valid.  --> - -&help.menu.documentation; +</variablelist> -</sect2> +<para> +Of course you can combine those two wildcard symbols in a search term. +</para>  </sect1> -</chapter> - -<chapter id="developers"> -<title>Developer's Guide to &kmyapplication;</title> -<!-- (OPTIONAL) A Programming/Scripting reference chapter should be -used for apps that use plugins or that provide their own scripting hooks -and/or development libraries. --> +<sect1 id="kfind-date-range"> +<title>The Contents Tab</title> +<variablelist> +<varlistentry> +<term><guilabel>File type</guilabel></term> +<listitem>  <para> -Programming &kmyapplication; plugins is a joy to behold. Just read through the next -66 pages of API's to learn how! +Here you can specify the type of file you are searching for.  </para> +</listitem> +</varlistentry> -<!-- Use refentries to describe APIs.  Refentries are fairly complicated and you -should consult the docbook reference for further details. The example below was -taken from that reference and shortened a bit for readability. --> - -<refentry id="re-1007-unmanagechildren-1"> -<refmeta> -<refentrytitle>XtUnmanageChildren</refentrytitle> -<refmiscinfo>Xt - Geometry Management</refmiscinfo> -</refmeta> -<refnamediv> -<refname>XtUnmanageChildren -</refname> -<refpurpose>remove a list of children from a parent widget's managed -list. -<indexterm id="ix-1007-unmanagechildren-1"><primary>widgets</primary><secondary>removing</secondary></indexterm> -<indexterm id="ix-1007-unmanagechildren-2"><primary>XtUnmanageChildren</primary></indexterm> -</refpurpose> - -</refnamediv> -<refsynopsisdiv> -<refsynopsisdivinfo> -<date>4 March 1996</date> -</refsynopsisdivinfo> -<synopsis> -void XtUnmanageChildren(<replaceable class="parameter">children</replaceable>, <replaceable class="parameter">num_children</replaceable>) -    WidgetList <replaceable class="parameter">children</replaceable>; -    Cardinal <replaceable class="parameter">num_children</replaceable>; -</synopsis> - -<refsect2 id="r2-1007-unmanagechildren-1"> -<title>Inputs</title> -<variablelist>  <varlistentry> -<term><replaceable class="parameter">children</replaceable> -</term> +<term><guilabel>Containing text</guilabel></term>  <listitem> -<para>Specifies an array of child widgets. Each child must be of -class RectObj or any subclass thereof. +<para> +Type in the word or phrase the files you are searching for must +contain. Note: If you do this in a large folder or checked +<guilabel>Include subfolders</guilabel> in the +<guilabel>Name/Location</guilabel> tab, this may take a long time. +</para> + +<note> +<para>This option will <emphasis>not</emphasis> work for all files listed  +under <guilabel>File type</guilabel>. Only the following file types +are supported: + +<itemizedlist> +<listitem><para>Text files, ⪚ source code and <filename>README</filename> files</para></listitem> +<listitem><para>&kword; >= 1.2</para></listitem> +<listitem><para>&kpresenter; >= 1.2</para></listitem> +<listitem><para>&kspread; >= 1.2</para></listitem> +<listitem><para>OpenOffice.org Writer</para></listitem> +<listitem><para>OpenOffice.org Impress</para></listitem> +<listitem><para>OpenOffice.org Calc</para></listitem> +</itemizedlist> +  </para> +</note> +  </listitem>  </varlistentry> +  <varlistentry> -<term><replaceable class="parameter">num_children</replaceable> -</term> +<term><guilabel>Case sensitive</guilabel></term>  <listitem> -<para>Specifies the number of elements in <replaceable class="parameter">children</replaceable>. +<para> +If you enable this option, &rekonq; will +only find files with the exact case matching, ⪚ +<userinput>MARC</userinput> will only match +<quote>MARC</quote>, not <quote>Marc</quote>.  </para>  </listitem>  </varlistentry> + +<varlistentry> +<term><guilabel>Regular expression</guilabel></term> +<listitem><para>If you have installed the &kregexpeditor; tool from +the kdeutils package, you will have this additional option.  Enabling +it will allow you to search for a <firstterm>regexp</firstterm> or +regular expression.  A regexp is a way to specify conditions for your +search, and they can be very complex, and equally they can be very +powerful.  If you are unfamiliar with regular expressions, you can +choose <guilabel>Edit Regular Expression</guilabel> to open +&kregexpeditor;.  This tool allows you to construct your set of +conditions graphically, and then generates the expression for +you.</para> + +<para>&kregexpeditor; is a very useful tool, and can be used from within +many &kde; applications other than &rekonq;.  You can find more +information from within its own help file.</para> +</listitem> +</varlistentry> + +<!-- TODO: "Search metainfo sections" --> +  </variablelist> -</refsect2></refsynopsisdiv> - -<refsect1 id="r1-1007-unmanagechildren-1"> -<title>Description -</title> -<para><function>XtUnmanageChildren()</function> unmaps the specified widgets -and removes them from their parent's geometry management. -The widgets will disappear from the screen, and (depending -on its parent) may no longer have screen space allocated for -them. -</para> -<para>Each of the widgets in the <replaceable class="parameter">children</replaceable> array must have -the same parent. -</para> -<para>See the “Algorithm” section below for full details of the -widget unmanagement procedure. -</para> -</refsect1> -<refsect1 id="r1-1007-unmanagechildren-2"> -<title>Usage</title> -<para>Unmanaging widgets is the usual method for temporarily -making them invisible.  They can be re-managed with -<function>XtManageChildren()</function>. -</para> -<para>You can unmap a widget, but leave it under geometry -management by calling <function>XtUnmapWidget()</function>.  You can -destroy a widget's window without destroying the widget by -calling <function>XtUnrealizeWidget()</function>.  You can destroy a -widget completely with <function>XtDestroyWidget()</function>. -</para> -<para>If you are only going to unmanage a single widget, it is -more convenient to call <function>XtUnmanageChild()</function>.  It is -often more convenient to call <function>XtUnmanageChild()</function> -several times than it is to declare and initialize an array -of widgets to pass to <function>XtUnmanageChildren()</function>.  Calling -<function>XtUnmanageChildren()</function> is more efficient, however, -because it only calls the parent's <function>change_managed()</function> -method once. -</para> -</refsect1> +</sect1> + +<sect1 id="kfind-advanced"> +<title>The Properties Tab</title> -<refsect1 id="r1-1007-unmanagechildren-3"> -<title>Algorithm -</title> -<para><function>XtUnmanageChildren()</function> performs the following: +<para> +Here you can refine your search. These are the special refinements  +you can choose:  </para> +  <variablelist> +  <varlistentry> -<term>- -</term> +<term><guilabel>Find all files created or modified</guilabel></term>  <listitem> -<para>Ignores the child if it already is unmanaged or is being -destroyed. +<para> +Here you can either enter two dates, between which the +files were created or modified, or specify a time period.  </para>  </listitem>  </varlistentry> +  <varlistentry> -<term>- -</term> +<term><guilabel>File size is</guilabel></term>  <listitem> -<para>Otherwise, if the child is realized, it makes it nonvisible -by unmapping it. +<para>Here you can specify if the file has to be at least or as most as +big as the size you entered in the following box.  </para>  </listitem>  </varlistentry> -</variablelist> -<para> -</para> -</refsect1> -<refsect1 id="r1-1007-unmanagechildren-4"> -<title>Structures</title> -<para>The <type>WidgetList</type> type is simply an array of widgets: +<varlistentry> +<term><guilabel>Files owned by user, Files owned by group</guilabel></term> +<listitem> +<para>Here you can specify user and group names.  </para> -<screen id="sc-1007-unmanagechildren-1">typedef Widget *WidgetList; -</screen> -</refsect1> -</refentry> +</listitem> +</varlistentry> -</chapter> +</variablelist> + +</sect1> -<chapter id="faq"> -<title>Questions and Answers</title> - -<!-- (OPTIONAL but recommended) This chapter should include all of the silly -(and not-so-silly) newbie questions that fill up your mailbox. This chapter -should be reserved for BRIEF questions and answers! If one question uses more -than a page or so then it should probably be part of the -"Using this Application" chapter instead. You should use links to -cross-reference questions to the parts of your documentation that answer them. -This is also a great place to provide pointers to other FAQ's if your users -must do some complicated configuration on other programs in order for your -application work. --> - -&reporting.bugs; -&updating.documentation; - -<qandaset id="faqlist"> -<qandaentry> -<question> -<para>My Mouse doesn't work. How do I quit &kmyapplication;?</para> -</question> -<answer> -<para>You silly goose! Check out the <link linkend="commands">Commands -Section</link> for the answer.</para> -</answer> -</qandaentry> -<qandaentry> -<question> -<para>Why can't I twiddle my documents?</para> -</question> -<answer> -<para>You can only twiddle your documents if you have the foobar.lib -installed.</para> -</answer> -</qandaentry> -</qandaset>  </chapter> -<chapter id="credits"> +<!-- ================== CHAPTER ==================  --> -<!-- Include credits for the programmers, documentation writers, and -contributors here. The license for your software should then be included below -the credits with a reference to the appropriate license file included in the KDE -distribution. --> +<chapter id="credits">  <title>Credits and License</title>  <para> -&kmyapplication; +&rekonq;   </para> +  <para> -Program copyright 2008 John Q. Hacker <email>jqh@kde.org</email> +Program copyright:  </para> -<para> -Contributors: +  <itemizedlist> -<listitem><para>Konqui the KDE Dragon <email>konqui@kde.org</email></para> -</listitem> -<listitem><para>Tux the Linux Penguin <email>tux@linux.org</email></para> +<title>Developers</title> +<listitem> +<para>&Andrea.Diamantini; &Andrea.Diamantini.mail;</para>  </listitem> +  </itemizedlist> -</para>  <para> -Documentation Copyright © 2008 George N. Ugnacious <email>gnu@kde.org</email> -</para> +Documentation copyright 2008 &Andrea.Diamantini; &Andrea.Diamantini.mail; +</para>   <!-- TRANS:CREDIT_FOR_TRANSLATORS -->  &underFDL;               <!-- FDL: do not remove --> - -<!-- Determine which license your application is licensed under, -     and delete all the remaining licenses below: - -     (NOTE:  All documentation are licensed under the FDL, -     regardless of what license the application uses) --> - -&underGPL;        	 <!-- GPL License -->  &underBSDLicense;        <!-- BSD License --> -&underArtisticLicense;   <!-- BSD Artistic License --> -&underX11License;        <!-- X11 License  -->  </chapter>  <appendix id="installation">  <title>Installation</title> -<sect1 id="getting-kapp"> -<title>How to obtain &kmyapplication;</title> - -<!-- This first entity contains boiler plate for applications that are -part of KDE CVS.  You should remove it if you are releasing your -application --> +<sect1 id="getting-kfind"> +<title>How to obtain &rekonq;</title>  &install.intro.documentation; @@ -500,70 +307,21 @@ application -->  <sect1 id="requirements">  <title>Requirements</title> -<!-- -List any special requirements for your application here. This should include: -.Libraries or other software that is not included in kdesupport, -kdelibs, or kdebase. -.Hardware requirements like amount of RAM, disk space, graphics card -capabilities, screen resolution, special expansion cards, etc. -.Operating systems the app will run on. If your app is designed only for a -specific OS, (you wrote a graphical LILO configurator for example) put this -information here. ---> -  <para> -In order to successfully use &kmyapplication;, you need &kde; 1.1. Foobar.lib is -required in order to support the advanced &kmyapplication; features. &kmyapplication; uses -about 5 megs of memory to run, but this may vary depending on your -platform and configuration. +In order to successfully use &rekonq;, you need at least Qt 4.4.x and &kde; 4.1.x.  </para> -<para> -All required libraries as well as &kmyapplication; itself can be found -on <ulink url="ftp://ftp.kapp.org">The &kmyapplication; home page</ulink>. -</para> - -<!-- For a list of updates, you may refer to the application web site -or the ChangeLog file, or ... --> -<para> -You can find a list of changes at <ulink -url="http://apps.kde.org/kapp">http://apps.kde.org/kapp</ulink>. -</para>  </sect1>  <sect1 id="compilation">  <title>Compilation and Installation</title> -<!-- This entity contains the boilerplate text for standard --> -<!-- compilation instructions.  If your application requires any --> -<!-- special handling, remove it, and replace with your own text. --> -  &install.compile.documentation;  </sect1> -<sect1 id="configuration"> -<title>Configuration</title> - -<para>Don't forget to tell your system to start the <filename>dtd</filename> -dicer-toaster daemon first, or &kmyapplication; won't work !</para> - -</sect1> -  </appendix>  &documentation.index; -</book> -<!-- -Local Variables: -mode: xml -sgml-minimize-attributes:nil -sgml-general-insert-case:lower -sgml-indent-step:0 -sgml-indent-data:nil -End: - -vim:tabstop=2:shiftwidth=2:expandtab -kate: space-indent on; indent-width 2; tab-width 2; indent-mode none; ---> +</book> diff --git a/htmls/notfound.html b/htmls/notfound.html index 77994119..6ffbc9f3 100644 --- a/htmls/notfound.html +++ b/htmls/notfound.html @@ -54,8 +54,10 @@ ul {        <li>If the address is correct, try to check the network        connection.</li>        <li>If your computer or network is protected by a firewall or -      proxy, make sure that the browser demo is permitted to access +      proxy, make sure that rekonq is permitted to access        the network.</li> +      <li>Of course, if rekonq doesn't work properly, you can always  +      say it's a programmer error ;)</li>      </ul>      <br/><br/>    </div> diff --git a/rekonq.SlackBuild b/rekonq.SlackBuild index eefdc684..000314ee 100644 --- a/rekonq.SlackBuild +++ b/rekonq.SlackBuild @@ -4,7 +4,7 @@  # Written by Andrea Diamantini - adjam7_AT_gmail_DOT_com  NAME=rekonq -VERSION=0.0.2 +VERSION=0.0.3  ARCH=${ARCH:-i486}  BUILD=1ad diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6a7c5c2d..88224670 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -15,8 +15,7 @@ SET( rekonq_SRCS      urlbar.cpp      findbar.cpp      searchbar.cpp -    settings.cpp  -    squeezelabel.cpp  +    settings.cpp      webview.cpp       main.cpp  ) @@ -45,6 +44,7 @@ TARGET_LINK_LIBRARIES( rekonq      ${QT_LIBRARIES}       ${QT_QTNETWORK_LIBRARY}      ${QT_QTWEBKIT_LIBRARY}  +    ${QT_QTUITOOLS_LIBRARY}  	${KDE4_KDEUI_LIBS}      ${KDE4_KIO_LIBS}  ) diff --git a/src/bookmarks.cpp b/src/bookmarks.cpp index 3cb65e38..584b2689 100644 --- a/src/bookmarks.cpp +++ b/src/bookmarks.cpp @@ -26,6 +26,7 @@  // KDE Includes  #include <KMimeType> +#include <KMenu>  OwnBookMarks::OwnBookMarks(KMainWindow *parent)      : QObject(parent) @@ -55,17 +56,52 @@ QString OwnBookMarks::currentTitle() const  } -//--------------------------------------------------------------------------------------------------------------------- +// ------------------------------------------------------------------------------------------------------ -BookmarksMenu::BookmarksMenu(KMainWindow *parent) -    : KMenu(parent) -    , m_owner( new OwnBookMarks( parent ) ) +BookmarksProvider::BookmarksProvider(KMainWindow* parent) +    : m_parent(parent) +    , m_owner(new OwnBookMarks(parent))   {      KUrl bookfile = KUrl( "~/.kde/share/apps/konqueror/bookmarks.xml" );    // share konqueror bookmarks      m_manager = KBookmarkManager::managerForExternalFile( bookfile.path() ); -      m_ac = new KActionCollection( this ); +} + -    m_menu = new KBookmarkMenu( m_manager , m_owner, this, m_ac ); +void BookmarksProvider::provideBmToolbar(KToolBar* toolbar) +{ +    toolbar->setToolButtonStyle( Qt::ToolButtonTextBesideIcon ); +    KBookmarkGroup toolbarGroup = m_manager->toolbar(); +    KBookmark bm = toolbarGroup.first(); +    while(!bm.isNull()) +    { +        if(bm.isGroup()) +        { +            // do nothing! +        } +        else +        { +            if(bm.isSeparator()) +            { +                toolbar->addSeparator(); +            } +            else +            { +                KAction *a = new KBookmarkAction(bm, m_owner, m_ac); +                toolbar->addAction(a); +            } +        } +        // go ahead! +        bm = toolbarGroup.next(bm); +    }  } + + +KMenu *BookmarksProvider::bookmarksMenu() +{ +    KMenu *bmMenu = new KMenu(m_parent); +    new KBookmarkMenu( m_manager, m_owner, bmMenu, m_ac ); +    return bmMenu; +} + diff --git a/src/bookmarks.h b/src/bookmarks.h index e0e49c78..2bdfab0a 100644 --- a/src/bookmarks.h +++ b/src/bookmarks.h @@ -26,6 +26,7 @@  #include <KBookmarkMenu>  #include <KUrl> +#include <KMenu>  #include <KActionCollection>  #include <KMainWindow> @@ -35,7 +36,7 @@ class OwnBookMarks : public QObject , public KBookmarkOwner  {  Q_OBJECT  public: -    OwnBookMarks(KMainWindow * ); +    OwnBookMarks(KMainWindow *);      virtual void openBookmark (const KBookmark & , Qt::MouseButtons , Qt::KeyboardModifiers ); @@ -50,19 +51,21 @@ private:      MainWindow *m_parent;  }; +// ------------------------------------------------------------------------------ -class BookmarksMenu : public KMenu +class BookmarksProvider : public QObject  {  Q_OBJECT  public: -    BookmarksMenu(KMainWindow * parent); +    BookmarksProvider(KMainWindow*); + +    void provideBmToolbar(KToolBar*); +    KMenu *bookmarksMenu();  private: -    KBookmarkManager *m_manager; +    KMainWindow *m_parent;      OwnBookMarks *m_owner; +    KBookmarkManager *m_manager;      KActionCollection *m_ac; -    KBookmarkMenu *m_menu;  }; - -  #endif diff --git a/src/download.cpp b/src/download.cpp index aedd0a63..627b11b2 100644 --- a/src/download.cpp +++ b/src/download.cpp @@ -33,7 +33,7 @@ Download::Download(const KUrl &srcUrl, const KUrl &destUrl)    : m_srcUrl(srcUrl),      m_destUrl(destUrl)  { -    kDebug(5001) << "DownloadFile: " << m_srcUrl.url() << " to dest: " << m_destUrl.url(); +    kWarning() << "DownloadFile: " << m_srcUrl.url() << " to dest: " << m_destUrl.url();      m_copyJob = KIO::get(m_srcUrl);      connect(m_copyJob, SIGNAL(data(KIO::Job*,const QByteArray &)), SLOT(slotData(KIO::Job*, const QByteArray&)));      connect(m_copyJob, SIGNAL(result(KJob *)), SLOT(slotResult(KJob *))); @@ -51,32 +51,36 @@ void Download::slotData(KIO::Job *job, const QByteArray& data)  void Download::slotResult(KJob * job)  { -    kDebug(5001);      switch (job->error())      {          case 0://The download has finished          { -            kDebug(5001) << "Downloading successfully finished" << m_destUrl.url(); -            QFile torrentFile(m_destUrl.path()); -            if (!torrentFile.open(QIODevice::WriteOnly | QIODevice::Text)) {} -            torrentFile.write(m_data); -            torrentFile.close(); -            emit finishedSuccessfully(m_destUrl, m_data); +            kDebug(5001) << "Downloading successfully finished: " << m_destUrl.url(); +            QFile destFile(m_destUrl.path()); +            int n = 1; +            QString fn = destFile.fileName(); +            while( destFile.exists() ) +            { +                destFile.setFileName( fn + "." + QString::number(n) ); +                n++; +            } +            if ( destFile.open(QIODevice::WriteOnly | QIODevice::Text) ) +            { +                destFile.write(m_data); +                destFile.close(); +            }              m_data = 0;              break;          }          case KIO::ERR_FILE_ALREADY_EXIST:          { -            kDebug(5001) << "ERROR - File already exists"; -            QFile file(m_destUrl.path()); -            emit finishedSuccessfully(m_destUrl, file.readAll()); +            kWarning() << "ERROR - File already exists";              m_data = 0;              break;          }          default: -            kDebug(5001) << "We are sorry to say you, that there were errors while downloading :("; +            kWarning() << "We are sorry to say you, that there were errors while downloading :(";              m_data = 0; -            emit finishedWithError();              break;      }  } diff --git a/src/download.h b/src/download.h index 7986341d..65f36d3b 100644 --- a/src/download.h +++ b/src/download.h @@ -37,10 +37,6 @@ class Download : public QObject          Download(const KUrl &srcUrl, const KUrl &destUrl);          ~Download(); -    Q_SIGNALS: -        void finishedSuccessfully(KUrl dest, QByteArray data); -        void finishedWithError(); -      private slots:          void slotResult(KJob * job);          void slotData(KIO::Job *job, const QByteArray& data); diff --git a/src/findbar.cpp b/src/findbar.cpp index 6ba310ca..df5b5bc7 100644 --- a/src/findbar.cpp +++ b/src/findbar.cpp @@ -33,33 +33,46 @@  #include <QtGui> -FindBar::FindBar(KXmlGuiWindow *parent) -    : KToolBar( "findBar" , parent, Qt::BottomToolBarArea, true, false, false) +FindBar::FindBar(KXmlGuiWindow *mainwindow) +    : QWidget()      , m_lineEdit(0)  { -    KAction *close = new KAction(KIcon("dialog-close") , "close" , this); -    connect( close , SIGNAL( triggered() ), this, SLOT( hide() ) ); -    addAction( close ); +    QHBoxLayout *layout = new QHBoxLayout; -    QLabel *label = new QLabel("Find: "); -    addWidget( label ); +    // cosmetic +    layout->setMargin(2); + +    // hide button +    QToolButton *hideButton = new QToolButton(this); +    hideButton->setAutoRaise(true); +    hideButton->setIcon(KIcon("dialog-close")); +    connect(hideButton, SIGNAL(clicked()), this, SLOT(hide())); +    layout->addWidget(hideButton); +    layout->setAlignment( hideButton, Qt::AlignLeft|Qt::AlignTop ); -    m_lineEdit = new KLineEdit(); -    m_lineEdit->setMaximumWidth( 200 ); +    // label +    QLabel *label = new QLabel("Find: "); +    layout->addWidget(label); -    connect( m_lineEdit, SIGNAL( returnPressed() ), parent, SLOT( slotFindNext() ) ); -    connect( m_lineEdit, SIGNAL( textEdited(const QString &) ), parent, SLOT( slotFindNext() ) ); -    addWidget( m_lineEdit ); +    // lineEdit, focusProxy +    m_lineEdit = new KLineEdit(this); +    setFocusProxy(m_lineEdit); +    m_lineEdit->setMaximumWidth( 250 ); +    connect( m_lineEdit, SIGNAL( textChanged(const QString &) ), mainwindow, SLOT( slotFind(const QString &) ) ); +    layout->addWidget( m_lineEdit ); +    // buttons      KPushButton *findNext = new KPushButton( KIcon("go-down"), "&Next", this );      KPushButton *findPrev = new KPushButton( KIcon("go-up"), "&Previous", this ); -    // perhaps we don't need working on style.. -//     findNext->setStyle(); -//     findPrev->setStyle(); -    connect( findNext, SIGNAL( clicked() ), parent, SLOT( slotFindNext() ) ); -    connect( findPrev, SIGNAL( clicked() ), parent, SLOT( slotFindPrevious() ) ); -    addWidget( findNext ); -    addWidget( findPrev ); +    connect( findNext, SIGNAL( clicked() ), mainwindow, SLOT( slotFindNext() ) ); +    connect( findPrev, SIGNAL( clicked() ), mainwindow, SLOT( slotFindPrevious() ) ); +    layout->addWidget( findNext ); +    layout->addWidget( findPrev ); +     +    // stretching widget on the left +    layout->addStretch(); + +    setLayout(layout);      // we start off hidden      hide(); @@ -102,7 +115,7 @@ void FindBar::keyPressEvent(QKeyEvent* event)          hide();          return;      } -    if(event->key() == Qt::Key_Return && ! ( m_lineEdit->text().isEmpty() ) ) +    if(event->key() == Qt::Key_Return && !m_lineEdit->text().isEmpty() )      {          emit searchString( m_lineEdit->text() );          return; diff --git a/src/findbar.h b/src/findbar.h index d70a9de1..f2c59ce9 100644 --- a/src/findbar.h +++ b/src/findbar.h @@ -25,12 +25,12 @@  #include <KToolBar>  #include <KXmlGuiWindow> -class FindBar : public KToolBar +class FindBar : public QWidget  // KateViewHelpers.h  {      Q_OBJECT  public: -    FindBar(KXmlGuiWindow *parent); +    FindBar(KXmlGuiWindow *mainwindow);      ~FindBar();      KLineEdit *lineEdit(); @@ -46,7 +46,6 @@ signals:  private:      KLineEdit *m_lineEdit; -    QWidget *m_centralWidget;  };  #endif diff --git a/src/main.cpp b/src/main.cpp index c3ac0c00..9a779783 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -27,7 +27,7 @@  static const char description[] =      I18N_NOOP("KDE Browser Webkit Based"); -static const char version[] = "0.0.2"; +static const char version[] = "0.0.3";  int main(int argc, char **argv)  { diff --git a/src/mainview.cpp b/src/mainview.cpp index 328d3dd1..acef1998 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -171,14 +171,6 @@ void MainView::slotWebPaste()  } -void MainView::slotWebSelectAll() -{ -    WebView *webView = currentWebView(); -    QWebPage *currentParent = webView->webPage(); -    // TODO -} - -  void MainView::clear()  {      // clear the recently closed tabs diff --git a/src/mainview.h b/src/mainview.h index 1bb0bf6e..1f443a37 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -112,7 +112,6 @@ public slots:      void slotWebCut();      void slotWebCopy();      void slotWebPaste(); -    void slotWebSelectAll();  private slots:      void currentChanged(int index); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 7a7ec427..ecd5e452 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -34,6 +34,8 @@  #include "networkaccessmanager.h"  #include "bookmarks.h"  #include "webview.h" +#include "mainview.h" +#include "bookmarks.h"  // UI Includes  #include "ui_passworddialog.h" @@ -48,6 +50,7 @@  #include <KActionCollection>  #include <KMessageBox>  #include <KFileDialog> +#include <KMenu>  // Qt Includes  #include <QPlainTextEdit> @@ -57,24 +60,35 @@  #include <QWebFrame>  #include <QWebHistory>  #include <QDebug> +#include <QVBoxLayout>  MainWindow::MainWindow()      : KXmlGuiWindow()      , m_view( new MainView(this) ) +    , m_bookmarksProvider( new BookmarksProvider(this) )  {      // accept dnd      setAcceptDrops(true);      // updating rekonq configuration      slotUpdateConf(); -//     QTimer::singleShot(0, this, SLOT( postLaunch() ) ); - +          // creating a new tab      m_view->newTab(); -    // tell the KXmlGuiWindow that this is indeed the main widget -    setCentralWidget(m_view); +    // creating a centralWidget containing m_view and the hidden findbar +    QWidget *centralWidget = new QWidget; +    QVBoxLayout *layout = new QVBoxLayout; +    layout->addWidget(m_view); + +    // Find Bar +    m_findBar = new FindBar(this); +    connect( m_findBar, SIGNAL( searchString(const QString &) ), this, SLOT( slotFind(const QString &) ) ); +    layout->addWidget(m_findBar); + +    centralWidget->setLayout(layout); +    setCentralWidget(centralWidget);      // connect signals and slots      connect(m_view, SIGNAL( loadUrlPage(const KUrl &) ), this, SLOT( loadUrl(const KUrl &) ) ); @@ -96,6 +110,12 @@ MainWindow::MainWindow()      // add a status bar      statusBar()->show(); +    // ----- BOOKMARKS MENU: this has to be done BEFORE setupGUI!! +    KAction *a = new KActionMenu( i18n("B&ookmarks"), this ); +    actionCollection()->addAction( QLatin1String("bookmarks"), a ); +    KMenu *bmMenu = m_bookmarksProvider->bookmarksMenu(); +    a->setMenu( bmMenu ); +      // a call to KXmlGuiWindow::setupGUI() populates the GUI      // with actions, using KXMLGUI.      // It also applies the saved mainwindow settings, if any, and ask the @@ -103,8 +123,8 @@ MainWindow::MainWindow()      // toolbar position, icon size, etc.      setupGUI(); -    // setup history & bookmarks menus -    setupCustomMenu(); +    // setup history menu +    setupHistoryMenu();      // setup Tab Bar      setupTabBar(); @@ -113,13 +133,16 @@ MainWindow::MainWindow()      KToolBar *navigationBar = toolBar( "mainToolBar" );      navigationBar->addWidget( m_view->lineEditStack() ); +    KToolBar *bmToolbar = toolBar("bookmarksToolBar"); +    m_bookmarksProvider->provideBmToolbar( bmToolbar ); + +    // setting up toolbars to NOT have context menu enabled +    setContextMenuPolicy( Qt::ActionsContextMenu ); + +    // search bar      m_searchBar = new SearchBar( this );      connect(m_searchBar, SIGNAL(search(const KUrl&)), this, SLOT(loadUrl(const KUrl&)));      navigationBar->addWidget(m_searchBar); - -    // Find Bar -    m_findBar = new FindBar( this ); -    connect( m_findBar, SIGNAL( searchString(const QString &) ), this, SLOT( slotFind(const QString &) ) );   } @@ -155,7 +178,6 @@ void MainWindow::setupActions()      KStandardAction::cut( m_view, SLOT( slotWebCut() ), actionCollection() );      KStandardAction::copy( m_view, SLOT( slotWebCopy() ), actionCollection() );      KStandardAction::paste( m_view, SLOT( slotWebPaste() ), actionCollection() ); -    KStandardAction::selectAll( m_view, SLOT( slotWebSelectAll() ), actionCollection() );      a = new KAction ( KIcon( "process-stop" ), i18n("&Stop"), this );      a->setShortcut( QKeySequence(Qt::CTRL | Qt::Key_Period) ); @@ -200,12 +222,6 @@ void MainWindow::setupActions()      actionCollection()->addAction( QLatin1String("web inspector"), a );      connect( a, SIGNAL( triggered(bool) ), this, SLOT( slotToggleInspector(bool) ) ); -    // ================== BOOKMARKS MENU -    a = new KActionMenu( i18n("B&ookmarks"), this ); -    actionCollection()->addAction( QLatin1String("bookmarks"), a ); -    BookmarksMenu *bookmarksMenu = new BookmarksMenu( this ); -    a->setMenu( bookmarksMenu ); -      // ================ history related actions      KAction *historyBack = new KAction( KIcon("go-previous"), i18n("Back"), this);      m_historyBackMenu = new KMenu(this); @@ -260,9 +276,8 @@ void MainWindow::setupTabBar()  } -void MainWindow::setupCustomMenu() +void MainWindow::setupHistoryMenu()  { -    //  -------------------------------- HISTORY MENU -----------------------------------------------------------------------      HistoryMenu *historyMenu = new HistoryMenu(this);      connect(historyMenu, SIGNAL(openUrl(const KUrl&)), m_view, SLOT(loadUrlInCurrentTab(const KUrl&)));      connect(historyMenu, SIGNAL(hovered(const QString&)), this, SLOT(slotUpdateStatusbar(const QString&))); @@ -539,12 +554,8 @@ void MainWindow::slotFind(const QString & search)  {      if (!currentTab())          return; -    if (!search.isEmpty())  -    { -        m_lastSearch = search; -        if (!currentTab()->findText(m_lastSearch)) -            slotUpdateStatusbar( QString(m_lastSearch) + i18n(" not found.") ); -    } +    m_lastSearch = search; +    slotFindNext();  } @@ -556,17 +567,23 @@ void MainWindow::slotViewFindBar()  void MainWindow::slotFindNext()  { -    if (!currentTab() && !m_lastSearch.isEmpty()) +    if (!currentTab() && m_lastSearch.isEmpty())          return; -    currentTab()->findText(m_lastSearch); +    if (!currentTab()->findText(m_lastSearch, QWebPage::FindWrapsAroundDocument)) +    { +        slotUpdateStatusbar( QString(m_lastSearch) + i18n(" not found.") ); +    }  }  void MainWindow::slotFindPrevious()  { -    if (!currentTab() && !m_lastSearch.isEmpty()) +    if (!currentTab() && m_lastSearch.isEmpty())          return; -    currentTab()->findText(m_lastSearch, QWebPage::FindBackward); +    if (!currentTab()->findText(m_lastSearch, QWebPage::FindBackward)) +    { +        slotUpdateStatusbar( QString(m_lastSearch) + i18n(" not found.") ); +    }  } @@ -638,17 +655,17 @@ void MainWindow::slotToggleInspector(bool enable)  } -void MainWindow::slotSwapFocus() -{ -    if ( currentTab()->hasFocus() ) -    { -        m_view->currentLineEdit()->setFocus(); -    } -    else -    { -        currentTab()->setFocus(); -    } -} +// void MainWindow::slotSwapFocus() +// { +//     if ( currentTab()->hasFocus() ) +//     { +//         m_view->currentLineEdit()->setFocus(); +//     } +//     else +//     { +//         currentTab()->setFocus(); +//     } +// }  MainView *MainWindow::tabWidget() const @@ -709,20 +726,20 @@ void MainWindow::slotAboutToShowBackMenu()  } -void MainWindow::slotShowWindow() -{ -    if (KAction *action = qobject_cast<KAction*>(sender()))  -    { -        QVariant v = action->data(); -        if (v.canConvert<int>())  -        { -            int offset = qvariant_cast<int>(v); -            QList<MainWindow*> windows = BrowserApplication::instance()->mainWindows(); -            windows.at(offset)->activateWindow(); -            windows.at(offset)->currentTab()->setFocus(); -        } -    } -} +// void MainWindow::slotShowWindow() +// { +//     if (KAction *action = qobject_cast<KAction*>(sender()))  +//     { +//         QVariant v = action->data(); +//         if (v.canConvert<int>())  +//         { +//             int offset = qvariant_cast<int>(v); +//             QList<MainWindow*> windows = BrowserApplication::instance()->mainWindows(); +//             windows.at(offset)->activateWindow(); +//             windows.at(offset)->currentTab()->setFocus(); +//         } +//     } +// }  void MainWindow::slotOpenActionUrl(QAction *action) diff --git a/src/mainwindow.h b/src/mainwindow.h index 8b8f1cbe..fa96eb0e 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -25,7 +25,6 @@  // Local Includes  #include "findbar.h"  #include "searchbar.h" -#include "mainview.h"  // KDE Includes  #include <KUrl> @@ -36,7 +35,8 @@  #include <KToggleAction>  #include <KMenu> - +class BookmarksProvider; +class MainView;  class QWebFrame;  class WebView; @@ -61,7 +61,7 @@ public:  private:      void setupActions(); -    void setupCustomMenu(); +    void setupHistoryMenu();      void setupTabBar();  public slots: @@ -75,15 +75,16 @@ private slots:      void slotUpdateWindowTitle(const QString &title = QString());      void slotOpenLocation();      void slotAboutToShowBackMenu(); +    void geometryChangeRequested(const QRect &geometry);      // history related      void slotOpenActionUrl(QAction *action);      void slotOpenPrevious();      void slotOpenNext(); -    void slotShowWindow(); -    void slotSwapFocus(); -    void geometryChangeRequested(const QRect &geometry); +/*    void slotShowWindow(); +    void slotSwapFocus();*/ +      // File Menu slots @@ -121,6 +122,8 @@ private:      KMenu *m_historyBackMenu;      KMenu *m_windowMenu; +    BookmarksProvider *m_bookmarksProvider; +      QAction *m_stopReload;      QString m_lastSearch; diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp index 1d601440..82947c3b 100644 --- a/src/networkaccessmanager.cpp +++ b/src/networkaccessmanager.cpp @@ -64,7 +64,7 @@ NetworkAccessManager::NetworkAccessManager(QObject *parent)  void NetworkAccessManager::loadSettings()  {      QNetworkProxy proxy; -    if ( ReKonfig::enableProxy() )  +    if ( ReKonfig::isProxyEnabled() )       {          if ( ReKonfig::proxyType() == 0 )          { diff --git a/src/rekonq.kcfg b/src/rekonq.kcfg index c20134be..a1b6ca4c 100644 --- a/src/rekonq.kcfg +++ b/src/rekonq.kcfg @@ -50,7 +50,7 @@  <!-- Proxy Settings -->    <group name="Proxy"> -    <entry name="enableProxy" type="Bool"> +    <entry name="isProxyEnabled" type="Bool">          <default>false</default>      </entry>      <entry name="proxyType" type="Int"> diff --git a/src/rekonqui.rc b/src/rekonqui.rc index 3a9ab682..0e372e82 100644 --- a/src/rekonqui.rc +++ b/src/rekonqui.rc @@ -1,5 +1,5 @@  <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd"> -<kpartgui name="rekonq" version="13"> +<kpartgui name="rekonq" version="27">  <MenuBar>  <!--  ============ FILE menu =========== -->  <Menu name="file" noMerge="1"><text>&File</text> @@ -28,8 +28,6 @@      <Action name="edit_copy" />      <Action name="edit_paste" />      <Separator/> -    <Action name="edit_select_all" /> -    <Separator/>      <Action name="edit_find" />      <Action name="edit_find_next" />      <Action name="edit_find_prev" /> @@ -44,7 +42,6 @@      <Action name="smaller font" />      <Separator/>      <Action name="page source" /> -    <Action name="fullscreen" />  </Menu>  <!--  ============ GO menu =========== -->  <Menu name="go" deleted="true"> @@ -57,26 +54,20 @@      <Action name="web inspector" />  </Menu>  <!--  ============ SETTINGS menu =========== --> -<Menu name="settings" noMerge="1"> -    <text>&Settings</text> -    <!-- -    Disable merging because we do not want the "fullscreen" action to appear -    here, since it is already in the "view" menu. -    --> -    <Action name="options_show_menubar"/> -    <Action name="options_configure_keybinding"/> -    <Action name="options_configure_toolbars"/> -    <Action name="options_configure"/> -</Menu>         +<Menu name="settings"> +</Menu>  </MenuBar>  <!--  ============ Main ToolBar =========== --> - -<ToolBar name="mainToolBar" fullWidth="true" iconText="iconOnly" position="top" noMerge="1"><text>Main Toolbar</text> +<ToolBar name="mainToolBar" iconText="iconOnly" newline="true" position="top" noMerge="1"><text>Main Toolbar</text>      <Action name="history back" />      <Action name="history forward" />      <Action name="stop reload" />      <Action name="go_home" />  </ToolBar> +<!--  ============ Bookmarks ToolBar =========== --> +<ToolBar name="bookmarksToolBar" iconSize="16" newline="true" position="top" noMerge="1" hidden="true"><text>Bookmarks Toolbar</text> +</ToolBar> +  </kpartgui> diff --git a/src/settings.cpp b/src/settings.cpp index 462874f9..7ab6e3dc 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -131,10 +131,19 @@ void SettingsDialog::readConfig()      connect(d->generalUi.downloadDirUrlRequester, SIGNAL(textChanged(QString)),this, SLOT(saveSettings()));      // ======= Fonts -    d->fontsUi.standardFontChooser->setFont(ReKonfig::standardFont(), false); +    QFont stdFont = ReKonfig::standardFont(); +    d->fontsUi.standardFontChooser->setFont(stdFont, false); +    d->fontsUi.standardFontChooser->setSampleText( stdFont.family() + " " + QString::number(stdFont.pointSize()) );      connect(d->fontsUi.standardFontChooser, SIGNAL(fontSelected(QFont)),this, SLOT(saveSettings())); -    d->fontsUi.fixedFontChooser->setFont(ReKonfig::fixedFont(), true); +    QFont fxFont = ReKonfig::fixedFont(); +    d->fontsUi.fixedFontChooser->setFont(fxFont, true); +    d->fontsUi.fixedFontChooser->setSampleText( fxFont.family() + " " + QString::number(fxFont.pointSize()) );      connect(d->fontsUi.fixedFontChooser, SIGNAL(fontSelected(QFont)),this, SLOT(saveSettings())); + +    // ======= Proxy +    bool proxyEnabled = ReKonfig::isProxyEnabled(); +    d->proxyUi.groupBox->setEnabled(proxyEnabled); +    connect(d->proxyUi.kcfg_isProxyEnabled, SIGNAL(clicked(bool)), d->proxyUi.groupBox, SLOT(setEnabled(bool)));  } diff --git a/src/settings_proxy.ui b/src/settings_proxy.ui index a7dd6073..bcee0a7e 100644 --- a/src/settings_proxy.ui +++ b/src/settings_proxy.ui @@ -5,21 +5,28 @@     <rect>      <x>0</x>      <y>0</y> -    <width>472</width> -    <height>221</height> +    <width>440</width> +    <height>223</height>     </rect>    </property>    <property name="windowTitle" >     <string>Proxy</string>    </property> -  <layout class="QHBoxLayout" name="horizontalLayout" > +  <layout class="QVBoxLayout" name="verticalLayout" >     <item> -    <widget class="QGroupBox" name="kcfg_enableProxy" > +    <widget class="QCheckBox" name="kcfg_isProxyEnabled" > +     <property name="text" > +      <string>enable proxy</string> +     </property> +    </widget> +   </item> +   <item> +    <widget class="QGroupBox" name="groupBox" >       <property name="title" > -      <string>Enable proxy</string> +      <string>Proxy Settings</string>       </property>       <layout class="QGridLayout" name="gridLayout_6" > -      <item row="0" column="0" > +      <item row="1" column="0" >         <widget class="QLabel" name="label_9" >          <property name="text" >           <string>Type:</string> @@ -29,7 +36,7 @@          </property>         </widget>        </item> -      <item row="0" column="1" colspan="2" > +      <item row="1" column="1" colspan="2" >         <widget class="QComboBox" name="kcfg_proxyType" >          <item>           <property name="text" > @@ -43,7 +50,7 @@          </item>         </widget>        </item> -      <item row="1" column="0" > +      <item row="2" column="0" >         <widget class="QLabel" name="label_10" >          <property name="text" >           <string>Host:</string> @@ -53,10 +60,10 @@          </property>         </widget>        </item> -      <item row="1" column="1" colspan="2" > +      <item row="2" column="1" colspan="2" >         <widget class="KLineEdit" name="kcfg_proxyHostName" />        </item> -      <item row="2" column="0" > +      <item row="3" column="0" >         <widget class="QLabel" name="label_11" >          <property name="text" >           <string>Port:</string> @@ -66,7 +73,7 @@          </property>         </widget>        </item> -      <item row="2" column="1" > +      <item row="3" column="1" >         <widget class="QSpinBox" name="kcfg_proxyPort" >          <property name="maximum" >           <number>10000</number> @@ -76,7 +83,7 @@          </property>         </widget>        </item> -      <item row="2" column="2" > +      <item row="3" column="2" >         <spacer name="horizontalSpacer_2" >          <property name="orientation" >           <enum>Qt::Horizontal</enum> @@ -89,7 +96,7 @@          </property>         </spacer>        </item> -      <item row="3" column="0" > +      <item row="4" column="0" >         <widget class="QLabel" name="label_12" >          <property name="text" >           <string>User Name:</string> @@ -99,10 +106,10 @@          </property>         </widget>        </item> -      <item row="3" column="1" colspan="2" > +      <item row="4" column="1" colspan="2" >         <widget class="KLineEdit" name="kcfg_proxyUserName" />        </item> -      <item row="4" column="0" > +      <item row="5" column="0" >         <widget class="QLabel" name="label_13" >          <property name="text" >           <string>Password:</string> @@ -112,10 +119,10 @@          </property>         </widget>        </item> -      <item row="4" column="1" colspan="2" > +      <item row="5" column="1" colspan="2" >         <widget class="KLineEdit" name="kcfg_proxyPassword" />        </item> -      <item row="5" column="0" > +      <item row="6" column="0" >         <spacer name="verticalSpacer_2" >          <property name="orientation" >           <enum>Qt::Vertical</enum> diff --git a/src/squeezelabel.cpp b/src/squeezelabel.cpp deleted file mode 100644 index 7aa9e177..00000000 --- a/src/squeezelabel.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* ============================================================ - * - * This file is a part of the rekonq project - * - * Copyright (C) 2007-2008 Trolltech ASA. All rights reserved - * Copyright (C) 2008 by Andrea Diamantini <adjam7 at gmail dot 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. - * - * ============================================================ */ - -#include "squeezelabel.h" - -SqueezeLabel::SqueezeLabel(QWidget *parent) : QLabel(parent) -{ -} - -void SqueezeLabel::paintEvent(QPaintEvent *event) -{ -    QFontMetrics fm = fontMetrics(); -    if (fm.width(text()) > contentsRect().width()) { -        QString elided = fm.elidedText(text(), Qt::ElideMiddle, width()); -        QString oldText = text(); -        setText(elided); -        QLabel::paintEvent(event); -        setText(oldText); -    } else { -        QLabel::paintEvent(event); -    } -} diff --git a/src/squeezelabel.h b/src/squeezelabel.h deleted file mode 100644 index a7906270..00000000 --- a/src/squeezelabel.h +++ /dev/null @@ -1,39 +0,0 @@ -/* ============================================================ - * - * This file is a part of the rekonq project - * - * Copyright (C) 2007-2008 Trolltech ASA. All rights reserved - * Copyright (C) 2008 by Andrea Diamantini <adjam7 at gmail dot 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. - * - * ============================================================ */ - -#ifndef SQUEEZELABEL_H -#define SQUEEZELABEL_H - -#include <QtGui/QLabel> - -class SqueezeLabel : public QLabel -{ -    Q_OBJECT - -public: -    SqueezeLabel(QWidget *parent = 0); - -protected: -    void paintEvent(QPaintEvent *event); - -}; - -#endif // SQUEEZELABEL_H - diff --git a/src/webview.cpp b/src/webview.cpp index 436db54e..5d317597 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -42,7 +42,8 @@  #include <QMouseEvent>  #include <QWebHitTestResult>  #include <QBuffer> - +// --- +#include <QUiLoader>  WebPage::WebPage(QObject *parent)      : QWebPage(parent) @@ -120,6 +121,16 @@ QWebPage *WebPage::createWindow(QWebPage::WebWindowType type)  } +QObject *WebPage::createPlugin(const QString &classId, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues) +{ +    Q_UNUSED(url); +    Q_UNUSED(paramNames); +    Q_UNUSED(paramValues); +    QUiLoader loader; +    return loader.createWidget(classId, view()); +} + +  void WebPage::handleUnsupportedContent(QNetworkReply *reply)  {      if (reply->error() == QNetworkReply::NoError)  @@ -191,6 +202,8 @@ WebView::WebView(QWidget* parent)  // TODO : improve and KDE-ize this menu +// 1. Add link to bookmarks +// 2. Add "save link as" action  void WebView::contextMenuEvent(QContextMenuEvent *event)  {      QWebHitTestResult r = page()->mainFrame()->hitTestContent(event->pos()); diff --git a/src/webview.h b/src/webview.h index 6710aac4..6892fbd4 100644 --- a/src/webview.h +++ b/src/webview.h @@ -50,6 +50,7 @@ public:  protected:      bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type);      QWebPage *createWindow(QWebPage::WebWindowType type); +    QObject *createPlugin(const QString &classId, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues);  private slots:      void handleUnsupportedContent(QNetworkReply *reply); | 
