Author Topic: Lets create a PCLinuxOS webkit browser (python)  (Read 29518 times)

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15829
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #210 on: April 08, 2011, 05:13:11 AM »
Quote from: scoundrel
this one is not comming to this thread kori ..just the main paige ..

That is because we have no menu bar with Help > About as yet. We hope to add that soon.

Offline Sproggy

  • Hero Member
  • *****
  • Posts: 1484
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #211 on: April 08, 2011, 06:23:42 AM »
the about is in the right click menu .... open the page and right click anywhere then choose about ... it will come straight to the thread

Kori

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15829
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #212 on: April 08, 2011, 06:39:18 AM »
Oops! :o Missed that. ::)

Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #213 on: April 08, 2011, 07:04:25 AM »
"About" is in the right-click menu but it opens this page - http://live.gnome.org/PyWebKitGtk.  Nothing wrong with that but we may want to come up with an alternative down the track - something inhouse and file:///...
Linux Registered User # 529407


Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15829
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #214 on: April 08, 2011, 07:22:42 AM »
"About" is in the right-click menu but it opens this page - http://live.gnome.org/PyWebKitGtk.  Nothing wrong with that but we may want to come up with an alternative down the track - something inhouse and file:///...


Kori has already changed that. See reply #201.

Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #215 on: April 08, 2011, 07:38:15 AM »
Sorry, hadn't looked at that.  I still like the idea of something inhouse and file:///..., although that will mean coming up with a preference/config file. 
Linux Registered User # 529407


Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15829
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #216 on: April 08, 2011, 07:54:30 AM »
Sorry, hadn't looked at that.  I still like the idea of something inhouse and file:///..., although that will mean coming up with a preference/config file. 

It will take a little time, but we can. :)

Offline Sproggy

  • Hero Member
  • *****
  • Posts: 1484
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #217 on: April 08, 2011, 08:08:15 AM »
thats why i pointed it here ... at least it's a kinda progress update ... hope i didnt do wrong :-\

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15829
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #218 on: April 08, 2011, 08:33:45 AM »
thats why i pointed it here ... at least it's a kinda progress update ... hope i didnt do wrong :-\

No, you did good. :) You gave us an "About" page. :)

Offline Sproggy

  • Hero Member
  • *****
  • Posts: 1484
« Last Edit: April 08, 2011, 02:03:01 PM by Sproggy »

Offline scoundrel

  • Administrator
  • Hero Member
  • *****
  • Posts: 4586
  • Philosophy= Bigger Hammer
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #220 on: April 08, 2011, 01:11:26 PM »
ok as i confused everyone ... i went in and hacked it a bit and have added an about button ... which comes to this thread

http://dl.dropbox.com/u/5639762/PCLinuxOS_Hammer.py-0.0.1.3.tar.xz

Kori


thanks dude..
Please Donate Today..Or I Will Make You Wish You Had

Hootiegibbon

  • Guest
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #221 on: April 08, 2011, 02:31:16 PM »
Ok, Great woirk by the "HammerCrewe" and thanks to all

I am trying to see how we cab feed an url into thehammer  from an external app ( a mail client for example) or from the commad line

From an earlier script I spotted this example which we can addapt into the current script I think, there is also an example of how we can add the http:// to addresses if its not entered
Code: [Select]
if len(sys.argv) > 1:
url = sys.argv[1]
else:
url = DEFAULT_URL
gtk.gdk.threads_init()
browser = SimpleBrowser()
browser.open(url)
browser.show()
Code: [Select]
   def on_active(self, widget, data=None):
        '''When the user enters an address in the bar, we check to make
           sure they added the http://, if not we add it for them.  Once
           the url is correct, we just ask webkit to open that site.'''
        url = self.url_bar.get_text()
        try:
            url.index("://")
        except:
            url = "http://"+url
        self.url_bar.set_text(url)
        self.web_view.open(url)



The other Question i have relates to hiding the toolbar with a keybinding, I notice that there is line that say 'if toolbar true @ doe this mean ther is a toggle state?
Code: [Select]
def __init__(self, location_enabled=True, toolbar_enabled=True):
        gtk.Toolbar.__init__(self)

Not sure if this makes sence as I am flagging a bit today, I will have a coffee of 5 and see if that helps.

EDIT - added both sets of code for review

Jase
« Last Edit: April 08, 2011, 02:40:13 PM by Hootiegibbon »

Hootiegibbon

  • Guest
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #222 on: April 08, 2011, 03:37:32 PM »

Ok double posting here I had a bit of inspiration with the 3rd coffee...

How about we get Surfraw to work with the hammer to open in new tabs when used

What is surfraw? well I am glad you asked!

http://surfraw.alioth.debian.org/

I know we had this set up in the repo (an older-version) but its moved on quite a bit ...

If this is possible can we set the textBrowser section to w3m...

Jase
« Last Edit: April 08, 2011, 03:41:58 PM by Hootiegibbon »

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15829
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #223 on: April 08, 2011, 04:12:59 PM »
Flagging myself, Jase. I'll see if I can do something with that. Maybe ongoto and Taco.22 will, too.

ongoto

  • Guest
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #224 on: April 08, 2011, 05:17:38 PM »
Hootiegibbon  ;D
I don't know about you LOL

Are we talking about shoe-horning a terminal into the browser so we can use W3M instead of Webkit ?