Hi Mark I fixed save_complete by replacing amiga/save_complete.c with gtk/gtk_save.c and amiga/save_complete.h with the attached (a better approach is to search through my files for #include "amiga/save_complete.h" and replace it with #incude "desktop/save_complete.h" and then delete amiga/save_complete.h)
There is a minor problem as I don't get an icon for index, I'm just adding that back in now. I've also improved the search code by adding Show All and Case Sensitive options. The two strings ShowAll and CaseSensitive will need to be added to the Messages files. Regards Chris
/* * Copyright 2008,2009 Chris Young <[email protected]> * * This file is part of NetSurf, http://www.netsurf-browser.org/ * * NetSurf is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * NetSurf is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef AMIGA_SAVE_COMPLETE_H #define AMIGA_SAVE_COMPLETE_H #include "desktop/save_complete.h" #endif
Index: search.c =================================================================== --- search.c (revision 7793) +++ search.c (working copy) @@ -1,6 +1,4 @@ /* - * Copyright 2004 John M Bell <[email protected]> - * Copyright 2005 Adrian Lees <[email protected]> * Copyright 2008 Chris Young <[email protected]> * * This file is part of NetSurf, http://www.netsurf-browser.org/ @@ -39,16 +37,19 @@ #include "amiga/object.h" #include <proto/intuition.h> #include <proto/exec.h> +#include "desktop/search.h" #include <proto/window.h> #include <proto/layout.h> #include <proto/string.h> #include <proto/button.h> #include <proto/label.h> +#include <proto/checkbox.h> #include <classes/window.h> #include <gadgets/layout.h> #include <gadgets/string.h> #include <gadgets/button.h> +#include <gadgets/checkbox.h> #include <images/label.h> #include <reaction/reaction_macros.h> @@ -132,6 +133,22 @@ LabelEnd, */ CHILD_WeightedHeight,0, + + LAYOUT_AddChild, fwin->gadgets[GID_CASE] = CheckBoxObject, + GA_ID,GID_CASE, + GA_Text,messages_get("CaseSensitive"), + GA_Selected,FALSE, + GA_TabCycle,TRUE, + GA_RelVerify,TRUE, + CheckBoxEnd, + LAYOUT_AddChild, fwin->gadgets[GID_SHOWALL] = CheckBoxObject, + GA_ID,GID_SHOWALL, + GA_Text,messages_get("ShowAll"), + GA_Selected,FALSE, + GA_TabCycle,TRUE, + GA_RelVerify,TRUE, + CheckBoxEnd, + LAYOUT_AddChild, HGroupObject, LAYOUT_AddChild, fwin->gadgets[GID_PREV] = ButtonObject, GA_ID,GID_PREV, @@ -220,6 +237,10 @@ void gui_search_set_hourglass(bool active) { + SetWindowPointer(fwin->win, + WA_BusyPointer,active, + WA_PointerDelay,active, + TAG_DONE); } char *gui_search_get_string() @@ -230,7 +251,7 @@ } -void gui_search_add_recent(static char *string) +void gui_search_add_recent(const char *string) { } @@ -249,10 +270,18 @@ bool gui_search_get_case_sens() { - return false; + ULONG res; + GetAttr(GA_Selected,fwin->gadgets[GID_CASE],(ULONG *)&res); + + if(res) return true; + else return false; } bool gui_search_get_show_all() { - return false; + ULONG res; + GetAttr(GA_Selected,fwin->gadgets[GID_SHOWALL],(ULONG *)&res); + + if(res) return true; + else return false; } Index: gui.h =================================================================== --- gui.h (revision 7793) +++ gui.h (working copy) @@ -58,6 +58,8 @@ GID_NEXT, GID_PREV, GID_SEARCHSTRING, + GID_CASE, + GID_SHOWALL, GID_LAST };
