tazweb rev 87

Add an icon into the search entry
author Christophe Lincoln <pankso@slitaz.org>
date Wed Apr 27 02:04:13 2011 +0200 (2011-04-27)
parents bf2ff0574080
children 79aa29eeb0a1
files src/main.c
line diff
     1.1 --- a/src/main.c	Wed Apr 27 01:29:25 2011 +0200
     1.2 +++ b/src/main.c	Wed Apr 27 02:04:13 2011 +0200
     1.3 @@ -352,6 +352,19 @@
     1.4  	/* Search entry */
     1.5  	item = gtk_tool_item_new();
     1.6  	gtk_widget_set_size_request(search, 150, 20);
     1.7 +	gtk_entry_set_icon_from_stock(GTK_ENTRY(search),
     1.8 +			GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_FIND);
     1.9 +	/*
    1.10 +	 * FIXME: The icon can be activatable but must be connected to a callback to
    1.11 +	 * valid the search. With GTK_ENTRY_ICON_SECONDARY it do a segfault maybe
    1.12 +	 * with GTK_ENTRY_ICON_PRIMARY it dont crash but dont works.
    1.13 +	 */
    1.14 +	gtk_entry_set_icon_activatable(GTK_ENTRY(search),
    1.15 +			GTK_ENTRY_ICON_SECONDARY, FALSE);
    1.16 +	//g_signal_connect(GTK_ENTRY(search), "icon-press",
    1.17 +	//		G_CALLBACK(search_entry_cb), webview);
    1.18 +	//gtk_entry_set_icon_tooltip_text (GTK_ENTRY(search),
    1.19 +	//		GTK_ENTRY_ICON_SECONDARY, "Search the web");
    1.20  	gtk_container_add(GTK_CONTAINER(item), search);
    1.21  	g_signal_connect(G_OBJECT(search), "activate",
    1.22  			G_CALLBACK(search_entry_cb), webview);