~ubuntu-branches/debian/jessie/aisleriot/jessie

« back to all changes in this revision

Viewing changes to src/ar-style.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Jeremy Bicha, Jordi Mallach
  • Date: 2012-04-22 12:49:26 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120422124926-gmr0thwstl91jt1n
Tags: 1:3.4.1-1
[ Jeremy Bicha ]
* New upstream release
* debian/control.in: (Build)-depend on guile-2.0
* debian/*.install: Cards files are now stored as zipped .svg's
* debian/patches/99_format-security.patch: Dropped, applied upstream

[ Jordi Mallach ]
* New upstream release.
* Update copyright to final version of the machine-readable 1.0 spec.
* Bump Standards Version to 3.9.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
enum
26
26
{
27
27
  PROP_0,
28
 
  PROP_BAIZE_COLOR,
29
28
  PROP_CARD_OVERHANG,
30
29
  PROP_CARD_SLOT_RATIO,
31
30
  PROP_CARD_STEP,
59
58
  priv = style->priv = G_TYPE_INSTANCE_GET_PRIVATE (style, AR_TYPE_STYLE, ArStylePrivate);
60
59
 
61
60
  priv->selection_color = default_selection_color;
62
 
  priv->baize_color = default_baize_color;
63
61
  priv->card_slot_ratio = DEFAULT_CARD_SLOT_RATIO;
64
62
  priv->card_overhang = DEFAULT_CARD_OVERHANG;
65
63
  priv->card_step = DEFAULT_CARD_STEP;
102
100
  ArStylePrivate *priv = style->priv;
103
101
 
104
102
  switch (property_id) {
105
 
    case PROP_BAIZE_COLOR:
106
 
      g_value_set_boxed (value, &priv->baize_color);
107
 
      break;
108
 
 
109
103
    case PROP_CARD_OVERHANG:
110
104
      g_value_set_double (value, ar_style_get_card_overhang (style));
111
105
      break;
189
183
  ArStylePrivate *priv = style->priv;
190
184
 
191
185
  switch (property_id) {
192
 
    case PROP_BAIZE_COLOR: {
193
 
      const GdkRGBA *color;
194
 
 
195
 
      if ((color = g_value_get_boxed (value)) != NULL) {
196
 
        priv->baize_color = *color;
197
 
      } else {
198
 
        priv->baize_color = default_baize_color;
199
 
      }
200
 
      break;
201
 
    }
202
 
 
203
186
    case PROP_CARD_OVERHANG:
204
187
      priv->card_overhang = g_value_get_double (value);
205
188
      break;
291
274
  object_class->get_property = ar_style_get_property;
292
275
  object_class->finalize     = ar_style_finalize;
293
276
 
294
 
  /**
295
 
   * ArStyle:baize-color:
296
 
   *
297
 
   * The board baize color.
298
 
   */
299
 
  g_object_class_install_property
300
 
    (object_class,
301
 
     PROP_BAIZE_COLOR,
302
 
     g_param_spec_boxed (AR_STYLE_PROP_BAIZE_COLOR, NULL, NULL,
303
 
                         GDK_TYPE_RGBA,
304
 
                         G_PARAM_READWRITE |
305
 
                         G_PARAM_STATIC_STRINGS));
306
 
 
307
277
  g_object_class_install_property
308
278
    (object_class,
309
279
     PROP_CARD_SLOT_RATIO,
794
764
}
795
765
 
796
766
/**
797
 
 * ar_style_get_baize_color:
798
 
 * @style: an #ArStyle
799
 
 * @color: location to store the color
800
 
 *
801
 
 */
802
 
void
803
 
ar_style_get_baize_color (ArStyle *style,
804
 
                          GdkRGBA * const color)
805
 
{
806
 
  ArStylePrivate *priv = style->priv;
807
 
 
808
 
  *color = priv->baize_color;
809
 
}
810
 
 
811
 
/**
812
767
 * ar_style_check_dnd_drag_threshold:
813
768
 * @style:
814
769
 * @x1: