~ubuntu-branches/ubuntu/natty/geany/natty

« back to all changes in this revision

Viewing changes to src/geanywraplabel.c

  • Committer: Bazaar Package Importer
  • Author(s): Chow Loong Jin
  • Date: 2010-08-07 03:23:12 UTC
  • mfrom: (1.4.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: james.westby@ubuntu.com-20100807032312-ot70ac9d50cn79we
Tags: upstream-0.19
ImportĀ upstreamĀ versionĀ 0.19

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *      along with this program; if not, write to the Free Software
19
19
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
20
 *
21
 
 *  $Id: geanywraplabel.c 4630 2010-01-31 21:54:47Z eht16 $
 
21
 *  $Id: geanywraplabel.c 4862 2010-04-25 17:43:39Z eht16 $
22
22
 */
23
23
 
24
24
/*
33
33
 
34
34
 
35
35
 
36
 
#define GEANY_WRAP_LABEL_GET_PRIVATE(obj)               (G_TYPE_INSTANCE_GET_PRIVATE((obj),\
37
 
        GEANY_WRAP_LABEL_TYPE, GeanyWrapLabelPrivate))
 
36
#define GEANY_WRAP_LABEL_GET_PRIVATE(obj)       (GEANY_WRAP_LABEL(obj)->priv)
38
37
 
39
38
 
40
39
struct _GeanyWrapLabelClass
42
41
        GtkLabelClass parent_class;
43
42
};
44
43
 
45
 
struct _GeanyWrapLabel
46
 
{
47
 
        GtkLabel parent;
48
 
};
49
 
 
50
44
typedef struct
51
45
{
52
46
        gsize wrap_width;
53
47
} GeanyWrapLabelPrivate;
54
48
 
 
49
struct _GeanyWrapLabel
 
50
{
 
51
        GtkLabel parent;
 
52
        GeanyWrapLabelPrivate *priv;
 
53
};
 
54
 
55
55
 
56
56
static void geany_wrap_label_size_request       (GtkWidget *widget, GtkRequisition *req);
57
57
static void geany_wrap_label_size_allocate      (GtkWidget *widget, GtkAllocation *alloc);
58
58
static void geany_wrap_label_set_wrap_width     (GtkWidget *widget, gsize width);
59
59
 
60
 
G_DEFINE_TYPE(GeanyWrapLabel, geany_wrap_label, GTK_TYPE_LABEL);
 
60
G_DEFINE_TYPE(GeanyWrapLabel, geany_wrap_label, GTK_TYPE_LABEL)
61
61
 
62
62
 
63
63
static void geany_wrap_label_class_init(GeanyWrapLabelClass *klass)
73
73
 
74
74
static void geany_wrap_label_init(GeanyWrapLabel *self)
75
75
{
76
 
        GeanyWrapLabelPrivate *priv = GEANY_WRAP_LABEL_GET_PRIVATE(self);
77
 
 
 
76
        GeanyWrapLabelPrivate *priv;
 
77
 
 
78
        self->priv = G_TYPE_INSTANCE_GET_PRIVATE(self,
 
79
                GEANY_WRAP_LABEL_TYPE, GeanyWrapLabelPrivate);
 
80
 
 
81
        priv = self->priv;
78
82
        priv->wrap_width = 0;
79
83
}
80
84