plug-ins: some gimp_spin_button_new() -> gtk_spin_button_new()
This commit is contained in:
@ -850,7 +850,7 @@ load_dialog (const gchar *filename)
|
|||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
GtkWidget *table;
|
GtkWidget *table;
|
||||||
GtkWidget *spinbutton;
|
GtkWidget *spinbutton;
|
||||||
GtkObject *adj;
|
GtkAdjustment *adj;
|
||||||
gint32 width, height, nframes;
|
gint32 width, height, nframes;
|
||||||
gboolean run;
|
gboolean run;
|
||||||
|
|
||||||
@ -887,8 +887,9 @@ load_dialog (const gchar *filename)
|
|||||||
* Maybe I add on-the-fly RGB conversion, to keep palettechanges...
|
* Maybe I add on-the-fly RGB conversion, to keep palettechanges...
|
||||||
* But for now you can set a start- and a end-frame:
|
* But for now you can set a start- and a end-frame:
|
||||||
*/
|
*/
|
||||||
spinbutton = gimp_spin_button_new (&adj,
|
adj = (GtkAdjustment *) gtk_adjustment_new (from_frame, 1, nframes, 1, 10, 0);
|
||||||
from_frame, 1, nframes, 1, 10, 0, 1, 0);
|
spinbutton = gtk_spin_button_new (adj, 1, 0);
|
||||||
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||||
C_("frame-range", "From:"), 0.0, 0.5,
|
C_("frame-range", "From:"), 0.0, 0.5,
|
||||||
spinbutton, 1, TRUE);
|
spinbutton, 1, TRUE);
|
||||||
@ -896,8 +897,9 @@ load_dialog (const gchar *filename)
|
|||||||
G_CALLBACK (gimp_int_adjustment_update),
|
G_CALLBACK (gimp_int_adjustment_update),
|
||||||
&from_frame);
|
&from_frame);
|
||||||
|
|
||||||
spinbutton = gimp_spin_button_new (&adj,
|
adj = (GtkAdjustment *) gtk_adjustment_new (to_frame, 1, nframes, 1, 10, 0);
|
||||||
to_frame, 1, nframes, 1, 10, 0, 1, 0);
|
spinbutton = gtk_spin_button_new (adj, 1, 0);
|
||||||
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||||
C_("frame-range", "To:"), 0.0, 0.5,
|
C_("frame-range", "To:"), 0.0, 0.5,
|
||||||
spinbutton, 1, TRUE);
|
spinbutton, 1, TRUE);
|
||||||
@ -920,7 +922,7 @@ save_dialog (gint32 image_id)
|
|||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
GtkWidget *table;
|
GtkWidget *table;
|
||||||
GtkWidget *spinbutton;
|
GtkWidget *spinbutton;
|
||||||
GtkObject *adj;
|
GtkAdjustment *adj;
|
||||||
gint nframes;
|
gint nframes;
|
||||||
gboolean run;
|
gboolean run;
|
||||||
|
|
||||||
@ -943,8 +945,9 @@ save_dialog (gint32 image_id)
|
|||||||
* Maybe I add on-the-fly RGB conversion, to keep palettechanges...
|
* Maybe I add on-the-fly RGB conversion, to keep palettechanges...
|
||||||
* But for now you can set a start- and a end-frame:
|
* But for now you can set a start- and a end-frame:
|
||||||
*/
|
*/
|
||||||
spinbutton = gimp_spin_button_new (&adj,
|
adj = (GtkAdjustment *) gtk_adjustment_new (from_frame, 1, nframes, 1, 10, 0);
|
||||||
from_frame, 1, nframes, 1, 10, 0, 1, 0);
|
spinbutton = gtk_spin_button_new (adj, 1, 0);
|
||||||
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||||
C_("frame-range", "From:"), 0.0, 0.5,
|
C_("frame-range", "From:"), 0.0, 0.5,
|
||||||
spinbutton, 1, TRUE);
|
spinbutton, 1, TRUE);
|
||||||
@ -952,8 +955,9 @@ save_dialog (gint32 image_id)
|
|||||||
G_CALLBACK (gimp_int_adjustment_update),
|
G_CALLBACK (gimp_int_adjustment_update),
|
||||||
&from_frame);
|
&from_frame);
|
||||||
|
|
||||||
spinbutton = gimp_spin_button_new (&adj,
|
adj = (GtkAdjustment *) gtk_adjustment_new (to_frame, 1, nframes, 1, 10, 0);
|
||||||
to_frame, 1, nframes, 1, 10, 0, 1, 0);
|
spinbutton = gtk_spin_button_new (adj, 1, 0);
|
||||||
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||||
C_("frame-range", "To:"), 0.0, 0.5,
|
C_("frame-range", "To:"), 0.0, 0.5,
|
||||||
spinbutton, 1, TRUE);
|
spinbutton, 1, TRUE);
|
||||||
|
@ -96,7 +96,7 @@ typedef struct
|
|||||||
gboolean run;
|
gboolean run;
|
||||||
GtkWidget *use_restart_markers; /*checkbox setting use restart markers*/
|
GtkWidget *use_restart_markers; /*checkbox setting use restart markers*/
|
||||||
GtkTextBuffer *text_buffer;
|
GtkTextBuffer *text_buffer;
|
||||||
GtkObject *scale_data; /*for restart markers*/
|
GtkAdjustment *scale_data; /*for restart markers*/
|
||||||
gulong handler_id_restart;
|
gulong handler_id_restart;
|
||||||
|
|
||||||
GtkObject *quality; /*quality slidebar*/
|
GtkObject *quality; /*quality slidebar*/
|
||||||
@ -849,12 +849,13 @@ save_dialog (void)
|
|||||||
GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
|
GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
|
||||||
gtk_widget_show (restart_markers_label);
|
gtk_widget_show (restart_markers_label);
|
||||||
|
|
||||||
/*pg.scale_data = scale_data;*/
|
pg.scale_data = (GtkAdjustment *)
|
||||||
pg.restart = restart_markers_scale = spinbutton =
|
gtk_adjustment_new (((jsvals.restart == 0) ?
|
||||||
gimp_spin_button_new (&pg.scale_data,
|
|
||||||
((jsvals.restart == 0) ?
|
|
||||||
DEFAULT_RESTART_MCU_ROWS : jsvals.restart),
|
DEFAULT_RESTART_MCU_ROWS : jsvals.restart),
|
||||||
1.0, 64.0, 1.0, 1.0, 0, 1.0, 0);
|
1.0, 64.0, 1.0, 1.0, 0);
|
||||||
|
pg.restart = restart_markers_scale = spinbutton =
|
||||||
|
gtk_spin_button_new (pg.scale_data, 1.0, 0);
|
||||||
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
|
||||||
gtk_table_attach (GTK_TABLE (table), spinbutton, 5, 6, 1, 2,
|
gtk_table_attach (GTK_TABLE (table), spinbutton, 5, 6, 1, 2,
|
||||||
GTK_FILL, GTK_FILL, 0, 0);
|
GTK_FILL, GTK_FILL, 0, 0);
|
||||||
gtk_widget_show (spinbutton);
|
gtk_widget_show (spinbutton);
|
||||||
|
@ -2103,11 +2103,13 @@ value_pair_create (gpointer data,
|
|||||||
value_pair->type = type;
|
value_pair->type = type;
|
||||||
value_pair->timeout_id = 0;
|
value_pair->timeout_id = 0;
|
||||||
|
|
||||||
value_pair->spin = gimp_spin_button_new ((GtkObject **) &value_pair->adjustment,
|
value_pair->adjustment = (GtkAdjustment *)
|
||||||
1.0, lower, upper,
|
gtk_adjustment_new (1.0, lower, upper,
|
||||||
(upper - lower) / 100,
|
(upper - lower) / 100,
|
||||||
(upper - lower) / 10,
|
(upper - lower) / 10,
|
||||||
0.0, 1.0, 3);
|
0.0);
|
||||||
|
value_pair->spin = gtk_spin_button_new (value_pair->adjustment, 1.0, 3);
|
||||||
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (value_pair->spin), TRUE);
|
||||||
gtk_widget_set_size_request (value_pair->spin, 72, -1);
|
gtk_widget_set_size_request (value_pair->spin, 72, -1);
|
||||||
|
|
||||||
g_signal_connect (value_pair->adjustment, "value-changed",
|
g_signal_connect (value_pair->adjustment, "value-changed",
|
||||||
|
@ -40,10 +40,10 @@ typedef struct
|
|||||||
GtkWidget *center_combo;
|
GtkWidget *center_combo;
|
||||||
GtkWidget *area_label;
|
GtkWidget *area_label;
|
||||||
GtkWidget *preview;
|
GtkWidget *preview;
|
||||||
GtkObject *left_adj;
|
GtkAdjustment *left_adj;
|
||||||
GtkObject *right_adj;
|
GtkAdjustment *right_adj;
|
||||||
GtkObject *top_adj;
|
GtkAdjustment *top_adj;
|
||||||
GtkObject *bottom_adj;
|
GtkAdjustment *bottom_adj;
|
||||||
} PrintSizeInfo;
|
} PrintSizeInfo;
|
||||||
|
|
||||||
enum
|
enum
|
||||||
@ -235,7 +235,7 @@ print_size_frame (PrintData *data,
|
|||||||
GtkWidget *chain;
|
GtkWidget *chain;
|
||||||
GtkWidget *frame;
|
GtkWidget *frame;
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
GtkObject *adj;
|
GtkAdjustment *adj;
|
||||||
gdouble image_width;
|
gdouble image_width;
|
||||||
gdouble image_height;
|
gdouble image_height;
|
||||||
|
|
||||||
@ -268,7 +268,9 @@ print_size_frame (PrintData *data,
|
|||||||
gtk_table_set_col_spacing (GTK_TABLE (entry), 0, 6);
|
gtk_table_set_col_spacing (GTK_TABLE (entry), 0, 6);
|
||||||
gtk_table_set_col_spacing (GTK_TABLE (entry), 2, 6);
|
gtk_table_set_col_spacing (GTK_TABLE (entry), 2, 6);
|
||||||
|
|
||||||
height = gimp_spin_button_new (&adj, 1, 1, 1, 1, 10, 0, 1, 2);
|
adj = (GtkAdjustment *) gtk_adjustment_new (1, 1, 1, 1, 10, 0);
|
||||||
|
height = gtk_spin_button_new (adj, 1, 2);
|
||||||
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (height), TRUE);
|
||||||
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
|
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
|
||||||
GTK_SPIN_BUTTON (height), NULL);
|
GTK_SPIN_BUTTON (height), NULL);
|
||||||
gtk_table_attach_defaults (GTK_TABLE (entry), height, 1, 2, 0, 1);
|
gtk_table_attach_defaults (GTK_TABLE (entry), height, 1, 2, 0, 1);
|
||||||
@ -310,7 +312,9 @@ print_size_frame (PrintData *data,
|
|||||||
gtk_table_set_col_spacing (GTK_TABLE (entry), 0, 6);
|
gtk_table_set_col_spacing (GTK_TABLE (entry), 0, 6);
|
||||||
gtk_table_set_col_spacing (GTK_TABLE (entry), 2, 6);
|
gtk_table_set_col_spacing (GTK_TABLE (entry), 2, 6);
|
||||||
|
|
||||||
height = gimp_spin_button_new (&adj, 1, 1, 1, 1, 10, 0, 1, 2);
|
adj = (GtkAdjustment *) gtk_adjustment_new (1, 1, 1, 1, 10, 0);
|
||||||
|
height = gtk_spin_button_new (adj, 1, 2);
|
||||||
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (height), TRUE);
|
||||||
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
|
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
|
||||||
GTK_SPIN_BUTTON (height), NULL);
|
GTK_SPIN_BUTTON (height), NULL);
|
||||||
gtk_table_attach_defaults (GTK_TABLE (entry), height, 1, 2, 0, 1);
|
gtk_table_attach_defaults (GTK_TABLE (entry), height, 1, 2, 0, 1);
|
||||||
@ -388,7 +392,9 @@ print_offset_frame (PrintData *data,
|
|||||||
gtk_widget_show (table);
|
gtk_widget_show (table);
|
||||||
|
|
||||||
/* left */
|
/* left */
|
||||||
spinner = gimp_spin_button_new (&info.left_adj, 1, 1, 1, 1, 10, 0, 1, 2);
|
info.left_adj = (GtkAdjustment *) gtk_adjustment_new (1, 1, 1, 1, 10, 0);
|
||||||
|
spinner = gtk_spin_button_new (info.left_adj, 1, 2);
|
||||||
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinner), TRUE);
|
||||||
|
|
||||||
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
|
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
|
||||||
GTK_SPIN_BUTTON (spinner), NULL);
|
GTK_SPIN_BUTTON (spinner), NULL);
|
||||||
@ -403,7 +409,9 @@ print_offset_frame (PrintData *data,
|
|||||||
gtk_widget_show (label);
|
gtk_widget_show (label);
|
||||||
|
|
||||||
/* right */
|
/* right */
|
||||||
spinner = gimp_spin_button_new (&info.right_adj, 1, 1, 1, 1, 10, 0, 1, 2);
|
info.right_adj = (GtkAdjustment *) gtk_adjustment_new (1, 1, 1, 1, 10, 0);
|
||||||
|
spinner = gtk_spin_button_new (info.right_adj, 1, 2);
|
||||||
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinner), TRUE);
|
||||||
|
|
||||||
g_signal_connect (info.right_adj, "value-changed",
|
g_signal_connect (info.right_adj, "value-changed",
|
||||||
G_CALLBACK (print_size_info_offset_max_changed),
|
G_CALLBACK (print_size_info_offset_max_changed),
|
||||||
@ -421,7 +429,9 @@ print_offset_frame (PrintData *data,
|
|||||||
gtk_widget_show (label);
|
gtk_widget_show (label);
|
||||||
|
|
||||||
/* top */
|
/* top */
|
||||||
spinner = gimp_spin_button_new (&info.top_adj, 1, 1, 1, 1, 10, 0, 1, 2);
|
info.top_adj = (GtkAdjustment *) gtk_adjustment_new (1, 1, 1, 1, 10, 0);
|
||||||
|
spinner = gtk_spin_button_new (info.top_adj, 1, 2);
|
||||||
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinner), TRUE);
|
||||||
|
|
||||||
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
|
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
|
||||||
GTK_SPIN_BUTTON (spinner), NULL);
|
GTK_SPIN_BUTTON (spinner), NULL);
|
||||||
@ -436,7 +446,9 @@ print_offset_frame (PrintData *data,
|
|||||||
gtk_widget_show (label);
|
gtk_widget_show (label);
|
||||||
|
|
||||||
/* bottom */
|
/* bottom */
|
||||||
spinner = gimp_spin_button_new (&info.bottom_adj, 1, 1, 1, 1, 10, 0, 1, 2);
|
info.bottom_adj = (GtkAdjustment *) gtk_adjustment_new (1, 1, 1, 1, 10, 0);
|
||||||
|
spinner = gtk_spin_button_new (info.bottom_adj, 1, 2);
|
||||||
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinner), TRUE);
|
||||||
|
|
||||||
g_signal_connect (info.bottom_adj, "value-changed",
|
g_signal_connect (info.bottom_adj, "value-changed",
|
||||||
G_CALLBACK (print_size_info_offset_max_changed),
|
G_CALLBACK (print_size_info_offset_max_changed),
|
||||||
|
@ -274,7 +274,6 @@ script_fu_interface (SFScript *script,
|
|||||||
for (i = start_arg; i < script->n_args; i++)
|
for (i = start_arg; i < script->n_args; i++)
|
||||||
{
|
{
|
||||||
GtkWidget *widget = NULL;
|
GtkWidget *widget = NULL;
|
||||||
GtkObject *adj;
|
|
||||||
gchar *label_text;
|
gchar *label_text;
|
||||||
gfloat label_yalign = 0.5;
|
gfloat label_yalign = 0.5;
|
||||||
gint *ID_ptr = NULL;
|
gint *ID_ptr = NULL;
|
||||||
@ -420,17 +419,18 @@ script_fu_interface (SFScript *script,
|
|||||||
|
|
||||||
case SF_SPINNER:
|
case SF_SPINNER:
|
||||||
left_align = TRUE;
|
left_align = TRUE;
|
||||||
widget =
|
arg->value.sfa_adjustment.adj = (GtkAdjustment *)
|
||||||
gimp_spin_button_new (&adj,
|
gtk_adjustment_new (arg->value.sfa_adjustment.value,
|
||||||
arg->value.sfa_adjustment.value,
|
|
||||||
arg->default_value.sfa_adjustment.lower,
|
arg->default_value.sfa_adjustment.lower,
|
||||||
arg->default_value.sfa_adjustment.upper,
|
arg->default_value.sfa_adjustment.upper,
|
||||||
arg->default_value.sfa_adjustment.step,
|
arg->default_value.sfa_adjustment.step,
|
||||||
arg->default_value.sfa_adjustment.page,
|
arg->default_value.sfa_adjustment.page,
|
||||||
0, 0,
|
0);
|
||||||
|
widget = gtk_spin_button_new (arg->value.sfa_adjustment.adj,
|
||||||
|
arg->default_value.sfa_adjustment.step,
|
||||||
arg->default_value.sfa_adjustment.digits);
|
arg->default_value.sfa_adjustment.digits);
|
||||||
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (widget), TRUE);
|
||||||
gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE);
|
gtk_entry_set_activates_default (GTK_ENTRY (widget), TRUE);
|
||||||
arg->value.sfa_adjustment.adj = GTK_ADJUSTMENT (adj);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user