Tag Info

Hot answers tagged

9

Good question. First of all, the appindicators are not Unity specific in any way. Actually, they run just as well on Xfce or KDE. It's very, very, simple to use. You'll create an indicator object, set the name of icons to use when it needs attention, etc, and simply attach menus to it. The indicators are then sent over dbus and properly displayed in a ...


9

An Ubuntu "app" is just an application, just like GIMP, Firefox, or whatever. They're still Debian packages, we just provide a tool called Quickly that gets people going with PyGTK and make it easy to package and submit to the software center. You can still write your application in Qt, package it, and submit it to the Software Center, we just are trying ...


8

Well, an application is provided as a package, but not all packages are applications. One or more fonts can be provided as packages, for instance. In other words, there is a conceptual difference between a package and an application, but no difference between an application and a package. Yes, you can develop applications in any language and using any ...


8

What's going on The <property name="icon"> settings refers to the window icon, not the application icon. As I understand it, the Ubuntu windowing server (X.org) squashes these to a tiny size after loading. If you don't recall from year 2009, they used to be used in this capacity: Using application icons instead Ubuntu Unity will use this low-res ...


7

Yes, in fact it's almost exactly the same: from gi.repository import Gtk class Test (object): def __init__(self): self.builder = Gtk.Builder() self.builder.add_from_file("test.glade") self.builder.connect_signals(self) def run(self, *args): self.builder.get_object("window1").show() Gtk.main() def ...


7

What I've done for StackApplet is to simply disable a menu item and use that as a 'header'. That way it doesn't respond to mouse clicks and looks like a static text label.


7

Okay, this is going to be step by step: Our widget is going to be named AwesomeTextView, the module it's in will be called awesome_text_view. These are the only names we need. A glade widget consists of two parts, the module and the catalog. We create a catalog, awesome_text_view.xml, and (as root) save it at /usr/share/glade3/catalogs/ This is what ...


7

As of 12.04 Gtk3 is the default on 12.04. For 11.x Simple answer: No, it does not (Quickly 11.10). Extended answer: Since all the code produced by quickly can be edited, you can change it to support gtk3, but it does not come with support. There is however a branch of quickly in development that (only) supports gtk3. You can see the difference in the ...


7

Here's an example that has context from gi.repository import Gtk class Handler: def onDeleteWindow(self, *args): Gtk.main_quit(*args) def addNotebookClick(self, *args): vbox = builder.get_object("attachtome") mynote = builder.get_object("notebook1") temp = Gtk.Box() mynote.reparent(temp) ...


6

The Application Indicator menu support is based on D-Bus menus, which are limited in what they support - they only support basic menu functionality, not more exotic things such as arbitrary widgets. One significant roadblock to them ever supporting such things is the fact that the application indicator menu is rendered by a different process, the ...


6

You can also try to have a look at the help for the add command. You can do either of these: invoke the quickly help add command invoke the quickly tutorial command and browse to the add command reference From the outupt of quickly help add For instance 'quickly add dialog dialog-name' will create: A subclass of Gtk.Dialog called DialogNameDialog in ...


5

Yes, the launchpad page for pygobject shows that 3.0.0 is in Oneiric, and that there is a python3-gobject package available for it.


5

from gi.repository import Gtk uses the new PyGObject instead of the older PyGTK that is used with import gtk.


5

Yes, it's possible to do. Use gtk.Notebook.set_current_page For example: def on_button1_clicked(self, widget): self.notebook1.set_current_page(2)


5

This is a tricky one, I had a similar problem, when trying to have only a ncurses based interface on a time tracker pc, the problem for me was that when no window manager is present, normal X Window applications behave oddly. Here's my proposal: Install ratpoison window manager sudo apt-get install ratpoison Unbind keyboards that shows a menu or allows ...


5

Using the function list_icons(): icons=icon_theme.list_icons() for icon in icons: if 'usb' in icon: print icon and the output: drive-removable-media-usb usbpendrive_unmount gnome-dev-removable-usb usb-creator drive-harddisk-usb gnome-dev-harddisk-usb gnome-dev-unknown-usb usb-creator-gtk drive-harddisk-usb-symbolic Now take your pic


4

The problem is that you are looking at the PyGTK documentation, but are using PyGI/GTK3 in your script. The docs on gtk_widget_render_icon() says the following: gtk_widget_render_icon has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_render_icon_pixbuf() instead. Then the docs on ...


4

Try to kill it via the process list: Or - if you want to be more nerdy - kill it via the console, using $>top


4

If you built vim against Qt rather than GTK+ and python-complete still isn't working, that suggests the problem isn't actually a consequence of trying to link to both GTK+2 and GTK+3. However, since you haven't yet provided any details about how you built with Qt (Qt isn't officially supported, so you must have used a third party derivative of vim), and you ...


4

To have it run on start-up for everyone, you should install an autostart file in /etc/xdg/autostart as per the XDG Autostart Specification.


4

The fix is: self.add_page(self.get_pages()) not self.add_page(self.get_pages) the latter passes in the function self.get_pages not its return value Edit: from: pages = self.subject.get_nth_page(subjectNum) to: pages = self.subjects.get_nth_page(subjectNum) This is a simple typo we all make from time to time.


4

Two solutions in one! :) First, there is a special button widget just for this job: GtkLinkButton. You create a GtkLinkButton just like a normal button. Here is a simple example program written with Python and PyGObject. PyGTK should look pretty similar: from gi.repository import Gtk window = Gtk.Window() button = Gtk.LinkButton("http://www.google.com", ...


4

Think I've cracked the code after dir()-ing everything I could find in the GObject class => G_SIGNAL_RUN_FIRST is found in the GSignalFlags enum, which translates to GObject.SignalFlags.RUN_FIRST. This is consistent, so G_SIGNAL_MATCH_ID found in the enum GSignalMatchType translates to GObject.SignalMatchType.ID. Not entirely obvious, but easy enough once ...


4

As per previous comments, the translation you asked would be as follows: from gi.repository import GObject __gsignals__ = {'cell-edited': (GObject.SignalFlags.RUN_LAST, GObject.TYPE_NONE, (GObject.TYPE_PYOBJECT, GObject.TYPE_PYOBJECT, GObject.TYPE_PYOBJECT, GObject.TYPE_PYOBJECT, ...


4

This bug report http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628492 suggests python-glade2 is the missing dependency. sudo apt-get install python-glade2 If that fixes the problem, you may wish to append your bug report on launchpad ;)


4

Unfortunately, appindicator doesn't allow adding custom widget, as it requires GObject introspection. This will be available when ido package will have GObject instrospection. Bug report


4

A reference to the current icon theme can be found in gconf-editor at: desktop > gnome > interface > icon_theme You can alternatively read directly ~/.gconf/desktop/gnome/interface$ cat %gconf.xml file. Unfortunately, this does not provide a path to the relevant icon theme. I'll check how this setting relates to the path and i'll let you know ;-)


3

There is a list of APIs available here: http://developer.ubuntu.com/api/


3

You can create multiple .desktop files that launch the individual windows separately. You can either use python filename.py or write a wrapper script for the command line argument.


3

sudo apt-get install python-gtk2 should fix this. These are the python bindings for GTK, which is a graphical package used to build the GUI for software-center. axi is something else entirely, try typing sudo apt-get install afnix into a terminal and see if that fixes it.



Only top voted, non community-wiki answers of a minimum length are eligible