Search Results

Search found 905 results on 37 pages for 'gtk'.

Page 3/37 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Retrieving Gtk::Widget's relative position: get_allocate() doesn't work

    - by a-v
    I need to retrieve the position of a Gtk::Widget relative to its parent, a Gtk::Table. Most sources (e.g. http://library.gnome.org/devel/gtk-faq/stable/x642.html) say that one needs to call Gtk::Widget::get_allocation(). However, the returned Gtk::Allocation object always contains x = -1, y = -1, width = 1, height = 1. I have to note that this happens before the Gtk::Table object is actually exposed and rendered. A call to show_all_children() or check_resize(), which I would expect to recalculate child widget geometry, doesn't help. What am I doing wrong? Thanks in advance.

    Read the article

  • Launch Webkit Gtk+ on ubuntu 11.10

    - by qlinux
    I am using Webkit nightly build revision 110829 on Ubuntu 11.10. I successfully build it. Here is what I did: In the Webkit directory I run: Tools/Scripts/build-webkit --gtk Built succeeded. I tried running it by typing: Tools/Scripts/run-safari --gtk But nothing happens. I mean, the command just did not show anything. Anyone has any idea? For someone who vote down: Like I said, when I run Tools/Scripts/run-safari --gtk nothing happens. So if anyone has any idea how to run it properly please tell me. I followed this instruction: https://trac.webkit.org/wiki/BuildingGtk

    Read the article

  • How to attach Gtk::Menu to Gtk::Widget

    - by krokoziabla
    Gtk::Menu has void Gtk::Menu::attach_to_widget(Widget& attach_widget, GtkMenuDetachFunc detacher) void Gtk::Menu::attach_to_widget (Widget& attach_widget) wrapper methods for void gtk_menu_attach_to_widget(GtkMenu *menu, GtkWidget *attach_widget, GtkMenuDetachFunc detacher) But why are they protected? If I want to make a pop-up menu on a widget, how, then, can I get access to it from the menu's activate call-back if not via these methods?

    Read the article

  • Detect user logout / shutdown in Python / GTK under Linux

    - by Ivo Wetzel
    OK this is presumably a hard one, I've got an pyGTK application that has random crashes due to X Window errors that I can't catch/control. So I created a wrapper that restarts the app as soon as it detects a crash, now comes the problem, when the user logs out or shuts down the system, the app exits with status 1. But on some X errors it does so too. So I tried literally anything to catch the shutdown/logout, with no success, here's what I've tried: import pygtk import gtk import sys class Test(gtk.Window): def delete_event(self, widget, event, data=None): open("delete_event", "wb") def destroy_event(self, widget, data=None): open("destroy_event", "wb") def destroy_event2(self, widget, event, data=None): open("destroy_event2", "wb") def __init__(self): gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL) self.show() self.connect("delete_event", self.delete_event) self.connect("destroy", self.destroy_event) self.connect("destroy-event", self.destroy_event2) def foo(): open("add_event", "wb") def ex(): open("sys_event", "wb") from signal import * def clean(sig): f = open("sig_event", "wb") f.write(str(sig)) f.close() exit(0) for sig in (SIGABRT, SIGILL, SIGINT, SIGSEGV, SIGTERM): signal(sig, lambda *args: clean(sig)) def at(): open("at_event", "wb") import atexit atexit.register(at) f = Test() sys.exitfunc = ex gtk.quit_add(gtk.main_level(), foo) gtk.main() open("exit_event", "wb") Not one of these succeeds, is there any low level way to detect the system shutdown? Google didn't find anything related to that. I guess there must be a way, am I right? :/

    Read the article

  • Forwarding keypresses in GTK

    - by dguaraglia
    I'm writing a bit of code for a Gedit plugin. I'm using Python and the interface (obviously) is GTK. So, the issue I'm having is quite simple: I have a search box (a gtk.Entry) and right below I have a results box (a gtk.TreeView). Right after you type something in the search box you are presented a bunch of results, and I would like the user to be able to press the Up/Down keys to select one, Enter to choose it, and be done. Thing is, I can't seem to find a way to forward the Up/Down keypress to the TreeView. Currently I have this piece of code: def __onSearchKeyPress(self, widget, event): """ Forward up and down keys to the tree. """ if event.keyval in [gtk.keysyms.Up, gtk.keysyms.Down]: print "pressed up or down" e = gtk.gdk.Event(gtk.gdk.KEY_PRESS) e.keyval = event.keyval e.window = self.browser.window e.send_event = True self.browser.emit("key-press-event", e) return True I can clearly see I'm receiving the right kind of event, but the event I'm sending gets ignored by the TreeView. Any ideas? Thanks in advance people.

    Read the article

  • Compiling simple gtk+ application

    - by sterh
    Hello, I try to compile simple gtk+ application in Anjuta IDE. Application is a simple window: # include <gtk/gtk.h> int main( int argc, char *argv[]) { GtkWidget *label; GtkWidget *window; gtk_init(&argc, &argv); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), "??????????, ???!"); label = gtk_label_new("??????????, ???!"); gtk_container_add(GTK_CONTAINER(window), label); gtk_widget_show_all(window); g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(gtk_main_quit), NULL); gtk_main(); return 0; } In make file i have: GTK_CFLAGS = -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/pixman-1 GTK_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 But i see error, when i try to compile project: gtk/gtk.h - No such file or directory Thank you.

    Read the article

  • Installing gtk and compiling using gcc under windows?

    - by sil3nt
    I have gcc installed in c:/programfiles (also set as a path variable), and i have all the necessary files for gtk from http://www.gtk.org/download-windows.html, glib,gtk,pango,atk and cairo. Although I have no clue as to how to compile a c program using gtk with the gcc compiler. How do I set everything up so that it works?. (I don't know where each zip file goes.?) basically I don't really know where start.

    Read the article

  • Infinite gtk warnings when I right click on the icon --CLOSED

    - by Runner
    From this tuto: #include <gtk/gtk.h> int main( int argc, char *argv[]) { GtkWidget *window; gtk_init(&argc, &argv); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_show(window); gtk_main(); return 0; } I run the executable and right click on the icon,then infinite warnings(the same) reported: GLib-WARNING **: g_main_context_check() called recursively from within a source's check() or prepare() member. Anyone knows how to fix this warning? UPDATE This problem also exists with gtk-demo , is it a gtk bug? Can someone verify that? Platform: windows XP UPDATE AGAIN This is indeed a gtk bug,which is un-fixable.

    Read the article

  • Gtk.MessageDialog window parameter problems

    - by William Culver
    I'm in a deeply nested class (which inherits from Gtk.Box) and I need to get a reference to the GtkWindow I'm in to pass to a call to Gtk.MessageDialog() yet I cant seem to find a reference to it. I have tried self.props.window as well as self.get_parent_window() with no avail. Everything I try to do leads to the following error: TypeError: Expected Gtk.Window, but got GObjectMeta Code snippet is as follows: def on_tb_del_clicked(self,widget): question = _("Are you sure you want to do this?") win = self.get_parent_window() dialog = Gtk.MessageDialog(win,0,Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO,question) # <<Exception response = dialog.run() Please help :)

    Read the article

  • $DISPLAY dependent gtk themes

    - by Vlad Seghete
    I have a computer at home that I log into remotely. The "monitor" for it is a TV, so I want gtk applications to use a large font and icon theme, which I managed to do by editing the ~/.gtkrc-2.0 file and some other similar stuff. What I want to be able to do is have a separate theme for when I'm logging in remotely. The best way to explain is that I would like my gtk theme choice to be dependent on the X display that the application is started on. For example, if I start something on :0.0 then that is the TV and I want large fonts, but if I start it on localhost:10.0 I want to use a regular size font, because it will get rendered on my laptop screen. The elegant solution would be to have some sort of IF statement in the .gtkrc-2.0 file that checks the $DISPLAY variable and behaves accordingly. The problem is I can't find any documentation on control structures in .gktrc files, or if it's even possible to do that.

    Read the article

  • How do I link gtk library more easily with cmake in windows?

    - by Runner
    I'm now doing it in a very ugly way by manually including all the required path(the gtk bundle is at D:/Tools/gtk+-bundle_2.20.0-20100406_win32): include_directories(D:/Tools/gtk+-bundle_2.20.0-20100406_win32/include/gtk-2.0 D:/Tools/gtk+-bundle_2.20.0-20100406_win32/include/glib-2.0 D:/Tools/gtk+-bundle_2.20.0-20100406_win32/lib/glib-2.0/include D:/Tools/gtk+-bundle_2.20.0-20100406_win32/include/cairo D:/Tools/gtk+-bundle_2.20.0-20100406_win32/include/pango-1.0 D:/Tools/gtk+-bundle_2.20.0-20100406_win32/lib/gtk-2.0/include D:/Tools/gtk+-bundle_2.20.0-20100406_win32/include/atk-1.0) link_directories(D:/Tools/gtk+-bundle_2.20.0-20100406_win32/lib) target_link_libraries(MyProgram gtk-win32-2.0.lib)

    Read the article

  • In Gtk#, why might VALID_ITER fail even after I check it with IterIsValid?

    - by Matthew
    I have a convenience function in my TreeView that looks something like this: Card GetCardFromPath (TreePath path) { TreeIter iter; if (path == null || !Model.GetIter (out iter, path)) return null; if ((Model as TreeModelSort).IterIsValid (iter)) return (Card) Model.GetValue (iter, 0); return null; } Most of the time this works without any errors. But when it is called directly after the Model is changed, line 8 gives me these Gtk runtime errors: [Fatal 16:53:02.448] [Gtk] gtk_list_store_get_value: assertion `VALID_ITER (iter, list_store)' failed [Fatal 16:53:02.449] [GLib-GObject] g_value_unset: assertion `G_IS_VALUE (value)' failed As far as I can tell, I shouldn't even need to check IterIsValid, because I'm already checking the return value of Model.GetIter. Even so, how can VALID_ITER fail in a function that only gets called if IterIsValid returns true? If it makes a difference, the Model is a TreeModelSort, which sorts a TreeModelFilter, which filters a ListStore. The error occurs when GetCardFromPath is called from HandleSelectionChanged when multiple rows have just been removed from the ListStore. It doesn't seem to prevent anything from working properly, but having a cascade of errors whenever I remove multiple rows isn't really ideal.

    Read the article

  • No anti-aliasing with Xmonad

    - by Leon
    I'm looking into Xmonad. One problem I'm having is that most of my applications in Xmonad don't have anti-aliasing. For example gnome-terminal & evolution. I have this in my .Xresources: Xft.dpi: 96 Xft.lcdfilter: lcddefault Xft.antialias: true Xft.autohint: true Xft.hinting: true Xft.hintstyle: hintfull Xft.hintstyle: slight Xft.rgba: rgb And this in my .gtkrc-2.0: gtk-theme-name="Ambiance" gtk-icon-theme-name="ubuntu-mono-dark" gtk-font-name="Sans 10" gtk-cursor-theme-name="DMZ-White" gtk-cursor-theme-size=0 gtk-toolbar-style=GTK_TOOLBAR_BOTH gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR gtk-button-images=1 gtk-menu-images=1 gtk-enable-event-sounds=1 gtk-enable-input-feedback-sounds=1 gtk-xft-antialias=1 gtk-xft-hinting=1 gtk-xft-hintstyle="hintfull" gtk-xft-rgba="rgb" include "/home/leon/.gtkrc-2.0.mine" But I still have no anti-aliasing. When I launch gnome-settings-daemon I do get anti-aliasing. But I don't want to run gnome-settings-daemon. What could be the problem? I'm running Ubuntu 12.04 Desktop.

    Read the article

  • python2.7 help() modules returnd error

    - by GerberaH
    # python Python 2.7.3 (default, Aug 1 2012, 05:14:39) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> help() Welcome to Python 2.7! This is the online help utility. If this is your first time using Python, you should definitely check out the tutorial on the Internet at http://docs.python.org/tutorial/. Enter the name of any module, keyword, or topic to get help on writing Python programs and using Python modules. To quit this help utility and return to the interpreter, just type "quit". To get a list of available modules, keywords, or topics, type "modules", "keywords", or "topics". Each module also comes with a one-line summary of what it does; to list the modules whose summaries contain a given word such as "spam", type "modules spam". help> modules Please wait a moment while I gather a list of all available modules... /usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed import gobject._gobject /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed from gtk import _gtk ** (python:6240): CRITICAL **: pyg_register_boxed: assertion `boxed_type != 0' failed /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: cannot register existing type `GdkDevice' from gtk import _gtk /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_get_qdata: assertion `node != NULL' failed from gtk import _gtk Speicherzugriffsfehler (Speicherabzug geschrieben)

    Read the article

  • X11 from ssh on Mac OSX to Linux server doesn't work --- Gtk-WARNING **: cannot open display

    - by Cal
    Hello, I installed a program wireshark on my remote linux box and I'm trying to run it with X11 from my mac computer using SSH. Here's my terminal... macosx$ echo $DISPLAY /tmp/launch-f4w6k6/:0 macosx$ ssh -X [email protected] [email protected]'s password: remoteubuntu:~# echo $DISPLAY remoteubuntu:~# wireshark (wireshark:18927): Gtk-WARNING **: cannot open display: Here's a few lines from /etc/ssh/sshd_config X11Forwarding yes X11DisplayOffset 10 PrintMotd no PrintLastLog yes TCPKeepAlive yes #UseLogin no Thanks for the help!

    Read the article

  • Monaco font not antialiased in some GTK apps

    - by Bartosz Radaczynski
    I have a strange issue with the Monaco font on Ubuntu Karmic. I have recently installed the Monaco font just to see what the hype is all about. The problem that I am facing now is that is not antialiased in some GTK apps (namely in Firefox and Eclipse), but it is antialiased in KDE apps (konsole) and in Chromium. I have hinting set to slight. Any help is appreciated.

    Read the article

  • remove border of a gtk.button

    - by spanctus
    Hi, I want to remove the border of the gtk.button, but i Don't know how to do it. I tried with : button = gtk.Button() button.set_style("inner-border",0) but i have an error : the property doesn't exist. I tried too to create a new gtk.Style and use it for the button, but same error. Anyone has an idea ? Thanks

    Read the article

  • How to find GTK version in PHP-GTK2?

    - by aidave
    This one is driving me nuts. According to GTK's site, there exists GTK_MAJOR_VERSION, GTK_MINOR_VERSION, and GTK_MICRO_VERSION constants. However, none of these work: echo GTK_MAJOR_VERSION; echo GtK::MAJOR_VERISON; echo Gtk::GTK_MAJOR_VERSION; etc Also, Gtk::check_version(2,12,0) always fails even though I have a higher version. I'd like to simply get the actual version number and not rely on check_version, which seems unreliable. How can I do this? I need to do it within PHP, platform independent.

    Read the article

  • Gtk equivalent for winforms BindingSource

    - by AvatarOfChronos
    Does anybody out there know of a Gtk equivalent for a System.Windows.Forms BindingSource? I'm trying to get a windows based project to work under a gtk environment and can't use the Windows.Forms dll for this. So does anybody know of a BindingSource replacement either in mono or a third party dll? (I've looked at the gtk-databindings project didn't seem to have what i need)

    Read the article

  • Free object/widget in GTK?

    - by wag2639
    I've got a pack box in my GTK application and I'm replacing it every once in a while with a completely new entry (at least for now cause I'm in a hurry). Since I'm replacing it with a new instance, do I need to explicitly free from memory the old pack box contents or is there some garbage collection in GTK? If I do need to explicitly need to free the object, is there a command that will recursively go to all objects in that tree (like will it clear my button in a box container inside my main pack box)? I'm using C/GTK-2.0 (gcc v4.4.3 and GTK 2.20.0).

    Read the article

  • Convert a GTK python script to C

    - by Jessica
    The following script will take a screenshot on a Gnome desktop. import gtk.gdk w = gtk.gdk.get_default_root_window() sz = w.get_size() pb = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB,False, 8, sz[0], sz[1]) pb = pb.get_from_drawable(w, w.get_colormap(), 0, 0, 0, 0, sz[0], sz[1]) if (pb != None): pb.save("screenshot.png", "png") print "Screenshot saved to screenshot.png." else: print "Unable to get the screenshot." Now, I've been trying to convert this to C and use it in one of the apps I am writing but so far i've been unsuccessful. Is there any what to do this in C (on Linux)? Thanks! Jess.

    Read the article

  • add gtk.widget in a gnome Applet

    - by dominos
    Hi, I have a question : I write a little gnome applet, and when we click on a button i want to add a gtk.widget under the "gnome-panel" like the calendar of the clock-applet. But I don't know how to do this. It's my code : listButton = gtk.Button(_("lastest")) self.listTwitt = gtk.TreeView() mainLayout = gtk.VBox() mainLayout.pack_start(listButton) mainLayout.pack_start(self.listTwitt) self.applet.add(mainLayout) With this code, when i click on the button, the list shows up in the gnome panel : it's because I add it in the mainLayout. So how do I add it under the "gnome-panel". Thanks

    Read the article

  • GNU/Emacs for gtk+ programming

    - by sterh
    Hello, I want to start C/gtk+ programming in GNU/Emacs. Where can i find manual, how to configure GNU/Emacs for C and gtk+ programming. I want to make GNU/Emacs IDE for gtk+ programming Thank you.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >