Permalink
Browse files

Indent with spaces

  • Loading branch information...
1 parent 8ce7d23 commit fefa1d765489101c21fa859ec948f019bf2fa492 @potyl committed May 29, 2011
Showing with 45 additions and 45 deletions.
  1. +3 −3 downloads.pl
  2. +42 −42 transparent.c
View
@@ -32,16 +32,16 @@ sub main {
die "Usage: url\n" unless @ARGV;
my ($url) = @ARGV;
- my $loop = Glib::MainLoop->new();
+ my $loop = Glib::MainLoop->new();
# Track all downloads
- my $session = Gtk2::WebKit->get_default_session();
+ my $session = Gtk2::WebKit->get_default_session();
my %resources;
$session->signal_connect('request-started' => \&tracker_cb, \%resources);
my $view = Gtk2::WebKit::WebView->new();
- # Track once all downloads are finished
+ # Track once all downloads are finished
$view->signal_connect('notify::load-status' => \&load_status_cb, [ $loop, \%resources ]);
$START = time;
View
@@ -2,50 +2,50 @@
#include <webkit/webkit.h>
static void destroy_cb(GtkWidget* widget, gpointer data) {
- gtk_main_quit();
+ gtk_main_quit();
}
int main(int argc, char* argv[]) {
- gtk_init(&argc, &argv);
-
- if (argc == 1) {
- printf("Usage: URI\n");
- return 1;
- }
- const char *uri = argv[1];
-
- if(!g_thread_supported())
- g_thread_init(NULL);
-
- // Create a Window, set colormap to RGBA
- GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
- GdkScreen *screen = gtk_widget_get_screen(window);
- GdkColormap *rgba = gdk_screen_get_rgba_colormap (screen);
-
- if (rgba && gdk_screen_is_composited (screen)) {
- gtk_widget_set_default_colormap(rgba);
- gtk_widget_set_colormap(GTK_WIDGET(window), rgba);
- }
-
- gtk_window_set_default_size(GTK_WINDOW(window), 600, 400);
- g_signal_connect(window, "destroy", G_CALLBACK(destroy_cb), NULL);
-
- // Optional: for dashboard style borderless windows
- gtk_window_set_decorated(GTK_WINDOW(window), FALSE);
-
-
- // Create a WebView, set it transparent, add it to the window
- WebKitWebView* web_view = WEBKIT_WEB_VIEW(webkit_web_view_new());
- webkit_web_view_set_transparent(web_view, TRUE);
- gtk_container_add (GTK_CONTAINER(window), GTK_WIDGET(web_view));
-
- // Load a default page
- webkit_web_view_load_uri(web_view, uri);
-
- // Show it and continue running until the window closes
- gtk_widget_grab_focus(GTK_WIDGET(web_view));
- gtk_widget_show_all(window);
- gtk_main();
- return 0;
+ gtk_init(&argc, &argv);
+
+ if (argc == 1) {
+ printf("Usage: URI\n");
+ return 1;
+ }
+ const char *uri = argv[1];
+
+ if(!g_thread_supported())
+ g_thread_init(NULL);
+
+ // Create a Window, set colormap to RGBA
+ GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ GdkScreen *screen = gtk_widget_get_screen(window);
+ GdkColormap *rgba = gdk_screen_get_rgba_colormap (screen);
+
+ if (rgba && gdk_screen_is_composited (screen)) {
+ gtk_widget_set_default_colormap(rgba);
+ gtk_widget_set_colormap(GTK_WIDGET(window), rgba);
+ }
+
+ gtk_window_set_default_size(GTK_WINDOW(window), 600, 400);
+ g_signal_connect(window, "destroy", G_CALLBACK(destroy_cb), NULL);
+
+ // Optional: for dashboard style borderless windows
+ gtk_window_set_decorated(GTK_WINDOW(window), FALSE);
+
+
+ // Create a WebView, set it transparent, add it to the window
+ WebKitWebView* web_view = WEBKIT_WEB_VIEW(webkit_web_view_new());
+ webkit_web_view_set_transparent(web_view, TRUE);
+ gtk_container_add (GTK_CONTAINER(window), GTK_WIDGET(web_view));
+
+ // Load a default page
+ webkit_web_view_load_uri(web_view, uri);
+
+ // Show it and continue running until the window closes
+ gtk_widget_grab_focus(GTK_WIDGET(web_view));
+ gtk_widget_show_all(window);
+ gtk_main();
+ return 0;
}

0 comments on commit fefa1d7

Please sign in to comment.