[baobab] Remove custom GtkListBox bindings



commit 3437d66ac332f30526da96e22ead59f44f50d506
Author: Stefano Facchini <stefano facchini gmail com>
Date:   Mon Jun 17 16:36:29 2013 +0200

    Remove custom GtkListBox bindings
    
    Now they're in vala

 configure.ac                  |    2 +-
 src/baobab-location-list.vala |   10 ++++----
 src/fixes.vapi                |   48 -----------------------------------------
 3 files changed, 6 insertions(+), 54 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ec545b9..46619ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,7 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The name of the gettext d
 AC_PROG_CC
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
-AM_PROG_VALAC([0.17.4])
+AM_PROG_VALAC([0.20.1])
 PKG_PROG_PKG_CONFIG([0.22])
 
 ## don't rerun to this point if we abort
diff --git a/src/baobab-location-list.vala b/src/baobab-location-list.vala
index a069a34..6b9849a 100644
--- a/src/baobab-location-list.vala
+++ b/src/baobab-location-list.vala
@@ -21,7 +21,7 @@
 namespace Baobab {
 
     [GtkTemplate (ui = "/org/gnome/baobab/ui/baobab-location-row.ui")]
-    private class LocationRow : LocalGtk.ListBoxRow {
+    private class LocationRow : Gtk.ListBoxRow {
         private static Gtk.SizeGroup name_size_group = null;
         private static Gtk.SizeGroup usage_size_group = null;
 
@@ -77,7 +77,7 @@ namespace Baobab {
         }
     }
 
-    public class LocationList : LocalGtk.ListBox {
+    public class LocationList : Gtk.ListBox {
         private const int MAX_RECENT_LOCATIONS = 5;
 
         private VolumeMonitor monitor;
@@ -97,12 +97,12 @@ namespace Baobab {
             monitor.volume_added.connect (volume_added);
 
             set_selection_mode (Gtk.SelectionMode.NONE);
-            set_header_func (update_header);
+            set_header_func (update_header, null);
 
             populate ();
         }
 
-        void update_header (LocalGtk.ListBoxRow row, LocalGtk.ListBoxRow? before_row) {
+        void update_header (Gtk.ListBoxRow row, Gtk.ListBoxRow? before_row) {
             if (before_row != null && row.get_header () == null) {
                 row.set_header (new Gtk.Separator (Gtk.Orientation.HORIZONTAL));
             } else {
@@ -110,7 +110,7 @@ namespace Baobab {
             }
         }
 
-        public override void row_activated (LocalGtk.ListBoxRow row) {
+        public override void row_activated (Gtk.ListBoxRow row) {
             if (location_action != null) {
                 var location_widget = row as LocationRow;
                 location_action (location_widget.location);
diff --git a/src/fixes.vapi b/src/fixes.vapi
index b690fae..66c0bba 100644
--- a/src/fixes.vapi
+++ b/src/fixes.vapi
@@ -6,51 +6,3 @@ namespace GLib2 {
                public void* join ();
        }
 }
-
-[CCode (cprefix = "Gtk", gir_namespace = "Gtk", gir_version = "3.0", lower_case_cprefix = "gtk_")]
-namespace LocalGtk {
-       [CCode (cheader_filename = "gtk/gtk.h", type_id = "gtk_list_box_get_type ()")]
-       public class ListBox : Gtk.Container, Atk.Implementor, Gtk.Buildable {
-               [CCode (has_construct_function = false, type = "GtkWidget*")]
-               public ListBox ();
-               public void drag_highlight_row (LocalGtk.ListBoxRow row);
-               public void drag_unhighlight_row ();
-               public unowned Gtk.Adjustment get_adjustment ();
-               public unowned LocalGtk.ListBoxRow get_row_at_index (int index);
-               public unowned LocalGtk.ListBoxRow get_row_at_y (int y);
-               public unowned LocalGtk.ListBoxRow get_selected_row ();
-               public Gtk.SelectionMode get_selection_mode ();
-               public void invalidate_filter ();
-               public void invalidate_headers ();
-               public void invalidate_sort ();
-               public void select_row (LocalGtk.ListBoxRow? row);
-               public void set_activate_on_single_click (bool single);
-               public void set_adjustment (Gtk.Adjustment? adjustment);
-               public void set_filter_func (owned LocalGtk.ListBoxFilterFunc? filter_func);
-               public void set_header_func (owned LocalGtk.ListBoxUpdateHeaderFunc? update_header);
-               public void set_placeholder (Gtk.Widget? placeholder);
-               public void set_selection_mode (Gtk.SelectionMode mode);
-               public void set_sort_func (owned LocalGtk.ListBoxSortFunc? sort_func);
-               public bool activate_on_single_click { get; set; }
-               public Gtk.SelectionMode selection_mode { get; set; }
-               public virtual signal void activate_cursor_row ();
-               public virtual signal void move_cursor (Gtk.MovementStep step, int count);
-               public virtual signal void row_activated (LocalGtk.ListBoxRow row);
-               public virtual signal void row_selected (LocalGtk.ListBoxRow row);
-               public virtual signal void toggle_cursor_row ();
-       }
-       [CCode (cheader_filename = "gtk/gtk.h", type_id = "gtk_list_box_row_get_type ()")]
-       public class ListBoxRow : Gtk.Bin, Atk.Implementor, Gtk.Buildable {
-               [CCode (has_construct_function = false, type = "GtkWidget*")]
-               public ListBoxRow ();
-               public void changed ();
-               public unowned Gtk.Widget get_header ();
-               public void set_header (Gtk.Widget? header);
-       }
-       [CCode (cheader_filename = "gtk/gtk.h", instance_pos = 1.9)]
-       public delegate bool ListBoxFilterFunc (LocalGtk.ListBoxRow row);
-       [CCode (cheader_filename = "gtk/gtk.h", instance_pos = 2.9)]
-       public delegate int ListBoxSortFunc (LocalGtk.ListBoxRow row1, LocalGtk.ListBoxRow row2);
-       [CCode (cheader_filename = "gtk/gtk.h", instance_pos = 2.9)]
-       public delegate void ListBoxUpdateHeaderFunc (LocalGtk.ListBoxRow row, LocalGtk.ListBoxRow before);
-}


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