diff options
author | Søren Sandmann <sandmann@redhat.com> | 2008-06-07 17:55:39 -0400 |
---|---|---|
committer | Søren Sandmann <sandmann@redhat.com> | 2008-06-07 17:55:39 -0400 |
commit | d28d25e4c00fe7276bef61b248de5d5dde2c34fd (patch) | |
tree | b78bd85871617b9af287e795676560f05994f952 | |
parent | 7d738b3680bcb36a6b245615dddff2d2d37dec24 (diff) |
Paint thumbnails
-rw-r--r-- | main.c | 34 |
1 files changed, 15 insertions, 19 deletions
@@ -28,29 +28,27 @@ get_widget (App *app, const char *name) static void on_thumbs_paint (FooScrollArea *scroll_area, - cairo_t *cr, - GdkRectangle *extents, - GdkRegion *region, - gpointer data) + cairo_t *cr, + GdkRectangle *extents, + GdkRegion *region, + gpointer data) { - - g_print ("paint thumbs\n"); + App *app = data; + + deck_paint (app->deck, scroll_area, cr); } static void on_thumbs_viewport_size_changed (FooScrollArea *scroll_area, GdkRectangle *viewport, - GdkRectangle *old_viewport) + GdkRectangle *old_viewport, + gpointer data) { - g_print ("thumbs viewport changed size\n"); -} - -#define MARGIN 20 -#define RATIO 1.414 -#define N_SLIDES 10 + App *app = data; + int height = deck_get_height (app->deck, viewport); -int slide_width; -int slide_height; + foo_scroll_area_set_size (scroll_area, viewport->width, height); +} static void on_main_paint (FooScrollArea *scroll_area, @@ -93,12 +91,10 @@ static void on_deck_changed (gpointer data) { App *app = data; - - } static void -set_size (GtkWindow *window) +set_window_size (GtkWindow *window) { GdkScreen *screen; int monitor_num; @@ -155,7 +151,7 @@ main (int argc, char **argv) g_signal_connect (app->thumbnails, "viewport_size_changed", G_CALLBACK (on_thumbs_viewport_size_changed), app); - set_size (get_widget (app, "main_window")); + set_window_size (get_widget (app, "main_window")); gtk_widget_show_all (get_widget (app, "main_window")); gtk_main (); |