Commit c5fa9573 authored by Salomon Sickert's avatar Salomon Sickert Committed by Javier Jardón

Use accessor functions instead direct access

This makes gdu GTK+3 compilant.
Signed-off-by: default avatarJavier Jardón <jjardon@gnome.org>
parent d3440548
......@@ -126,7 +126,7 @@ GOBJECT2_REQUIRED=2.16
GIO2_REQUIRED=2.22
DBUS_GLIB_REQUIRED=0.74
GNOME_KEYRING_REQUIRED=2.22
GTK2_REQUIRED=2.17.2
GTK2_REQUIRED=2.20.0
UNIQUE_REQUIRED=1.0
LIBNOTIFY_REQUIRED=0.3.0
NAUTILUS_REQUIRED=2.24.0
......
......@@ -1090,6 +1090,8 @@ on_self_test_button_clicked (GduButtonElement *button_element,
{
GduAtaSmartDialog *dialog = GDU_ATA_SMART_DIALOG (user_data);
GtkWidget *test_dialog;
GtkWidget *content_area;
GtkWidget *action_area;
GtkWidget *hbox;
GtkWidget *image;
GtkWidget *main_vbox;
......@@ -1112,15 +1114,19 @@ on_self_test_button_clicked (GduButtonElement *button_element,
NULL);
gtk_window_set_title (GTK_WINDOW (test_dialog), "");
content_area = gtk_dialog_get_content_area (GTK_DIALOG (test_dialog));
action_area = gtk_dialog_get_action_area (GTK_DIALOG (test_dialog));
gtk_container_set_border_width (GTK_CONTAINER (test_dialog), 6);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (test_dialog)->vbox), 2);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (test_dialog)->action_area), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (test_dialog)->action_area), 6);
gtk_box_set_spacing (GTK_BOX (content_area), 2);
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
gtk_box_set_spacing (GTK_BOX (action_area), 6);
gtk_window_set_resizable (GTK_WINDOW (test_dialog), FALSE);
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (test_dialog)->vbox), hbox, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (content_area), hbox, TRUE, TRUE, 0);
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG);
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
......
......@@ -486,6 +486,7 @@ gdu_create_linux_md_dialog_constructed (GObject *object)
{
GduCreateLinuxMdDialog *dialog = GDU_CREATE_LINUX_MD_DIALOG (object);
GtkWidget *content_area;
GtkWidget *action_area;
GtkWidget *button;
GtkWidget *label;
GtkWidget *hbox;
......@@ -505,11 +506,14 @@ gdu_create_linux_md_dialog_constructed (GObject *object)
ret = FALSE;
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
action_area = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 0);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->action_area), 6);
gtk_box_set_spacing (GTK_BOX (content_area), 0);
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
gtk_box_set_spacing (GTK_BOX (action_area), 6);
gtk_window_set_title (GTK_WINDOW (dialog), _("Create RAID Array"));
gtk_window_set_icon_name (GTK_WINDOW (dialog), "gdu-raid-array");
......@@ -520,7 +524,6 @@ gdu_create_linux_md_dialog_constructed (GObject *object)
GTK_RESPONSE_OK);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
gtk_container_set_border_width (GTK_CONTAINER (content_area), 10);
vbox = content_area;
......
......@@ -517,6 +517,7 @@ benchmark_cb (GduDevice *device,
{
GduDriveBenchmarkDialog *dialog = GDU_DRIVE_BENCHMARK_DIALOG (user_data);
GError *local_error;
GtkAllocation allocation;
if (error != NULL) {
if (!(error->domain == GDU_ERROR && error->code == GDU_ERROR_CANCELLED)) {
......@@ -556,11 +557,12 @@ benchmark_cb (GduDevice *device,
out:
if (!dialog->priv->deleted) {
update_dialog (dialog);
gtk_widget_get_allocation (dialog->priv->drawing_area, &allocation);
gtk_widget_queue_draw_area (dialog->priv->drawing_area,
0,
0,
dialog->priv->drawing_area->allocation.width,
dialog->priv->drawing_area->allocation.height);
allocation.width,
allocation.height);
}
g_object_unref (dialog);
}
......@@ -869,6 +871,7 @@ on_drawing_area_expose_event (GtkWidget *widget,
gpointer user_data)
{
GduDriveBenchmarkDialog *dialog = GDU_DRIVE_BENCHMARK_DIALOG (user_data);
GtkAllocation allocation;
cairo_t *cr;
gdouble width, height;
gdouble gx, gy, gw, gh;
......@@ -963,10 +966,11 @@ on_drawing_area_expose_event (GtkWidget *widget,
size = gdu_device_get_size (gdu_dialog_get_device (GDU_DIALOG (dialog)));
width = widget->allocation.width;
height = widget->allocation.height;
gtk_widget_get_allocation (widget, &allocation);
width = allocation.width;
height = allocation.height;
cr = gdk_cairo_create (widget->window);
cr = gdk_cairo_create (gtk_widget_get_window (widget));
cairo_select_font_face (cr, "sans",
CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
......
......@@ -283,6 +283,7 @@ gdu_edit_linux_lvm2_dialog_constructed (GObject *object)
GduEditLinuxLvm2Dialog *dialog = GDU_EDIT_LINUX_LVM2_DIALOG (object);
GduLinuxLvm2VolumeGroup *vg;
GtkWidget *content_area;
GtkWidget *action_area;
GtkWidget *vbox;
GtkWidget *vbox2;
GtkWidget *hbox;
......@@ -320,11 +321,12 @@ gdu_edit_linux_lvm2_dialog_constructed (GObject *object)
vbox = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
action_area = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 0);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->action_area), 6);
gtk_box_set_spacing (GTK_BOX (content_area), 0);
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
gtk_box_set_spacing (GTK_BOX (action_area), 6);
name = gdu_presentable_get_name (GDU_PRESENTABLE (vg));
vpd_name = gdu_presentable_get_vpd_name (GDU_PRESENTABLE (vg));
......
......@@ -321,6 +321,7 @@ gdu_edit_linux_md_dialog_constructed (GObject *object)
GduEditLinuxMdDialog *dialog = GDU_EDIT_LINUX_MD_DIALOG (object);
GduLinuxMdDrive *linux_md_drive;
GtkWidget *content_area;
GtkWidget *action_area;
GtkWidget *vbox;
GtkWidget *vbox2;
GtkWidget *hbox;
......@@ -358,11 +359,12 @@ gdu_edit_linux_md_dialog_constructed (GObject *object)
vbox = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
action_area = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 0);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->action_area), 6);
gtk_box_set_spacing (GTK_BOX (content_area), 0);
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
gtk_box_set_spacing (GTK_BOX (action_area), 6);
name = gdu_presentable_get_name (GDU_PRESENTABLE (linux_md_drive));
vpd_name = gdu_presentable_get_vpd_name (GDU_PRESENTABLE (linux_md_drive));
......
......@@ -464,6 +464,7 @@ gdu_format_dialog_constructed (GObject *object)
{
GduFormatDialog *dialog = GDU_FORMAT_DIALOG (object);
GtkWidget *content_area;
GtkWidget *action_area;
GtkWidget *button;
GtkWidget *icon;
GtkWidget *label;
......@@ -486,11 +487,14 @@ gdu_format_dialog_constructed (GObject *object)
pixbuf = gdu_util_get_pixbuf_for_presentable (gdu_dialog_get_presentable (GDU_DIALOG (dialog)),
GTK_ICON_SIZE_DIALOG);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
action_area = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 0);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->action_area), 6);
gtk_box_set_spacing (GTK_BOX (content_area), 0);
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
gtk_box_set_spacing (GTK_BOX (action_area), 6);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
......@@ -518,7 +522,6 @@ gdu_format_dialog_constructed (GObject *object)
}
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
gtk_container_set_border_width (GTK_CONTAINER (content_area), 10);
/* icon and text labels */
......
......@@ -290,6 +290,8 @@ gdu_util_dialog_show_filesystem_busy (GtkWidget *parent_window,
char *window_title;
GIcon *window_icon;
GtkWidget *dialog;
GtkWidget *content_area;
GtkWidget *action_area;
GtkWidget *hbox;
GtkWidget *main_vbox;
GtkWidget *label;
......@@ -345,18 +347,20 @@ gdu_util_dialog_show_filesystem_busy (GtkWidget *parent_window,
GTK_WINDOW (parent_window),
GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT|GTK_DIALOG_NO_SEPARATOR,
NULL);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
action_area = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 2);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->action_area), 6);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
gtk_box_set_spacing (GTK_BOX (content_area), 2);
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
gtk_box_set_spacing (GTK_BOX (action_area), 6);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
// TODO: no support for GIcon in GtkWindow
//gtk_window_set_icon_name (GTK_WINDOW (dialog), window_icon);
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (content_area), hbox, TRUE, TRUE, 0);
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_DIALOG);
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
......@@ -551,6 +555,8 @@ gdu_util_dialog_secret_internal (GtkWidget *parent_window,
int response;
char *secret;
GtkWidget *dialog;
GtkWidget *content_area;
GtkWidget *action_area;
GtkWidget *image;
GtkWidget *hbox;
GtkWidget *main_vbox;
......@@ -589,10 +595,13 @@ gdu_util_dialog_secret_internal (GtkWidget *parent_window,
}
gtk_dialog_set_default_response (GTK_DIALOG (dialog), 0);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
action_area = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 2);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->action_area), 6);
gtk_box_set_spacing (GTK_BOX (content_area), 2);
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
gtk_box_set_spacing (GTK_BOX (action_area), 6);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
// TODO: no support for GIcon in GtkWindow
//if (window_icon != NULL)
......@@ -602,7 +611,7 @@ gdu_util_dialog_secret_internal (GtkWidget *parent_window,
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (content_area), hbox, TRUE, TRUE, 0);
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION, GTK_ICON_SIZE_DIALOG);
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
......@@ -1141,6 +1150,8 @@ gdu_util_delete_confirmation_dialog (GtkWidget *parent_window,
gboolean ret;
gint response;
GtkWidget *dialog;
GtkWidget *content_area;
GtkWidget *action_area;
GtkWidget *hbox;
GtkWidget *image;
GtkWidget *main_vbox;
......@@ -1152,16 +1163,18 @@ gdu_util_delete_confirmation_dialog (GtkWidget *parent_window,
GTK_WINDOW (parent_window),
GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT|GTK_DIALOG_NO_SEPARATOR,
NULL);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
action_area = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 2);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->action_area), 6);
gtk_box_set_spacing (GTK_BOX (content_area), 2);
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
gtk_box_set_spacing (GTK_BOX (action_area), 6);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (content_area), hbox, TRUE, TRUE, 0);
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_DIALOG);
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
......
......@@ -177,6 +177,7 @@ gdu_partition_dialog_constructed (GObject *object)
{
GduPartitionDialog *dialog = GDU_PARTITION_DIALOG (object);
GtkWidget *content_area;
GtkWidget *action_area;
GtkWidget *label;
GtkWidget *hbox;
GtkWidget *image;
......@@ -195,11 +196,14 @@ gdu_partition_dialog_constructed (GObject *object)
pixbuf = gdu_util_get_pixbuf_for_presentable (gdu_dialog_get_presentable (GDU_DIALOG (dialog)),
GTK_ICON_SIZE_DIALOG);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
action_area = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 0);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->action_area), 6);
gtk_box_set_spacing (GTK_BOX (content_area), 0);
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
gtk_box_set_spacing (GTK_BOX (action_area), 6);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
......@@ -216,7 +220,6 @@ gdu_partition_dialog_constructed (GObject *object)
_("_Format"),
GTK_RESPONSE_OK);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
gtk_container_set_border_width (GTK_CONTAINER (content_area), 10);
/* icon and text labels */
......
......@@ -125,6 +125,7 @@ static GtkDrawingAreaClass *parent_class;
static void
draw (GtkWidget *widget, cairo_t *cr)
{
GtkAllocation allocation;
double x, y;
double radius;
double half;
......@@ -137,18 +138,22 @@ draw (GtkWidget *widget, cairo_t *cr)
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
width = widget->allocation.width;
height = widget->allocation.height;
gtk_widget_get_allocation (widget, &allocation);
width = allocation.width;
height = allocation.height;
if ( (width < 12) || (height <12) )
if ( (width < 12) || (height <12) ) {
gtk_widget_set_size_request(widget, 12, 12);
gtk_widget_get_allocation (widget, &allocation);
width = allocation.width;
height = allocation.height;
}
//x = widget->allocation.x + widget->allocation.width / 2;
//y = widget->allocation.y + widget->allocation.height / 2;
x = widget->allocation.width / 2;
y = widget->allocation.height / 2;
radius = MIN (widget->allocation.width / 2,
widget->allocation.height / 2);
/* x = widget->allocation.x + widget->allocation.width / 2;
* y = widget->allocation.y + widget->allocation.height / 2; */
x = width / 2;
y = height / 2;
radius = MIN (width / 2, height / 2);
half = priv->lines / 2;
/*FIXME: render in B&W for non transparency */
......@@ -217,7 +222,7 @@ gdu_spinner_init (GduSpinner *spinner)
priv->current = 0;
priv->timeout = 0;
GTK_WIDGET_SET_FLAGS (GTK_WIDGET (spinner), GTK_NO_WINDOW);
gtk_widget_set_has_window (GTK_WIDGET (spinner), FALSE);
}
static gboolean
......@@ -226,7 +231,7 @@ gdu_spinner_expose (GtkWidget *widget, GdkEventExpose *event)
cairo_t *cr;
/* get cairo context */
cr = gdk_cairo_create (widget->window);
cr = gdk_cairo_create (gtk_widget_get_window (widget));
/* set a clip region for the expose event */
cairo_rectangle (cr,
......
......@@ -407,15 +407,18 @@ static void
gdu_volume_grid_realize (GtkWidget *widget)
{
GduVolumeGrid *grid = GDU_VOLUME_GRID (widget);
GdkWindow *window;
GdkWindowAttr attributes;
gint attributes_mask;
GtkAllocation allocation;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
gtk_widget_set_realized (widget, TRUE);
gtk_widget_get_allocation (widget, &allocation);
attributes.x = widget->allocation.x;
attributes.y = widget->allocation.y;
attributes.width = widget->allocation.width;
attributes.height = widget->allocation.height;
attributes.x = allocation.x;
attributes.y = allocation.y;
attributes.width = allocation.width;
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.window_type = GDK_WINDOW_CHILD;
attributes.event_mask = gtk_widget_get_events (widget) |
......@@ -430,17 +433,20 @@ gdu_volume_grid_realize (GtkWidget *widget)
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
widget->window = gtk_widget_get_parent_window (widget);
g_object_ref (widget->window);
window = gtk_widget_get_parent_window (widget);
gtk_widget_set_window (widget, window);
g_object_ref (window);
widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes,
attributes_mask);
gdk_window_set_user_data (widget->window, grid);
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes,
attributes_mask);
gtk_widget_set_window (widget, window);
gdk_window_set_user_data (window, grid);
widget->style = gtk_style_attach (widget->style, widget->window);
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
gtk_widget_style_attach (widget);
gtk_style_set_background (gtk_widget_get_style (widget),
window,
GTK_STATE_NORMAL);
}
static guint
......@@ -518,7 +524,7 @@ gdu_volume_grid_init (GduVolumeGrid *grid)
{
grid->priv = G_TYPE_INSTANCE_GET_PRIVATE (grid, GDU_TYPE_VOLUME_GRID, GduVolumeGridPrivate);
GTK_WIDGET_SET_FLAGS (grid, GTK_CAN_FOCUS);
gtk_widget_set_can_focus (GTK_WIDGET (grid), TRUE);
}
GtkWidget *
......@@ -1474,19 +1480,21 @@ gdu_volume_grid_expose_event (GtkWidget *widget,
GdkEventExpose *event)
{
GduVolumeGrid *grid = GDU_VOLUME_GRID (widget);
GtkAllocation allocation;
cairo_t *cr;
gdouble width;
gdouble height;
gboolean need_animation_timeout;
width = widget->allocation.width;
height = widget->allocation.height;
gtk_widget_get_allocation (widget, &allocation);
width = allocation.width;
height = allocation.height;
recompute_size (grid,
width - 1,
height -1);
cr = gdk_cairo_create (widget->window);
cr = gdk_cairo_create (gtk_widget_get_window (widget));
cairo_rectangle (cr,
event->area.x, event->area.y,
event->area.width, event->area.height);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment