Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6197017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:44:49+00:00 2026-05-24T03:44:49+00:00

I have written a gnomeapplet for gnome-panel, and the corresponding server file. Everything seems

  • 0

I have written a gnomeapplet for gnome-panel, and the corresponding server file. Everything seems to work fine when I use the “debug mode”, but when I try to load the applet from the panel it shows only a little white dot.
Can anyone help me find the problem?

my code is:

#!/usr/bin/env python

import gnomeapplet
import gobject

import sys
import gtk



class Priberam(gnomeapplet.Applet):

    def __init__(self, applet, iid):


    hbox = gtk.HBox(False, 0)
    image = gtk.Image()     
    pixbuf = gtk.gdk.pixbuf_new_from_file('1.png')
    pixbuf = gtk.gdk.Pixbuf.add_alpha(pixbuf,255,255,255 ,255)
    size = applet.get_size()-6
    pixbuf = pixbuf.scale_simple(size,size,gtk.gdk.INTERP_BILINEAR)

    image.set_from_pixbuf(pixbuf)

    button_search = gtk.Button()
    button_search.add(image)

    entry = gtk.Entry()


    hbox.pack_start(button_search, False, False, 0)
    hbox.pack_end(entry, False, False, 0)

    applet.add(hbox)
    applet.show_all()


gobject.type_register(Priberam)

def priberam_factory(applet,iid):
    Priberam(applet,iid)
    return True



if len(sys.argv) > 1 and sys.argv[1] == '-d': # debugging
    mainWindow = gtk.Window()
    mainWindow.set_title('Applet window')
    mainWindow.connect("destroy", lambda w: gtk.main_quit())
    applet = gnomeapplet.Applet()
    priberam_factory(applet, None)
    applet.reparent(mainWindow)
    mainWindow.show_all()
    gtk.main()
    sys.exit()

if __name__ == '__main__':
    gnomeapplet.bonobo_factory('OAFIID:GNOME_Priberam_Factory', gnomeapplet.Applet.__gtype__, 'Priberam Applet', '0.1', priberam_factory)

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T03:44:50+00:00Added an answer on May 24, 2026 at 3:44 am

    Solved…The solution was so simple…I just have to change the path to the image file to the complete path…instead of pixbuf = gtk.gdk.pixbuf_new_from_file('1.png') I should use for example: pixbuf = gtk.gdk.pixbuf_new_from_file('/home/username/applet/1.png')

    Better: pixbuf = gtk.gdk.pixbuf_new_from_file(os.path.join(os.path.dirname(__file__), '1.png')), don’t forget to import os

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a web service that seems to be running fine - I
I have written an AIR Application that downloads videos and documents from a server.
I have a Gnome applet written in Python. In order to save configuration data/settings,
I have a Gnome applet I've been working on. It is written in Python
I have written some Rspec test cases in my spec/models/season_spec.rb file. They are as:-
I have written a class that extends JPanel. Is it possible to use this
I have written a app in PHP on my localhost server using XAMP, which
I have written a tab based application in Xcode/RestKit and am attempting to use
I have written a WSDL and I want to generate java classes. I use
I have written a packet reader that uses libpcap to read a capture file.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.