Updating branch refs/heads/master to efde953ab16a3fdbb0b21161fa5414cce89bdc26 (commit) from 585dc915b8a792170ca423405689a3823804f28f (commit)
commit efde953ab16a3fdbb0b21161fa5414cce89bdc26 Author: Nick Schermer <n...@xfce.org> Date: Thu Sep 20 19:53:15 2012 +0200 Compile with gseal enabled. glade/libxfce4ui-glade.c | 5 +++ libxfce4kbd-private/xfce-shortcut-dialog.c | 5 +-- libxfce4ui/xfce-heading.c | 51 ++++++++++++++++----------- 3 files changed, 36 insertions(+), 25 deletions(-) diff --git a/glade/libxfce4ui-glade.c b/glade/libxfce4ui-glade.c index 7b8c282..2c98909 100644 --- a/glade/libxfce4ui-glade.c +++ b/glade/libxfce4ui-glade.c @@ -25,6 +25,11 @@ #include <string.h> #endif +/* else glade is not working */ +#ifdef SEAL_ENABLE +typedef struct gpointer GtkCombo; +#endif + #include <gtk/gtk.h> #include <gladeui/glade.h> #include <libxfce4ui/libxfce4ui.h> diff --git a/libxfce4kbd-private/xfce-shortcut-dialog.c b/libxfce4kbd-private/xfce-shortcut-dialog.c index 5f1b058..e16a8e8 100644 --- a/libxfce4kbd-private/xfce-shortcut-dialog.c +++ b/libxfce4kbd-private/xfce-shortcut-dialog.c @@ -219,9 +219,6 @@ xfce_shortcut_dialog_create_contents (XfceShortcutDialog *dialog, gtk_window_set_title (GTK_WINDOW (dialog), title); gtk_window_set_icon_name (GTK_WINDOW (dialog), "input-keyboard"); - /* Configure dialog */ - gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); - /* Create clear button for xfwm4 */ if (g_utf8_collate (provider, "xfwm4") == 0) { @@ -239,7 +236,7 @@ xfce_shortcut_dialog_create_contents (XfceShortcutDialog *dialog, gtk_table_set_row_spacings (GTK_TABLE (table), 6); gtk_table_set_col_spacings (GTK_TABLE (table), 12); gtk_container_set_border_width (GTK_CONTAINER (table), 12); - gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), table); + gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), table); gtk_widget_show (table); label = gtk_label_new (action_label); diff --git a/libxfce4ui/xfce-heading.c b/libxfce4ui/xfce-heading.c index afcfff5..7a0560f 100644 --- a/libxfce4ui/xfce-heading.c +++ b/libxfce4ui/xfce-heading.c @@ -179,10 +179,11 @@ _xfce_heading_realize (GtkWidget *widget) gdk_window_set_user_data (window, widget); /* connect the style to the window */ - widget->style = gtk_style_attach (widget->style, widget->window); + gtk_widget_style_attach (widget); /* set background color (using the base color) */ - gdk_window_set_background (widget->window, &widget->style->base[GTK_STATE_NORMAL]); + gdk_window_set_background (gtk_widget_get_window (widget), + >k_widget_get_style (widget)->base[GTK_STATE_NORMAL]); #endif } @@ -339,10 +340,11 @@ _xfce_heading_style_set (GtkWidget *widget, GtkStyle *previous_style) { /* check if we're already realized */ - if (GTK_WIDGET_REALIZED (widget)) + if (gtk_widget_get_realized (widget)) { /* set background color (using the base color) */ - gdk_window_set_background (widget->window, &widget->style->base[GTK_STATE_NORMAL]); + gdk_window_set_background (gtk_widget_get_window (widget), + >k_widget_get_style (widget)->base[GTK_STATE_NORMAL]); } } @@ -352,20 +354,24 @@ static gboolean _xfce_heading_expose_event (GtkWidget *widget, GdkEventExpose *event) { - XfceHeading *heading = XFCE_HEADING (widget); - PangoLayout *layout; - GdkPixbuf *pixbuf; - gboolean rtl; - gint width; - gint height; - gint x; - gint y; + XfceHeading *heading = XFCE_HEADING (widget); + PangoLayout *layout; + GdkPixbuf *pixbuf; + gboolean rtl; + gint width; + gint height; + gint x; + gint y; + cairo_t *cr; + GtkAllocation allocation; + + gtk_widget_get_allocation (widget, &allocation); /* check if we should render from right to left */ rtl = (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL); /* determine the initial horizontal position */ - x = (rtl ? widget->allocation.width - XFCE_HEADING_BORDER : XFCE_HEADING_BORDER); + x = (rtl ? allocation.width - XFCE_HEADING_BORDER : XFCE_HEADING_BORDER); /* check if we have a pixbuf to render */ pixbuf = _xfce_heading_make_pixbuf (heading); @@ -376,12 +382,13 @@ _xfce_heading_expose_event (GtkWidget *widget, height = gdk_pixbuf_get_height (pixbuf); /* determine the vertical position */ - y = (widget->allocation.height - height) / 2; + y = (allocation.height - height) / 2; /* render the pixbuf */ - gdk_draw_pixbuf (widget->window, widget->style->black_gc, pixbuf, 0, 0, - (rtl ? x - width : x), y, width, height, - GDK_RGB_DITHER_NORMAL, 0, 0); + cr = gdk_cairo_create (GDK_DRAWABLE (gtk_widget_get_window (widget))); + gdk_cairo_set_source_pixbuf (cr, pixbuf, (rtl ? x - width : x), y); + cairo_paint (cr); + cairo_destroy (cr); /* release the pixbuf */ g_object_unref (G_OBJECT (pixbuf)); @@ -395,12 +402,14 @@ _xfce_heading_expose_event (GtkWidget *widget, pango_layout_get_pixel_size (layout, &width, &height); /* determine the vertical position */ - y = (widget->allocation.height - height) / 2; + y = (allocation.height - height) / 2; /* render the title */ - gtk_paint_layout (widget->style, widget->window, - GTK_WIDGET_STATE (widget), TRUE, &event->area, - widget, "heading", (rtl ? x - width : x), y, layout); + gtk_paint_layout (gtk_widget_get_style (widget), + gtk_widget_get_window (widget), + gtk_widget_get_state (widget), + TRUE, &event->area, widget, + "heading", (rtl ? x - width : x), y, layout); /* release the layout */ g_object_unref (G_OBJECT (layout)); _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits