summaryrefslogtreecommitdiff
path: root/amiga/gui.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2011-07-02 19:38:54 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2011-07-02 19:38:54 +0000
commit910c6d314fc356a8b8628b3ff7b26c3ff289a4dd (patch)
treef3280e20d434ffb2e4fdae9c3aa8c637f13f7185 /amiga/gui.c
parentb415e6dabc4fb4d2699a28112a09828dfbf0528d (diff)
downloadnetsurf-910c6d314fc356a8b8628b3ff7b26c3ff289a4dd.tar.gz
netsurf-910c6d314fc356a8b8628b3ff7b26c3ff289a4dd.tar.bz2
Put a search icon where the old search favicon was
svn path=/trunk/netsurf/; revision=12558
Diffstat (limited to 'amiga/gui.c')
-rwxr-xr-xamiga/gui.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index 0621bc9f4..ba6245feb 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3749,14 +3749,30 @@ void gui_window_set_search_ico(hlcache_handle *ico)
struct nsObject *node;
struct nsObject *nnode;
struct gui_window_2 *gwin;
+ char fname[100];
+ struct bitmap *nsbm;
+ bool free_bm = false;
if(IsMinListEmpty(window_list)) return;
if(option_kiosk_mode == true) return;
+/* disabled, as at the moment, favicon/search icons don't work
if (ico == NULL) ico = search_web_ico();
if ((ico != NULL) && (content_get_bitmap(ico) != NULL))
{
bm = ami_getcachenativebm(content_get_bitmap(ico), 16, 16, NULL);
}
+*/
+
+ /* generic search image */
+ if(bm == NULL)
+ {
+ ami_get_theme_filename(&fname, "theme_search", false);
+ if(nsbm = ami_bitmap_from_datatype(fname))
+ {
+ bm = ami_getcachenativebm(nsbm, 16, 16, NULL);
+ }
+ free_bm = true;
+ }
node = (struct nsObject *)GetHead((struct List *)window_list);
@@ -3794,6 +3810,8 @@ void gui_window_set_search_ico(hlcache_handle *ico)
}
}
} while(node = nnode);
+
+ if(bm && free_bm) bitmap_destroy(nsbm);
}
void gui_window_place_caret(struct gui_window *g, int x, int y, int height)