Search Results

Search found 4 results on 1 pages for 'ubersoldat'.

Page 1/1 | 1 

  • Differentiate gtk.Entry icons

    - by Ubersoldat
    I'm adding two icons to a gtk.Entry in PyGTK. The icons signals are handled by the following method def entry_icon_event(self, widget, position, event) I'm trying to differentiate between the two of them: <enum GTK_ENTRY_ICON_PRIMARY of type GtkEntryIconPosition> <enum GTK_ENTRY_ICON_SECONDARY of type GtkEntryIconPosition> How can I do this? I've been digging through the documentation of PyGTK but there's no object GtkEntryIconPosition nor any definition for this enums. Thanks

    Read the article

  • Android HTTP Connection

    - by Ubersoldat
    Can anybody tell my why this doesn't work in the Android emulator? From the browser I have access and the server is internal. All I can think of is that I'm missing some configuration on my app so it can access the network layer. try { InetAddress server = Inet4Address.getByName("thehost"); //Doesn't work either //or InetAddress server2 = Inet4Address.getByAddress(new String("192.168.1.30").getBytes()); if(server.isReachable(5000)){ Log.d(TAG, "Ping!"); } Socket clientsocket = new Socket(server, 8080); } catch (UnknownHostException e) { Log.e(TAG, "Server Not Found"); } catch (IOException e) { Log.e(TAG, "Couldn't open socket"); } Throws an UnknownHostException Thanks

    Read the article

  • Send Special Keys to Gtk.VteTerminal

    - by Ubersoldat
    Hi I have this OSS Project called Monocaffe connections manager which uses the Gtk.VteTerminal widget from PyGTK. A nice feature is that it allows the users to send commands to different servers' consoles (cluster mode) using a Gtk.TextView for the input. The way I send key strokes to each Gtk.VteTerminal is by using the feed_child method. For common keys there's no problem: I simply feed what the TextView receives to all the terminals, but when doing so with special keys I get into a little trouble. For "Return" I catch the event and feed the terminal a '\n'. For back-space is the same, catch the event and feed a '\b'. def cluster_backspace(self, widget): return self.cluster_send_key('\b') The problem comes with other keys like Tab, Arrows, Esc which I don't know how to feed as str to the terminal to recognize them. In the case of Esc is a real pain, because the users can edit the same file on different servers using vi, but cannot escape insert mode. Anyway, I'm not looking for a complete solution, just ideas since I've ran out of them. Thanks.

    Read the article

1