plug-ins: port some more plug-ins to GTK+ 3.0

This commit is contained in:
Michael Natterer
2010-10-26 15:22:34 +02:00
parent 138a3a4bf3
commit 09e214bc11
3 changed files with 23 additions and 30 deletions

View File

@ -420,15 +420,15 @@ dialog (void)
/* Missing options: Color-dialogs? / own curl layer ? / transparency
to original drawable / Warp-curl (unsupported yet) */
GtkWidget *dialog;
GtkWidget *hbox;
GtkWidget *vbox;
GtkWidget *table;
GtkWidget *frame;
GtkWidget *button;
GtkWidget *combo;
GtkObject *adjustment;
gboolean run;
GtkWidget *dialog;
GtkWidget *hbox;
GtkWidget *vbox;
GtkWidget *table;
GtkWidget *frame;
GtkWidget *button;
GtkWidget *combo;
GtkAdjustment *adjustment;
gboolean run;
gimp_ui_init (PLUG_IN_BINARY, FALSE);

View File

@ -80,8 +80,8 @@ static void print_preview_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void print_preview_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static gboolean print_preview_expose_event (GtkWidget *widget,
GdkEventExpose *event);
static gboolean print_preview_draw (GtkWidget *widget,
cairo_t *cr);
static gboolean print_preview_button_press_event (GtkWidget *widget,
GdkEventButton *event);
static gboolean print_preview_button_release_event (GtkWidget *widget,
@ -182,7 +182,7 @@ print_preview_class_init (PrintPreviewClass *klass)
widget_class->unrealize = print_preview_unrealize;
widget_class->size_request = print_preview_size_request;
widget_class->size_allocate = print_preview_size_allocate;
widget_class->expose_event = print_preview_expose_event;
widget_class->draw = print_preview_draw;
widget_class->button_press_event = print_preview_button_press_event;
widget_class->button_release_event = print_preview_button_release_event;
widget_class->motion_notify_event = print_preview_motion_notify_event;
@ -398,13 +398,12 @@ print_preview_leave_notify_event (GtkWidget *widget,
}
static gboolean
print_preview_expose_event (GtkWidget *widget,
GdkEventExpose *event)
print_preview_draw (GtkWidget *widget,
cairo_t *cr)
{
PrintPreview *preview = PRINT_PREVIEW (widget);
GtkStyle *style = gtk_widget_get_style (widget);
GtkAllocation allocation;
cairo_t *cr;
gdouble paper_width;
gdouble paper_height;
gdouble left_margin;
@ -425,11 +424,7 @@ print_preview_expose_event (GtkWidget *widget,
scale = print_preview_get_scale (preview);
cr = gdk_cairo_create (gtk_widget_get_window (widget));
cairo_translate (cr,
allocation.x + border,
allocation.y + border);
cairo_translate (cr, border, border);
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
{
@ -501,8 +496,6 @@ print_preview_expose_event (GtkWidget *widget,
cairo_fill (cr);
}
cairo_destroy (cr);
return FALSE;
}

View File

@ -48,13 +48,13 @@ static GSList * adjust_widgets = NULL;
void
reset_adv_dialog (void)
{
GSList *list;
GtkObject *widget;
gdouble *value;
GSList *list;
GObject *widget;
gdouble *value;
for (list = adjust_widgets; list; list = g_slist_next (list))
{
widget = GTK_OBJECT (list->data);
widget = G_OBJECT (list->data);
value = (gdouble *) g_object_get_data (G_OBJECT (widget),
"default_value");
@ -84,10 +84,10 @@ def_val (gdouble default_value)
GtkWidget *
dialog_create_selection_area (SELVALS *sels)
{
GtkWidget *table;
GtkWidget *check;
GtkObject *adj;
gint row;
GtkWidget *table;
GtkWidget *check;
GtkAdjustment *adj;
gint row;
table = gtk_table_new (20, 3, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);