]> saetta.ns0.it Git - solipa/libsolipa/commitdiff
Aggiustamenti e correzioni.
authorAndrea Zagli <a.zagli@comune.scandicci.fi.it>
Thu, 26 May 2011 15:53:32 +0000 (17:53 +0200)
committerAndrea Zagli <a.zagli@comune.scandicci.fi.it>
Thu, 26 May 2011 15:53:32 +0000 (17:53 +0200)
configure.ac
data/libsolipa/gui/libsolipa.ui
src/allegato.c

index 2b1ed5680f41f105fa30173bd24223797d54ce07..c33083f3600e03fa0e5ffdce96e8b51b4cd8587b 100644 (file)
@@ -7,6 +7,9 @@ AC_CONFIG_SRCDIR([src/solipa.c])
 AC_CONFIG_HEADER([config.h])
 
 AM_INIT_AUTOMAKE
+
+m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
+
 AM_MAINTAINER_MODE
 
 AC_CONFIG_MACRO_DIR([m4])
index 8abed8c53a6dfda49d22bfe29121c2633d6fdb30..a7ae81605dc0d3755817df18ea29cb77c8e4603c 100644 (file)
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">False</property>
+            <property name="no_show_all">True</property>
             <property name="xalign">0.52999997138977051</property>
             <property name="draw_indicator">True</property>
           </object>
         <child>
           <object class="GtkLabel" id="label143">
             <property name="visible">True</property>
+            <property name="no_show_all">True</property>
             <property name="xalign">0</property>
             <property name="label" translatable="yes">Salva nel database</property>
           </object>
index 5d1dc9a5c7b69e6c958e1068414d27679db463f4..52f1fbe3b9e3719d83039d7a54d442ed78a70fe6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2010-2011 Andrea Zagli <azagli@libero.it>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -30,6 +30,7 @@
 #include <libgtkform/widgetentry.h>
 
 #include "allegato.h"
+#include "utils.h"
 
 static void solipa_allegato_class_init (SolipaAllegatoClass *class);
 static void solipa_allegato_init (SolipaAllegato *solipa_allegato);
@@ -154,6 +155,8 @@ GtkWidget
 {
        SolipaAllegatoPrivate *priv;
 
+       g_return_val_if_fail (IS_SOLIPA_ALLEGATO (solipa_allegato), NULL);
+
        priv = SOLIPA_ALLEGATO_GET_PRIVATE (solipa_allegato);
 
        return priv->widget;
@@ -166,8 +169,11 @@ solipa_allegato_con_salva_in_db (SolipaAllegato *solipa_allegato, gboolean con_s
 
        g_return_if_fail (IS_SOLIPA_ALLEGATO (solipa_allegato));
 
+       priv = SOLIPA_ALLEGATO_GET_PRIVATE (solipa_allegato);
+
        gtk_widget_set_visible (GTK_WIDGET (gtk_builder_get_object (priv->gtkbuilder, "label143")), con_salva_in_db);
        gtk_widget_set_visible (priv->chk_salva_nel_db, con_salva_in_db);
+       gtk_table_set_row_spacing (GTK_TABLE (priv->widget), 2, con_salva_in_db ? 5 : 0);
 }
 
 const gchar
@@ -243,6 +249,7 @@ solipa_allegato_apri_allegato (GtkWindow *transient, const gchar *filename)
                                                         GTK_BUTTONS_OK,
                                                         "Impossibile aprire l'allegato selezionato.");
                        gtk_dialog_run (GTK_DIALOG (dialog));
+                       gtk_widget_destroy (dialog);
                        return;
                }
 
@@ -257,6 +264,7 @@ solipa_allegato_apri_allegato (GtkWindow *transient, const gchar *filename)
                                                         "Impossibile aprire l'allegato selezionato: %s.",
                                                         (error != NULL & error->message != NULL ? error->message : "nessun dettaglio"));
                        gtk_dialog_run (GTK_DIALOG (dialog));
+                       gtk_widget_destroy (dialog);
                        return;
                }
 
@@ -273,6 +281,7 @@ solipa_allegato_apri_allegato (GtkWindow *transient, const gchar *filename)
                                                         "Impossibile aprire l'allegato selezionato: %s.",
                                                         (error != NULL & error->message != NULL ? error->message : "nessun dettaglio"));
                        gtk_dialog_run (GTK_DIALOG (dialog));
+                       gtk_widget_destroy (dialog);
                }
 }
 
@@ -470,7 +479,7 @@ solipa_allegato_on_btn_file_clicked (GtkButton *button,
                                                            g_strdup_printf ("%02d/%02d/%04d %02d.%02d.%02d",
                                                                             tm->tm_mday, tm->tm_mon + 1, tm->tm_year + 1900,
                                                                             tm->tm_hour, tm->tm_min, tm->tm_sec));
-                                       gtk_entry_set_text (GTK_ENTRY (priv->txt_dimensione), g_strdup_printf ("%d", buf.st_size));
+                                       gtk_entry_set_text (GTK_ENTRY (priv->txt_dimensione), solipa_format_money (buf.st_size, 0, FALSE));
                                }
                        else
                                {