Commit 071e110286f4979869ee365de673035c3acb959a

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

Redesigning file transfer dialog.

src/dialogs/tools.c
@@ -44,7 +44,7 @@ @@ -44,7 +44,7 @@
44 return grid; 44 return grid;
45 } 45 }
46 46
47 - GtkWidget * v3270_box_pack_frame(GtkWidget *box, GtkWidget *child, const gchar *title, GtkAlign align, gboolean expand, gboolean fill, guint padding) 47 + GtkWidget * v3270_dialog_create_frame(GtkWidget * child, const gchar *title)
48 { 48 {
49 GtkFrame * frame = GTK_FRAME(gtk_frame_new("")); 49 GtkFrame * frame = GTK_FRAME(gtk_frame_new(""));
50 g_autofree gchar * markup = g_strdup_printf("<b>%s</b>",title); 50 g_autofree gchar * markup = g_strdup_printf("<b>%s</b>",title);
@@ -55,12 +55,17 @@ @@ -55,12 +55,17 @@
55 gtk_frame_set_label_widget(GTK_FRAME(frame),label); 55 gtk_frame_set_label_widget(GTK_FRAME(frame),label);
56 56
57 gtk_container_add(GTK_CONTAINER(frame),GTK_WIDGET(child)); 57 gtk_container_add(GTK_CONTAINER(frame),GTK_WIDGET(child));
58 - gtk_widget_set_halign(GTK_WIDGET(frame),align);  
59 58
60 g_object_set(G_OBJECT(frame),"margin-top",6,NULL); 59 g_object_set(G_OBJECT(frame),"margin-top",6,NULL);
61 60
62 - gtk_box_pack_start(GTK_BOX(box),GTK_WIDGET(frame),expand,fill,padding); 61 + return GTK_WIDGET(frame);
  62 + }
63 63
  64 + GtkWidget * v3270_box_pack_frame(GtkWidget *box, GtkWidget *child, const gchar *title, GtkAlign align, gboolean expand, gboolean fill, guint padding)
  65 + {
  66 + GtkWidget * frame = v3270_dialog_create_frame(child,title);
  67 + gtk_widget_set_halign(GTK_WIDGET(frame),align);
  68 + gtk_box_pack_start(GTK_BOX(box),frame,expand,fill,padding);
64 return child; 69 return child;
65 } 70 }
66 71
src/include/internals.h
@@ -59,9 +59,9 @@ @@ -59,9 +59,9 @@
59 } 59 }
60 60
61 G_GNUC_INTERNAL GtkWidget * v3270_box_pack_frame(GtkWidget *box, GtkWidget *child, const gchar *title, GtkAlign align, gboolean expand, gboolean fill, guint padding); 61 G_GNUC_INTERNAL GtkWidget * v3270_box_pack_frame(GtkWidget *box, GtkWidget *child, const gchar *title, GtkAlign align, gboolean expand, gboolean fill, guint padding);
  62 + G_GNUC_INTERNAL GtkWidget * v3270_box_pack_frame(GtkWidget *box, GtkWidget *child, const gchar *title, GtkAlign align, gboolean expand, gboolean fill, guint padding);
62 G_GNUC_INTERNAL GtkWidget * v3270_dialog_create_grid(GtkAlign align); 63 G_GNUC_INTERNAL GtkWidget * v3270_dialog_create_grid(GtkAlign align);
63 64
64 -  
65 G_END_DECLS 65 G_END_DECLS
66 66
67 #endif // V3270_INTERNALS_H_INCLUDED 67 #endif // V3270_INTERNALS_H_INCLUDED
src/v3270ft/dialog.c
@@ -122,7 +122,9 @@ static void V3270FTDialog_init(V3270FTDialog *widget) @@ -122,7 +122,9 @@ static void V3270FTDialog_init(V3270FTDialog *widget)
122 gtk_widget_set_vexpand(scrolled,TRUE); 122 gtk_widget_set_vexpand(scrolled,TRUE);
123 gtk_widget_set_hexpand(scrolled,TRUE); 123 gtk_widget_set_hexpand(scrolled,TRUE);
124 124
125 - gtk_box_pack_start(GTK_BOX(container),scrolled,TRUE,TRUE,0); 125 + GtkWidget * frame = v3270_dialog_create_frame(scrolled,_("Transfer queue"));
  126 +
  127 + gtk_box_pack_start(GTK_BOX(container),frame,TRUE,TRUE,0);
126 } 128 }
127 129
128 130