xfprint patch
Olivier Fourdan
fourdan at xfce.org
Sun Mar 30 15:59:43 CEST 2003
Hi Jasper,
Make sense. I would right align labels for "columns", "rows" and
papersize"
Cheers,
Olivier.
On Sun, 2003-03-30 at 15:37, Jasper Huijsmans wrote:
> Benedikt,
>
> I made a small patch for xfprint (for starters ;):
> * add some space around main dialog objects
> * change Save button to 'Save settings' (I didn't understand what it did
> when I first saw it).
> * Don't make copies spinbutton fill complete line.
>
> Screenshot attached. What do you think?
>
> I think all notebook pages also need some extra spacing. If you want I
> can have a look at it.
>
> Jasper
>
> Index: printdlg.c
> ===================================================================
> RCS file: /cvsroot/xfce/xfce-devel/xfprint/xfprint/printdlg.c,v
> retrieving revision 1.2
> diff -u -r1.2 printdlg.c
> --- printdlg.c 10 Mar 2003 21:07:39 -0000 1.2
> +++ printdlg.c 30 Mar 2003 13:28:36 -0000
> @@ -30,6 +30,7 @@
>
> #include <gtk/gtk.h>
> #include <libxfce4util/util.h>
> +#include <libxfcegui4/dialogs.h>
> #include <xfprinterlist.h>
> #include <xfprintsettings.h>
>
> @@ -97,10 +98,16 @@
> GtkWidget *label;
> GtkWidget *table;
>
> - dlg->save = gtk_dialog_add_button(GTK_DIALOG(dlg),
> - GTK_STOCK_SAVE, GTK_RESPONSE_APPLY);
> + dlg->save = mixed_button_new(GTK_STOCK_SAVE, "Save settings");
> + gtk_widget_show(dlg->save);
> g_signal_connect(G_OBJECT(dlg->save), "clicked",
> G_CALLBACK(clicked_cb), dlg);
> + gtk_dialog_add_action_widget(GTK_DIALOG(dlg),
> + dlg->save, GTK_RESPONSE_APPLY);
> + gtk_button_box_set_child_secondary(
> + GTK_BUTTON_BOX(GTK_DIALOG(dlg)->action_area),
> + dlg->save,
> + TRUE);
>
> gtk_dialog_add_buttons(GTK_DIALOG(dlg),
> GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
> @@ -114,10 +121,12 @@
> /* "Printer"-Frame: */
> frame = gtk_frame_new("Printer");
> gtk_widget_show(frame);
> + gtk_container_set_border_width(GTK_CONTAINER(frame), 5);
> gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->vbox), frame, FALSE,
> - TRUE, 2);
> + TRUE, 0);
>
> table = gtk_table_new(2, 3, FALSE);
> + gtk_container_set_border_width(GTK_CONTAINER(table), 5);
> gtk_widget_show(table);
> gtk_container_add(GTK_CONTAINER(frame), table);
>
> @@ -171,6 +180,7 @@
> /* Notebook */
> dlg->notebook = gtk_notebook_new();
> gtk_widget_show(dlg->notebook);
> + gtk_container_set_border_width(GTK_CONTAINER(dlg->notebook), 5);
> gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->vbox),
> dlg->notebook, TRUE, TRUE, 0);
>
> @@ -209,18 +219,20 @@
> gtk_notebook_append_page(GTK_NOTEBOOK(dlg->notebook), dlg->head,
> label);
>
> + /* number of copies */
> hbox = gtk_hbox_new(FALSE, 4);
> + gtk_container_set_border_width(GTK_CONTAINER(hbox), 6);
> gtk_widget_show(hbox);
> gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->vbox), hbox,
> FALSE, TRUE, 0);
>
> label = gtk_label_new("Copies:");
> gtk_widget_show(label);
> - gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, TRUE, 0);
> + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
>
> dlg->copies = gtk_spin_button_new_with_range(1.0, 1000.0, 1.0);
> gtk_widget_show(dlg->copies);
> - gtk_box_pack_start(GTK_BOX(hbox), dlg->copies, TRUE, TRUE, 0);
> + gtk_box_pack_start(GTK_BOX(hbox), dlg->copies, FALSE, FALSE, 0);
>
> /* defaults to no printer selected */
> dlg->pr = NULL;
--
Olivier Fourdan <fourdan at xfce.org>
http://www.xfce.org
More information about the Xfce4-dev
mailing list