~ubuntu-branches/ubuntu/raring/geany/raring-proposed

« back to all changes in this revision

Viewing changes to src/geanywraplabel.c

  • Committer: Bazaar Package Importer
  • Author(s): Damián Viano
  • Date: 2008-10-26 19:44:46 UTC
  • mto: (1.3.1 upstream) (3.1.2 experimental)
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20081026194446-kytjyn3a831y1oc8
Import upstream version 0.15

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 2187 2008-01-23 14:32:52Z eht16 $
 
21
 *  $Id: geanywraplabel.c 2789 2008-07-18 13:45:23Z eht16 $
22
22
 */
23
23
 
24
24
/*
58
58
 
59
59
static void geany_wrap_label_class_init         (GeanyWrapLabelClass *klass);
60
60
static void geany_wrap_label_init                       (GeanyWrapLabel *self);
61
 
static void geany_wrap_label_finalize           (GObject *object);
62
61
static void geany_wrap_label_size_request       (GtkWidget *widget, GtkRequisition *req);
63
62
static void geany_wrap_label_size_allocate      (GtkWidget *widget, GtkAllocation *alloc);
64
63
static void geany_wrap_label_set_wrap_width     (GtkWidget *widget, gsize width);
92
91
 
93
92
static void geany_wrap_label_class_init(GeanyWrapLabelClass *klass)
94
93
{
95
 
        GObjectClass *g_object_class = G_OBJECT_CLASS(klass);
96
94
        GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
97
95
 
98
 
        g_object_class->finalize = geany_wrap_label_finalize;
99
 
 
100
96
        parent_class = g_type_class_peek_parent(klass);
101
97
        widget_class->size_request = geany_wrap_label_size_request;
102
98
        widget_class->size_allocate = geany_wrap_label_size_allocate;
113
109
}
114
110
 
115
111
 
116
 
static void geany_wrap_label_finalize(GObject *object)
117
 
{
118
 
        GeanyWrapLabel *self;
119
 
 
120
 
        g_return_if_fail(object != NULL);
121
 
        g_return_if_fail(IS_GEANY_WRAP_LABEL(object));
122
 
 
123
 
        self = GEANY_WRAP_LABEL(object);
124
 
 
125
 
        if (G_OBJECT_CLASS(parent_class)->finalize)
126
 
                (* G_OBJECT_CLASS(parent_class)->finalize)(object);
127
 
}
128
 
 
129
 
 
130
112
/* Sets the point at which the text should wrap. */
131
113
static void geany_wrap_label_set_wrap_width(GtkWidget *widget, gsize width)
132
114
{