[gnome-scan/gnome-scan-0-6] Use a label when only one output format is available
- From: Étienne Bersac <bersace src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-scan/gnome-scan-0-6] Use a label when only one output format is available
- Date: Tue, 9 Jun 2009 15:10:53 -0400 (EDT)
commit 9dce13f647ec6ac98a0684cfadfa273db6b032e1
Author: Ã?tienne Bersac <bersace gnome org>
Date: Tue Jun 9 21:11:11 2009 +0200
Use a label when only one output format is available
---
src/flegita-output-filename-widget.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/flegita-output-filename-widget.c b/src/flegita-output-filename-widget.c
index 0051f99..6a50d82 100644
--- a/src/flegita-output-filename-widget.c
+++ b/src/flegita-output-filename-widget.c
@@ -121,6 +121,13 @@ flegita_output_filename_widget_build (GnomeScanParamWidget *widget)
NULL);
node = flegita_param_output_filename_get_formats (widget->pspec);
+ /* if only one format, user a label and hide the combo */
+ if (node->next == NULL) {
+ gtk_widget_set_no_show_all(priv->combo, TRUE);
+ format = node->data;
+ GtkWidget *label = gtk_label_new(g_strdup_printf(".%s", format->extensions[0]));
+ gtk_box_pack_start(GTK_BOX(widget), label, FALSE, FALSE, 0);
+ }
for (; node ; node = node->next) {
format = node->data;
gtk_list_store_insert_with_values (priv->liststore, &iter, -1,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]