RE: Doesn't gtk_menu_ensure_uline_accel_group() work with pkg-config ?
- From: "Cho, hyun-sang" <hscho newer co kr>
- To: <gtk-app-devel-list gnome org>
- Subject: RE: Doesn't gtk_menu_ensure_uline_accel_group() work with pkg-config ?
- Date: Fri, 10 Jan 2003 17:39:56 +0900
Thanks for reply.
Yes, the code is sampled from "Teach Yourself GTK+ in 21 Days".
As I wrote, compiled with
gcc -W -Wall program.c -o program `gtk-config --cflags --libs`
is done successfully.
The goal that I want to do is, compile the code with pkg-config.
I read under-line acceleration coded by gtk_menu_ensure_uline_accel_group() from FAQ which is included in
gtk+2.0 tar ball.
And, examples within the tar ball use pkg-config instead of gtk-config.
I want to know why the code cannont compiled with pkg-config as like other samples within gtk+2.0 tar ball.
Finally, I want to use under-line menu acceleration with pkg-config.
Thanks.
-----Original Message-----
From: gtk-app-devel-list-admin gnome org [mailto:gtk-app-devel-list-admin gnome org]On Behalf Of Davidlohr
Bueso
Sent: Friday, January 10, 2003 5:16 PM
To: gtk-app-devel-list gnome org
Subject: Re: Doesn't gtk_menu_ensure_uline_accel_group() work with pkg-config ?
//*** code start
GtkWidget *menu_bar, *file_item, *separator, *file_menu, *exit_item;
GtkWidget *help_item, *help_menu, *what_item, *separator1, *about_item;
GtkWidget *plot_item;
GtkAccelGroup *file_accel_group;
guint key;
menu_bar = gtk_menu_bar_new();
file_menu = gtk_menu_new();
file_item = gtk_menu_item_new_with_label("File");
separator = gtk_menu_item_new();
exit_item = gtk_menu_item_new_with_label("");
help_menu = gtk_menu_new();
help_item = gtk_menu_item_new_with_label("help");
separator1 = gtk_menu_item_new();
what_item = gtk_menu_item_new_with_label("What's this ?");
about_item = gtk_menu_item_new_with_label("About my program");
plot_item = gtk_menu_item_new_with_label("Plot");
file_accel_group = gtk_menu_ensure_uline_accel_group(GTK_MENU(file_menu));
key = gtk_label_parse_uline(GTK_LABEL(GTK_BIN(exit_item)->child),"_Exit");
gtk_widget_add_accelerator(exit_item, "activate", file_accel_group,key, GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE);
//*** code end
If Im not mistaken, that code is from Sam`s "Teach Yourself GTK+ in 21 Days", and that book if for GTK+
1.2.x. Therefore, to compile the code you need to do:
gcc -W -Wall program.c -o program `gtk-config --cflags --libs`
the -W -Wall are obiously optional, generally I make a Makefile
--
Davidlohr Bueso
http://www.daemon.cl
http://www.linuxtech.cl
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]