Changeset 853f397 for mainpanel.c


Ignore:
Timestamp:
Jun 3, 2010, 1:36:06 PM (11 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
840032d
Parents:
8f9a044
Message:
Make mainpanel's fill_parent_cb also generic
File:
1 edited

Legend:

Unmodified
Added
Removed
  • mainpanel.c

    rfa65671 r853f397  
    11#include "owl.h"
    2 
    3 static void owl_mainpanel_size(owl_window *parent, void *user_data);
    42
    53void owl_mainpanel_init(owl_mainpanel *mp)
     
    1311
    1412  /* Set up sizing hooks */
    15   owl_signal_connect_object(owl_window_get_screen(), "resized", G_CALLBACK(owl_mainpanel_size), mp->panel, 0);
     13  owl_signal_connect_object(owl_window_get_screen(), "resized", G_CALLBACK(owl_window_fill_parent_cb), mp->panel, 0);
    1614  g_signal_connect_swapped(mp->panel, "resized", G_CALLBACK(owl_mainpanel_layout_contents), mp);
    1715
    1816  /* Bootstrap the sizes and go */
    19   owl_mainpanel_size(owl_window_get_screen(), mp->panel);
     17  owl_window_fill_parent_cb(owl_window_get_screen(), mp->panel);
    2018  owl_window_show_all(mp->panel);
    21 }
    22 
    23 static void owl_mainpanel_size(owl_window *parent, void *user_data)
    24 {
    25   int lines, cols;
    26   owl_window *panel = user_data;
    27 
    28   /* Make this panel full-screen */
    29   owl_window_get_position(parent, &lines, &cols, NULL, NULL);
    30   owl_window_set_position(panel, lines, cols, 0, 0);
    3119}
    3220
Note: See TracChangeset for help on using the changeset viewer.