Author: danw
Date: 2005-05-04 16:25:19 -0400 (Wed, 04 May 2005)
New Revision: 44044

Modified:
   trunk/stetic/ChangeLog
   trunk/stetic/configure.in
   trunk/stetic/libstetic/editor/GroupPicker.cs
   trunk/stetic/libstetic/wrapper/ToggleToolButton.cs
   trunk/stetic/libstetic/wrapper/Toolbar.cs
Log:
        * configure.in: require gtk-sharp 2.5

        * libstetic/editor/GroupPicker.cs: use ComboBox.RowSeparatorFunc
        to add a separator to the menu

        * libstetic/wrapper/Toolbar.cs (Tooltips): Remove; this is a real
        property in gtk 2.6

        * libstetic/wrapper/ToggleToolButton.cs (Active): Likewise


Modified: trunk/stetic/ChangeLog
===================================================================
--- trunk/stetic/ChangeLog      2005-05-04 20:09:57 UTC (rev 44043)
+++ trunk/stetic/ChangeLog      2005-05-04 20:25:19 UTC (rev 44044)
@@ -1,3 +1,15 @@
+2005-05-04  Dan Winship  <[EMAIL PROTECTED]>
+
+       * configure.in: require gtk-sharp 2.5
+
+       * libstetic/editor/GroupPicker.cs: use ComboBox.RowSeparatorFunc
+       to add a separator to the menu
+
+       * libstetic/wrapper/Toolbar.cs (Tooltips): Remove; this is a real
+       property in gtk 2.6
+
+       * libstetic/wrapper/ToggleToolButton.cs (Active): Likewise
+
 2005-04-28  Dan Winship  <[EMAIL PROTECTED]>
 
        * libstetic/GladeUtils.cs (PropToString): switch based on the type

Modified: trunk/stetic/configure.in
===================================================================
--- trunk/stetic/configure.in   2005-05-04 20:09:57 UTC (rev 44043)
+++ trunk/stetic/configure.in   2005-05-04 20:25:19 UTC (rev 44044)
@@ -24,11 +24,11 @@
 AC_SUBST(MONO)
 AC_SUBST(MCS)
 
-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4)
+PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6.0)
 AC_SUBST(GTK_CFLAGS)
 AC_SUBST(GTK_LIBS)
 
-PKG_CHECK_MODULES(STETIC, gtk-sharp-2.0 gnome-sharp-2.0)
+PKG_CHECK_MODULES(STETIC, gtk-sharp-2.0 >= 2.5.0 gnome-sharp-2.0)
 AC_SUBST(STETIC_LIBS)
 
 AC_OUTPUT([

Modified: trunk/stetic/libstetic/editor/GroupPicker.cs
===================================================================
--- trunk/stetic/libstetic/editor/GroupPicker.cs        2005-05-04 20:09:57 UTC 
(rev 44043)
+++ trunk/stetic/libstetic/editor/GroupPicker.cs        2005-05-04 20:25:19 UTC 
(rev 44044)
@@ -43,6 +43,7 @@
 
                        combo = Gtk.ComboBox.NewText ();
                        combo.Changed += combo_Changed;
+                       combo.RowSeparatorFunc = RowSeparatorFunc;
                        combo.Show ();
                        PackStart (combo, true, true, 0);
 
@@ -56,12 +57,21 @@
                                i++;
                        }
 
-                       // FIXME: once we go to 2.6, add a separator here
+                       combo.AppendText ("");
 
                        combo.AppendText ("Rename Group...");
                        combo.AppendText ("New Group...");
                }
 
+               bool RowSeparatorFunc (Gtk.TreeModel model, Gtk.TreeIter iter)
+               {
+                       GLib.Value val = new GLib.Value ();
+                       model.GetValue (iter, 0, ref val);
+                       bool sep = ((string)val) == "";
+                       val.Dispose ();
+                       return sep;
+               }
+
                public string Group {
                        get {
                                return group;
@@ -91,7 +101,7 @@
 
                void doDialog ()
                {
-                       bool rename = combo.Active == values.Count;
+                       bool rename = combo.Active == values.Count + 1;
                        Gtk.Dialog dialog = new Gtk.Dialog (
                                rename ? "Rename Group" : "New Group",
                                combo.Toplevel as Gtk.Window,

Modified: trunk/stetic/libstetic/wrapper/ToggleToolButton.cs
===================================================================
--- trunk/stetic/libstetic/wrapper/ToggleToolButton.cs  2005-05-04 20:09:57 UTC 
(rev 44043)
+++ trunk/stetic/libstetic/wrapper/ToggleToolButton.cs  2005-05-04 20:25:19 UTC 
(rev 44044)
@@ -20,25 +20,5 @@
                {
                        return new Gtk.ToggleToolButton (Gtk.Stock.Bold);
                }
-
-               // FIXME. Not needed in 2.6
-               [GladeProperty (Name = "active", Proxy = "GladeActive")]
-               public bool Active {
-                       get {
-                               return ((Gtk.ToggleToolButton)Wrapped).Active;
-                       }
-                       set {
-                               ((Gtk.ToggleToolButton)Wrapped).Active = value;
-                       }
-               }
-
-               public string GladeActive {
-                       get {
-                               return Active ? "True" : "False";
-                       }
-                       set {
-                               Active = (value == "True");
-                       }
-               }
        }
 }

Modified: trunk/stetic/libstetic/wrapper/Toolbar.cs
===================================================================
--- trunk/stetic/libstetic/wrapper/Toolbar.cs   2005-05-04 20:09:57 UTC (rev 
44043)
+++ trunk/stetic/libstetic/wrapper/Toolbar.cs   2005-05-04 20:25:19 UTC (rev 
44044)
@@ -38,26 +38,6 @@
                        }
                }
 
-               // FIXME. Not needed in 2.6
-               [GladeProperty (Name = "tooltips", Proxy = "GladeTooltips")]
-               public bool Tooltips {
-                       get {
-                               return toolbar.Tooltips;
-                       }
-                       set {
-                               toolbar.Tooltips = value;
-                       }
-               }
-
-               public string GladeTooltips {
-                       get {
-                               return Tooltips ? "True" : "False";
-                       }
-                       set {
-                               Tooltips = (value == "True");
-                       }
-               }
-
                Gtk.Toolbar toolbar {
                        get {
                                return (Gtk.Toolbar)Wrapped;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to