tazweb rev 46

Small code clean-up
author Christophe Lincoln <pankso@slitaz.org>
date Tue Apr 19 01:34:35 2011 +0200 (2011-04-19)
parents 020cf8b6e14e
children 88c8f1e20324
files README src/main.c
line diff
     1.1 --- a/README	Tue Apr 19 01:12:28 2011 +0200
     1.2 +++ b/README	Tue Apr 19 01:34:35 2011 +0200
     1.3 @@ -47,7 +47,7 @@
     1.4                          G_CALLBACK (mime_type_decision_cb), web_view);
     1.5  
     1.6      * Get user config directory path in $HOME
     1.7 -      home = g_strdup_printf ("%s/.config/tazweb", g_get_home_dir ());
     1.8 +      config = g_strdup_printf ("%s/.config/tazweb", g_get_home_dir ());
     1.9  
    1.10  
    1.11  ================================================================================
     2.1 --- a/src/main.c	Tue Apr 19 01:12:28 2011 +0200
     2.2 +++ b/src/main.c	Tue Apr 19 01:34:35 2011 +0200
     2.3 @@ -32,14 +32,6 @@
     2.4  }
     2.5  
     2.6  static void
     2.7 -activate_uri_entry_cb (GtkWidget* entry, gpointer data)
     2.8 -{
     2.9 -    const gchar* uri = gtk_entry_get_text (GTK_ENTRY (entry));
    2.10 -    g_assert (uri);
    2.11 -    webkit_web_view_load_uri (web_view, uri);
    2.12 -}
    2.13 -
    2.14 -static void
    2.15  notify_title_cb (WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
    2.16  {
    2.17      if (main_title)
    2.18 @@ -67,6 +59,15 @@
    2.19      }
    2.20  }
    2.21  
    2.22 +/* URL entry callback function */
    2.23 +static void
    2.24 +activate_uri_entry_cb (GtkWidget* entry, gpointer data)
    2.25 +{
    2.26 +    const gchar* uri = gtk_entry_get_text (GTK_ENTRY (entry));
    2.27 +    g_assert (uri);
    2.28 +    webkit_web_view_load_uri (web_view, uri);
    2.29 +}
    2.30 +
    2.31  static void
    2.32  destroy_cb (GtkWidget* widget, gpointer data)
    2.33  {
    2.34 @@ -111,7 +112,7 @@
    2.35      webkit_web_view_reload (web_view);
    2.36  }
    2.37  
    2.38 -/* Fullscreen and unfullscreen action */
    2.39 +/* Fullscreen and unfullscreen function */
    2.40  static void
    2.41  fullscreen_cb (GtkWindow* window, gpointer data)
    2.42  {
    2.43 @@ -237,7 +238,7 @@
    2.44  {
    2.45      GtkWidget* window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    2.46  
    2.47 -    /* Default tazweb window size ratio to 3/4 ?? --> 720, 540*/
    2.48 +    /* Default tazweb window size ratio to 3/4 --> 720, 540*/
    2.49      gtk_window_set_default_size (GTK_WINDOW (window), 800, 600);
    2.50      gtk_window_set_icon (GTK_WINDOW (window),
    2.51                           create_pixbuf ("/usr/share/pixmaps/tazweb.png"));