PNG Transparency Fix for IE6
Hope somone can help with this. Basically I have a PNG image with a transparancy to sit over a gradient background, like this :
http://www.hpwebdesign.co.uk/mklink/index102.shtml
The little graphics next to campaign metrics are OK, but the main header image they sit in with the light blue gradient and hand graphic etc is not - the little areas around the curved corners should be transparent but are not (in IE6).
I assume this is because that is a background image for the <div> being referenced in the CSS, rather than dropped into the page directly.
So I guess my question is can this be overcome?
Thanks.
IE 6 doesn't support transparent PNGs natively. You will either have to resort to Javascript hacks to force IE 6 to render it correctly (although these do not work for repeated background images in CSS), use a lowest common denominator image format (GIF), or use conditional commenting to give IE 6 it's own stylesheet with it's own image to get something somewhat like what the other browsers will see.
Or just not worry what IE 6 sees as long as your site content is accessible and usable.
Similar Messages
-
Png transparency issues in IE6
I've had an absolutely lovely time today trying to make my
header logo (a transparent .png) display correctly in IE6. I guess
I might be better off giving up on it, but at this point I don't
want to let go of it (plus I'd like the page to look better). I
used the pngfix.js fix from
Bob
Osala's site. I put the JavaScript in the same folder as my
template, and followed the instructions given on the site.
When I check the template page in IE6 it looks just fine, but
when I check the web pages using the template, the logo displays
with the dreaded bluish gray background. Here's what my test page
looks like:
Feed-back.com test
page
IE6 doesn't even see the code. I obviously don't understand
how this works. Anybody have any thoughts or suggestions?
Thanks,
DanaDana,
Your page is looking for the pngfix.js here but it's not
there.
http://feed-back.com/pngfix.js
I typically place my scripts into a folder called Scripts. So
my code would
look like this:
<!--[if lt IE 7]>
<script defer type="text/javascript"
src="Scripts/pngfix.js"></script>
<![endif]-->
Also, just so you know, pngfix.js doesn't work on background
images.
HTH,
--Nancy O.
Alt-Web Design & Publishing
www.alt-web.com
"danaclaire" <[email protected]> wrote in
message
news:g3kgp3$i7b$[email protected]..
> I've had an absolutely lovely time today trying to make
my header logo (a
> transparent .png) display correctly in IE6. I guess I
might be better off
> giving up on it, but at this point I don't want to let
go of it (plus I'd
like
> the page to look better). I used the pngfix.js fix from
>
http://homepage.ntlworld.com/bobosola/pnghowto.htm.
I put the JavaScript
in the
> same folder as my template, and followed the
instructions given on the
site.
>
> When I check the template page in IE6 it looks just
fine, but when I
check the
> web pages using the template, the logo displays with the
dreaded bluish
gray
> background. Here's what my test page looks like:
>
http://feed-back.com/consulting_temp.html
>
> IE6 doesn't even see the code. I obviously don't
understand how this
works.
> Anybody have any thoughts or suggestions?
> Thanks,
> Dana
> -
Hello.
I've been working on a CSS drop down menu for my website
which works fine in Internet Explorer 7 and all other modern
browsers. But I used Browsershots.org to have a look at the site in
IE6 and it was terrible. I am using Windows Vista so there is no
way of me getting IE 6 on this machine (MultipleIE's doesn't work).
So I need some help fixing for IE6. Page url is
http://runecentral.net/index.php
HTML Code and CSS Code;
First the list
<div class="menu">
<ul id="nav">
<li id="fi"><a href="
http://www.runecentral.net/">Home</a></li>
<li id="fi"><a href="
http://forum.runecentral.net/">Forums</a></li>
<li id="fi"><a href="
http://chat.runecentral.net/">Chat</a></li>
<li id="fi">Guides
<ul>
<li id="si"><a href="/skills.php">Skill
Guides</a></li>
<li id="si"><a href="/quests.php">Quest
Guides</a></li>
<li id="si"><a href="/minigames.php">Mini Game
Guides</a></li>
<li id="si"><a href="/guilds.php">Guild
Guides</a></li>
<li id="si"><a href="/cities.php">City
Guides</a></li>
<li id="si"><a
href="/monsterhunting.php">Monster Hunting
Guides</a></li>
<li id="si"><a href="/moneymaking.php">Money
Making Guides</a></li>
<li id="si"><a
href="/miscellaneous.php">Miscellaneous
Guides</a></li>
</ul>
</li>
<li id="fi">Databases
<ul>
<li id="si"><a href="/items.php">Item
Database</a></li>
<li id="si"><a href="/monsters.php">Monster
Database</a></li>
<li id="si"><a href="/npcs.php">NPC
Database</a></li>
<li id="si"><a href="/shops.php">Shop
Database</a></li>
</ul>
</li>
<li id="fi">Tools
<ul>
<li id="si"><a href="/skillcalcs.php">Skill
Calculators</a></li>
<li id="si"><a href="/skillplanners.php">Skill
Planners</a></li>
<li id="si"><a href="/maxhit.php">Max Hit
Calculator</a></li>
<li id="si"><a href="/combatcalc.php">Combat
Calculator</a></li>
</ul>
</li>
<li id="fi">Maps
<ul>
<li id="si"><a href="/worldmap.php">Official
World Map</a></li>
<li id="si"><a href="/dungeons.php">Dungeon
Maps</a></li>
</ul>
</li>
<li id="fi">Archives
<ul id="nav">
<li id="si"><a href="/newsarchive.php">News
Archive</a></li>
<li id="si"><a href="/pollarchive.php">Poll
Archive</a></li>
</ul>
</li>
<li id="fi"><a
href="/contact.php">Contact</a></li>
</ul>
</div>
Now the main CSS code
.menu ul, li {
margin: 0;
padding: 0;
list-style-type: none;
.menu {
text-align: center;
font-size: 14px;
height: 30px;
line-height: 30px;
.menu a {
text-decoration: none;
color: #FFFFFF;
ul#nav {
width: 100%;
height: 30px;
margin: 0 auto;
ul#nav li {
position: relative;
float: left;
#fi {
width: 75px;
height: 30px;
cursor: pointer;
#si {
width: 170px;
float: left;
height: 25px;
line-height: 25px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-right-color: #000000;
border-bottom-color: #000000;
border-left-color: #000000;
background-color: red;
ul#nav li:hover {
background-color:#00FFCC;
ul#nav li ul {
display: none;
ul#nav li:hover ul {
display: inline;
float: left;
height: auto;
padding: 0;
margin: 0;
text-align: left;
ul#nav li:hover ul li {
display: block;
margin: 0;
padding: 0 0 0 5px;
height: 100%;
ul#nav li#fi a {
display: block;
height: 100%;
ul#nav li#fi:hover {
background-image: url(/img/fixedbar_over.png);
If you need any more code just check the page source.
I know this is quite a lot to ask but I am really stuck as I
cannot do it myself so any help would be greatly appreciated.
Many thanks and regards,
Perry RoperHowever, if it's
http://www.runecentral.com/
then you need to fix some of
the 150 validation errors here:
http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.runecentral.com%2F
Jo
"josie1one" <[email protected]> wrote in message
news:[email protected]...
>>
http://runecentral.net/index.php
> Appears to be a bad link
>
> --
> Jo
>
>
>
> "Perry|" <[email protected]> wrote in
message
> news:[email protected]...
>> Hello.
>>
>> I've been working on a CSS drop down menu for my
website which works fine
>> in
>> Internet Explorer 7 and all other modern browsers.
But I used
>> Browsershots.org
>> to have a look at the site in IE6 and it was
terrible. I am using Windows
>> Vista
>> so there is no way of me getting IE 6 on this
machine (MultipleIE's
>> doesn't
>> work). So I need some help fixing for IE6. Page url
is
>>
http://runecentral.net/index.php
HTML Code and CSS Code;
>>
>> First the list
>>
>> <div class="menu">
>> <ul id="nav">
>> <li id="fi"><a href="
http://www.runecentral.net/">Home</a></li>
>> <li id="fi"><a href="
http://forum.runecentral.net/">Forums</a></li>
>> <li id="fi"><a href="
http://chat.runecentral.net/">Chat</a></li>
>> <li id="fi">Guides
>>
>> <li id="si"><a href="/skills.php">Skill
Guides</a></li>
>> <li id="si"><a href="/quests.php">Quest
Guides</a></li>
>> <li id="si"><a
href="/minigames.php">Mini Game Guides</a></li>
>> <li id="si"><a href="/guilds.php">Guild
Guides</a></li>
>> <li id="si"><a href="/cities.php">City
Guides</a></li>
>> <li id="si"><a
href="/monsterhunting.php">Monster Hunting
>> Guides</a></li>
>> <li id="si"><a
href="/moneymaking.php">Money Making Guides</a></li>
>> <li id="si"><a
href="/miscellaneous.php">Miscellaneous
Guides</a></li>
>>
>> </li>
>> <li id="fi">Databases
>>
>> <li id="si"><a href="/items.php">Item
Database</a></li>
>> <li id="si"><a
href="/monsters.php">Monster Database</a></li>
>> <li id="si"><a href="/npcs.php">NPC
Database</a></li>
>> <li id="si"><a href="/shops.php">Shop
Database</a></li>
>>
>> </li>
>> <li id="fi">Tools
>>
>> <li id="si"><a
href="/skillcalcs.php">Skill Calculators</a></li>
>> <li id="si"><a
href="/skillplanners.php">Skill Planners</a></li>
>> <li id="si"><a href="/maxhit.php">Max
Hit Calculator</a></li>
>> <li id="si"><a
href="/combatcalc.php">Combat Calculator</a></li>
>>
>> </li>
>> <li id="fi">Maps
>>
>> <li id="si"><a
href="/worldmap.php">Official World Map</a></li>
>> <li id="si"><a
href="/dungeons.php">Dungeon Maps</a></li>
>>
>> </li>
>> <li id="fi">Archives
>> <ul id="nav">
>> <li id="si"><a
href="/newsarchive.php">News Archive</a></li>
>> <li id="si"><a
href="/pollarchive.php">Poll Archive</a></li>
>>
>> </li>
>> <li id="fi"><a
href="/contact.php">Contact</a></li>
>>
>> </div>
>>
>> Now the main CSS code
>>
>> .menu ul, li {
>> margin: 0;
>> padding: 0;
>> list-style-type: none;
>> }
>> .menu {
>> text-align: center;
>> font-size: 14px;
>> height: 30px;
>> line-height: 30px;
>> }
>> .menu a {
>> text-decoration: none;
>> color: #FFFFFF;
>> }
>> ul#nav {
>> width: 100%;
>> height: 30px;
>> margin: 0 auto;
>> }
>> ul#nav li {
>> position: relative;
>> float: left;
>> }
>> #fi {
>> width: 75px;
>> height: 30px;
>> cursor: pointer;
>> }
>> #si {
>> width: 170px;
>> float: left;
>> height: 25px;
>> line-height: 25px;
>> border-right-width: 1px;
>> border-bottom-width: 1px;
>> border-left-width: 1px;
>> border-right-style: solid;
>> border-bottom-style: solid;
>> border-left-style: solid;
>> border-right-color: #000000;
>> border-bottom-color: #000000;
>> border-left-color: #000000;
>> background-color: red;
>> }
>> ul#nav li:hover {
>> background-color:#00FFCC;
>> }
>> ul#nav li ul {
>> display: none;
>> }
>> ul#nav li:hover ul {
>> display: inline;
>> float: left;
>> height: auto;
>> padding: 0;
>> margin: 0;
>> text-align: left;
>> }
>> ul#nav li:hover ul li {
>> display: block;
>> margin: 0;
>> padding: 0 0 0 5px;
>> height: 100%;
>> }
>> ul#nav li#fi a {
>> display: block;
>> height: 100%;
>> }
>> ul#nav li#fi:hover {
>> background-image: url(/img/fixedbar_over.png);
>> }
>>
>> If you need any more code just check the page
source.
>>
>> I know this is quite a lot to ask but I am really
stuck as I cannot do it
>> myself so any help would be greatly appreciated.
>>
>> Many thanks and regards,
>>
>> Perry Roper
>>
>
> -
hi everyone. i'm doing a new site and decided to go with pngs
for my
topper graphic with transparency since gif is supposedly
dead, or
whatever. i searched here and the web for a good fix for IE6-
and
decided on Supersleight
http://24ways.org/2007/supersleight-transparent-png-in-ie6).
i must be
doing something wrong because i can't for the life of me get
it to work!
the png is the background image for the topper div, but this
fix is
supposed to work on background images. also, if i put that
same image
elsewhere in the page, it still doesn't work. however, if i
put it on an
empty page with nothing but the background, it does work. so
it seems
like there must be something in my template that's causing it
to not work.
could somebody please help me?
here's a link:
http://www.pikespeakderbydames.com/new
thanks!i was afraid of that. i guess i'll go see if Project VII
knows what's up!
thanks for the help!
Nancy O wrote:
> <shrug> Either don't use the png script or look
for an acceptable
> substitute for the others. Project VII could probably
tell you "why" there
> is a conflict with this script. </shrug>
>
> --Nancy O.
> Alt-Web Design & Publishing
> www.alt-web.com
>
>
>
> "courtney (n h c)"
<[email protected]> wrote in message
> news:[email protected]...
>
>> that's it! it won't work with either of those other
two scripts. is
>> there anything i can do about that?
>>
>> thank you for your help!
>>
>> Nancy O wrote:
>>
>>> I haven't used this script before. Quite
possibly there's a conflict
>>>
> with
>
>>> other scripts on that page. Start by commenting
out the Project VII
>>>
> Express
>
>>> Menu script and see if that helps. Then comment
out other scripts one by
>>>
> one
>
>>> to debug.
>>>
>>>
>>> --Nancy O.
>>> Alt-Web Design & Publishing
>>> www.alt-web.com
>>>
>>>
>>> "courtney (n h c)"
<[email protected]> wrote in message
>>> news:[email protected]...
>>>
>>>
>>>> plus, here's my test page with nothing but
the background and topper
>>>> div, and it works fine there:
>>>>
http://www.pikespeakderbydames.com/new/test.html
>>>>
>>>> so it should work, but it's not!
>>>>
>>>> courtney (n h c) wrote:
>>>>
>>>>
>>>>> then why do the instructions say that it
works for backgrounds?
>>>>>
>>>>> SuperSleight adds a number of new and
useful features that have
>>>>>
> come
>
>>>>> from the day-to-day needs of working
with PNGs.
>>>>>
>>>>> * Works with both inline and background
images, replacing the
>>>>> need for both sleight and bgsleight
>>>>>
>>>>> plus, it also won't work on regular
images on that page, but will on
>>>>> other pages. which is why i think
there's something wrong with my code
>>>>> somewhere.
>>>>>
>>>>>
>>>>> Nancy O wrote:
>>>>>
>>>>>
>>>>>> Sorry, png fix doesn't work on BG
images. But it works fine on
>>>>>>
> regular
>
>>>>>> images.
>>>>>>
>>>>>> --Nancy O.
>>>>>> Alt-Web Design & Publishing
>>>>>> www.alt-web.com
>>>>>>
>>>>>>
>>>>>> "courtney (n h c)"
<[email protected]> wrote in message
>>>>>>
news:[email protected]...
>>>>>>
>>>>>>
>>>>>>
>>>>>>> hi everyone. i'm doing a new
site and decided to go with pngs for my
>>>>>>> topper graphic with transparency
since gif is supposedly dead, or
>>>>>>> whatever. i searched here and
the web for a good fix for IE6- and
>>>>>>> decided on Supersleight
>>>>>>> (
http://24ways.org/2007/supersleight-transparent-png-in-ie6).
i must
>>>>>>>
>>>>>>>
>>> be
>>>
>>>
>>>>>>> doing something wrong because i
can't for the life of me get it to
>>>>>>> work!
>>>>>>>
>>>>>>> the png is the background image
for the topper div, but this fix is
>>>>>>> supposed to work on background
images. also, if i put that same
>>>>>>>
> image
>
>>>>>>> elsewhere in the page, it still
doesn't work. however, if i put it
>>>>>>> on an
>>>>>>> empty page with nothing but the
background, it does work. so it
>>>>>>>
> seems
>
>>>>>>> like there must be something in
my template that's causing it to not
>>>>>>> work.
>>>>>>>
>>>>>>> could somebody please help me?
>>>>>>>
>>>>>>> here's a link:
>>>>>>>
http://www.pikespeakderbydames.com/new
>>>>>>>
>>>>>>> thanks!
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>
>>>
>
>
> -
How to fix site display for IE6
Hello,
I posted this last week, but the issue is not yet resolved,
so I'm hoping someone else might be able to assist me. Basically, I
am troubleshooting a site that was created by someone else that
uses Javascript includes and 2 CSS files for the navigation and
presentation.
All but the Home Page does not display correctly in IE6 on
Windows XP, that is, the main content of the page wraps
left-justified and below the left-side navigation.
I've included the html code below because when you visit the
page "live", the html is different. The CSS on the sub main pages
are generated from "includes", and the correct CSS are supposedly
linked, but for some reason the tag does not display when viewing
the source code in a browser window.
The test site is: Home -
http://www.usm.maine.edu/sb/sb_12.21.07/
Sub Pages:
Degree Programs -
http://www.usm.maine.edu/sb/sb_12.21.07/degree/index.html
Prospective Students -
http://www.usm.maine.edu/sb/sb_12.21.07/prospective_students/index.html
Current Students -
http://www.usm.maine.edu/sb/sb_12.21.07/current_students/index.html
Alumni & Friends -
http://www.usm.maine.edu/sb/sb_12.21.07/alumni/index.html
Below is the HTML from the index.html files for the various
sections (Degree Programs, Prospective Students, Current Students,
etc.):
------ code below ---------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN"
http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<!--ENTER PAGE TITLE HERE-->
<title>USM School of Business</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<!--DO *NOT* DELETE-->
<!--#include virtual="/includes/default_hf.htm"-->
</head>
<BODY bgcolor="#FFFFFF" text="#000000" leftmargin="0"
topmargin="0" marginwidth="0" marginheight="0" ID="inside">
<!--DO *NOT* DELETE OR ALTER: code for page header-->
<!--#include virtual="/includes/header_hf.htm"-->
<!--end code for page header-->
<!--Enter page content here-->
<STYLE TYPE="text/css"> @import
url("../css/usmbiz_styles.css"); </STYLE>
<!-- ActiveX fix for IE7 -->
<script src="../js/AC_RunActiveContent.js"
type="text/javascript"></script>
<script src="../js/random_horizontal.js"
type="text/javascript"></script>
<script src="../js/random_vert.js"
type="text/javascript"></script>
<!-- DROP MENU JAVASCRIPT MANDATORY FOR WIND IE -->
<script
type="text/javascript"><!--//--><![CDATA[//><!--
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("horizontal");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes;
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
window.onload=startList;
//--><!]]></script>
<div align="center">
<!-- wrapper -->
<div id="wrapper"><a name="top"></a>
<!-- header -->
<div id="header">
<script type="text/javascript">
AC_FL_RunContent( 'codebase','
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','widt h','775','height','155','id','banner_home','align','middle','src','../banner_home','wmode' ,'transparent','quality','high','flashvars','scale','noscale','pluginspage','http://www.ma cromedia.com/go/getflashplayer','movie','banner_home'
); //end AC code
</script>
<!-- ******** MANDATORY NOSCRIPT FOR IE6 WIN ************
-->
<noscript>
<object
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
width="775" height="155" id="banner_home" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="banner_home.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<embed src="../banner_home.swf" quality="high" width="775"
height="155" name="banner_home" align="middle"
allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
pluginspage="
http://www.macromedia.com/go/getflashplayer"
wmode="transparent"/>
</object>
</noscript>
</div>
<!-- end header -->
------ end code -----------------------
If anyone has additional thoughts/advice, I am most
appreciative. Thanks so much for your help!!
RHYou can try refreshing PPR programmatcly on that table.
Bind that table with bean and when u displaying table using some button or you navigating to that page.call this method before navigation to that page.it will re refresh the table.
Like this AdfFacesContext.getCurrentInstance().addPartialTarget(this.getOrderLinesTableBinding()); -
I use the PluginLab menu extensions for DW, but have yet to
come across a reliable PNG fix. They claim they're working on one;
I have seen Bob Osola's and will try to get it to work in the
meantime...
http://homepage.ntlworld.com/bobosola/index.htmHi,
Hmmm. I think you have a great point there. In my opinion, I
think that there is no png fix for background images. Use jpegs
with background. I do the same.
Gaurav
www.gauravchandra.com -
Transparent background for png sequences
I have a 30 sec cube rotating with transparent background in After effect cs 5-5.. But I am getting png sequence with Black ground. How to get Transparent background in png sequence ?
Thank you Barsik.. In after effect cs 4 I was geeting Transparent background for png sequence but in after effect cs 5-5 I was geeting Black Background and this was creating problem in premiere..
-
Is there any fix for wmode transparency and mouseWheel for actionscript 2.0?
I have a flash component which have to be transparent. Unfortunately, the mouseWheel event is not being detected when wmode is set to transparent. Is there a fix for this?
A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.<br />
The helpers at that forum are more knowledgeable about web development issues.<br />
You need to register at the mozillaZine forum site in order to post at that forum.<br />
See http://forums.mozillazine.org/viewforum.php?f=25 -
PNG fix for background images?
I am putting together an artsy-fartsy design with lots of
stylish wavy lines, fine gradients and dropdown shadow effects and
was wondering if there was a PNG fix for background images. Most
out there seem only to apply to images included in the html.
Otherwise I can use JPEGs with a bit of the background included
behind them (I hate doing this)...Hi,
Hmmm. I think you have a great point there. In my opinion, I
think that there is no png fix for background images. Use jpegs
with background. I do the same.
Gaurav
www.gauravchandra.com -
My macbook fell off the couch and now everything on the display is double and slightly transparent. Is there a fix for this other than getting it replaced?
Only an Apple Store or an authorized Apple Service Provider can determine if a repair is economically justifiable. It may be as simple as a dislodged display cable.
-
I am creating a website and I create stylesheets for the look and feel of the website. Because of conflicting browser engines I have to create a separate stylesheet for versions of Internet Explorer.
I have noticed that FF 3.6 is using the conditional stylesheet I created only for IE6. Please help, this is not happening in later versions of FF or any other browsers.
ThanksThere are solutions for those interface issues, but to address your question about keeping the old version, make sure your auto-update is set to ask you before updating you.
Tools > Options > Advanced > Update mini-tab
http://support.mozilla.com/en-US/kb/Updating%20Firefox#w_configuring-update-options -
I'm having trounble with PNG transparency in Firefox
After I publish my site I see all the PNG transparency in Firefox but in other browsers the PNG transparency works well.
Is there a fix for this?You would need to publish a URL to get help with this and also mention which version of Firefox you are using. Are you using the latest V 4.0?
-
PyGtk/Python 2.0 png transparency help
I've googled and tried to solve this myself for the past few hours to no avail, so i'm hoping someone will be able to help. I installed gmail-notify and decided i wanted to make the popup transparent, so i started looking into the .py file. Even though i'm learning C, and some Assembly, i just can't fully understand python and the gtk library and the frustration is starting to get me. So basically what i'm trying to achieve is to make the image that pops up (background.png) transparent. I'm running stand-alone Openbox, with Cairo. And iv'e made the alpha layers and all that too in the png image. Any help would be greatly appreciated.
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Uploaded by juan_grande 2005/02/24 18:38 UTC
import pygtk
pygtk.require('2.0')
import gtk
import time
import os
import pytrayicon
import sys
import warnings
import ConfigParser
import xmllangs
import GmailConfig
import GmailPopupMenu
import gmailatom
sys.path[0] = "/usr/share/gmail-notify"
BKG_PATH=sys.path[0]+"/background.png"
ICON_PATH=sys.path[0]+"/icon.png"
ICON2_PATH=sys.path[0]+"/icon2.png"
def removetags(text):
raw=text.split("<b>")
raw2=raw[1].split("</b>")
final=raw2[0]
return final
def shortenstring(text,characters):
if text == None: text = ""
mainstr=""
length=0
splitstr=text.split(" ")
for word in splitstr:
length=length+len(word)
if len(word)>characters:
if mainstr=="":
mainstr=word[0:characters]
break
else: break
mainstr=mainstr+word+" "
if length>characters: break
return mainstr.strip()
class GmailNotify:
configWindow = None
options = None
def __init__(self):
self.init=0
print "Gmail Notifier v1.6.1b ("+time.strftime("%Y/%m/%d %H:%M:%S", time.localtime())+")"
print "----------"
# Configuration window
self.configWindow = GmailConfig.GmailConfigWindow( )
# Reference to global options
self.options = self.configWindow.options
# Check if there is a user and password, if not, load config window
while ( self.options["gmailusername"] == None or self.options["gmailpassword"] == None ):
self.configWindow.show()
# Load selected language
self.lang = self.configWindow.get_lang()
print "selected language: "+self.lang.get_name()
# Creates the main window
self.window = gtk.Window(gtk.WINDOW_POPUP)
self.window.set_title(self.lang.get_string(21))
self.window.set_resizable(1)
self.window.set_decorated(0)
self.window.set_keep_above(1)
self.window.stick()
self.window.hide()
# Define some flags
self.senddown=0
self.popup=0
self.newmessages=0
self.mailcheck=0
self.hasshownerror=0
self.hassettimer=0
self.dont_connect=0
self.unreadmsgcount=0
# Define the timers
self.maintimer=None
self.popuptimer=0
self.waittimer=0
# Create the tray icon object
self.tray = pytrayicon.TrayIcon(self.lang.get_string(21));
self.eventbox = gtk.EventBox()
self.tray.add(self.eventbox)
self.eventbox.connect("button_press_event", self.tray_icon_clicked)
# Tray icon drag&drop options
self.eventbox.drag_dest_set(
gtk.DEST_DEFAULT_ALL,
[('_NETSCAPE_URL', 0, 0),('text/uri-list ', 0, 1),('x-url/http', 0, 2)],
gtk.gdk.ACTION_COPY | gtk.gdk.ACTION_MOVE)
# Create the tooltip for the tray icon
self._tooltip = gtk.Tooltips()
# Set the image for the tray icon
self.imageicon = gtk.Image()
pixbuf = gtk.gdk.pixbuf_new_from_file( ICON_PATH )
scaled_buf = pixbuf.scale_simple(24,24,gtk.gdk.INTERP_BILINEAR)
self.imageicon.set_from_pixbuf(scaled_buf)
self.eventbox.add(self.imageicon)
# Show the tray icon
self.tray.show_all()
# Create the popup menu
self.popup_menu = GmailPopupMenu.GmailPopupMenu( self)
# Create the popup
self.fixed=gtk.Fixed()
self.window.add(self.fixed)
self.fixed.show()
self.fixed.set_size_request(0,0)
# Set popup's background image
self.image=gtk.Image()
self.image.set_from_file( BKG_PATH )
self.image.show()
self.fixed.put(self.image,0,0)
# Set popup's label
self.label=gtk.Label()
self.label.set_line_wrap(1)
self.label.set_size_request(170,140)
self.default_label = "<span size='large' ><i><u>"+self.lang.get_string(21)+"</u></i></span>\n\n\n"+self.lang.get_string(20)
self.label.set_markup( self.default_label)
# Show popup
self.label.show()
# Create popup's event box
self.event_box = gtk.EventBox()
self.event_box.set_visible_window(0)
self.event_box.show()
self.event_box.add(self.label)
self.event_box.set_size_request(180,125)
self.event_box.set_events(gtk.gdk.BUTTON_PRESS_MASK)
self.event_box.connect("button_press_event", self.event_box_clicked)
# Setup popup's event box
self.fixed.put(self.event_box,6,25)
self.event_box.realize()
self.event_box.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.HAND1))
# Resize and move popup's event box
self.window.resize(180,1)
self.width, self.height = self.window.get_size()
self.height+=self.options['voffset']
self.width+=self.options['hoffset']
self.window.move(gtk.gdk.screen_width() - self.width, gtk.gdk.screen_height() - self.height)
self.init=1
while gtk.events_pending():
gtk.main_iteration(gtk.TRUE)
# Attemp connection for first time
if self.connect()==1:
# Check mail for first time
self.mail_check()
self.maintimer=gtk.timeout_add(self.options['checkinterval'],self.mail_check)
def connect(self):
# If connecting, cancel connection
if self.dont_connect==1:
print "connection attemp suspended"
return 0
self.dont_connect=1
print "connecting..."
self._tooltip.set_tip(self.tray,self.lang.get_string(13))
while gtk.events_pending():
gtk.main_iteration( gtk.TRUE)
# Attemp connection
try:
self.connection=gmailatom.GmailAtom(self.options['gmailusername'],self.options['gmailpassword'])
self.connection.refreshInfo()
print "connection successful... continuing"
self._tooltip.set_tip(self.tray,self.lang.get_string(14))
self.dont_connect=0
return 1
except:
print "login failed, will retry"
self._tooltip.set_tip(self.tray,self.lang.get_string(15))
self.default_label = "<span size='large' ><u><i>"+self.lang.get_string(15)+"</i></u></span>\n\n"+self.lang.get_string(16)
self.label.set_markup(self.default_label)
self.show_popup()
self.dont_connect=0
return 0
def mail_check(self, event=None):
# If checking, cancel mail check
if self.mailcheck==1:
print "self.mailcheck=1"
return gtk.TRUE
# If popup is up, destroy it
if self.popup==1:
self.destroy_popup()
self.mailcheck=1
print "----------"
print "checking for new mail ("+time.strftime("%Y/%m/%d %H:%M:%S", time.localtime())+")"
while gtk.events_pending():
gtk.main_iteration( gtk.TRUE)
# Get new messages count
attrs = self.has_new_messages()
# If mail check was unsuccessful
if attrs[0]==-1:
self.mailcheck=0
return gtk.TRUE
# Update tray icon
self.eventbox.remove(self.imageicon)
self.imageicon = gtk.Image()
if attrs[1]>0:
print str(attrs[1])+" new messages"
sender = attrs[2]
subject= attrs[3]
snippet= attrs[4]
if len(snippet)>0:
self.default_label="<span size='large' ><u><i>"+self.lang.get_string(17)+sender[0:24]+"</i></u></span>\n"+shortenstring(subject,20)+"\n\n"+snippet+"..."
else:
self.default_label="<span size='large' ><u><i>"+self.lang.get_string(17)+sender[0:24]+"</i></u></span>\n"+shortenstring(subject,20)+"\n\n"+snippet+"..."
self.show_popup()
if attrs[0]>0:
print str(attrs[0])+" unread messages"
s = ' '
if attrs[0]>1: s=self.lang.get_string(35)+" "
self._tooltip.set_tip(self.tray,(self.lang.get_string(19))%{'u':attrs[0],'s':s})
pixbuf = gtk.gdk.pixbuf_new_from_file( ICON2_PATH )
else:
print "no new messages"
self.default_label="<span size='large' ><i><u>"+self.lang.get_string(21)+"</u></i></span>\n\n\n"+self.lang.get_string(18)
self._tooltip.set_tip(self.tray,self.lang.get_string(18))
pixbuf = gtk.gdk.pixbuf_new_from_file( ICON_PATH )
self.label.set_markup(self.default_label)
scaled_buf = pixbuf.scale_simple(24,24,gtk.gdk.INTERP_BILINEAR)
self.imageicon.set_from_pixbuf(scaled_buf)
self.eventbox.add(self.imageicon)
self.tray.show_all()
self.unreadmsgcount=attrs[0]
self.mailcheck=0
return gtk.TRUE
def has_new_messages( self):
unreadmsgcount=0
# Get total messages in inbox
try:
self.connection.refreshInfo()
unreadmsgcount=self.connection.getUnreadMsgCount()
except:
# If an error ocurred, cancel mail check
print "getUnreadMsgCount() failed, will try again soon"
return (-1,)
sender=''
subject=''
snippet=''
finalsnippet=''
if unreadmsgcount>0:
# Get latest message data
sender = self.connection.getMsgAuthorName(0)
subject = self.connection.getMsgTitle(0)
snippet = self.connection.getMsgSummary(0)
if len(sender)>12:
finalsnippet=shortenstring(snippet,20)
else:
finalsnippet=shortenstring(snippet,40)
# Really new messages? Or just repeating...
newmsgcount=unreadmsgcount-self.unreadmsgcount
self.unreadmsgcount=unreadmsgcount
if unreadmsgcount>0:
return (unreadmsgcount, newmsgcount, sender, subject, finalsnippet)
else:
return (unreadmsgcount,0, sender, subject, finalsnippet)
def show_popup(self):
# If popup is up, destroy it
if self.popup==1:
self.destroy_popup()
# Generate popup
print "generating popup"
self.popuptimer = gtk.timeout_add(self.options['animationdelay'],self.popup_proc)
self.window.show()
return
def destroy_popup(self):
print "destroying popup"
if self.popuptimer>0:gtk.timeout_remove(self.popuptimer)
if self.waittimer>0: gtk.timeout_remove(self.waittimer)
self.senddown=0
self.hassettimer=0
self.window.hide()
self.window.resize(180,1)
self.window.move(gtk.gdk.screen_width() - self.width, gtk.gdk.screen_height() - self.height)
return
def popup_proc(self):
# Set popup status flag
if self.popup==0:
self.popup=1
currentsize=self.window.get_size()
currentposition=self.window.get_position()
positiony=currentposition[1]
sizey=currentsize[1]
if self.senddown==1:
if sizey<2:
# If popup is down
self.senddown=0
self.window.hide()
self.window.resize(180,1)
self.window.move(gtk.gdk.screen_width() - self.width, gtk.gdk.screen_height() - self.height)
self.popup=0
return gtk.FALSE
else:
# Move it down
self.window.resize(180,sizey-2)
self.window.move(gtk.gdk.screen_width() - self.width,positiony+2)
else:
if sizey<140:
# Move it up
self.window.resize(180,sizey+2)
self.window.move(gtk.gdk.screen_width() - self.width,positiony-2)
else:
# If popup is up, run wait timer
sizex=currentsize[0]
self.popup=1
if self.hassettimer==0:
self.waittimer = gtk.timeout_add(self.options['popuptimespan'],self.wait)
self.hassettimer=1
return gtk.TRUE
def wait(self):
self.senddown=1
self.hassettimer=0
return gtk.FALSE
def tray_icon_clicked(self,signal,event):
if event.button==3:
self.popup_menu.show_menu(event)
else:
self.label.set_markup(self.default_label)
self.show_popup()
def event_box_clicked(self,signal,event):
if event.button==1:
self.gotourl()
def exit(self, event):
dialog = gtk.MessageDialog( None, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO, self.lang.get_string(5))
dialog.width, dialog.height = dialog.get_size()
dialog.move( gtk.gdk.screen_width()/2-dialog.width/2, gtk.gdk.screen_height()/2-dialog.height/2)
ret = dialog.run()
if( ret==gtk.RESPONSE_YES):
gtk.main_quit(0)
dialog.destroy()
def gotourl( self, wg=None):
print "----------"
print "launching browser "+self.options['browserpath']+" [url]http://gmail.google.com[/url]"
os.system(self.options['browserpath']+" [url]http://gmail.google.com[/url] &")
def show_quota_info( self, event):
print "Not available"
#if self.popup==1:self.destroy_popup()
#print "----------"
#print "retrieving quota info"
#while gtk.events_pending()!=0:
# gtk.main_iteration(gtk.TRUE)
#try:
# usage=self.connection.getQuotaInfo()
#except:
# if self.connect()==0:
# return
# else:
# usage=self.connection.getQuotaInfo()
#self.label.set_markup("<span size='large' ><u><i>"+self.lang.get_string(6)+"</i></u></span>\n\n"+self.lang.get_string(24)%{'u':usage[0],'t':usage[1],'p':usage[2]})
#self.show_popup()
def update_config(self, event=None):
# Kill all timers
if self.popup==1:self.destroy_popup()
if self.init==1:gtk.timeout_remove(self.maintimer)
# Run the configuration dialog
self.configWindow.show()
# Update timeout
self.maintimer = gtk.timeout_add(self.options["checkinterval"], self.mail_check )
# Update user/pass
self.connection=gmailatom.GmailAtom(self.options["gmailusername"],self.options["gmailpassword"])
self.connect()
self.mail_check()
# Update popup location
self.window.resize(180,1)
self.width, self.height = self.window.get_size()
self.height +=self.options["voffset"]
self.width +=self.options["hoffset"]
self.window.move(gtk.gdk.screen_width() - self.width, gtk.gdk.screen_height() - self.height)
# Update language
self.lang=self.configWindow.get_lang()
# Update popup menu
self.popup_menu = GmailPopupMenu.GmailPopupMenu(self)
return
def main(self):
gtk.main()
if __name__ == "__main__":
warnings.filterwarnings( action="ignore", category=DeprecationWarning)
gmailnotifier = GmailNotify()
gmailnotifier.main()
Cheers!Anyone?
-
Want to create an oval vignette in photoshop elements 10 with transparent background for printing w
I am fairly new to PSE and I want to create an oval vignette in Photoshop Elements 10 with transparent background for printing on white paper using MS Publisher. Using the white background on inverse selection makes a slight line impression and either it should have a defined "frame" or nothing.
Appreciate any guidance.Try with the Elliptical marquee tool:
On the tool's option bar set feather 25-40 px (experiment)
Drag out the Ellipse to embrace the object
Go to Layer>new>layer via copy, or CTRL+J
Your selection should fade out as a vignette and be surrounded by transparency
Save this layer via File>save for web, select PNG-24, and tick "Transparency" -
(This is a possible solution for most users) I have found that inside the folder C:\WINDOWS\system32\Macromed\Flash (WinXP Home/Pro) (Computer > C: Drive > Windows > System32 > Macromed > Flash for Vista) there should be a file named FlashUtil10b.exe (IF NOT YOU SHOULD UPDATE AS SPECIFIED!) (or FlashUtil10a.exe or for older versions something similar depending on your version), which is the update utility for flash player. Click on this and if it updates, you will have to restart your computer. This should fix any missing files, and update you to the latest version.
On a side note to all those who read this, I downloaded and installed 5 different times, the same version, from different websites, all for the "new" flash version, and they didn't work (this also included trying to update Shockwave player itself). Apparently, going directly to the website and downloading a new version of Adobe Flash Player, and installing, doesn't uninstall the older version, (though it says it does nor does the uninstaller work directly from the website) nor fixes the problem. I assume they are aware of this problem, because they included this bug fix in revision 10b. This fix should work for those of you whom cannot view/see flash images as well. There also appears to be a bug/reference problem with the installation of IE8 giving the error "Missing Shockwave Decompression XTRA", when trying to play a Shockwave/Flash file, which seems also to affect Firefox and other browsers. It doesn't recognize that the folder or files that it needs in it, exist. I never had his problem before, until IE8 was installed. I checked which version I had in the system32 folder and found this updater built in to Adobe. Version 10a does NOT automatically update, but version 10b includes this fix. I currently had version 10a when I received this error, and began digging for a solution. Doing the update as described above fixed the problem, and updated it to version 10b.
The new flash version 10b has some new features, such as volume control, auto-updating, and several rendering options for those who may have a faster or slower computer/video card.
I found this works great for XP users but unsure of the Vista users. The process is the same for Vista and the update should still work the same, as long as you run it as Administrator, I assume. I have this also posted on wwwdslreports.com at http://www.dslreports.com/forum/r22115254-IE-IE8-and-Adobe-Flash-Question and here http://www.dslreports.com/forum/r22361930-Adobe-Flash-Player-10-Fix-for-WinXP-IE 8-Firefox-ect. It appears to work for everyone so far. I have not heard of any problems from users with this problem running the RC (Release Canidate) for Windows 7 yet.
I hope this works to your benefit.
Please leave a reply to help Adobe and other users know if this fix worked for you or not. If not, please explain what you did, and the effects your seeing, including operating system, site of the flash file trying to view, browser type (ex. IE6, IE7, IE8, Firefox, Opera, ect.), and I will try to help you as best I can.
(I would strongly recommend those not using IE8, or Firefox 3.5, get the updated versions)
If your looking for uninstallers go to this site: http://kb2.adobe.com/cps/141/tn_14157.html
If your looking for a true full install, you can download this developer version for Windows and Mac: http://download.macromedia.com/pub/flashplayer/updaters/10/flash_player_update2_flash10.zi p (44MB) (If you download this, I would recommend you still follow my instructions for the Flash Utility before restarting your computer.)I would recommend all users having problems try the above solution first.
I have posted this on a couple of websites, and so far it has fixed everyones problems.
Firefox 3.5 Beta 4 has Adobe Flash Player coding built into the browser so that it not only loads faster but works better.
You still need to have the Adobe ActiveX plug-in and Adobe Flash Player for both browsers.
I would also recommend you download Shockwave Player 11.
IE8 has tried this as well, but it still has a couple bugs in it.
If you have IE8 or FireFox 3.5 Beta 4, and you are still having problems, then I recommend that you go to www.windowsupdate.com and get all of the latest updates (including SP3), then try this fix again.
Your auto-updater built into windows (If you even have it on) doesn't always pull down every update available for your computer. It only pulls down the manditory ones.
Sometimes you HAVE to go to the website and manually get them yourself. I recommend when you go to the website, you click on custom install and pick every last one of them to install, which includes, hardware and software fixes for your computer.
What a lot of people don't know is that when you have installed and tried all of the recommended fixes that Adobe gives you, and it still doesn't work, is that you are having registry conflicts within your Operating System (OS ex. WinXP, Vista, Linux, ect.), and that it is not the Adobe software at all.
Those are usually repaired by making sure your computer stays up to date.
The fact is the computer world is changing so rapidly that everyone can't keep up. You have to check for updates weekly.
If you fall behind on those updates, then you start having problems with your computer and/or software.
One problem then can turn into many and people get frustrated when something all the sudden just quits working.
Take a day or two at least once a month, and make sure you update and maintain your computer.
This includes disk defragmenting, disk cleanup, and making sure you have all the lastest updates.
You can get to Disk Defrag, and Disk Cleanup by going to Start, All Programs, Accessories, then to System Tools.
I would do Disk Cleanup first, then Defrag.
I hope you take this advise into consideration, and that it is very helpful for you.
If you find this useful, please come back and reply to this forum, and let everyone know so that others will be encouraged to do this.
Thanks and goodluck, from another user like you.
Maybe you are looking for
-
How can I create a full-screen view of Keynote slide in Snow Leopard?
How can I create a full-screen view of my Keynote slides in Snow Leopard? I'm going to be importing into ScreenFlow to create a video. Thank you!!
-
Hi gurus, I'm trying to attach a document (Word, Excel, PDF, Txt) in a combination of characteristicas display in a query, but when I press a button upload, the system show a message: "Name.tx doesn't exist or is empty.. " So I can't attach any docum
-
Dear Experts, How it is possible to maintain How to maintain description in several languages for cost centers? my client has branches in other countries, so when we maintained description in English (sap login language "EN"), my client is not able t
-
Database Home page display : The database target is currently unavailable
Hello, I Installed OEM Gird 11g on an Windows 2008 R2 version Installed : - Oracle Enterprise Manager Grid Console 11.1.0.1.0 - WebLogic Platform 10.3.2.0 - Oracle WebTier and Utilities CD 11.1.1.2.0 To make it running I have to disable IPV6 ! One th
-
Advice needed on buying iphone as gift
I went to apple store, they do not want to sell iphone to me unless I sign AT&T 2 years plan. I thought AT&T has locked the phone and users must subscribe in order to use it. Why Apple store still not allow me to buy? Please advice, if I want to buy