You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
559 lines
23 KiB
559 lines
23 KiB
15 years ago
|
#include "konq_aboutpage.h"
|
||
|
|
||
13 years ago
|
#include <tqtextcodec.h>
|
||
15 years ago
|
|
||
12 years ago
|
#include <tdeaboutdata.h>
|
||
|
#include <tdeapplication.h>
|
||
15 years ago
|
#include <kdebug.h>
|
||
12 years ago
|
#include <tdelocale.h>
|
||
|
#include <tdemessagebox.h>
|
||
15 years ago
|
#include <ksavefile.h>
|
||
|
#include <kstandarddirs.h>
|
||
12 years ago
|
#include <tdeaction.h>
|
||
15 years ago
|
#include <kiconloader.h>
|
||
15 years ago
|
#include <kurifilter.h>
|
||
|
#include <ktrader.h>
|
||
12 years ago
|
#include <tdeconfig.h>
|
||
15 years ago
|
|
||
|
#include <assert.h>
|
||
15 years ago
|
#include <tqfile.h>
|
||
|
#include <tqdir.h>
|
||
15 years ago
|
|
||
|
K_EXPORT_COMPONENT_FACTORY( konq_aboutpage, KonqAboutPageFactory )
|
||
|
|
||
12 years ago
|
TDEInstance *KonqAboutPageFactory::s_instance = 0;
|
||
15 years ago
|
TQString *KonqAboutPageFactory::s_launch_html = 0;
|
||
|
TQString *KonqAboutPageFactory::s_intro_html = 0;
|
||
|
TQString *KonqAboutPageFactory::s_specs_html = 0;
|
||
|
TQString *KonqAboutPageFactory::s_tips_html = 0;
|
||
|
TQString *KonqAboutPageFactory::s_plugins_html = 0;
|
||
15 years ago
|
|
||
15 years ago
|
KonqAboutPageFactory::KonqAboutPageFactory( TQObject *parent, const char *name )
|
||
15 years ago
|
: KParts::Factory( parent, name )
|
||
|
{
|
||
12 years ago
|
s_instance = new TDEInstance( "konqaboutpage" );
|
||
15 years ago
|
}
|
||
|
|
||
|
KonqAboutPageFactory::~KonqAboutPageFactory()
|
||
|
{
|
||
|
delete s_instance;
|
||
|
s_instance = 0;
|
||
|
delete s_launch_html;
|
||
|
s_launch_html = 0;
|
||
|
delete s_intro_html;
|
||
|
s_intro_html = 0;
|
||
|
delete s_specs_html;
|
||
|
s_specs_html = 0;
|
||
|
delete s_tips_html;
|
||
|
s_tips_html = 0;
|
||
|
delete s_plugins_html;
|
||
|
s_plugins_html = 0;
|
||
|
}
|
||
|
|
||
14 years ago
|
KParts::Part *KonqAboutPageFactory::createPartObject( TQWidget *parentWidget, const char *widgetName,
|
||
15 years ago
|
TQObject *parent, const char *name,
|
||
|
const char *, const TQStringList & )
|
||
15 years ago
|
{
|
||
14 years ago
|
//KonqFrame *frame = tqt_dynamic_cast<KonqFrame *>( parentWidget );
|
||
15 years ago
|
//if ( !frame ) return 0;
|
||
|
|
||
|
return new KonqAboutPage( //frame->childView()->mainWindow(),
|
||
14 years ago
|
parentWidget, widgetName, parent, name );
|
||
15 years ago
|
}
|
||
|
|
||
15 years ago
|
TQString KonqAboutPageFactory::loadFile( const TQString& file )
|
||
15 years ago
|
{
|
||
15 years ago
|
TQString res;
|
||
15 years ago
|
if ( file.isEmpty() )
|
||
|
return res;
|
||
|
|
||
15 years ago
|
TQFile f( file );
|
||
15 years ago
|
|
||
|
if ( !f.open( IO_ReadOnly ) )
|
||
|
return res;
|
||
|
|
||
15 years ago
|
TQTextStream t( &f );
|
||
15 years ago
|
|
||
|
res = t.read();
|
||
|
|
||
|
// otherwise all embedded objects are referenced as about:/...
|
||
13 years ago
|
TQString basehref = TQString::fromLatin1("<BASE HREF=\"file:") +
|
||
13 years ago
|
file.left( file.findRev( '/' )) +
|
||
13 years ago
|
TQString::fromLatin1("/\">\n");
|
||
15 years ago
|
TQRegExp reg("<head>");
|
||
15 years ago
|
reg.setCaseSensitive(FALSE);
|
||
13 years ago
|
res.replace(reg, "<head>\n\t" + basehref);
|
||
15 years ago
|
return res;
|
||
|
}
|
||
|
|
||
15 years ago
|
TQString KonqAboutPageFactory::launch()
|
||
15 years ago
|
{
|
||
15 years ago
|
// FIXME: only regenerate launch page if kuriikwsfilterrc changed.
|
||
|
/*
|
||
15 years ago
|
if ( s_launch_html )
|
||
|
return *s_launch_html;
|
||
15 years ago
|
*/
|
||
15 years ago
|
|
||
15 years ago
|
TQString res = loadFile( locate( "data", "konqueror/about/launch.html" ));
|
||
15 years ago
|
if ( res.isEmpty() )
|
||
|
return res;
|
||
|
|
||
12 years ago
|
TDEIconLoader *iconloader = TDEGlobal::iconLoader();
|
||
|
int iconSize = iconloader->currentSize(TDEIcon::Desktop);
|
||
|
TQString home_icon_path = iconloader->iconPath("kfm_home", TDEIcon::Desktop );
|
||
10 years ago
|
TQString storage_icon_path = iconloader->iconPath("computer", TDEIcon::Desktop );
|
||
12 years ago
|
TQString remote_icon_path = iconloader->iconPath("network", TDEIcon::Desktop );
|
||
|
TQString wastebin_icon_path = iconloader->iconPath("trashcan_full", TDEIcon::Desktop );
|
||
|
TQString applications_icon_path = iconloader->iconPath("kmenu", TDEIcon::Desktop );
|
||
|
TQString settings_icon_path = iconloader->iconPath("kcontrol", TDEIcon::Desktop );
|
||
|
TQString help_icon_path = iconloader->iconPath("khelpcenter", TDEIcon::Desktop );
|
||
15 years ago
|
TQString home_folder = TQDir::homeDirPath();
|
||
12 years ago
|
TQString continue_icon_path = TQApplication::reverseLayout()?iconloader->iconPath("1leftarrow", TDEIcon::Small ):iconloader->iconPath("1rightarrow", TDEIcon::Small );
|
||
15 years ago
|
|
||
13 years ago
|
res = res.arg( locate( "data", "tdeui/about/kde_infopage.css" ) );
|
||
15 years ago
|
if ( kapp->reverseLayout() )
|
||
13 years ago
|
res = res.arg( "@import \"%1\";" ).arg( locate( "data", "tdeui/about/kde_infopage_rtl.css" ) );
|
||
15 years ago
|
else
|
||
13 years ago
|
res = res.arg( "" );
|
||
15 years ago
|
|
||
15 years ago
|
// Try to split page in three. If it succeeds, insert the default search into the middle part.
|
||
15 years ago
|
TQStringList parts = TQStringList::split( "<!--search bar splitter-->", res );
|
||
15 years ago
|
if ( parts.count() == 3 ) {
|
||
12 years ago
|
TDEConfig config( "kuriikwsfilterrc", true /*read-only*/, false /*no KDE globals*/ );
|
||
15 years ago
|
config.setGroup( "General" );
|
||
15 years ago
|
TQString name = config.readEntry("DefaultSearchEngine");
|
||
15 years ago
|
KService::Ptr service =
|
||
13 years ago
|
KService::serviceByDesktopPath(TQString("searchproviders/%1.desktop").arg(name));
|
||
15 years ago
|
if ( service ) {
|
||
15 years ago
|
TQString searchBar = parts[1];
|
||
15 years ago
|
searchBar = searchBar
|
||
13 years ago
|
.arg( iconSize ).arg( iconSize )
|
||
|
.arg( service->name() )
|
||
|
.arg( service->property("Keys").toStringList()[0] )
|
||
15 years ago
|
;
|
||
|
res = parts[0] + searchBar + parts[2];
|
||
|
}
|
||
|
else res = parts[0] + parts[2];
|
||
|
}
|
||
|
|
||
13 years ago
|
res = res.arg( i18n("Conquer your Desktop!") )
|
||
|
.arg( i18n( "Konqueror" ) )
|
||
|
.arg( i18n("Conquer your Desktop!") )
|
||
|
.arg( i18n("Konqueror is your file manager, web browser and universal document viewer.") )
|
||
|
.arg( i18n( "Starting Points" ) )
|
||
|
.arg( i18n( "Introduction" ) )
|
||
|
.arg( i18n( "Tips" ) )
|
||
|
.arg( i18n( "Specifications" ) )
|
||
|
.arg( home_folder )
|
||
|
.arg( home_icon_path )
|
||
|
.arg(iconSize).arg(iconSize)
|
||
|
.arg( home_folder )
|
||
|
.arg( i18n( "Home Folder" ) )
|
||
|
.arg( i18n( "Your personal files" ) )
|
||
|
.arg( storage_icon_path )
|
||
|
.arg(iconSize).arg(iconSize)
|
||
|
.arg( i18n( "Storage Media" ) )
|
||
|
.arg( i18n( "Disks and removable media" ) )
|
||
|
.arg( remote_icon_path )
|
||
|
.arg(iconSize).arg(iconSize)
|
||
|
.arg( i18n( "Network Folders" ) )
|
||
|
.arg( i18n( "Shared files and folders" ) )
|
||
|
.arg( wastebin_icon_path )
|
||
|
.arg(iconSize).arg(iconSize)
|
||
|
.arg( i18n( "Trash" ) )
|
||
|
.arg( i18n( "Browse and restore the trash" ) )
|
||
|
.arg( applications_icon_path )
|
||
|
.arg(iconSize).arg(iconSize)
|
||
|
.arg( i18n( "Applications" ) )
|
||
|
.arg( i18n( "Installed programs" ) )
|
||
12 years ago
|
.arg( settings_icon_path )
|
||
13 years ago
|
.arg(iconSize).arg(iconSize)
|
||
12 years ago
|
.arg( i18n( "Settings" ) )
|
||
|
.arg( i18n( "Desktop configuration" ) )
|
||
13 years ago
|
.arg( continue_icon_path )
|
||
12 years ago
|
.arg( TDEIcon::SizeSmall ).arg( TDEIcon::SizeSmall )
|
||
13 years ago
|
.arg( i18n( "Next: An Introduction to Konqueror" ) )
|
||
15 years ago
|
;
|
||
|
i18n("Search the Web");//i18n for possible future use
|
||
|
|
||
15 years ago
|
s_launch_html = new TQString( res );
|
||
15 years ago
|
|
||
|
return res;
|
||
|
}
|
||
|
|
||
15 years ago
|
TQString KonqAboutPageFactory::intro()
|
||
15 years ago
|
{
|
||
|
if ( s_intro_html )
|
||
|
return *s_intro_html;
|
||
|
|
||
15 years ago
|
TQString res = loadFile( locate( "data", "konqueror/about/intro.html" ));
|
||
15 years ago
|
if ( res.isEmpty() )
|
||
|
return res;
|
||
|
|
||
12 years ago
|
TDEIconLoader *iconloader = TDEGlobal::iconLoader();
|
||
|
TQString back_icon_path = TQApplication::reverseLayout()?iconloader->iconPath("forward", TDEIcon::Small ):iconloader->iconPath("back", TDEIcon::Small );
|
||
10 years ago
|
TQString gohome_icon_path = iconloader->iconPath("go-home", TDEIcon::Small );
|
||
12 years ago
|
TQString continue_icon_path = TQApplication::reverseLayout()?iconloader->iconPath("1leftarrow", TDEIcon::Small ):iconloader->iconPath("1rightarrow", TDEIcon::Small );
|
||
15 years ago
|
|
||
13 years ago
|
res = res.arg( locate( "data", "tdeui/about/kde_infopage.css" ) );
|
||
15 years ago
|
if ( kapp->reverseLayout() )
|
||
13 years ago
|
res = res.arg( "@import \"%1\";" ).arg( locate( "data", "tdeui/about/kde_infopage_rtl.css" ) );
|
||
15 years ago
|
else
|
||
13 years ago
|
res = res.arg( "" );
|
||
|
|
||
|
res = res.arg( i18n("Conquer your Desktop!") )
|
||
|
.arg( i18n( "Konqueror" ) )
|
||
|
.arg( i18n( "Conquer your Desktop!") )
|
||
|
.arg( i18n( "Konqueror is your file manager, web browser and universal document viewer.") )
|
||
|
.arg( i18n( "Starting Points" ) )
|
||
|
.arg( i18n( "Introduction" ) )
|
||
|
.arg( i18n( "Tips" ) )
|
||
|
.arg( i18n( "Specifications" ) )
|
||
|
.arg( i18n( "Konqueror makes working with and managing your files easy. You can browse "
|
||
15 years ago
|
"both local and networked folders while enjoying advanced features "
|
||
|
"such as the powerful sidebar and file previews."
|
||
|
) )
|
||
13 years ago
|
.arg( i18n( "Konqueror is also a full featured and easy to use web browser which you "
|
||
15 years ago
|
"can use to explore the Internet. "
|
||
11 years ago
|
"Enter the address (e.g. <a href=\"http://www.trinitydesktop.org\">http://www.trinitydesktop.org</A>) "
|
||
15 years ago
|
"of a web page you would like to visit in the location bar and press Enter, "
|
||
|
"or choose an entry from the Bookmarks menu.") )
|
||
13 years ago
|
.arg( i18n( "To return to the previous "
|
||
15 years ago
|
"location, press the back button <img width='16' height='16' src=\"%1\"> "
|
||
13 years ago
|
"in the toolbar. ").arg( back_icon_path ) )
|
||
|
.arg( i18n( "To quickly go to your Home folder press the "
|
||
|
" home button <img width='16' height='16' src=\"%1\">." ).arg(gohome_icon_path) )
|
||
|
.arg( i18n( "For more detailed documentation on Konqueror click <a href=\"%1\">here</a>." )
|
||
|
.arg("exec:/khelpcenter") )
|
||
|
.arg( i18n( "<em>Tuning Tip:</em> If you want the Konqueror web browser to start faster,"
|
||
15 years ago
|
" you can turn off this information screen by clicking <a href=\"%1\">here</a>. You can re-enable it"
|
||
|
" by choosing the Help -> Konqueror Introduction menu option, and then pressing "
|
||
13 years ago
|
"Settings -> Save View Profile \"Web Browsing\".").arg("config:/disable_overview") )
|
||
|
.arg( "<img width='16' height='16' src=\"%1\">" ).arg( continue_icon_path )
|
||
|
.arg( i18n( "Next: Tips & Tricks" ) )
|
||
15 years ago
|
;
|
||
|
|
||
|
|
||
15 years ago
|
s_intro_html = new TQString( res );
|
||
15 years ago
|
|
||
|
return res;
|
||
|
}
|
||
|
|
||
15 years ago
|
TQString KonqAboutPageFactory::specs()
|
||
15 years ago
|
{
|
||
|
if ( s_specs_html )
|
||
|
return *s_specs_html;
|
||
|
|
||
12 years ago
|
TDEIconLoader *iconloader = TDEGlobal::iconLoader();
|
||
15 years ago
|
TQString res = loadFile( locate( "data", "konqueror/about/specs.html" ));
|
||
12 years ago
|
TQString continue_icon_path = TQApplication::reverseLayout()?iconloader->iconPath("1leftarrow", TDEIcon::Small ):iconloader->iconPath("1rightarrow", TDEIcon::Small );
|
||
15 years ago
|
if ( res.isEmpty() )
|
||
|
return res;
|
||
|
|
||
13 years ago
|
res = res.arg( locate( "data", "tdeui/about/kde_infopage.css" ) );
|
||
15 years ago
|
if ( kapp->reverseLayout() )
|
||
13 years ago
|
res = res.arg( "@import \"%1\";" ).arg( locate( "data", "tdeui/about/kde_infopage_rtl.css" ) );
|
||
15 years ago
|
else
|
||
13 years ago
|
res = res.arg( "" );
|
||
|
|
||
|
res = res.arg( i18n("Conquer your Desktop!") )
|
||
|
.arg( i18n( "Konqueror" ) )
|
||
|
.arg( i18n("Conquer your Desktop!") )
|
||
|
.arg( i18n("Konqueror is your file manager, web browser and universal document viewer.") )
|
||
|
.arg( i18n( "Starting Points" ) )
|
||
|
.arg( i18n( "Introduction" ) )
|
||
|
.arg( i18n( "Tips" ) )
|
||
|
.arg( i18n( "Specifications" ) )
|
||
|
.arg( i18n("Specifications") )
|
||
|
.arg( i18n("Konqueror is designed to embrace and support Internet standards. "
|
||
15 years ago
|
"The aim is to fully implement the officially sanctioned standards "
|
||
|
"from organizations such as the W3 and OASIS, while also adding "
|
||
|
"extra support for other common usability features that arise as "
|
||
|
"de facto standards across the Internet. Along with this support, "
|
||
|
"for such functions as favicons, Internet Keywords, and <A HREF=\"%1\">XBEL bookmarks</A>, "
|
||
13 years ago
|
"Konqueror also implements:").arg("http://pyxml.sourceforge.net/topics/xbel/") )
|
||
|
.arg( i18n("Web Browsing") )
|
||
|
.arg( i18n("Supported standards") )
|
||
|
.arg( i18n("Additional requirements*") )
|
||
|
.arg( i18n("<A HREF=\"%1\">DOM</A> (Level 1, partially Level 2) based "
|
||
|
"<A HREF=\"%2\">HTML 4.01</A>").arg("http://www.w3.org/DOM").arg("http://www.w3.org/TR/html4/") )
|
||
|
.arg( i18n("built-in") )
|
||
|
.arg( i18n("<A HREF=\"%1\">Cascading Style Sheets</A> (CSS 1, partially CSS 2)").arg("http://www.w3.org/Style/CSS/") )
|
||
|
.arg( i18n("built-in") )
|
||
|
.arg( i18n("<A HREF=\"%1\">ECMA-262</A> Edition 3 (roughly equals JavaScript 1.5)").arg("http://www.ecma.ch/ecma1/STAND/ECMA-262.HTM") )
|
||
12 years ago
|
.arg( i18n("JavaScript disabled (globally). Enable JavaScript <A HREF=\"%1\">here</A>.").arg("exec:/tdecmshell tdehtml_java_js") )
|
||
|
.arg( i18n("JavaScript enabled (globally). Configure JavaScript <A HREF=\\\"%1\\\">here</A>.").arg("exec:/tdecmshell tdehtml_java_js") ) // leave the double backslashes here, they are necessary for javascript !
|
||
13 years ago
|
.arg( i18n("Secure <A HREF=\"%1\">Java</A><SUP>®</SUP> support").arg("http://java.sun.com") )
|
||
|
.arg( i18n("JDK 1.2.0 (Java 2) compatible VM (<A HREF=\"%1\">Blackdown</A>, <A HREF=\"%2\">IBM</A> or <A HREF=\"%3\">Sun</A>)")
|
||
|
.arg("http://www.blackdown.org").arg("http://www.ibm.com").arg("http://java.sun.com") )
|
||
12 years ago
|
.arg( i18n("Enable Java (globally) <A HREF=\"%1\">here</A>.").arg("exec:/tdecmshell tdehtml_java_js") ) // TODO Maybe test if Java is enabled ?
|
||
13 years ago
|
.arg( i18n("Netscape Communicator<SUP>®</SUP> <A HREF=\"%4\">plugins</A> (for viewing <A HREF=\"%1\">Flash<SUP>®</SUP></A>, <A HREF=\"%2\">Real<SUP>®</SUP></A>Audio, <A HREF=\"%3\">Real<SUP>®</SUP></A>Video, etc.)")
|
||
|
.arg("http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash")
|
||
|
.arg("http://www.real.com").arg("http://www.real.com")
|
||
|
.arg("about:plugins") )
|
||
|
.arg( i18n("built-in") )
|
||
|
.arg( i18n("Secure Sockets Layer") )
|
||
|
.arg( i18n("(TLS/SSL v2/3) for secure communications up to 168bit") )
|
||
|
.arg( i18n("OpenSSL") )
|
||
13 years ago
|
.arg( i18n("Bidirectional 16bit unicode support") )
|
||
13 years ago
|
.arg( i18n("built-in") )
|
||
|
.arg( i18n("AutoCompletion for forms") )
|
||
|
.arg( i18n("built-in") )
|
||
|
.arg( i18n("G E N E R A L") )
|
||
|
.arg( i18n("Feature") )
|
||
|
.arg( i18n("Details") )
|
||
|
.arg( i18n("Image formats") )
|
||
|
.arg( i18n("Transfer protocols") )
|
||
|
.arg( i18n("HTTP 1.1 (including gzip/bzip2 compression)") )
|
||
|
.arg( i18n("FTP") )
|
||
12 years ago
|
.arg( i18n("and <A HREF=\"%1\">many more...</A>").arg("exec:/tdecmshell ioslaveinfo") )
|
||
13 years ago
|
.arg( i18n("URL-Completion") )
|
||
|
.arg( i18n("Manual"))
|
||
|
.arg( i18n("Popup"))
|
||
|
.arg( i18n("(Short-) Automatic"))
|
||
|
.arg( "<img width='16' height='16' src=\"%1\">" ).arg( continue_icon_path )
|
||
|
.arg( i18n("<a href=\"%1\">Return to Starting Points</a>").arg("launch.html") )
|
||
15 years ago
|
|
||
|
;
|
||
|
|
||
15 years ago
|
s_specs_html = new TQString( res );
|
||
15 years ago
|
|
||
|
return res;
|
||
|
}
|
||
|
|
||
15 years ago
|
TQString KonqAboutPageFactory::tips()
|
||
15 years ago
|
{
|
||
|
if ( s_tips_html )
|
||
|
return *s_tips_html;
|
||
|
|
||
15 years ago
|
TQString res = loadFile( locate( "data", "konqueror/about/tips.html" ));
|
||
15 years ago
|
if ( res.isEmpty() )
|
||
|
return res;
|
||
|
|
||
12 years ago
|
TDEIconLoader *iconloader = TDEGlobal::iconLoader();
|
||
15 years ago
|
TQString viewmag_icon_path =
|
||
12 years ago
|
iconloader->iconPath("viewmag", TDEIcon::Small );
|
||
15 years ago
|
TQString history_icon_path =
|
||
12 years ago
|
iconloader->iconPath("history", TDEIcon::Small );
|
||
15 years ago
|
TQString openterm_icon_path =
|
||
12 years ago
|
iconloader->iconPath("openterm", TDEIcon::Small );
|
||
15 years ago
|
TQString locationbar_erase_rtl_icon_path =
|
||
12 years ago
|
iconloader->iconPath("clear_left", TDEIcon::Small );
|
||
15 years ago
|
TQString locationbar_erase_icon_path =
|
||
12 years ago
|
iconloader->iconPath("locationbar_erase", TDEIcon::Small );
|
||
15 years ago
|
TQString window_fullscreen_icon_path =
|
||
10 years ago
|
iconloader->iconPath("view-fullscreen", TDEIcon::Small );
|
||
15 years ago
|
TQString view_left_right_icon_path =
|
||
12 years ago
|
iconloader->iconPath("view_left_right", TDEIcon::Small );
|
||
|
TQString continue_icon_path = TQApplication::reverseLayout()?iconloader->iconPath("1leftarrow", TDEIcon::Small ):iconloader->iconPath("1rightarrow", TDEIcon::Small );
|
||
15 years ago
|
|
||
13 years ago
|
res = res.arg( locate( "data", "tdeui/about/kde_infopage.css" ) );
|
||
15 years ago
|
if ( kapp->reverseLayout() )
|
||
13 years ago
|
res = res.arg( "@import \"%1\";" ).arg( locate( "data", "tdeui/about/kde_infopage_rtl.css" ) );
|
||
15 years ago
|
else
|
||
13 years ago
|
res = res.arg( "" );
|
||
|
|
||
|
res = res.arg( i18n("Conquer your Desktop!") )
|
||
|
.arg( i18n( "Konqueror" ) )
|
||
|
.arg( i18n("Conquer your Desktop!") )
|
||
|
.arg( i18n("Konqueror is your file manager, web browser and universal document viewer.") )
|
||
|
.arg( i18n( "Starting Points" ) )
|
||
|
.arg( i18n( "Introduction" ) )
|
||
|
.arg( i18n( "Tips" ) )
|
||
|
.arg( i18n( "Specifications" ) )
|
||
|
.arg( i18n( "Tips & Tricks" ) )
|
||
11 years ago
|
.arg( i18n( "Use Internet-Keywords and Web-Shortcuts: by typing \"gg: Trinity Desktop\" one can search the Internet, "
|
||
|
"using Google, for the search phrase \"Trinity Desktop\". There are a lot of "
|
||
15 years ago
|
"Web-Shortcuts predefined to make searching for software or looking "
|
||
|
"up certain words in an encyclopedia a breeze. You can even "
|
||
12 years ago
|
"<a href=\"%1\">create your own</a> Web-Shortcuts." ).arg("exec:/tdecmshell ebrowsing") )
|
||
13 years ago
|
.arg( i18n( "Use the magnifier button <img width='16' height='16' src=\"%1\"> in the"
|
||
|
" toolbar to increase the font size on your web page.").arg(viewmag_icon_path) )
|
||
|
.arg( i18n( "When you want to paste a new address into the Location toolbar you might want to "
|
||
15 years ago
|
"clear the current entry by pressing the black arrow with the white cross "
|
||
|
"<img width='16' height='16' src=\"%1\"> in the toolbar.")
|
||
13 years ago
|
.arg(TQApplication::reverseLayout() ? locationbar_erase_rtl_icon_path : locationbar_erase_icon_path))
|
||
|
.arg( i18n( "To create a link on your desktop pointing to the current page, "
|
||
15 years ago
|
"simply drag the \"Location\" label that is to the left of the Location toolbar, drop it on to "
|
||
|
"the desktop, and choose \"Link\"." ) )
|
||
13 years ago
|
.arg( i18n( "You can also find <img width='16' height='16' src=\"%1\"> \"Full-Screen Mode\" "
|
||
15 years ago
|
"in the Settings menu. This feature is very useful for \"Talk\" "
|
||
13 years ago
|
"sessions.").arg(window_fullscreen_icon_path) )
|
||
|
.arg( i18n( "Divide et impera (lat. \"Divide and conquer\") - by splitting a window "
|
||
15 years ago
|
"into two parts (e.g. Window -> <img width='16' height='16' src=\"%1\"> Split View "
|
||
|
"Left/Right) you can make Konqueror appear the way you like. You"
|
||
|
" can even load some example view-profiles (e.g. Midnight Commander)"
|
||
13 years ago
|
", or create your own ones." ).arg(view_left_right_icon_path))
|
||
|
.arg( i18n( "Use the <a href=\"%1\">user-agent</a> feature if the website you are visiting "
|
||
15 years ago
|
"asks you to use a different browser "
|
||
12 years ago
|
"(and do not forget to send a complaint to the webmaster!)" ).arg("exec:/tdecmshell useragent") )
|
||
13 years ago
|
.arg( i18n( "The <img width='16' height='16' src=\"%1\"> History in your SideBar ensures "
|
||
|
"that you can keep track of the pages you have visited recently.").arg(history_icon_path) )
|
||
|
.arg( i18n( "Use a caching <a href=\"%1\">proxy</a> to speed up your"
|
||
12 years ago
|
" Internet connection.").arg("exec:/tdecmshell proxy") )
|
||
13 years ago
|
.arg( i18n( "Advanced users will appreciate the Konsole which you can embed into "
|
||
15 years ago
|
"Konqueror (Window -> <img width='16' height='16' SRC=\"%1\"> Show "
|
||
13 years ago
|
"Terminal Emulator).").arg(openterm_icon_path))
|
||
|
.arg( i18n( "Thanks to <a href=\"%1\">DCOP</a> you can have full control over Konqueror using a script."
|
||
|
).arg("exec:/kdcop") )
|
||
|
.arg( i18n( "<img width='16' height='16' src=\"%1\">" ).arg( continue_icon_path ) )
|
||
|
.arg( i18n( "Next: Specifications" ) )
|
||
15 years ago
|
;
|
||
|
|
||
|
|
||
15 years ago
|
s_tips_html = new TQString( res );
|
||
15 years ago
|
|
||
|
return res;
|
||
|
}
|
||
|
|
||
|
|
||
15 years ago
|
TQString KonqAboutPageFactory::plugins()
|
||
15 years ago
|
{
|
||
|
if ( s_plugins_html )
|
||
|
return *s_plugins_html;
|
||
|
|
||
15 years ago
|
TQString res = loadFile( locate( "data", kapp->reverseLayout() ? "konqueror/about/plugins_rtl.html" : "konqueror/about/plugins.html" ))
|
||
13 years ago
|
.arg(i18n("Installed Plugins"))
|
||
|
.arg(i18n("<td>Plugin</td><td>Description</td><td>File</td><td>Types</td>"))
|
||
|
.arg(i18n("Installed"))
|
||
|
.arg(i18n("<td>Mime Type</td><td>Description</td><td>Suffixes</td><td>Plugin</td>"));
|
||
15 years ago
|
if ( res.isEmpty() )
|
||
|
return res;
|
||
|
|
||
15 years ago
|
s_plugins_html = new TQString( res );
|
||
15 years ago
|
|
||
|
return res;
|
||
|
}
|
||
|
|
||
|
|
||
|
KonqAboutPage::KonqAboutPage( //KonqMainWindow *
|
||
14 years ago
|
TQWidget *parentWidget, const char *widgetName,
|
||
15 years ago
|
TQObject *parent, const char *name )
|
||
12 years ago
|
: TDEHTMLPart( parentWidget, widgetName, parent, name, BrowserViewGUI )
|
||
15 years ago
|
{
|
||
|
//m_mainWindow = mainWindow;
|
||
12 years ago
|
TQTextCodec* codec = TDEGlobal::locale()->codecForEncoding();
|
||
15 years ago
|
if (codec)
|
||
|
setCharset(codec->name(), true);
|
||
|
else
|
||
|
setCharset("iso-8859-1", true);
|
||
12 years ago
|
// about:blah isn't a tdeioslave -> disable View source
|
||
12 years ago
|
TDEAction * act = actionCollection()->action("viewDocumentSource");
|
||
15 years ago
|
if ( act )
|
||
|
act->setEnabled( false );
|
||
|
}
|
||
|
|
||
|
KonqAboutPage::~KonqAboutPage()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
bool KonqAboutPage::openURL( const KURL &u )
|
||
|
{
|
||
15 years ago
|
kdDebug(1202) << "now in KonqAboutPage::openURL( \"" << u.url() << "\" )" << endl;
|
||
|
if ( u.url() == "about:plugins" )
|
||
|
serve( KonqAboutPageFactory::plugins(), "plugins" );
|
||
|
else if ( !u.query().isEmpty() ) {
|
||
15 years ago
|
TQMap< TQString, TQString > queryItems = u.queryItems( 0 );
|
||
|
TQMap< TQString, TQString >::ConstIterator query = queryItems.begin();
|
||
|
TQString newUrl;
|
||
15 years ago
|
if (query.key() == "strigi") {
|
||
|
newUrl = KURIFilter::self()->filteredURI( query.key() + ":?q=" + query.data() );
|
||
|
} else {
|
||
|
newUrl = KURIFilter::self()->filteredURI( query.key() + ":" + query.data() );
|
||
|
}
|
||
|
kdDebug(1202) << "scheduleRedirection( 0, \"" << newUrl << "\" )" << endl;
|
||
|
scheduleRedirection( 0, newUrl );
|
||
|
}
|
||
|
else serve( KonqAboutPageFactory::launch(), "konqueror" );
|
||
|
return true;
|
||
15 years ago
|
}
|
||
|
|
||
|
bool KonqAboutPage::openFile()
|
||
|
{
|
||
|
return true;
|
||
|
}
|
||
|
|
||
15 years ago
|
void KonqAboutPage::saveState( TQDataStream &stream )
|
||
15 years ago
|
{
|
||
|
stream << m_htmlDoc;
|
||
|
stream << m_what;
|
||
|
}
|
||
|
|
||
15 years ago
|
void KonqAboutPage::restoreState( TQDataStream &stream )
|
||
15 years ago
|
{
|
||
|
stream >> m_htmlDoc;
|
||
|
stream >> m_what;
|
||
|
serve( m_htmlDoc, m_what );
|
||
|
}
|
||
|
|
||
15 years ago
|
void KonqAboutPage::serve( const TQString& html, const TQString& what )
|
||
15 years ago
|
{
|
||
|
m_what = what;
|
||
13 years ago
|
begin( KURL( TQString("about:%1").arg(what) ) );
|
||
15 years ago
|
write( html );
|
||
|
end();
|
||
|
m_htmlDoc = html;
|
||
|
}
|
||
|
|
||
15 years ago
|
void KonqAboutPage::urlSelected( const TQString &url, int button, int state, const TQString &target, KParts::URLArgs _args )
|
||
15 years ago
|
{
|
||
|
KURL u( url );
|
||
|
if ( u.protocol() == "exec" )
|
||
|
{
|
||
15 years ago
|
TQStringList args = TQStringList::split( TQChar( ' ' ), url.mid( 6 ) );
|
||
|
TQString executable = args[ 0 ];
|
||
15 years ago
|
args.remove( args.begin() );
|
||
12 years ago
|
TDEApplication::tdeinitExec( executable, args );
|
||
15 years ago
|
return;
|
||
|
}
|
||
|
|
||
13 years ago
|
if ( url == TQString::fromLatin1("launch.html") )
|
||
15 years ago
|
{
|
||
|
emit browserExtension()->openURLNotify();
|
||
|
serve( KonqAboutPageFactory::launch(), "konqueror" );
|
||
|
return;
|
||
|
}
|
||
13 years ago
|
else if ( url == TQString::fromLatin1("intro.html") )
|
||
15 years ago
|
{
|
||
|
emit browserExtension()->openURLNotify();
|
||
|
serve( KonqAboutPageFactory::intro(), "konqueror" );
|
||
|
return;
|
||
|
}
|
||
13 years ago
|
else if ( url == TQString::fromLatin1("specs.html") )
|
||
15 years ago
|
{
|
||
|
emit browserExtension()->openURLNotify();
|
||
|
serve( KonqAboutPageFactory::specs(), "konqueror" );
|
||
|
return;
|
||
|
}
|
||
13 years ago
|
else if ( url == TQString::fromLatin1("tips.html") )
|
||
15 years ago
|
{
|
||
|
emit browserExtension()->openURLNotify();
|
||
|
serve( KonqAboutPageFactory::tips(), "konqueror" );
|
||
|
return;
|
||
|
}
|
||
|
|
||
13 years ago
|
else if ( url == TQString::fromLatin1("config:/disable_overview") )
|
||
15 years ago
|
{
|
||
|
if ( KMessageBox::questionYesNo( widget(),
|
||
|
i18n("Do you want to disable showing "
|
||
|
"the introduction in the webbrowsing profile?"),
|
||
|
i18n("Faster Startup?"),i18n("Disable"),i18n("Keep") )
|
||
|
== KMessageBox::Yes )
|
||
|
{
|
||
15 years ago
|
TQString profile = locateLocal("data", "konqueror/profiles/webbrowsing");
|
||
15 years ago
|
KSaveFile file( profile );
|
||
|
if ( file.status() == 0 ) {
|
||
15 years ago
|
TQCString content = "[Profile]\n"
|
||
15 years ago
|
"Name=Web-Browser";
|
||
|
fputs( content.data(), file.fstream() );
|
||
|
file.close();
|
||
|
}
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
|
||
12 years ago
|
TDEHTMLPart::urlSelected( url, button, state, target, _args );
|
||
15 years ago
|
}
|
||
|
|
||
|
#include "konq_aboutpage.moc"
|