gucharmap r1949 - in trunk: docs/reference/tmpl gucharmap



Author: chpe
Date: Fri Nov  7 22:58:09 2008
New Revision: 1949
URL: http://svn.gnome.org/viewvc/gucharmap?rev=1949&view=rev

Log:
Don't install the 'orientable' property in gtk >= 2.15.0, since GtkPaned
is orientable already.

Modified:
   trunk/docs/reference/tmpl/gucharmap-charmap.sgml
   trunk/docs/reference/tmpl/gucharmap-unused.sgml
   trunk/gucharmap/gucharmap-charmap.c
   trunk/gucharmap/gucharmap-charmap.h

Modified: trunk/docs/reference/tmpl/gucharmap-charmap.sgml
==============================================================================
--- trunk/docs/reference/tmpl/gucharmap-charmap.sgml	(original)
+++ trunk/docs/reference/tmpl/gucharmap-charmap.sgml	Fri Nov  7 22:58:09 2008
@@ -76,11 +76,6 @@
 
 </para>
 
-<!-- ##### ARG GucharmapCharmap:orientation ##### -->
-<para>
-
-</para>
-
 <!-- ##### ARG GucharmapCharmap:snap-power-2 ##### -->
 <para>
 

Modified: trunk/docs/reference/tmpl/gucharmap-unused.sgml
==============================================================================
--- trunk/docs/reference/tmpl/gucharmap-unused.sgml	(original)
+++ trunk/docs/reference/tmpl/gucharmap-unused.sgml	Fri Nov  7 22:58:09 2008
@@ -57,6 +57,12 @@
 @GUCHARMAP_CHAPTERS_SCRIPT: 
 @GUCHARMAP_CHAPTERS_BLOCK: 
 
+<!-- ##### ARG GucharmapCharmap:orientation ##### -->
+<para>
+
+</para>
+
+
 <!-- ##### FUNCTION gucharmap_charmap_set_font ##### -->
 <para>
 

Modified: trunk/gucharmap/gucharmap-charmap.c
==============================================================================
--- trunk/gucharmap/gucharmap-charmap.c	(original)
+++ trunk/gucharmap/gucharmap-charmap.c	Fri Nov  7 22:58:09 2008
@@ -31,8 +31,10 @@
 #include "gucharmap-private.h"
 
 struct _GucharmapCharmapPrivate {
+#if !GTK_CHECK_VERSION (2, 15, 0)
   GtkOrientation orientation;
   GtkWidgetClass *paned_class;
+#endif
 
   GtkWidget *notebook;
   GucharmapChaptersView *chapters_view;
@@ -61,7 +63,9 @@
 
 enum {
   PROP_0,
+#if !GTK_CHECK_VERSION (2, 15, 0)
   PROP_ORIENTATION,
+#endif
   PROP_CHAPTERS_MODEL,
   PROP_ACTIVE_CHAPTER,
   PROP_ACTIVE_CHARACTER,
@@ -90,7 +94,9 @@
   if (priv->font_desc)
     pango_font_description_free (priv->font_desc);
 
+#if !GTK_CHECK_VERSION (2, 15, 0)
   g_type_class_unref (priv->paned_class);
+#endif
 
   G_OBJECT_CLASS (gucharmap_charmap_parent_class)->finalize (object);
 }
@@ -105,9 +111,11 @@
   GucharmapCharmapPrivate *priv = charmap->priv;
 
   switch (prop_id) {
+#if !GTK_CHECK_VERSION (2, 15, 0)
     case PROP_ORIENTATION:
       g_value_set_enum (value, gucharmap_charmap_get_orientation (charmap));
       break;
+#endif
     case PROP_CHAPTERS_MODEL:
       g_value_set_object (value, gucharmap_charmap_get_chapters_model (charmap));
       break;
@@ -145,9 +153,11 @@
   GucharmapCharmapPrivate *priv = charmap->priv;
 
   switch (prop_id) {
+#if !GTK_CHECK_VERSION (2, 15, 0)
     case PROP_ORIENTATION:
       gucharmap_charmap_set_orientation (charmap, g_value_get_enum (value));
       break;
+#endif
     case PROP_CHAPTERS_MODEL:
       gucharmap_charmap_set_chapters_model (charmap, g_value_get_object (value));
       break;
@@ -174,6 +184,8 @@
   }
 }
 
+#if !GTK_CHECK_VERSION (2, 15, 0)
+
 static void
 gucharmap_charmap_size_request (GtkWidget *widget,
                                 GtkRequisition *requisition)
@@ -194,11 +206,15 @@
   priv->paned_class->size_allocate (widget, allocation);
 }
 
+#endif /* GTK < 2.15.0 */
+
 static void
 gucharmap_charmap_class_init (GucharmapCharmapClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
+#if !GTK_CHECK_VERSION (2, 15, 0)
   GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+#endif
 
   _gucharmap_intl_ensure_initialized ();
 
@@ -206,8 +222,10 @@
   object_class->set_property = gucharmap_charmap_set_property;
   object_class->finalize = gucharmap_charmap_finalize;
 
+#if !GTK_CHECK_VERSION (2, 15, 0)
   widget_class->size_request = gucharmap_charmap_size_request;
   widget_class->size_allocate = gucharmap_charmap_size_allocate;
+#endif
 
   gucharmap_charmap_signals[STATUS_MESSAGE] =
       g_signal_new (I_("status-message"), gucharmap_charmap_get_type (),
@@ -223,6 +241,12 @@
                     NULL, NULL, _gucharmap_marshal_VOID__UINT_UINT, G_TYPE_NONE, 
                     2, G_TYPE_UINT, G_TYPE_UINT);
 
+#if !GTK_CHECK_VERSION (2, 15, 0)
+  /**
+   * GucharmapCharmap:orientation:
+   *
+   * Deprecated: 2.25.0
+   */
   g_object_class_install_property
     (object_class,
      PROP_ORIENTATION,
@@ -234,6 +258,7 @@
                         G_PARAM_STATIC_NAME |
                         G_PARAM_STATIC_NICK |
                         G_PARAM_STATIC_BLURB));
+#endif
 
   g_object_class_install_property
     (object_class,
@@ -1217,13 +1242,27 @@
 GtkWidget *
 gucharmap_charmap_new (void)
 {
-  return g_object_new (gucharmap_charmap_get_type (), NULL);
+  return g_object_new (GUCHARMAP_TYPE_CHARMAP,
+                       "orientation", GTK_ORIENTATION_HORIZONTAL,
+                       NULL);
 }
 
+#ifndef GUCHARMAP_DISABLE_DEPRECATED_SOURCE
+
+/**
+ * gucharmap_charmap_set_orientation:
+ * @charmap:
+ * @orientation:
+ *
+ * Deprecated: 2.25.0
+ */
 void
 gucharmap_charmap_set_orientation (GucharmapCharmap *charmap,
                                    GtkOrientation orientation)
 {
+#if GTK_CHECK_VERSION (2, 15, 0)
+  gtk_orientable_set_orientation (GTK_ORIENTABLE (charmap), orientation);
+#else
   GucharmapCharmapPrivate *priv;
   GtkPaned *paned = GTK_PANED (charmap);
 
@@ -1251,16 +1290,29 @@
   }
 
   g_object_notify (G_OBJECT (charmap), "orientation");
+#endif
 }
 
+/**
+ * gucharmap_charmap_get_orientation:
+ * @charmap:
+ *
+ * Deprecated: 2.25.0
+ */
 GtkOrientation
 gucharmap_charmap_get_orientation (GucharmapCharmap *charmap)
 {
   g_return_val_if_fail (GUCHARMAP_IS_CHARMAP (charmap), GTK_ORIENTATION_HORIZONTAL);
 
+#if GTK_CHECK_VERSION (2, 15, 0)
+  return gtk_orientable_get_orientation (GTK_ORIENTABLE (charmap));
+#else
   return charmap->priv->orientation;
+#endif
 }
 
+#endif /* !GUCHARMAP_DISABLE_DEPRECATED_SOURCE */
+
 /**
  * gucharmap_chartable_set_font_desc:
  * @chartable: a #GucharmapChartable

Modified: trunk/gucharmap/gucharmap-charmap.h
==============================================================================
--- trunk/gucharmap/gucharmap-charmap.h	(original)
+++ trunk/gucharmap/gucharmap-charmap.h	Fri Nov  7 22:58:09 2008
@@ -68,9 +68,11 @@
 
 GtkWidget *           gucharmap_charmap_new                (void);
 
+#ifndef GUCHARMAP_DISABLE_DEPRECATED
 void           gucharmap_charmap_set_orientation (GucharmapCharmap *charmap,
                                                   GtkOrientation orientation);
 GtkOrientation gucharmap_charmap_get_orientation (GucharmapCharmap *charmap);
+#endif
 
 void      gucharmap_charmap_set_active_character (GucharmapCharmap *charmap,
                                                   gunichar           uc);



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