Revert "Merge branch 'inscription-single-line' into 'main'"
authorMatthias Clasen <mclasen@redhat.com>
Sun, 19 Feb 2023 00:00:10 +0000 (19:00 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 19 Feb 2023 00:04:00 +0000 (19:04 -0500)
This reverts commit 7ec90abf2473a3ba0fd9d0f0eda8b2f3f9b2f915, reversing
changes made to ec49a912aa855eb8064a4bbaf7a2d311c4cdf83a.

We did not have agreement on this after all.

gtk/gtkinscription.c
gtk/gtkinscription.h

index 243af852a02cffe6a109a1d8f2ab90bb58cacb54..b5ecabac745ae213d2a828348db490d9f81d584d 100644 (file)
@@ -70,7 +70,6 @@ struct _GtkInscription
   guint nat_chars;
   guint min_lines;
   guint nat_lines;
-  gboolean single_line_mode;
   float xalign;
   float yalign;
   PangoAttrList *attrs;
@@ -88,7 +87,6 @@ enum
   PROP_MIN_LINES,
   PROP_NAT_CHARS,
   PROP_NAT_LINES,
-  PROP_SINGLE_LINE_MODE,
   PROP_TEXT,
   PROP_TEXT_OVERFLOW,
   PROP_WRAP_MODE,
@@ -152,10 +150,6 @@ gtk_inscription_get_property (GObject    *object,
       g_value_set_uint (value, self->nat_lines);
       break;
 
-    case PROP_SINGLE_LINE_MODE:
-      g_value_set_boolean (value, self->single_line_mode);
-      break;
-
     case PROP_TEXT:
       g_value_set_string (value, self->text);
       break;
@@ -216,10 +210,6 @@ gtk_inscription_set_property (GObject      *object,
       gtk_inscription_set_nat_lines (self, g_value_get_uint (value));
       break;
 
-    case PROP_SINGLE_LINE_MODE:
-      gtk_inscription_set_single_line_mode (self, g_value_get_boolean (value));
-      break;
-
     case PROP_TEXT:
       gtk_inscription_set_text (self, g_value_get_string (value));
       break;
@@ -668,21 +658,6 @@ gtk_inscription_class_init (GtkInscriptionClass *klass)
                          DEFAULT_NAT_LINES,
                          G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
 
-  /**
-   * GtkInscription:single-line-mode: (attributes org.gtk.Property.get=gtk_inscription_get_single_line_mode org.gtk.Property.set=gtk_inscription_set_single_line_mode)
-   *
-   * Whether the inscription is in single line mode.
-   *
-   * In single line mode, the text is forced to be displayed in a single line,
-   * showing a glyph for each newline character in it.
-   *
-   * Since: 4.10
-   */
-  properties[PROP_SINGLE_LINE_MODE] =
-      g_param_spec_boolean ("single-line-mode", NULL, NULL,
-                            FALSE,
-                            G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
-
   /**
    * GtkInscription:text: (attributes org.gtk.Property.get=gtk_inscription_get_text org.gtk.Property.set=gtk_inscription_set_text)
    *
@@ -1043,55 +1018,6 @@ gtk_inscription_get_nat_lines (GtkInscription *self)
   return self->nat_lines;
 }
 
-/**
- * gtk_inscription_set_single_line_mode: (attributes org.gtk.Method.set_property=single-line-mode)
- * @self: a `GtkInscription`
- * @single_line_mode: %TRUE if the inscription should be in single line mode
- *
- * Sets the `single-line-mode` of the inscription.
- *
- * See the [property@Gtk.Inscription:single-line-mode] property.
- *
- * Since: 4.10
- */
-void
-gtk_inscription_set_single_line_mode (GtkInscription *self,
-                                      gboolean        single_line_mode)
-{
-  g_return_if_fail (GTK_IS_INSCRIPTION (self));
-
-  if (self->single_line_mode == single_line_mode)
-    return;
-
-  self->single_line_mode = single_line_mode;
-
-  pango_layout_set_single_paragraph_mode (self->layout, self->single_line_mode);
-
-  gtk_widget_queue_draw (GTK_WIDGET (self));
-
-  g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SINGLE_LINE_MODE]);
-}
-
-/**
- * gtk_inscription_get_single_line_mode: (attributes org.gtk.Method.get_property=single-line-mode)
- * @self: a `GtkInscription`
- *
- * Gets the `single-line-mode` of the inscription.
- *
- * See the [property@Gtk.Inscription:single-line-mode] property.
- *
- * Returns: the single-line-mode property
- *
- * Since: 4.10
- */
-gboolean
-gtk_inscription_get_single_line_mode (GtkInscription *self)
-{
-  g_return_val_if_fail (GTK_IS_INSCRIPTION (self), FALSE);
-
-  return self->single_line_mode;
-}
-
 /**
  * gtk_inscription_set_xalign: (attributes org.gtk.Method.set_property=xalign)
  * @self: a `GtkInscription`
index 038d30aea392c6fb5a1ce30a21305cbd537c5edf..164d05991ababd0424d4ab8335b4a60179557d2c 100644 (file)
@@ -100,12 +100,6 @@ GDK_AVAILABLE_IN_4_8
 void                    gtk_inscription_set_nat_lines           (GtkInscription         *self,
                                                                  guint                   nat_lines);
 
-GDK_AVAILABLE_IN_4_10
-gboolean                gtk_inscription_get_single_line_mode    (GtkInscription         *self);
-GDK_AVAILABLE_IN_4_10
-void                    gtk_inscription_set_single_line_mode    (GtkInscription         *self,
-                                                                 gboolean                single_line_mode);
-
 GDK_AVAILABLE_IN_4_8
 float                   gtk_inscription_get_xalign              (GtkInscription         *self);
 GDK_AVAILABLE_IN_4_8