Re: Can I Disable or Alter GtkEntry and GtkTextView Clipboard Menus?
- Date: Tue, 18 Dec 2007 10:46:15 +0100
- From: Mathias Hasselmann <mathias.hasselmann@xxxxxx>
- Subject: Re: Can I Disable or Alter GtkEntry and GtkTextView Clipboard Menus?
Am Montag, den 17.12.2007, 19:29 -0500 schrieb Vallone, Anthony: > I am developing applications that run in a very user controlled > environment (think big brother). When a GtkEntry or GtkTextView widget > is clicked with button 3, a clipboard menu opens with basic clipboard > options, an "Input Methods" sub menu, and an "Insert Unicode ..." sub > menu. How can I disable or alter that menu? > > I also tried connecting to the "popup-menu" from the GtkWidget level, > but that signal never seems to propagate. I don't know what went wrong, but connecting to the "popup-menu" signal definitly works, as the attached program demonstrates. Ciao, Mathias -- Mathias Hasselmann <mathias.hasselmann@xxxxxx> Openismus GmbH: http://www.openismus.com/ Personal Site: http://taschenorakel.de/
#include <gtk/gtk.h>
int
main (int argc,
char *argv[])
{
GtkWidget *window, *vbox, *entry, *text_view;
gtk_init (&argc, &argv);
entry = gtk_entry_new ();
g_signal_connect (entry, "popup-menu",
G_CALLBACK (gtk_true),
NULL);
text_view = gtk_text_view_new ();
g_signal_connect (text_view, "popup-menu",
G_CALLBACK (gtk_true),
NULL);
vbox = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (vbox), text_view, TRUE, TRUE, 0);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_widget_show_all (window);
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_main_quit),
NULL);
gtk_main ();
return 0;
}
Attachment:
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
_______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list
- Follow-Ups:
- RE: Can I Disable or Alter GtkEntry and GtkTextView Clipboard Menus?
- From: Vallone, Anthony
- RE: Can I Disable or Alter GtkEntry and GtkTextView Clipboard Menus?
- References:
- Can I Disable or Alter GtkEntry and GtkTextView Clipboard Menus?
- From: Vallone, Anthony
- Can I Disable or Alter GtkEntry and GtkTextView Clipboard Menus?
- Prev by Date: Can I Disable or Alter GtkEntry and GtkTextView Clipboard Menus?
- Next by Date: Re: Gtk and threading
- Previous by thread: Can I Disable or Alter GtkEntry and GtkTextView Clipboard Menus?
- Next by thread: RE: Can I Disable or Alter GtkEntry and GtkTextView Clipboard Menus?
- Index(es):