Merge branch 'experimental' of git://github.com/Dieterbe/uzbl into experimental
authorEvgeny Grablyk <evgeny.grablyk@gmail.com>
Fri, 1 May 2009 18:07:53 +0000 (21:07 +0300)
committerEvgeny Grablyk <evgeny.grablyk@gmail.com>
Fri, 1 May 2009 18:07:53 +0000 (21:07 +0300)
1  2 
examples/configs/sampleconfig-dev
uzbl.c

@@@ -33,15 -37,10 +37,16 @@@ w = follow_link_new_windo
  + = zoom_in
  - = zoom_out
  t = toggle_status
- k = exit
- B = spawn /bin/bash ./examples/scripts/insert_bookmark.sh
- u = spawn /bin/bash ./examples/scripts/load_url_from_history.sh
- U = spawn /bin/bash ./examples/scripts/load_url_from_bookmarks.sh
+ ZZ = exit
+ i = insert_mode
+ B = spawn ./examples/scripts/insert_bookmark.sh
+ u = spawn ./examples/scripts/load_url_from_history.sh
+ U = spawn ./examples/scripts/load_url_from_bookmarks.sh
  
  [network]
- proxy_server = 
++proxy_server = http://192.168.1.10:8118
 +#values 0-3
- http_debug = 0
++http_debug = 1
 +user-agent = uzbl
 +max_conns = 
 +max_conns_per_host = 
diff --cc uzbl.c
--- 1/uzbl.c
--- 2/uzbl.c
+++ b/uzbl.c
  #include <stdlib.h>
  #include <errno.h>
  #include <string.h>
- #include <sys/types.h>
  #include <fcntl.h>
 -
 +#include <sys/socket.h>
 +#include <sys/un.h>
 +#include <libsoup/soup.h>
+ #include "uzbl.h"
  
  /* housekeeping / internal variables */
- static GtkWidget* main_window;
- static GtkWidget* mainbar;
- static GtkWidget* mainbar_label;
+ static GtkWidget*     main_window;
+ static GtkWidget*     mainbar;
+ static GtkWidget*     mainbar_label;
+ static GtkScrollbar*  scbar_v;   // Horizontal and Vertical Scrollbar 
+ static GtkScrollbar*  scbar_h;   // (These are still hidden)
+ static GtkAdjustment* bar_v; // Information about document length
+ static GtkAdjustment* bar_h; // and scrolling position
  static WebKitWebView* web_view;
- static gchar* main_title;
- static gchar selected_url[500] = "\0";
- static gint load_progress;
- static Window xwin = 0;
- static char fifo_path[64];
- static char socket_path[108];
+ static gchar*         main_title;
+ static gchar          selected_url[500] = "\0";
+ static gint           load_progress;
+ static Window         xwin = 0;
+ static char           fifo_path[64];
+ static char           socket_path[108];
+ static char           executable_path[500];
+ static GString*       keycmd;
  
  /* state variables (initial values coming from command line arguments but may be changed later) */
  static gchar*   uri         = NULL;
@@@ -81,18 -86,14 +89,15 @@@ static gboolean insert_mode        = FA
  static gboolean status_top         = FALSE;
  static gchar*   modkey             = NULL;
  static guint    modmask            = 0;
 +static guint    http_debug         = 0;
+ static gdouble   hscroll            = 20;
+ static gdouble   vscroll            = 20;
  
  /* settings from config: group bindings, key -> action */
- static GHashTable *bindings;
+ static GHashTable* bindings;
  
  /* command list: name -> Command  */
- static GHashTable *commands;
- typedef struct {
-     char *name;
-     char *param;
- } Action;
+ static GHashTable* commands;
  
  /* commandline arguments (set initial values for the state variables) */
  static GOptionEntry entries[] =
@@@ -109,40 -110,6 +114,14 @@@ typedef void (*Command)(WebKitWebView*
  static char *XDG_CONFIG_HOME_default[256];
  static char *XDG_CONFIG_DIRS_default = "/etc/xdg";
  
 +/* libsoup stuff - proxy and friends; networking aptions actually */
 +static SoupSession *soup_session;
 +static SoupLogger *soup_logger;
 +static char *proxy_url = NULL;
 +static char *useragent = NULL;
 +static gint max_conns;
 +static gint max_conns_host;
 +
- static void
- update_title (GtkWindow* window);
- static void
- load_uri ( WebKitWebView * web_view, const gchar * uri);
- static void
- new_window_load_uri (const gchar * uri);
- static void
- close_uzbl (WebKitWebView *page, const char *param);
- static gboolean
- run_command(const char *command, const char *args);
- static void
- spawn(WebKitWebView *web_view, const char *param);
- static void
- free_action(gpointer action);
- static Action*
- new_action(const gchar *name, const gchar *param);
  /* --- CALLBACKS --- */
  
  static gboolean
@@@ -813,8 -810,9 +860,10 @@@ main (int argc, char* argv[]) 
      g_option_context_parse (context, &argc, &argv, &error);
      /* initialize hash table */
      bindings = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, free_action);
 -
 +      
 +      soup_session = webkit_get_default_session();
+     keycmd = g_string_new("");
      settings_init ();
      commands_hash ();