LinuxQuestions.org
Support LQ: Use code LQCO20 and save 20% on CrossOver Office
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 01-26-2012, 02:51 AM   #1
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 346

Rep: Reputation: 7
Save a File


anybody knows how to save a file with FileChooserDialog???
please do help me if you know
 
Old 01-26-2012, 03:09 AM   #2
TobiSGD
Guru
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware
Posts: 7,592
Blog Entries: 2

Rep: Reputation: 1673Reputation: 1673Reputation: 1673Reputation: 1673Reputation: 1673Reputation: 1673Reputation: 1673Reputation: 1673Reputation: 1673Reputation: 1673Reputation: 1673
The FileCHooserDialog does exactly what its name says: It allows the user to specify a file name using a graphical dialog and delivers it back to your program. The saving part is totally up to your program, the FileChooserDialog will not do that.
 
Old 01-26-2012, 03:30 AM   #3
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 346

Original Poster
Rep: Reputation: 7
ok i got it.but i have another question.i'm writing a web browser with python.i built the basic function like go back, go forward, refresh and an entry, so far.
when i browse a site like google everything is ok and it shows the google page.but when i click on images in the google home page my browser's entry wont change to the new address.how am i suppose to make it work.
consider that for saving a page i should know the exact address of the page.
 
Old 01-26-2012, 07:03 AM   #4
MTK358
LQ 5k Club
 
Registered: Sep 2009
Distribution: Arch x86_64
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 707Reputation: 707Reputation: 707Reputation: 707Reputation: 707Reputation: 707Reputation: 707
Quote:
Originally Posted by devilboy09 View Post
when i browse a site like google everything is ok and it shows the google page.but when i click on images in the google home page my browser's entry wont change to the new address.
I have no idea what GUI toolkit you are using, but that browser widget should probably have a way to call a callback when the address changes, and you can use it to change the text in your address line.
 
Old 01-27-2012, 01:43 AM   #5
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 346

Original Poster
Rep: Reputation: 7
i'm using gtk.webkit.i'm new with python.could you help me about that.i didn't find anything paticular in the help pag of webkit !
 
Old 01-27-2012, 02:43 AM   #6
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 346

Original Poster
Rep: Reputation: 7
i found it, so i put it here in case anybody wants to use it:
Code:
self.browser = gtk.webkit.WebView()
self.yrl_bar = gtk.Entry()
self.url_bar.set_text( self.browser.get_main_frame().get_uri() )
the third line will update the url bar after every time you enter a site domain and subdomains
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Sed – how do I save output to file with filename from content of another file? misarab Programming 4 02-28-2011 02:12 PM
gedit cannot save text file, type mailbox file ! snailchess Linux - Newbie 10 02-26-2011 04:57 AM
[SOLVED] Transferring from save file to save partition hda7 Puppy 2 05-04-2010 08:11 AM
How to modify a field in few lines in a file and save the new file - in Perl rounak94 Programming 1 10-02-2008 07:43 PM
Mozilla 1.7 - No File Save / File Open dialogs on Slackware 10.0 jayseye Slackware 8 08-10-2004 05:52 AM


All times are GMT -5. The time now is 05:18 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration