[overview / compilation in 64-bit/amiga/riscos][Fwd: Re: Review: Mark Benjamin -- gtkmain branch]

Mark markieb.lists.20090330 at gmail.com
Sun Jul 12 05:24:53 BST 2009


Hi,

well as the main Email that I sent would cause bounces all round, I'll
try to create sub-threads here for individual features; the
'foundations' are in overview / glade / Misc, then the features are [in
order] favicon, search, save, theme, customization, Menu; uploads is an
unmerged branch as it should merge without real conflicts; overview is
now 2  threads as even after the sub-threading this Email was 127k, so
hopefully I'll save lots of approving oversize Emails to the list; at
the cost of proliferation of threads, though I hope that's manageable;
currently overview/scaffolding is 95k of actual message content, as is
search; they could be further sub-threaded [search in  particular
naturally has web-search / page-search domains] in case of need

John-Mark Bell wrote:
> Precis:
>
> This is Mark Benjamin's GTK work. It builds for GTK, with warnings. It does not build for RISC OS. The Amiga frontend conflicts loads when merged to trunk, so all bets are off there.
>

I have now hopefully modified the branch to account for the amiga compile errors too; as well as adding the enums that I must have omitted at first time of asking Chris :-)

>
>
> Changed files
>
>
>  !NetSurf/Resources/de/Messages |  113 ++
>  !NetSurf/Resources/en/Messages |  111 ++
>  !NetSurf/Resources/fr/Messages |  115 ++
>  !NetSurf/Resources/it/Messages |  146 ++-
>  !NetSurf/Resources/nl/Messages |  113 ++
>  Docs/Doxyfile                  |    2 
>  Makefile                       |    8 
>  Makefile.sources               |   25 
>  amiga/download.c               |    2 
>  amiga/gui.c                    |    6 
>  amiga/menu.c                   |    2 
>  amiga/save_complete.c          |  827 +----------------
>  amiga/search.c                 |  668 +-------------
>  beos/beos_scaffolding.cpp      |    4 
>  content/content.c              |    3 
>  content/fetchcache.c           |   97 +-
>  desktop/browser.c              |   34 
>  desktop/browser.h              |    1 
>  desktop/gui.h                  |    5 
>  desktop/options.c              |    8 
>  desktop/options.h              |    2 
>  gtk/dialogs/gtk_options.c      |  198 +++-
>  gtk/dialogs/gtk_options.h      |    2 
>  gtk/dialogs/gtk_source.c       |  222 ++--
>  gtk/gtk_download.c             |    4 
>  gtk/gtk_gui.c                  |  114 +-
>  gtk/gtk_gui.h                  |   14 
>  gtk/gtk_login.c                |    2 
>  gtk/gtk_scaffolding.c          | 1952 +++++++++++++++++++++++++++--------------
>  gtk/gtk_scaffolding.h          |  233 ++++
>  gtk/gtk_selection.c            |    5 
>  gtk/gtk_tabs.c                 |   34 
>  gtk/gtk_window.c               |  115 +-
>  gtk/gtk_window.h               |   40 
>  gtk/options.h                  |   10 
>  gtk/res/netsurf.glade          | 1661 ++--------------------------------
>  gtk/res/options.glade          |  772 ++++++++++------
>  image/ico.c                    |    9 
>  image/ico.h                    |    1 
>  render/html.c                  |    8 
>  render/html.h                  |    3 
>  render/html_redraw.c           |    2 
>  render/textplain.c             |    2 
>  riscos/save.c                  |   64 +
>  riscos/search.c                |  618 ------------
>  riscos/window.c                |   13 
>  utils/config.h                 |    5 
>  utils/container.c              |  170 ++-
>  utils/container.h              |    3 
>  utils/utils.c                  |   17 
>  utils/utils.h                  |    1 
>  51 files changed, 3855 insertions(+), 4731 deletions(-)
> Index: gtk/gtk_tabs.c
>   
mainly consequential amendments for reinstatement of privacy /
encapsulation from gtkmain branch
> ===================================================================
> --- gtk/gtk_tabs.c	(revision 8438)
> +++ gtk/gtk_tabs.c	(working copy)
> @@ -23,12 +23,13 @@
>  #include "desktop/browser.h"
>  #include "content/content.h"
>  #include "desktop/options.h"
> +#include "desktop/search.h"
>  #include "utils/utils.h"
>  #include "gtk/options.h"
>  #include "gtk/gtk_tabs.h"
>  
>  #define TAB_WIDTH_N_CHARS 15
> -#define GET_WIDGET(x) glade_xml_get_widget(gladeWindows, (x))
> +#define GET_WIDGET(x) glade_xml_get_widget(gladeNetsurf, (x))
>  
>  static GtkWidget *nsgtk_tab_label_setup(struct gui_window *window);
>  static void nsgtk_tab_visibility_update(GtkNotebook *notebook, GtkWidget *child,
> @@ -58,15 +59,19 @@
>  
>  void nsgtk_tab_add(struct gui_window *window, bool background)
>  {
> -	GtkWidget *tabs = GTK_WIDGET(nsgtk_scaffolding_get_notebook(window));
> +	GtkWidget *tabs = GTK_WIDGET(nsgtk_scaffolding_notebook(
> +			nsgtk_get_scaffold(window)));
>  	GtkWidget *tabBox = nsgtk_tab_label_setup(window);
>  	gint remember = gtk_notebook_get_current_page(GTK_NOTEBOOK(tabs));
>  	gtk_notebook_append_page(GTK_NOTEBOOK(tabs), 
> -			GTK_WIDGET(window->scrolledwindow), tabBox);
> -	/*causes gtk errors can't set a parent
> +			GTK_WIDGET(nsgtk_window_get_scrolledwindow(window)),
> +			tabBox);
> +	/*causes gtk errors can't set a parent */
>  	gtk_notebook_set_tab_reorderable(GTK_NOTEBOOK(tabs), 
> -			GTK_WIDGET(window->scrolledwindow), true); */
> -	gtk_widget_show_all(GTK_WIDGET(window->scrolledwindow));
> +			GTK_WIDGET(nsgtk_window_get_scrolledwindow(window)),
> +			true);
> +	gtk_widget_show_all(GTK_WIDGET(nsgtk_window_get_scrolledwindow(
> +			window)));
>  	gtk_notebook_set_current_page(GTK_NOTEBOOK(tabs), 
>  			gtk_notebook_get_n_pages(GTK_NOTEBOOK(tabs)) - 1);
>  	if (option_new_blank) {
> @@ -75,13 +80,15 @@
>  		blankpage = g_strconcat("file:///", res_dir_location, 
>  				"blankpage", NULL); */
>  		/* segfaults 
> -		struct browser_window *bw = nsgtk_get_browser_for_gui(window);
> +		struct browser_window *bw =
> +				gui_window_get_browser_window(window);
>  		browser_window_go(bw, blankpage, 0, true); */
>  		/* free(blankpage); */
>  	}
>  	if (background)
>  		gtk_notebook_set_current_page(GTK_NOTEBOOK(tabs), remember);
> -	gtk_widget_grab_focus(GTK_WIDGET(window->scaffold->url_bar));
> +	gtk_widget_grab_focus(GTK_WIDGET(nsgtk_scaffolding_urlbar(
> +			nsgtk_get_scaffold(window))));
>  }
>  
>  void nsgtk_tab_visibility_update(GtkNotebook *notebook, GtkWidget *child,
> @@ -97,12 +104,14 @@
>  void nsgtk_tab_set_title(struct gui_window *g, const char *title)
>  {
>  	GtkWidget *label;
> -	gboolean is_top_level = (g->tab != NULL);
> +	GtkWidget *tab;
> +	tab = nsgtk_window_get_tab(g);
> +	gboolean is_top_level = (tab != NULL);
>  
>  	if (is_top_level) {
> -		label = g_object_get_data(G_OBJECT(g->tab), "label");
> +		label = g_object_get_data(G_OBJECT(tab), "label");
>  		gtk_label_set_text(GTK_LABEL(label), title);
> -		gtk_widget_set_tooltip_text(g->tab, title);
> +		gtk_widget_set_tooltip_text(tab, title);
>  	}
>  }
>  
> @@ -147,7 +156,7 @@
>  	g_object_set_data(G_OBJECT(hbox), "label", label);
>  	g_object_set_data(G_OBJECT(hbox), "close-button", button);
>  
> -	window->tab = hbox;
> +	nsgtk_window_set_tab(window, hbox);
>  
>  	gtk_widget_show_all(hbox);
>  	return hbox;
> @@ -183,6 +192,7 @@
>  	GtkWidget *window = gtk_notebook_get_nth_page(notebook, page_num);
>  	struct gui_window *gw = g_object_get_data(G_OBJECT(window),
>  			"gui_window");
> +	search_reset();
>  	if (gw)
>  		nsgtk_scaffolding_set_top_level(gw);
>  }
> Index: gtk/dialogs/gtk_options.c
>   
new options for search web from url bar [default off]; select search
provider; view source in new tab; theme selection / addition; load theme
list from file; real time add theme name to combo;
> ===================================================================
> --- gtk/dialogs/gtk_options.c	(revision 8438)
> +++ gtk/dialogs/gtk_options.c	(working copy)
> @@ -2,6 +2,7 @@
>   * Copyright 2006 Rob Kendrick <rjek at rjek.com>
>   * Copyright 2008 Mike Lester <element3260 at gmail.com>
>   * Copyright 2009 Daniel Silverstone <dsilvers at netsurf-browser.org>
> + * Copyright 2009 Mark Benjamin <netsurf-browser.org.MarkBenjamin at dfgh.net>
>   *
>   * This file is part of NetSurf, http://www.netsurf-browser.org/
>   *
> @@ -27,15 +28,18 @@
>  #include <glade/glade.h>
>  #include "desktop/options.h"
>  #include "desktop/print.h"
> +#include "desktop/searchweb.h"
>  #include "gtk/options.h"
>  #include "gtk/gtk_gui.h"
>  #include "gtk/gtk_scaffolding.h"
> +#include "gtk/gtk_theme.h"
>  #include "gtk/dialogs/gtk_options.h"
>  #include "gtk/gtk_window.h"
>  #include "utils/log.h"
>  #include "utils/utils.h"
> +#include "utils/messages.h"
>  
> -GtkDialog *wndPreferences;
> +GtkDialog *wndPreferences = NULL;
>  static GladeXML *gladeFile;
>  static gchar *glade_location;
>  static struct browser_window *current_browser;
> @@ -97,6 +101,12 @@
>  DECLARE(fileChooserDownloads);
>  DECLARE(checkFocusNew);
>  DECLARE(checkNewBlank);
> +DECLARE(checkUrlSearch);
> +DECLARE(comboSearch);
> +DECLARE(combotheme);
> +DECLARE(buttonaddtheme);
> +DECLARE(sourceButtonTab);
> +static GtkWidget *sourceButtonWindow;
>  
>  DECLARE(spinMarginTop);
>  DECLARE(spinMarginBottom);
> @@ -133,7 +143,13 @@
>  	wndPreferences = GTK_DIALOG(glade_xml_get_widget(gladeFile,
>  				"dlgPreferences"));
>  	gtk_window_set_transient_for (GTK_WINDOW(wndPreferences), parent);
> -		
> +	
> +	FIND_WIDGET(sourceButtonTab);
> +	FIND_WIDGET(sourceButtonWindow);
> +	GSList *group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(
> +			sourceButtonWindow));
> +	gtk_radio_button_set_group(GTK_RADIO_BUTTON(sourceButtonTab), group);
> +	
>  	/* set the widgets to reflect the current options */
>  	nsgtk_options_load();
>  	
> @@ -188,7 +204,13 @@
>  	
>  	CONNECT(checkFocusNew, "toggled");
>  	CONNECT(checkNewBlank, "toggled");
> +	CONNECT(checkUrlSearch, "toggled");
> +	CONNECT(comboSearch, "changed");
>  	
> +	CONNECT(combotheme, "changed");
> +	CONNECT(buttonaddtheme, "clicked");
> +	CONNECT(sourceButtonTab, "toggled");
> +	
>  	CONNECT(spinMarginTop, "value-changed");
>  	CONNECT(spinMarginBottom, "value-changed");
>  	CONNECT(spinMarginLeft, "value-changed");
> @@ -247,11 +269,11 @@
>                                                (value));                 \
>          } while (0)
>  
> -#define SET_FILE_CHOOSER(widgt, value)                                  \
> +#define SET_FILE_CHOOSER(widget, value)                                  \
>          do {                                                            \
> -                (widgt) = glade_xml_get_widget(gladeFile, #widgt);      \
> -                gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER((widgt)), \
> -                                                    (value));           \
> +                (widget) = glade_xml_get_widget(gladeFile, #widget);      \
> +                gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(\
> +                		(widget)), (value));			\
>          } while (0)
>  
>  #define SET_BUTTON(widget)                                              \
> @@ -262,19 +284,18 @@
>  
>  void nsgtk_options_load(void) 
>  {
> -	GtkVBox *combolanguagevbox;
> -	gchar *languagefile;
> +	GtkBox *box;
> +	gchar *languagefile, *themefile;
>  	const char *default_accept_language = 
>  			option_accept_language ? option_accept_language : "en";
>  	int combo_row_count = 0;
>  	int active_language = 0;
>  	int proxytype = 0;
>  	FILE *fp;
> -	char buf[20];
> +	char buf[50];
>  
>  	/* Create combobox */
> -	combolanguagevbox = 
> -		GTK_VBOX(glade_xml_get_widget(gladeFile, "combolanguagevbox"));
> +	box = GTK_BOX(glade_xml_get_widget(gladeFile, "combolanguagevbox"));
>  	comboLanguage = gtk_combo_box_new_text();
>  
>  	languagefile = g_strconcat(res_dir_location, "languages", NULL);
> @@ -309,10 +330,35 @@
>  	/** \todo localisation */
>  	gtk_widget_set_tooltip_text(GTK_WIDGET(comboLanguage), 
>  			"set preferred language for web pages");
> -	gtk_box_pack_start(GTK_BOX(combolanguagevbox), 
> -			comboLanguage, FALSE, FALSE, 0);
> +	gtk_box_pack_start(box, comboLanguage, FALSE, FALSE, 0);
>  	gtk_widget_show(comboLanguage);
> +	
> +	/* populate theme combo from themelist file */
> +	box = GTK_BOX(glade_xml_get_widget(gladeFile, "themehbox"));
> +	combotheme = gtk_combo_box_new_text();
> +	themefile = g_strconcat(res_dir_location, "themelist", NULL);
> +	fp = fopen((const char *)themefile, "r");
> +	g_free(themefile);
> +	if (fp == NULL) {
> +		LOG(("Failed opening themes file"));
> +		warn_user("FileError", (const char *) themefile);
> +		return;
> +	}
> +	while (fgets(buf, sizeof(buf), fp)) {
> +		/* Ignore blank lines */
> +		if (buf[0] == '\0')
> +			continue;
>  
> +		/* Remove trailing \n */
> +		buf[strlen(buf) - 1] = '\0';
> +
> +		gtk_combo_box_append_text(GTK_COMBO_BOX(combotheme), buf);
> +	}
> +	gtk_combo_box_set_active(GTK_COMBO_BOX(combotheme), 
> +			option_current_theme);
> +	gtk_box_pack_start(box, combotheme, FALSE, TRUE, 0);
> +	gtk_widget_show(combotheme);		
> +
>  	SET_ENTRY(entryHomePageURL,
>  			option_homepage_url ? option_homepage_url : "");
>  	SET_BUTTON(setCurrentPage);
> @@ -380,7 +426,12 @@
>  	
>  	SET_CHECK(checkFocusNew, option_focus_new);
>  	SET_CHECK(checkNewBlank, option_new_blank);
> +	SET_CHECK(checkUrlSearch, option_search_url_bar);
> +	SET_COMBO(comboSearch, option_search_provider);
>  	
> +	SET_BUTTON(buttonaddtheme);
> +	SET_CHECK(sourceButtonTab, option_source_tab);
> +		
>  	SET_SPIN(spinMarginTop, option_margin_top);
>  	SET_SPIN(spinMarginBottom, option_margin_bottom);
>  	SET_SPIN(spinMarginLeft, option_margin_left);
> @@ -417,6 +468,14 @@
>  	}
>  	return stay_alive;
>  }
> +
> +bool nsgtk_options_combo_theme_add(const char *themename)
> +{
> +	if (wndPreferences == NULL)
> +		return false;
> +	gtk_combo_box_append_text(GTK_COMBO_BOX(combotheme), themename);
> +	return true;
> +}
>  	
>  
>  /* Defines the callback functions for all widgets and specifies
> @@ -643,42 +702,43 @@
>  END_HANDLER
>  
>  COMBO_CHANGED(comboButtonType, option_button_type)
> -	struct gui_window *current = window_list;
> +	nsgtk_scaffolding *current = scaf_list;
>  
>  	while (current)	{
> +		nsgtk_scaffolding_reset_offset(current);
>  		switch(option_button_type) {
>  		case 0:
>  			gtk_toolbar_set_style(
> -				GTK_TOOLBAR(current->scaffold->tool_bar),
> +				GTK_TOOLBAR(nsgtk_scaffolding_toolbar(current)),
>  				GTK_TOOLBAR_ICONS);
>  			gtk_toolbar_set_icon_size(
> -				GTK_TOOLBAR(current->scaffold->tool_bar),
> +				GTK_TOOLBAR(nsgtk_scaffolding_toolbar(current)),
>  				GTK_ICON_SIZE_SMALL_TOOLBAR);
>  			break;
>  		case 1:
>  			gtk_toolbar_set_style(
> -				GTK_TOOLBAR(current->scaffold->tool_bar),
> +				GTK_TOOLBAR(nsgtk_scaffolding_toolbar(current)),
>  				GTK_TOOLBAR_ICONS);
>  			gtk_toolbar_set_icon_size(
> -				GTK_TOOLBAR(current->scaffold->tool_bar),
> +				GTK_TOOLBAR(nsgtk_scaffolding_toolbar(current)),
>  				GTK_ICON_SIZE_LARGE_TOOLBAR);
>  			break;
>  		case 2:
>  			gtk_toolbar_set_style(
> -				GTK_TOOLBAR(current->scaffold->tool_bar),
> +				GTK_TOOLBAR(nsgtk_scaffolding_toolbar(current)),
>  				GTK_TOOLBAR_BOTH);
>  			gtk_toolbar_set_icon_size(
> -				GTK_TOOLBAR(current->scaffold->tool_bar),
> +				GTK_TOOLBAR(nsgtk_scaffolding_toolbar(current)),
>  				GTK_ICON_SIZE_LARGE_TOOLBAR);
>  			break;
>  		case 3:
>  			gtk_toolbar_set_style(
> -				GTK_TOOLBAR(current->scaffold->tool_bar),
> +				GTK_TOOLBAR(nsgtk_scaffolding_toolbar(current)),
>  				GTK_TOOLBAR_TEXT);
>  		default:
>  			break;
>  		}
> -		current = current->next;
> +		current = nsgtk_scaffolding_iterate(current);
>  	}
>  END_HANDLER
>  
> @@ -704,6 +764,100 @@
>  CHECK_CHANGED(checkNewBlank, option_new_blank)
>  END_HANDLER
>  
> +CHECK_CHANGED(checkUrlSearch, option_search_url_bar)
> +END_HANDLER
> +
> +COMBO_CHANGED(comboSearch, option_search_provider)	
> +	nsgtk_scaffolding *current = scaf_list;
> +	char *name;
> +	/* refresh web search prefs from file */
> +	search_web_provider_details(option_search_provider);
> +	/* retrieve ico */
> +	search_ico = search_web_retrieve_ico(false);
> +	/* callback may handle changing gui */
> +	if (search_ico != NULL)
> +		gui_window_set_search_ico();
> +	/* set entry */
> +	name = search_web_provider_name();
> +	while (current) {
> +		nsgtk_scaffolding_set_websearch(current, name);
> +		current = nsgtk_scaffolding_iterate(current);
> +	}
> +	free(name);
> +END_HANDLER
> +
> +COMBO_CHANGED(combotheme, option_current_theme)
> +	nsgtk_scaffolding *current = scaf_list;
> +	if (option_current_theme != 0) {
> +		if (current_theme_name != NULL)
> +			free(current_theme_name);
> +		current_theme_name = strdup(gtk_combo_box_get_active_text(
> +				GTK_COMBO_BOX(combotheme)));
> +		nsgtk_theme_prepare();
> +	} else if (current_theme_name != NULL) {
> +		free(current_theme_name);
> +		current_theme_name = NULL;
> +	}
> +	while (current)	{
> +		nsgtk_theme_implement(current);
> +		current = nsgtk_scaffolding_iterate(current);
> +	}		
> +END_HANDLER
> +
> +BUTTON_CLICKED(buttonaddtheme)
> +	char *themesfolder, *filename, *directory;
> +	GtkWidget *fc = gtk_file_chooser_dialog_new(
> +			messages_get("gtkAddThemeTitle"),
> +			GTK_WINDOW(wndPreferences),
> +			GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
> +			GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
> +			GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL);
> +	themesfolder = g_strconcat(res_dir_location, "themes", NULL);
> +	gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(fc), 
> +			themesfolder);
> +	gint res = gtk_dialog_run(GTK_DIALOG(fc));
> +	if (res == GTK_RESPONSE_ACCEPT) {
> +		filename = gtk_file_chooser_get_current_folder(
> +				GTK_FILE_CHOOSER(fc));
> +		if (strcmp(filename, themesfolder) != 0) {
> +			directory = strrchr(filename, '/');
> +			*directory = '\0';
> +			if (strcmp(filename, themesfolder) != 0) {
> +				warn_user(messages_get(
> +						"gtkThemeFolderInstructions"), 
> +						0);
> +				gtk_widget_destroy(GTK_WIDGET(fc));
> +				free(filename);
> +				free(themesfolder);
> +				return FALSE;
> +			} else {
> +				directory++;
> +			}
> +		} else {
> +			free(filename);
> +			filename = gtk_file_chooser_get_filename(
> +					GTK_FILE_CHOOSER(fc));
> +			if (strcmp(filename, themesfolder) == 0) {
> +				warn_user(messages_get("gtkThemeFolderSub"),
> +						0);
> +				gtk_widget_destroy(GTK_WIDGET(fc));
> +				free(filename);
> +				free(themesfolder);
> +				return FALSE;
> +			}
> +			directory = strrchr(filename, '/') + 1;
> +		}
> +		gtk_widget_destroy(GTK_WIDGET(fc));
> +		nsgtk_theme_add(directory);
> +		free(filename);
> +		free(themesfolder);
> +	}
> +
> +END_HANDLER
> +
> +CHECK_CHANGED(sourceButtonTab, option_source_tab)
> +END_HANDLER
> +
>  SPIN_CHANGED(spinMarginTop, option_margin_top)
>  END_HANDLER
>  
> Index: gtk/dialogs/gtk_options.h
> ===================================================================
> --- gtk/dialogs/gtk_options.h	(revision 8438)
> +++ gtk/dialogs/gtk_options.h	(working copy)
> @@ -1,5 +1,6 @@
>  /*
>   * Copyright 2006 Rob Kendrick <rjek at rjek.com>
> + * Copyright 2009 Mark Benjamin <netsurf-browser.org.MarkBenjamin at dfgh.net>
>   *
>   * This file is part of NetSurf, http://www.netsurf-browser.org/
>   *
> @@ -26,5 +27,6 @@
>  GtkDialog* nsgtk_options_init(struct browser_window *bw, GtkWindow *parent);		/** Init options and load window */
>  void nsgtk_options_load(void);		/** Load current options into window */
>  void nsgtk_options_save(void);		/** Save options from window */
> +bool nsgtk_options_combo_theme_add(const char *themename); /** add new theme name to combo */
>  
>  #endif
> Index: gtk/res/options.glade
> ===================================================================
> --- gtk/res/options.glade	(revision 8438)
> +++ gtk/res/options.glade	(working copy)
> @@ -298,7 +298,7 @@
>                                      <property name="visible">True</property>
<etc>
> Index: !NetSurf/Resources/de/Messages
> ===================================================================
> --- !NetSurf/Resources/de/Messages	(revision 8438)
> +++ !NetSurf/Resources/de/Messages	(working copy)
<etc>
> Index: !NetSurf/Resources/en/Messages
> ===================================================================
> --- !NetSurf/Resources/en/Messages	(revision 8438)
> +++ !NetSurf/Resources/en/Messages	(working copy)
> @@ -429,12 +429,119 @@

worth commenting are the menu labels, including accelerators; allowing relatively straightforward I18n of accelerators as well as fully personal customization for advanced users

> +# gtk Menu / Button labels
> +#
> +
> +gtkNewTab:New _Tab
> +gtkNewTabAccel:<ctrl>t
> +gtkNewWindow:_New Window
> +gtkNewWindowAccel:<ctrl>n
> +gtkOpenFile:_Open File
> +gtkOpenFileAccel:<ctrl>o
> +gtkCloseWindow:_Close Window
> +gtkCloseWindowAccel:<ctrl><shift>w
> +gtkSavePage:Save Page..
> +gtkSavePageAccel:<ctrl>s
> +gtkExport:Export
> +gtkPlainText:Plain Text..
> +gtkDrawFile:Drawfile..
> +gtkPostScript:PostScript..
> +gtkPDF:PDF..
> +gtkPrintPreview:Print Preview..
> +gtkPrintPreviewAccel:<ctrl><shift>p
> +gtkPrint:Print..
> +gtkPrintAccel:<ctrl>p
> +gtkQuit:_Quit
> +gtkQuitAccel:<ctrl>q
> +
> +gtkCut:Cu_t
> +gtkCutAccel:<ctrl>x
> +gtkCopy:_Copy
> +gtkCopyAccel:<ctrl>c
> +gtkPaste:_Paste
> +gtkPasteAccel:<ctrl>v
> +gtkDelete:_Delete
> +gtkSelectAll:Select _All
> +gtkSelectAllAccel:<ctrl>a
> +gtkFind:_Find..
> +gtkFindAccel:<ctrl>f
> +gtkPreferences:P_references
> +
> +gtkStop:_Stop
> +gtkStopAccel:Escape
> +gtkReload:_Reload
> +gtkReloadAccel:F5
> +gtkScaleView:_Scale View
> +gtkZoomPlus:Zoom _in
> +gtkZoomPlusAccel:<ctrl>plus
> +gtkZoomMinus:Zoom _out
> +gtkZoomMinusAccel:<ctrl>minus
> +gtkZoomNormal:_Normal size
> +gtkZoomNormalAccel:<ctrl>0
> +gtkFullScreen:_Fullscreen
> +gtkFullScreenAccel:F11
> +gtkViewSource:View S_ource
> +gtkViewSourceAccel:F8
> +gtkImages:_Images
> +gtkForegroundImages:_Foreground Images
> +gtkBackgroundImages:_Background Images
> +gtkToolbars:_Toolbars
> +gtkMenuBar:_Menu Bar
> +gtkToolBar:_Button Bar
> +gtkStatusBar:_Status Bar
> +gtkDownloads:_Downloads
> +gtkDownloadsAccel:<ctrl>d
> +gtkSaveWindowSize:S_ave Window Size
> +gtkDebugging:De_bugging
> +gtkToggleDebugging:T_oggle debug rendering
> +gtkSaveBoxTree:_Save box tree
> +gtkSaveDomTree:Save DOM tree
> +
> +gtkBack:_Back
> +gtkBackAccel:<alt>Left
> +gtkForward:_Forward
> +gtkForwardAccel:<alt>Right
> +gtkHome:_Home
> +gtkHomeAccel:<alt>Down
> +gtkLocalHistory:_Local History
> +gtkLocalHistoryAccel:<ctrl>h
> +gtkGlobalHistory:_Global History
> +gtkGlobalHistoryAccel:<ctrl><shift>h
> +gtkAddBookMarks:_Add to Bookmarks..
> +gtkShowBookMarks:_Show Bookmarks..
> +gtkShowBookMarksAccel:F6
> +gtkOpenLocation:_Open Location..
> +gtkOpenLocationAccel:<ctrl>l
> +
> +gtkNextTab:_Next tab
> +gtkNextTabAccel:<ctrl>Right
> +gtkPrevTab:_Previous tab
> +gtkPrevTabAccel:<ctrl>Left
> +gtkCloseTab:_Close tab
> +gtkCloseTabAccel:<ctrl>w
> +
> +gtkContents:_Contents
> +gtkGuide:User _guide
> +gtkUserInformation:User _information
> +gtkAbout:_About
> +
<etc>
> Index: !NetSurf/Resources/fr/Messages
> ===================================================================
> --- !NetSurf/Resources/fr/Messages	(revision 8438)
> +++ !NetSurf/Resources/fr/Messages	(working copy)
<etc>
> Index: !NetSurf/Resources/nl/Messages
> ===================================================================
> --- !NetSurf/Resources/nl/Messages	(revision 8438)
> +++ !NetSurf/Resources/nl/Messages	(working copy)
> Index: !NetSurf/Resources/it/Messages
> ===================================================================
> --- !NetSurf/Resources/it/Messages	(revision 8438)
> +++ !NetSurf/Resources/it/Messages	(working copy)
> Index: Makefile.sources
> ===================================================================
> --- Makefile.sources	(revision 8438)
> +++ Makefile.sources	(working copy)
> @@ -8,12 +8,13 @@
>  S_CONTENT := content.c fetch.c fetchcache.c urldb.c			\
>  	fetchers/fetch_curl.c fetchers/fetch_data.c
>  S_CSS := css.c css_enum.c parser.c ruleset.c scanner.c
> -S_RENDER := box.c box_construct.c box_normalise.c directory.c		\
> +S_RENDER := box.c box_construct.c box_normalise.c directory.c favicon.c \
>  	form.c html.c html_redraw.c hubbub_binding.c imagemap.c		\
>  	layout.c list.c loosen.c table.c textplain.c
> -S_UTILS := base64.c filename.c hashtable.c locale.c messages.c talloc.c	\
> -	url.c utf8.c utils.c useragent.c
> -S_DESKTOP := knockout.c options.c print.c tree.c version.c textarea.c
> +S_UTILS := base64.c container.c filename.c hashtable.c locale.c		\
> +	 messages.c talloc.c url.c utf8.c utils.c useragent.c
> +S_DESKTOP := knockout.c options.c print.c search.c searchweb.c textarea.c \
> +	tree.c version.c
>  
>  # S_COMMON are sources common to all builds
>  S_COMMON := $(addprefix content/,$(S_CONTENT))				\
> @@ -32,8 +33,8 @@
>  
>  # S_BROWSER are sources related to full browsers but are common
>  # between RISC OS, GTK, BeOS and AmigaOS builds
> -S_BROWSER := browser.c frames.c history_core.c netsurf.c save_text.c	\
> -	selection.c textinput.c
> +S_BROWSER := browser.c frames.c history_core.c netsurf.c save_complete.c \
> +	save_text.c selection.c textinput.c
>  S_BROWSER := $(addprefix desktop/,$(S_BROWSER))
>  
>  # S_RISCOS are sources purely for the RISC OS build
> @@ -42,8 +43,8 @@
>  	filetype.c font.c global_history.c gui.c help.c history.c	\
>  	hotlist.c image.c menus.c message.c palettes.c plotters.c	\
>  	plugin.c print.c query.c save.c save_complete.c save_draw.c	\
> -	save_pdf.c schedule.c search.c sprite.c sslcert.c textarea.c	\
> -	textselection.c theme.c theme_install.c thumbnail.c		\
> +	save_pdf.c schedule.c search.c searchweb.c sprite.c sslcert.c	\
> +	textarea.c textselection.c theme.c theme_install.c thumbnail.c	\
>  	treeview.c ucstables.c uri.c url_complete.c url_protocol.c	\
>  	wimp.c wimp_event.c window.c gui/progress_bar.c			\
>  	gui/status_bar.c						\
> @@ -59,7 +60,8 @@
>  	gtk_thumbnail.c gtk_plotters.c gtk_treeview.c gtk_scaffolding.c	\
>  	gtk_completion.c gtk_login.c gtk_throbber.c gtk_selection.c	\
>  	gtk_history.c gtk_window.c gtk_filetype.c gtk_download.c	\
> -	gtk_print.c gtk_tabs.c						\
> +	gtk_menu.c gtk_print.c gtk_save.c gtk_search.c gtk_tabs.c	\
> +	gtk_theme.c gtk_toolbar.c \
>  	$(addprefix dialogs/,gtk_options.c gtk_about.c gtk_source.c)
>  S_GTK := $(addprefix gtk/,$(S_GTK))
>  
> @@ -67,8 +69,9 @@
>  S_BEOS := beos_about.cpp beos_bitmap.cpp beos_fetch_rsrc.cpp		\
>  	beos_filetype.cpp beos_font.cpp beos_gui.cpp beos_history.cpp	\
>  	beos_login.cpp beos_options.cpp beos_plotters.cpp		\
> -	beos_scaffolding.cpp beos_schedule.cpp beos_thumbnail.cpp	\
> -	beos_treeview.cpp beos_throbber.cpp beos_window.cpp
> +	beos_scaffolding.cpp beos_search.cpp beos_schedule.cpp		\
> +	beos_thumbnail.cpp beos_treeview.cpp beos_throbber.cpp		\
> +	beos_window.cpp
>  S_BEOS := $(addprefix beos/,$(S_BEOS))
>  RDEF_BEOS := beos_res.rdef
>  RDEF_BEOS := $(addprefix beos/,$(RDEF_BEOS))
> Index: desktop/options.h
> ===================================================================
> --- desktop/options.h	(revision 8438)
> +++ desktop/options.h	(working copy)
> @@ -70,6 +70,8 @@
>  extern char *option_cookie_file;
>  extern char *option_cookie_jar;
>  extern char *option_homepage_url;
> +extern bool option_search_url_bar;
> +extern int option_search_provider;
>  extern bool option_target_blank;
>  extern bool option_button_2_tab;
>  extern bool option_url_suggestion;
> Index: desktop/options.c
> ===================================================================
> --- desktop/options.c	(revision 8438)
> +++ desktop/options.c	(working copy)
> @@ -110,12 +110,16 @@
>  char *option_ca_path = 0;
>  /** Cookie file location */
>  char *option_cookie_file = 0;
> -/** Cookie jar loaction */
> +/** Cookie jar location */
>  char *option_cookie_jar = 0;
>  /** Home page location */
>  char *option_homepage_url = 0;
> +/** search web from url bar */
> +bool option_search_url_bar = false;
>  /** URL completion in url bar */
>  bool option_url_suggestion = true;
> +/** default web search provider */
> +int option_search_provider = 0;
>  /** default x position of new windows */
>  int option_window_x = 0;
>  /** default y position of new windows */
> @@ -229,6 +233,8 @@
>  	{ "cookie_file",	OPTION_STRING,	&option_cookie_file },
>  	{ "cookie_jar",		OPTION_STRING,	&option_cookie_jar },
>          { "homepage_url",	OPTION_STRING,	&option_homepage_url },
> +        { "search_url_bar",	OPTION_BOOL,	&option_search_url_bar},
> +        { "search_provider",	OPTION_INTEGER,	&option_search_provider},
>  	{ "url_suggestion",	OPTION_BOOL,	&option_url_suggestion },
>  	{ "window_x",		OPTION_INTEGER,	&option_window_x },
>  	{ "window_y",		OPTION_INTEGER,	&option_window_y },
> Index: Makefile
> ===================================================================
> --- Makefile	(revision 8438)
> +++ Makefile	(working copy)
> @@ -109,6 +109,11 @@
>  
>  # Override this only if the host compiler is called something different
>  HOST_CC := gcc
> +ifeq ($(TARGET),amiga)
> +  ifneq ($(HOST),amiga)
> +    CC := ppc-amigaos-gcc
> +  endif
> +endif
>  
>  ifeq ($(TARGET),riscos)
>    ifeq ($(HOST),riscos)
> @@ -748,10 +753,13 @@
>  	@cp -vRL gtk/res/Aliases $(DESTDIR)$(NETSURF_GTK_RESOURCES)
>  	@cp -vrL gtk/res/docs $(DESTDIR)/$(NETSURF_GTK_RESOURCES)
>  	gzip -9v < gtk/res/messages > $(DESTDIR)$(NETSURF_GTK_RESOURCES)messages
> +	gzip -9v < gtk/res/SearchEngines > $(DESTDIR)$(NETSURF_GTK_RESOURCES)SearchEngines
>  	gzip -9v < gtk/res/downloads.glade > $(DESTDIR)$(NETSURF_GTK_RESOURCES)downloads.glade
>  	gzip -9v < gtk/res/netsurf.glade > $(DESTDIR)$(NETSURF_GTK_RESOURCES)netsurf.glade
>  	gzip -9v < gtk/res/options.glade > $(DESTDIR)$(NETSURF_GTK_RESOURCES)options.glade
>  	gzip -9v < gtk/res/history.glade > $(DESTDIR)$(NETSURF_GTK_RESOURCES)history.glade
> +	gzip -9v < gtk/res/toolbar.glade >
> +	$(DESTDIR)$(NETSURF_GTK_RESOURCES)toolbar.glade
>  	gzip -9v < gtk/res/source.glade > $(DESTDIR)$(NETSURF_GTK_RESOURCES)source.glade
>  
>  install-beos: NetSurf

>
>
> Conflicted files
>
>
>
>
> Removed files
>
>
>

Mark

http://www.halloit.com

Key ID 046B65CF




More information about the netsurf-dev mailing list