[gnome-devel-docs] Revert "Trimmed trailing whitespace in .c files."



commit a313ab8d4c442f66cd3157517841cf590115ba10
Author: Tiffany Antopolski <tiffany antopolski gmail com>
Date:   Fri Jun 22 22:44:41 2012 -0400

    Revert "Trimmed trailing whitespace in .c files."
    
    This reverts commit f9859ea0a89d162b969de6f03d64400c3d712f65.

 platform-demos/C/samples/button.c       |    2 +-
 platform-demos/C/samples/dialog.c       |   46 ++++++++++++++--------------
 platform-demos/C/samples/entry.c        |    6 ++--
 platform-demos/C/samples/progressbar.c  |   14 ++++----
 platform-demos/C/samples/spinner.c      |   50 +++++++++++++++---------------
 platform-demos/C/samples/togglebutton.c |   12 ++++----
 6 files changed, 65 insertions(+), 65 deletions(-)
---
diff --git a/platform-demos/C/samples/button.c b/platform-demos/C/samples/button.c
index c7ce0a8..17554bc 100644
--- a/platform-demos/C/samples/button.c
+++ b/platform-demos/C/samples/button.c
@@ -1,6 +1,6 @@
 #include <gtk/gtk.h>
 
-/*This is the callback function. It is a handler function which reacts to the signal.
+/*This is the callback function. It is a handler function which reacts to the signal. 
 In this case, it will cause the button label's string to reverse.*/
 
 static void
diff --git a/platform-demos/C/samples/dialog.c b/platform-demos/C/samples/dialog.c
index cfe7302..ea22626 100644
--- a/platform-demos/C/samples/dialog.c
+++ b/platform-demos/C/samples/dialog.c
@@ -1,17 +1,17 @@
 #include <gtk/gtk.h>
+ 
 
-
-/*Callback function in which reacts to the "response" signal. Be sure to place
+/*Callback function in which reacts to the "response" signal. Be sure to place 
 it before the function it is called in*/
 static void
 on_response (GtkDialog *dialog,
              gint       response_id,
              gpointer   user_data)
 {
-  /*For demonstration purposes, this will show the int value
+  /*For demonstration purposes, this will show the int value 
   of the response type*/
   g_print ("response is %d\n", response_id);
-
+  
   /*This will cause the dialog to be destroyed*/
   gtk_widget_destroy (GTK_WIDGET (dialog));
 }
@@ -30,13 +30,13 @@ show_dialog (GtkButton *button,
 
   gint response_id;
 
-  /*Create the dialog window. Modal windows prevent interaction with other
+  /*Create the dialog window. Modal windows prevent interaction with other 
   windows in the same application*/
-  dialog = gtk_dialog_new_with_buttons ("A Gtk+ Dialog",
-                                        window,
-                                        GTK_DIALOG_MODAL,
-                                        GTK_STOCK_OK,
-                                        GTK_RESPONSE_OK,
+  dialog = gtk_dialog_new_with_buttons ("A Gtk+ Dialog", 
+                                        window, 
+                                        GTK_DIALOG_MODAL, 
+                                        GTK_STOCK_OK, 
+                                        GTK_RESPONSE_OK, 
                                         NULL);
 
   /*Create a label and attach it to the content area of the dialog*/
@@ -46,12 +46,12 @@ show_dialog (GtkButton *button,
 
   /*The main purpose of this is to show dialog's child widget, label*/
   gtk_widget_show_all (dialog);
-
+  
   /*Connecting the "response" signal from the user to the associated
   callback function*/
-  g_signal_connect (GTK_DIALOG (dialog),
-                    "response",
-                    G_CALLBACK (on_response),
+  g_signal_connect (GTK_DIALOG (dialog), 
+                    "response", 
+                    G_CALLBACK (on_response), 
                     NULL);
 
 }
@@ -64,7 +64,7 @@ activate (GtkApplication *app,
 {
   GtkWidget *window;
   GtkWidget *button;
-
+ 
   /*Create a window with a title and a default size*/
   window = gtk_application_window_new (app);
   gtk_window_set_title (GTK_WINDOW (window), "GNOME Button");
@@ -73,16 +73,16 @@ activate (GtkApplication *app,
   /*Create a button with a label, and add it to the window*/
   button = gtk_button_new_with_label ("Click Me");
   gtk_container_add (GTK_CONTAINER (window), button);
-
+ 
   /*Connecting the clicked signal to the callback*/
-  g_signal_connect (GTK_BUTTON (button),
-                    "clicked",
-                    G_CALLBACK (show_dialog),
+  g_signal_connect (GTK_BUTTON (button), 
+                    "clicked", 
+                    G_CALLBACK (show_dialog), 
                     GTK_WINDOW (window));
-
+ 
   gtk_widget_show_all (window);
 }
-
+ 
 
 
 int
@@ -90,11 +90,11 @@ main (int argc, char **argv)
 {
   GtkApplication *app;
   int status;
-
+ 
   app = gtk_application_new ("org.gtk.example", G_APPLICATION_FLAGS_NONE);
   g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
   status = g_application_run (G_APPLICATION (app), argc, argv);
   g_object_unref (app);
-
+ 
   return status;
 }
diff --git a/platform-demos/C/samples/entry.c b/platform-demos/C/samples/entry.c
index 3f1e969..a400b56 100644
--- a/platform-demos/C/samples/entry.c
+++ b/platform-demos/C/samples/entry.c
@@ -1,7 +1,7 @@
 #include <gtk/gtk.h>
 
-/*This is the callback function. It is a handler function
-which reacts to the signal. In this case, it will grab the
+/*This is the callback function. It is a handler function 
+which reacts to the signal. In this case, it will grab the 
 text input from the entry box and print out a line to the user.*/
 static void
 on_activate (GtkEntry *entry,
@@ -20,7 +20,7 @@ activate (GtkApplication *app,
   GtkWidget *window;
   GtkWidget *entry_box;
 
-  /*Create a window with a title, a default size,
+  /*Create a window with a title, a default size, 
   and a set border width*/
   window = gtk_application_window_new (app);
   gtk_window_set_title (GTK_WINDOW (window), "What is your name?");
diff --git a/platform-demos/C/samples/progressbar.c b/platform-demos/C/samples/progressbar.c
index ddb3fd7..cd599be 100644
--- a/platform-demos/C/samples/progressbar.c
+++ b/platform-demos/C/samples/progressbar.c
@@ -17,9 +17,9 @@ fill (gpointer   user_data)
   gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progress_bar), fraction);
 
   /*Ensures that the fraction stays below 1.0*/
-  if (fraction < 1.0)
+  if (fraction < 1.0) 
     return TRUE;
-
+  
   return FALSE;
 }
 
@@ -38,7 +38,7 @@ activate (GtkApplication *app,
   window = gtk_application_window_new (app);
   gtk_window_set_title (GTK_WINDOW (window), "ProgressBar Example");
   gtk_window_set_default_size (GTK_WINDOW (window), 220, 20);
-
+ 
   /*Create a progressbar and add it to the window*/
   progress_bar = gtk_progress_bar_new ();
   gtk_container_add (GTK_CONTAINER (window), progress_bar);
@@ -48,10 +48,10 @@ activate (GtkApplication *app,
 
   /*Use the created fill function every 500 milliseconds*/
   g_timeout_add (500, fill, GTK_PROGRESS_BAR (progress_bar));
-
+ 
   gtk_widget_show_all (window);
 }
-
+ 
 
 
 int
@@ -59,11 +59,11 @@ main (int argc, char **argv)
 {
   GtkApplication *app;
   int status;
-
+ 
   app = gtk_application_new ("org.gtk.example", G_APPLICATION_FLAGS_NONE);
   g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
   status = g_application_run (G_APPLICATION (app), argc, argv);
   g_object_unref (app);
-
+ 
   return status;
 }
diff --git a/platform-demos/C/samples/spinner.c b/platform-demos/C/samples/spinner.c
index b8f3df8..61b9c20 100644
--- a/platform-demos/C/samples/spinner.c
+++ b/platform-demos/C/samples/spinner.c
@@ -1,15 +1,15 @@
 #include <gtk/gtk.h>
-
+ 
  /*Global variable used to indicate active state of the
-spinner. TRUE = active, FALSE = not-active. This is because
+spinner. TRUE = active, FALSE = not-active. This is because 
 there isn't a current function for C that does this for us*/
-gboolean active;
-
+gboolean active;  
+ 
 
-/*This is the callback function. It is a handler function
-which reacts to the signal. In this case, it will cause the
-spinner to start and stop according to how many times the user
-presses the spacebar.*/
+/*This is the callback function. It is a handler function 
+which reacts to the signal. In this case, it will cause the 
+spinner to start and stop according to how many times the user 
+presses the spacebar.*/ 
 static gboolean
 key_pressed_event (GtkWidget *widget,
                    GdkEvent  *event,
@@ -17,27 +17,27 @@ key_pressed_event (GtkWidget *widget,
 {
   GtkWidget *spinner = user_data;
   guint keyval;
-
-  /*Extracts the keyval from an event. And stores it in the  variable
-  "keyval" (we give the function the address). In this case, the
+  
+  /*Extracts the keyval from an event. And stores it in the  variable 
+  "keyval" (we give the function the address). In this case, the 
   event is GdkEventKey, a key press event*/
-  gdk_event_get_keyval (event, &keyval);
+  gdk_event_get_keyval (event, &keyval);  
 
   /*Grabbing the boolean value from the spinner*/
   g_object_get (GTK_SPINNER (spinner), "active", &active, NULL);
-
+  
   if (keyval == GDK_KEY_space) {
      if (active) {
          gtk_spinner_stop (GTK_SPINNER (spinner));
      }
      else {
          gtk_spinner_start (GTK_SPINNER (spinner));
-     }
+     } 
   }
-
+  
 return TRUE;
 }
-
+ 
 
 static void
 activate (GtkApplication *app,
@@ -45,38 +45,38 @@ activate (GtkApplication *app,
 {
   GtkWidget *window;
   GtkWidget *spinner;
-
+ 
   /*Create a window with a title, border width and a default size*/
   window = gtk_application_window_new (app);
-
+ 
   gtk_window_set_title (GTK_WINDOW (window), "Spinner Example");
   gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);
   gtk_container_set_border_width(GTK_CONTAINER(window), 30);
-
+ 
   /*Create a spinner, with extra horizontal and vertical space*/
   spinner = gtk_spinner_new ();
   gtk_spinner_start (GTK_SPINNER (spinner));
   //gtk_widget_set_hexpand (spinner, TRUE);
   //gtk_widget_set_vexpand (spinner, TRUE);
-
+  
   gtk_container_add (GTK_CONTAINER (window), spinner);
-
+ 
   /*connecting the clicked signal to the callback*/
   g_signal_connect (GTK_WINDOW (window), "key-press-event", G_CALLBACK (key_pressed_event), spinner);
-
+ 
   gtk_widget_show_all (window);
 }
-
+ 
 int
 main (int argc, char **argv)
 {
   GtkApplication *app;
   int status;
-
+ 
   app = gtk_application_new ("org.gtk.example", G_APPLICATION_FLAGS_NONE);
   g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
   status = g_application_run (G_APPLICATION (app), argc, argv);
   g_object_unref (app);
-
+ 
   return status;
 }
diff --git a/platform-demos/C/samples/togglebutton.c b/platform-demos/C/samples/togglebutton.c
index 17654cc..8ef7dcf 100644
--- a/platform-demos/C/samples/togglebutton.c
+++ b/platform-demos/C/samples/togglebutton.c
@@ -1,8 +1,8 @@
 #include <gtk/gtk.h>
 
-/*This is the callback function. It is a handler function
-which reacts to the signal. In this case, it will cause the
-spinner to start and stop according to how many times the user
+/*This is the callback function. It is a handler function 
+which reacts to the signal. In this case, it will cause the 
+spinner to start and stop according to how many times the user 
 presses the button.*/
 static void
 button_toggled_cb (GtkWidget *button,
@@ -41,15 +41,15 @@ activate (GtkApplication *app,
   gtk_widget_set_hexpand (spinner, TRUE);
   gtk_widget_set_vexpand (spinner, TRUE);
 
-  /*Create a grid and set the row spacing, attach the togglebutton
+  /*Create a grid and set the row spacing, attach the togglebutton 
   and spinner onto the grid and position them accordingly*/
   grid = gtk_grid_new();
   gtk_grid_set_row_homogeneous (GTK_GRID (grid), FALSE);
   gtk_grid_set_row_spacing (GTK_GRID (grid), 15);
-
+  
   gtk_grid_attach (GTK_GRID (grid), spinner, 0, 0, 1, 1);
   gtk_grid_attach (GTK_GRID (grid), button, 0, 1, 1, 1);
-
+  
   gtk_container_add (GTK_CONTAINER (window), grid);
 
   /*connecting the clicked signal to the callback*/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]