Hot answers tagged pygtk
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
Threads and GTK don't always play nice together. There are a few tricks that help, but don't be surprised to have weird bugs. I recently removed all threads from an application and it feels much better. So, the first thing you should think about is whether you can rewrite your application to take advantage of the GLib async methods. If you insist on having ...
Using time.sleep() is not a good idea when you are using gtk. You could try use a timer event. (I don't use quickly anymore but this should work i think.) from gi.repository import GLib class Just_for_correct_coding(): self.per = int() def start(self): GLib.timeout_add_seconds(1, self.calc) def calc(self,treeiter): ...
You can do that stuff with devilspie. Install the devilspie package, and write the following configfile (save as ~/.devilspie/gnome-terminal.ds) (if (is (window_role) "borderless") (begin (geometry "+0+0") (maximize_vertically) (undecorate) ) ) Now you just run devilspie when you log in (e.g. by adding it to startup applications), then ...
Change control file in debian/DEBIAN folder, edit "Depends" field. Example of control file: Package: root-your-phone-tool Version: 1.0.0 Architecture: all Section: base Maintainer: Gustaf Haglund <firstname.lastname@example.org> Depends: android-tools-adb, python, python-gtk2 Description: Root your phone easy with this tool.
EDIT Here's the correct function to use: Gtk.TextIter.forward_to_tag_toggle() here's an example that generates a list of all bolded words: start = self.textbuffer.get_start_iter() bolded= while start.forward_to_tag_toggle(self.tag_bold): begin=start.copy() start.forward_to_tag_toggle(self.tag_bold) ...
"on_preference_window_destroy":self.on_quit, This line is your problem. When the window is destroyed, you're calling a quit method. When you close the window, it gets destroyed, thus resulting in your quit method being called. Also, you don't want to call sys.exit(0) to exit a GTK+ application. You want to use Gtk.main_quit() instead. It ...
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 ...
I had the same problem, so I googled,And it turned out, that I could edit this file: sudo nano /usr/share/kupfer/kupfer/icons.py Changed variable LARGE_SZ = 128 to LARGE_SZ = 32 I hope it was helpful. Greetings from Debian!
Only top voted, non community-wiki answers of a minimum length are eligible