diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2006-05-20 06:34:27 +0000 |
|---|---|---|
| committer | joncruz <joncruz@users.sourceforge.net> | 2006-05-20 06:34:27 +0000 |
| commit | fb49c3582b99223708574492293d0717d3c45a68 (patch) | |
| tree | cd6a6d4cdaab87b2f82b860cadf17e7e184ad8fb /src/widgets/icon.cpp | |
| parent | * Don't block when setting a font trough the GtkEntry (diff) | |
| download | inkscape-fb49c3582b99223708574492293d0717d3c45a68.tar.gz inkscape-fb49c3582b99223708574492293d0717d3c45a68.zip | |
Changled dialog from checkboxes to icons for visible and locked.
(bzr r903)
Diffstat (limited to 'src/widgets/icon.cpp')
| -rw-r--r-- | src/widgets/icon.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp index cab03fa50..0aa01a37e 100644 --- a/src/widgets/icon.cpp +++ b/src/widgets/icon.cpp @@ -189,6 +189,19 @@ static int sp_icon_expose(GtkWidget *widget, GdkEventExpose *event) if ( GTK_WIDGET_DRAWABLE(widget) ) { SPIcon *icon = SP_ICON(widget); if ( !icon->pb ) { + sp_icon_fetch_pixbuf( icon ); + } + + sp_icon_paint(SP_ICON(widget), &event->area); + } + + return TRUE; +} + +void sp_icon_fetch_pixbuf( SPIcon *icon ) +{ + if ( icon ) { + if ( !icon->pb ) { guchar *pixels = 0; icon->psize = sp_icon_get_phys_size(icon->lsize); @@ -220,14 +233,9 @@ static int sp_icon_expose(GtkWidget *widget, GdkEventExpose *event) g_warning ("failed to load icon '%s'", icon->name); } } - - sp_icon_paint(SP_ICON(widget), &event->area); } - - return TRUE; } - static void sp_icon_screen_changed( GtkWidget *widget, GdkScreen *previous_screen ) { if ( GTK_WIDGET_CLASS( parent_class )->screen_changed ) { |
