Commit 9f9a7d93c70010f9bcc4f9d0850fa49f11feefc7

Authored by Perry Werneck
1 parent adcdb9bd
Exists in master and in 1 other branch develop

Adjustments in the model_number property.

src/dialogs/print/print.c
@@ -81,7 +81,9 @@ @@ -81,7 +81,9 @@
81 if(operation->contents.dynamic) 81 if(operation->contents.dynamic)
82 { 82 {
83 #pragma GCC diagnostic push 83 #pragma GCC diagnostic push
  84 +#ifdef _WIN32
84 #pragma GCC diagnostic ignored "-Wcast-function-type" 85 #pragma GCC diagnostic ignored "-Wcast-function-type"
  86 +#endif // _WIN32
85 87
86 g_list_free_full(operation->contents.dynamic,(GDestroyNotify) lib3270_free); 88 g_list_free_full(operation->contents.dynamic,(GDestroyNotify) lib3270_free);
87 operation->contents.dynamic = NULL; 89 operation->contents.dynamic = NULL;
src/selection/selection.c
@@ -43,7 +43,9 @@ void v3270_clear_selection(v3270 *terminal) @@ -43,7 +43,9 @@ void v3270_clear_selection(v3270 *terminal)
43 if(terminal->selection.blocks) 43 if(terminal->selection.blocks)
44 { 44 {
45 #pragma GCC diagnostic push 45 #pragma GCC diagnostic push
  46 +#ifdef _WIN32
46 #pragma GCC diagnostic ignored "-Wcast-function-type" 47 #pragma GCC diagnostic ignored "-Wcast-function-type"
  48 +#endif // _WIN32
47 49
48 g_list_free_full(terminal->selection.blocks,(GDestroyNotify) lib3270_free); 50 g_list_free_full(terminal->selection.blocks,(GDestroyNotify) lib3270_free);
49 51
src/terminal/font/actions.c
@@ -32,30 +32,6 @@ @@ -32,30 +32,6 @@
32 32
33 /*--[ Implement ]------------------------------------------------------------------------------------*/ 33 /*--[ Implement ]------------------------------------------------------------------------------------*/
34 34
35 -/*  
36 -static void update_font_size(v3270 * terminal, cairo_t *cr, gint width, gint height, int step)  
37 -{  
38 -  
39 -  
40 - cairo_set_font_face(cr,terminal->font.face);  
41 -  
42 - cairo_set_font_size(cr,terminal->font.size);  
43 -  
44 - v3270_update_font_metrics(terminal, width, height);  
45 -  
46 - if(terminal->font.scaled)  
47 - cairo_scaled_font_destroy(terminal->font.scaled);  
48 -  
49 - terminal->font.scaled = cairo_get_scaled_font(cr);  
50 - cairo_scaled_font_reference(terminal->font.scaled);  
51 -  
52 - v3270_redraw(terminal, cr, width, height);  
53 -  
54 - gtk_widget_queue_draw(GTK_WIDGET(terminal));  
55 -  
56 -}  
57 -*/  
58 -  
59 void v3270_zoom_best(GtkWidget *widget) 35 void v3270_zoom_best(GtkWidget *widget)
60 { 36 {
61 debug("%s",__FUNCTION__); 37 debug("%s",__FUNCTION__);
src/terminal/properties/init.c
@@ -231,9 +231,9 @@ @@ -231,9 +231,9 @@
231 uint_props[ix].name, 231 uint_props[ix].name,
232 uint_props[ix].name, 232 uint_props[ix].name,
233 uint_props[ix].description, 233 uint_props[ix].description,
234 - 0, // Minimo  
235 - UINT_MAX, // Máximo  
236 - 0, // Default 234 + uint_props[ix].min, // Minimo
  235 + (uint_props[ix].max ? uint_props[ix].max : UINT_MAX), // Máximo
  236 + (uint_props[ix].default_value ? uint_props[ix].default_value : uint_props[ix].min), // Default
237 (uint_props[ix].set == NULL ? G_PARAM_READABLE : (G_PARAM_READABLE|G_PARAM_WRITABLE)) 237 (uint_props[ix].set == NULL ? G_PARAM_READABLE : (G_PARAM_READABLE|G_PARAM_WRITABLE))
238 ); 238 );
239 239
src/terminal/widget.c
@@ -475,7 +475,7 @@ static void release_activity_timer(v3270 *widget) @@ -475,7 +475,7 @@ static void release_activity_timer(v3270 *widget)
475 static void v3270_init(v3270 *widget) 475 static void v3270_init(v3270 *widget)
476 { 476 {
477 477
478 - widget->host = lib3270_session_new(""); 478 + widget->host = lib3270_session_new(NULL);
479 lib3270_set_user_data(widget->host,widget); 479 lib3270_set_user_data(widget->host,widget);
480 480
481 // Install callbacks 481 // Install callbacks
@@ -627,7 +627,6 @@ static void release_cursor_timer(v3270 *widget) @@ -627,7 +627,6 @@ static void release_cursor_timer(v3270 *widget)
627 627
628 static void v3270_realize(GtkWidget * widget) 628 static void v3270_realize(GtkWidget * widget)
629 { 629 {
630 -#if GTK_CHECK_VERSION(2,18,0)  
631 if(!gtk_widget_get_has_window(widget)) 630 if(!gtk_widget_get_has_window(widget))
632 { 631 {
633 GTK_WIDGET_CLASS(v3270_parent_class)->realize(widget); 632 GTK_WIDGET_CLASS(v3270_parent_class)->realize(widget);
@@ -661,49 +660,6 @@ static void v3270_realize(GtkWidget * widget) @@ -661,49 +660,6 @@ static void v3270_realize(GtkWidget * widget)
661 gtk_im_context_set_client_window(GTK_V3270(widget)->input_method,window); 660 gtk_im_context_set_client_window(GTK_V3270(widget)->input_method,window);
662 661
663 } 662 }
664 -#else  
665 - {  
666 - if(GTK_WIDGET_NO_WINDOW (widget))  
667 - {  
668 - GTK_WIDGET_CLASS(v3270_parent_class)->realize (widget);  
669 - }  
670 - else  
671 - {  
672 - GdkWindowAttr attributes;  
673 - gint attributes_mask;  
674 -  
675 - GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);  
676 -  
677 - memset(&attributes,0,sizeof(attributes));  
678 -  
679 - attributes.window_type = GDK_WINDOW_CHILD;  
680 - attributes.x = widget->allocation.x;  
681 - attributes.y = widget->allocation.y;  
682 - attributes.width = widget->allocation.width;  
683 - attributes.height = widget->allocation.height;  
684 - attributes.wclass = GDK_INPUT_OUTPUT;  
685 - attributes.visual = gtk_widget_get_visual (widget);  
686 - attributes.colormap = gtk_widget_get_colormap (widget);  
687 - attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;  
688 -  
689 - attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;  
690 -  
691 - widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),&attributes, attributes_mask);  
692 - gdk_window_set_user_data(widget->window, widget);  
693 -  
694 - widget->style = gtk_style_attach (widget->style, widget->window);  
695 - gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);  
696 - }  
697 -  
698 - gtk_im_context_set_client_window(GTK_V3270(widget)->input_method,widget->window);  
699 - }  
700 -  
701 -#endif // GTK(2,18,0)  
702 -  
703 -#if !GTK_CHECK_VERSION(3,0,0)  
704 - widget->style = gtk_style_attach (widget->style, widget->window);  
705 - gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);  
706 -#endif // !GTK3  
707 663
708 v3270_reconfigure(GTK_V3270(widget)); 664 v3270_reconfigure(GTK_V3270(widget));
709 665