gtkhtml r9198 - trunk/gtkhtml
- From: mbarnes svn gnome org
- To: svn-commits-list gnome org
- Subject: gtkhtml r9198 - trunk/gtkhtml
- Date: Thu, 9 Apr 2009 14:40:00 +0000 (UTC)
Author: mbarnes
Date: Thu Apr 9 14:40:00 2009
New Revision: 9198
URL: http://svn.gnome.org/viewvc/gtkhtml?rev=9198&view=rev
Log:
2009-04-09 Matthew Barnes <mbarnes redhat com>
* gtkhtml/testgtkhtml.c:
Fix compiler warnings and coding style.
Modified:
trunk/gtkhtml/ChangeLog
trunk/gtkhtml/testgtkhtml.c
Modified: trunk/gtkhtml/testgtkhtml.c
==============================================================================
--- trunk/gtkhtml/testgtkhtml.c (original)
+++ trunk/gtkhtml/testgtkhtml.c Thu Apr 9 14:40:00 2009
@@ -186,86 +186,88 @@
{
GtkWidget * label;
GtkToolItem *item;
+ GtkWidget * action_table;
+
+ action_table = gtk_table_new (7, 1, FALSE);
+
+ item = gtk_tool_button_new_from_stock (GTK_STOCK_GO_BACK);
+ gtk_tool_item_set_tooltip_text (item, "Move back");
+ g_signal_connect (item, "clicked", G_CALLBACK (back_cb), NULL);
+ gtk_widget_set_sensitive (GTK_WIDGET (item), FALSE);
+ toolbar_back = GTK_WIDGET (item);
+ gtk_table_attach (
+ GTK_TABLE (action_table),
+ GTK_WIDGET (item),
+ /* X direction */ /* Y direction */
+ 0, 1, 0, 1,
+ GTK_SHRINK, GTK_SHRINK,
+ 0, 0);
+
+ item = gtk_tool_button_new_from_stock (GTK_STOCK_GO_FORWARD);
+ gtk_tool_item_set_tooltip_text (item, "Move forward");
+ g_signal_connect (item, "clicked", G_CALLBACK (forward_cb), NULL);
+ gtk_widget_set_sensitive (GTK_WIDGET (item), FALSE);
+ toolbar_forward = GTK_WIDGET (item);
+ gtk_table_attach (
+ GTK_TABLE (action_table),
+ GTK_WIDGET (item),
+ /* X direction */ /* Y direction */
+ 1, 2, 0, 1,
+ GTK_SHRINK, GTK_SHRINK,
+ 0, 0);
+
+ item = gtk_tool_button_new_from_stock (GTK_STOCK_STOP);
+ gtk_tool_item_set_tooltip_text (item, "Stop loading");
+ g_signal_connect (item, "clicked", G_CALLBACK (stop_cb), NULL);
+ gtk_table_attach (
+ GTK_TABLE (action_table),
+ GTK_WIDGET (item),
+ /* X direction */ /* Y direction */
+ 2, 3, 0, 1,
+ GTK_SHRINK, GTK_SHRINK,
+ 0, 0);
+
+ item = gtk_tool_button_new_from_stock (GTK_STOCK_REFRESH);
+ gtk_tool_item_set_tooltip_text (item, "Reload page");
+ g_signal_connect (item, "clicked", G_CALLBACK (reload_cb), NULL);
+ gtk_table_attach (
+ GTK_TABLE (action_table),
+ GTK_WIDGET (item),
+ /* X direction */ /* Y direction */
+ 3, 4, 0, 1,
+ GTK_SHRINK, GTK_SHRINK,
+ 0, 0);
+
+ item = gtk_tool_button_new_from_stock (GTK_STOCK_HOME);
+ gtk_tool_item_set_tooltip_text (item, "Home page");
+ g_signal_connect (item, "clicked", G_CALLBACK (home_cb), NULL);
+ gtk_table_attach (
+ GTK_TABLE (action_table),
+ GTK_WIDGET (item),
+ /* X direction */ /* Y direction */
+ 4, 5, 0, 1,
+ GTK_SHRINK, GTK_SHRINK,
+ 0, 0);
+
+ label = gtk_label_new ("Location:");
+ gtk_table_attach (
+ GTK_TABLE (action_table),
+ label,
+ /* X direction */ /* Y direction */
+ 5, 6, 0, 1,
+ GTK_SHRINK, GTK_SHRINK,
+ 0, 0);
+
+ entry = gtk_entry_new ();
+ g_signal_connect (entry, "activate", G_CALLBACK (entry_goto_url), NULL);
+ gtk_table_attach (
+ GTK_TABLE (action_table),
+ entry,
+ /* X direction */ /* Y direction */
+ 6, 7, 0, 1,
+ GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,
+ 0, 0);
- GtkWidget * action_table = gtk_table_new (7, 1, FALSE);
- {
- item = gtk_tool_button_new_from_stock (GTK_STOCK_GO_BACK);
- gtk_tool_item_set_tooltip_text (item, "Move back");
- g_signal_connect (item, "clicked", G_CALLBACK (back_cb), NULL);
- gtk_widget_set_sensitive (GTK_WIDGET (item), FALSE);
- toolbar_back = GTK_WIDGET (item);
- gtk_table_attach (GTK_TABLE (action_table),
- GTK_WIDGET (item),
- /* X direction */ /* Y direction */
- 0, 1, 0, 1,
- GTK_SHRINK, GTK_SHRINK,
- 0, 0);
- }
- {
- item = gtk_tool_button_new_from_stock (GTK_STOCK_GO_FORWARD);
- gtk_tool_item_set_tooltip_text (item, "Move forward");
- g_signal_connect (item, "clicked", G_CALLBACK (forward_cb), NULL);
- gtk_widget_set_sensitive (GTK_WIDGET (item), FALSE);
- toolbar_forward = GTK_WIDGET (item);
- gtk_table_attach (GTK_TABLE (action_table),
- GTK_WIDGET (item),
- /* X direction */ /* Y direction */
- 1, 2, 0, 1,
- GTK_SHRINK, GTK_SHRINK,
- 0, 0);
- }
- {
- item = gtk_tool_button_new_from_stock (GTK_STOCK_STOP);
- gtk_tool_item_set_tooltip_text (item, "Stop loading");
- g_signal_connect (item, "clicked", G_CALLBACK (stop_cb), NULL);
- gtk_table_attach (GTK_TABLE (action_table),
- GTK_WIDGET (item),
- /* X direction */ /* Y direction */
- 2, 3, 0, 1,
- GTK_SHRINK, GTK_SHRINK,
- 0, 0);
- }
- {
- item = gtk_tool_button_new_from_stock (GTK_STOCK_REFRESH);
- gtk_tool_item_set_tooltip_text (item, "Reload page");
- g_signal_connect (item, "clicked", G_CALLBACK (reload_cb), NULL);
- gtk_table_attach (GTK_TABLE (action_table),
- GTK_WIDGET (item),
- /* X direction */ /* Y direction */
- 3, 4, 0, 1,
- GTK_SHRINK, GTK_SHRINK,
- 0, 0);
- }
- {
- item = gtk_tool_button_new_from_stock (GTK_STOCK_HOME);
- gtk_tool_item_set_tooltip_text (item, "Home page");
- g_signal_connect (item, "clicked", G_CALLBACK (home_cb), NULL);
- gtk_table_attach (GTK_TABLE (action_table),
- GTK_WIDGET (item),
- /* X direction */ /* Y direction */
- 4, 5, 0, 1,
- GTK_SHRINK, GTK_SHRINK,
- 0, 0);
- }
- {
- label = gtk_label_new ("Location:");
- gtk_table_attach (GTK_TABLE (action_table),
- label,
- /* X direction */ /* Y direction */
- 5, 6, 0, 1,
- GTK_SHRINK, GTK_SHRINK,
- 0, 0);
- }
- {
- entry = gtk_entry_new ();
- g_signal_connect (entry, "activate", G_CALLBACK (entry_goto_url), NULL);
- gtk_table_attach (GTK_TABLE (action_table),
- entry,
- /* X direction */ /* Y direction */
- 6, 7, 0, 1,
- GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,
- 0, 0);
- }
return action_table;
}
@@ -1005,6 +1007,7 @@
gint
main (gint argc, gchar *argv[])
{
+ SoupCookieJar *cookie_jar;
GtkWidget *app, *bar, *main_table;
GtkWidget *html_widget;
GtkWidget *scrolled_window;
@@ -1056,7 +1059,7 @@
session = soup_session_async_new ();
- SoupCookieJar * cookie_jar = soup_cookie_jar_text_new("./cookies.txt", FALSE);
+ cookie_jar = soup_cookie_jar_text_new("./cookies.txt", FALSE);
soup_session_add_feature(session, SOUP_SESSION_FEATURE(cookie_jar));
html_widget = gtk_html_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]