gtkieembed r210 - in trunk: . sample
- From: hiikezoe svn gnome org
- To: svn-commits-list gnome org
- Subject: gtkieembed r210 - in trunk: . sample
- Date: Tue, 3 Feb 2009 06:43:17 +0000 (UTC)
Author: hiikezoe
Date: Tue Feb 3 06:43:17 2009
New Revision: 210
URL: http://svn.gnome.org/viewvc/gtkieembed?rev=210&view=rev
Log:
* sample/samplebrowser.c: Added 3rd tab to use
gtk_ie_embed_set_while_history().
Modified:
trunk/ChangeLog
trunk/sample/samplebrowser.c
Modified: trunk/sample/samplebrowser.c
==============================================================================
--- trunk/sample/samplebrowser.c (original)
+++ trunk/sample/samplebrowser.c Tue Feb 3 06:43:17 2009
@@ -213,6 +213,7 @@
"Stop loading", G_CALLBACK (stop_action) },
{ "reload", GTK_STOCK_REFRESH, NULL, "<control>R",
"Reload page", G_CALLBACK (reload_action) }
+
};
static guint n_entries = G_N_ELEMENTS (entries);
@@ -268,6 +269,8 @@
" <menuitem name=\"font-size-smallest\" action=\"font-size-smallest\" />\n"
" <separator name=\"view-sep1\" />\n"
" <menuitem name=\"use-context-menu\" action=\"use-context-menu\" />\n"
+" <separator name=\"view-sep2\" />\n"
+" <menuitem name=\"get-history\" action=\"get-history\" />\n"
" </menu>\n"
" </menubar>\n"
" <toolbar name=\"toolbar\">\n"
@@ -482,6 +485,15 @@
}
static void
+append_new_embed_with_history (GtkNotebook *notebook, GList *history)
+{
+ GtkIEEmbed *embed;
+
+ embed = create_new_embed (GTK_NOTEBOOK (notebook));
+ gtk_ie_embed_set_whole_history (embed, history, g_list_length(history));
+}
+
+static void
append_new_welcome_embed (GtkNotebook *notebook)
{
GtkIEEmbed *embed;
@@ -501,6 +513,7 @@
GtkWidget *notebook;
GtkWidget *vbox, *hbox;
GtkUIManager *merge;
+ GList *history = NULL;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
@@ -561,6 +574,18 @@
append_new_welcome_embed (GTK_NOTEBOOK (notebook));
append_new_embed_with_url (GTK_NOTEBOOK (notebook),
"http://www.gnome.org/");
+ history = g_list_append (history,
+ gtk_ie_embed_history_item_new ("http://www.google.com/", "1st page"));
+ history = g_list_append (history,
+ gtk_ie_embed_history_item_new ("http://www.google.com/search?q=gonme", "2nd page"));
+ history = g_list_append (history,
+ gtk_ie_embed_history_item_new ("http://www.gnome.org/", "3rd page"));
+ history = g_list_append (history,
+ gtk_ie_embed_history_item_new ("http://www.gnome.org/start/stable/", "4th page"));
+ append_new_embed_with_history (GTK_NOTEBOOK (notebook), history);
+
+ g_list_foreach (history, (GFunc) g_object_unref, NULL);
+ g_list_free (history);
}
int
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]