[gtk-web/sort-bindings: 1/2] Sort language bindings alphabetically




commit 6913955bd40a6538a8e638868842383db24baac0
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Sat Oct 3 16:30:07 2020 +0100

    Sort language bindings alphabetically
    
    We're now listing enough bindings that sorting by preference/maintenance
    is getting in the way of clarity, so might as well use an alphabetical
    order.

 _data/sample_codes.yml           | 114 +++++++++++++++++++--------------------
 _docs/language-bindings/index.md |  10 ++--
 2 files changed, 62 insertions(+), 62 deletions(-)
---
diff --git a/_data/sample_codes.yml b/_data/sample_codes.yml
index 360a11c2..7f6fde24 100644
--- a/_data/sample_codes.yml
+++ b/_data/sample_codes.yml
@@ -1,4 +1,30 @@
 codes:
+  - name: C
+    ext: c
+    snippet: |
+      ```cpp
+      // Include gtk
+      #include <gtk/gtk.h>
+
+      static void on_activate (GtkApplication *app) {
+        // Create a new window
+        GtkWidget *window = gtk_application_window_new (app);
+        // Create a new button
+        GtkWidget *button = gtk_button_new_with_label ("Hello, World!");
+        // When the button is clicked, close the window passed as an argument
+        g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_window_close), window);
+        gtk_container_add (GTK_CONTAINER (window), button);
+        gtk_widget_show_all (window);
+      }
+
+      int main (int argc, char *argv[]) {
+        // Create a new application
+        GtkApplication *app = gtk_application_new ("com.example.GtkApplication",
+                                                   G_APPLICATION_FLAGS_NONE);
+        g_signal_connect (app, "activate", G_CALLBACK (on_activate), NULL);
+        return g_application_run (G_APPLICATION (app), argc, argv);
+      }
+      ```
   - name: JavaScript
     ext: javascript
     snippet: |
@@ -24,6 +50,37 @@ codes:
       // Run the application
       app.run([]);
       ```
+  - name: Perl
+    ext: pl
+    snippet: |
+      ```perl
+      #!/usr/bin/env perl
+      use strict; use warnings; use utf8;
+      use Glib::IO;
+      use Gtk3;
+
+      # Create a new application
+      my $app =
+        Gtk3::Application->new('com.example.Gtk3Application', 'G_APPLICATION_FLAGS_NONE');
+
+      # When the application is launched…
+      $app->signal_connect(
+        activate => sub {
+          my $app = shift;
+          # … create a new window …
+          my $win = Gtk3::ApplicationWindow->new($app);
+          # … with a button in it …
+          my $btn = Gtk3::Button->new('Hello World!');
+          # … which closes the window when clicked
+          $btn->signal_connect(clicked => sub { $win->close(); });
+          $win->add($btn);
+          $win->show_all();
+        }
+      );
+
+      # Run the application
+      $app->run(\@ARGV);
+      ```
   - name: Python
     ext: py
     snippet: |
@@ -108,60 +165,3 @@ codes:
           return app.run (argv);
       }
       ```
-  - name: C
-    ext: c
-    snippet: |
-      ```cpp
-      // Include gtk
-      #include <gtk/gtk.h>
-
-      static void on_activate (GtkApplication *app) {
-        // Create a new window
-        GtkWidget *window = gtk_application_window_new (app);
-        // Create a new button
-        GtkWidget *button = gtk_button_new_with_label ("Hello, World!");
-        // When the button is clicked, close the window passed as an argument
-        g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_window_close), window);
-        gtk_container_add (GTK_CONTAINER (window), button);
-        gtk_widget_show_all (window);
-      }
-
-      int main (int argc, char *argv[]) {
-        // Create a new application
-        GtkApplication *app = gtk_application_new ("com.example.GtkApplication",
-                                                   G_APPLICATION_FLAGS_NONE);
-        g_signal_connect (app, "activate", G_CALLBACK (on_activate), NULL);
-        return g_application_run (G_APPLICATION (app), argc, argv);
-      }
-      ```
-  - name: Perl
-    ext: pl
-    snippet: |
-      ```perl
-      #!/usr/bin/env perl
-      use strict; use warnings; use utf8;
-      use Glib::IO;
-      use Gtk3;
-
-      # Create a new application
-      my $app =
-        Gtk3::Application->new('com.example.Gtk3Application', 'G_APPLICATION_FLAGS_NONE');
-
-      # When the application is launched…
-      $app->signal_connect(
-        activate => sub {
-          my $app = shift;
-          # … create a new window …
-          my $win = Gtk3::ApplicationWindow->new($app);
-          # … with a button in it …
-          my $btn = Gtk3::Button->new('Hello World!');
-          # … which closes the window when clicked
-          $btn->signal_connect(clicked => sub { $win->close(); });
-          $win->add($btn);
-          $win->show_all();
-        }
-      );
-
-      # Run the application
-      $app->run(\@ARGV);
-      ```
diff --git a/_docs/language-bindings/index.md b/_docs/language-bindings/index.md
index 93ddca35..0c76b287 100644
--- a/_docs/language-bindings/index.md
+++ b/_docs/language-bindings/index.md
@@ -9,14 +9,14 @@ create because GTK is designed with them in mind.
 
 Language | v3 | v4
 --- | :---: | :---:
-<a href="https://pygobject.readthedocs.io/en/latest/";>Python</a> | <i class="far fa-check-circle"></i> | <i 
class="far fa-check-circle"></i>
-<a href="https://gitlab.gnome.org/GNOME/gjs/blob/master/doc/Home.md";>JavaScript</a> | <i class="far 
fa-check-circle"></i> | <i class="far fa-check-circle"></i>
 <a href="https://www.gtkmm.org/en/index.html";>C++</a> | <i class="far fa-check-circle"></i> | <i class="far 
fa-check-circle"></i>
-<a href="https://valadoc.org/";>Vala</a> | <i class="far fa-check-circle"></i> | <i class="far 
fa-check-circle"></i>
-<a href="http://gtk2-perl.sourceforge.net/";>Perl</a> | <i class="far fa-check-circle"></i> | <i class="far 
fa-check-circle"></i>
 <a href="https://gtkd.org/";>D</a> | <i class="far fa-check-circle"></i> | <i class="far fa-check-circle"></i>
-<a href="https://gtk-rs.org";>Rust</a> | <i class="far fa-check-circle"></i> | <i class="far 
fa-check-circle"></i>
 <a href="https://github.com/gotk3/gotk3";>Go</a> | <i class="far fa-check-circle"></i> | <i class="fas 
fa-minus-circle"></i>
+<a href="https://gitlab.gnome.org/GNOME/gjs/blob/master/doc/Home.md";>JavaScript</a> | <i class="far 
fa-check-circle"></i> | <i class="far fa-check-circle"></i>
+<a href="http://gtk2-perl.sourceforge.net/";>Perl</a> | <i class="far fa-check-circle"></i> | <i class="far 
fa-check-circle"></i>
+<a href="https://pygobject.readthedocs.io/en/latest/";>Python</a> | <i class="far fa-check-circle"></i> | <i 
class="far fa-check-circle"></i>
+<a href="https://gtk-rs.org";>Rust</a> | <i class="far fa-check-circle"></i> | <i class="far 
fa-check-circle"></i>
+<a href="https://valadoc.org/";>Vala</a> | <i class="far fa-check-circle"></i> | <i class="far 
fa-check-circle"></i>
 
 ## GObject Introspection
 


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