From d6247b36820cd998da510b68590cdb73408bf9d3 Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Sat, 25 May 2013 15:07:29 +0200 Subject: [PATCH] Aggiunti i parametri di GraphViz nel tipo nodo (closes #647). --- data/organigramma/form/tipo_nodo.form | 4 + data/organigramma/gui/organigramma.gui | 37 ++++++- docs/DBChangelog | 2 + docs/organigramma.sql | 141 +++++++++++++------------ src/ufficio.c | 4 +- 5 files changed, 115 insertions(+), 73 deletions(-) diff --git a/data/organigramma/form/tipo_nodo.form b/data/organigramma/form/tipo_nodo.form index 8ecaae9..2ab7256 100644 --- a/data/organigramma/form/tipo_nodo.form +++ b/data/organigramma/form/tipo_nodo.form @@ -16,4 +16,8 @@ + + + + diff --git a/data/organigramma/gui/organigramma.gui b/data/organigramma/gui/organigramma.gui index ca09f2d..9bcd30c 100644 --- a/data/organigramma/gui/organigramma.gui +++ b/data/organigramma/gui/organigramma.gui @@ -6183,7 +6183,7 @@ True False - 2 + 3 2 5 5 @@ -6246,6 +6246,41 @@ GTK_FILL + + + True + True + automatic + automatic + etched-in + + + True + True + + + + + 1 + 2 + 2 + 3 + + + + + True + False + 0 + 0 + GraphViz + + + 2 + 3 + GTK_FILL + + True diff --git a/docs/DBChangelog b/docs/DBChangelog index 4ced9f8..9bd88e7 100644 --- a/docs/DBChangelog +++ b/docs/DBChangelog @@ -2,3 +2,5 @@ ================================================================================ ALTER TABLE uffici ADD COLUMN id_uffici integer DEFAULT 0; +ALTER TABLE tipi_nodo ADD COLUMN graphviz text DEFAULT ''; + diff --git a/docs/organigramma.sql b/docs/organigramma.sql index c1a1370..dcc8eae 100644 --- a/docs/organigramma.sql +++ b/docs/organigramma.sql @@ -4,7 +4,7 @@ -- Dumped from database version 9.1.9 -- Dumped by pg_dump version 9.1.9 --- Started on 2013-05-25 14:43:44 CEST +-- Started on 2013-05-25 15:06:39 CEST SET statement_timeout = 0; SET client_encoding = 'UTF8'; @@ -21,7 +21,7 @@ CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; -- --- TOC entry 2093 (class 0 OID 0) +-- TOC entry 2095 (class 0 OID 0) -- Dependencies: 183 -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: - -- @@ -35,7 +35,7 @@ SET default_with_oids = false; -- -- TOC entry 161 (class 1259 OID 17751) --- Dependencies: 1954 1955 1956 6 +-- Dependencies: 1955 1956 1957 6 -- Name: nodi; Type: TABLE; Schema: public; Owner: - -- @@ -51,7 +51,7 @@ CREATE TABLE nodi ( -- -- TOC entry 162 (class 1259 OID 17760) --- Dependencies: 1957 1958 1959 1960 1961 1962 1963 1964 1965 6 +-- Dependencies: 1958 1959 1960 1961 1962 1963 1964 1965 1966 6 -- Name: persona_incarichi; Type: TABLE; Schema: public; Owner: - -- @@ -73,7 +73,7 @@ CREATE TABLE persona_incarichi ( -- -- TOC entry 163 (class 1259 OID 17775) --- Dependencies: 1966 1967 1968 1969 6 +-- Dependencies: 1967 1968 1969 1970 6 -- Name: persona_nodi; Type: TABLE; Schema: public; Owner: - -- @@ -90,7 +90,7 @@ CREATE TABLE persona_nodi ( -- -- TOC entry 164 (class 1259 OID 17785) --- Dependencies: 1970 1971 1972 1973 1974 1975 1976 6 +-- Dependencies: 1971 1972 1973 1974 1975 1976 1977 6 -- Name: persona_nodo_recapiti; Type: TABLE; Schema: public; Owner: - -- @@ -108,7 +108,7 @@ CREATE TABLE persona_nodo_recapiti ( -- -- TOC entry 165 (class 1259 OID 17798) --- Dependencies: 1977 1978 1979 1980 1981 1982 6 +-- Dependencies: 1978 1979 1980 1981 1982 1983 6 -- Name: persona_recapiti; Type: TABLE; Schema: public; Owner: - -- @@ -125,7 +125,7 @@ CREATE TABLE persona_recapiti ( -- -- TOC entry 166 (class 1259 OID 17810) --- Dependencies: 1983 1984 1985 1986 6 +-- Dependencies: 1984 1985 1986 1987 6 -- Name: persona_uffici; Type: TABLE; Schema: public; Owner: - -- @@ -144,7 +144,7 @@ CREATE TABLE persona_uffici ( -- -- TOC entry 167 (class 1259 OID 17820) --- Dependencies: 1987 1988 1989 1990 1991 1992 1993 6 +-- Dependencies: 1988 1989 1990 1991 1992 1993 1994 6 -- Name: persona_ufficio_recapiti; Type: TABLE; Schema: public; Owner: - -- @@ -162,7 +162,7 @@ CREATE TABLE persona_ufficio_recapiti ( -- -- TOC entry 168 (class 1259 OID 17833) --- Dependencies: 1994 1995 1996 1997 1998 1999 2000 2001 2002 6 +-- Dependencies: 1995 1996 1997 1998 1999 2000 2001 2002 2003 6 -- Name: persone; Type: TABLE; Schema: public; Owner: - -- @@ -183,7 +183,7 @@ CREATE TABLE persone ( -- -- TOC entry 169 (class 1259 OID 17848) --- Dependencies: 2003 2004 6 +-- Dependencies: 2004 2005 6 -- Name: posizioni_economiche; Type: TABLE; Schema: public; Owner: - -- @@ -196,7 +196,7 @@ CREATE TABLE posizioni_economiche ( -- -- TOC entry 170 (class 1259 OID 17853) --- Dependencies: 2005 2006 6 +-- Dependencies: 2006 2007 6 -- Name: profili_professionali; Type: TABLE; Schema: public; Owner: - -- @@ -209,7 +209,7 @@ CREATE TABLE profili_professionali ( -- -- TOC entry 171 (class 1259 OID 17858) --- Dependencies: 2007 2008 2009 6 +-- Dependencies: 2008 2009 2010 6 -- Name: struttura_indirizzi; Type: TABLE; Schema: public; Owner: - -- @@ -225,7 +225,7 @@ CREATE TABLE struttura_indirizzi ( -- -- TOC entry 172 (class 1259 OID 17867) --- Dependencies: 2010 2011 2012 2013 2014 6 +-- Dependencies: 2011 2012 2013 2014 2015 6 -- Name: strutture; Type: TABLE; Schema: public; Owner: - -- @@ -241,20 +241,21 @@ CREATE TABLE strutture ( -- -- TOC entry 173 (class 1259 OID 17878) --- Dependencies: 2015 2016 6 +-- Dependencies: 2016 2017 2018 6 -- Name: tipi_nodo; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE tipi_nodo ( id integer NOT NULL, nome character varying(100) DEFAULT ''::character varying, - status character varying(1) DEFAULT ''::character varying + status character varying(1) DEFAULT ''::character varying, + graphviz text DEFAULT ''::text ); -- -- TOC entry 174 (class 1259 OID 17883) --- Dependencies: 2017 2018 6 +-- Dependencies: 2019 2020 6 -- Name: tipi_prestazione; Type: TABLE; Schema: public; Owner: - -- @@ -267,7 +268,7 @@ CREATE TABLE tipi_prestazione ( -- -- TOC entry 175 (class 1259 OID 17888) --- Dependencies: 2019 2020 6 +-- Dependencies: 2021 2022 6 -- Name: tipi_rapporto_lavoro; Type: TABLE; Schema: public; Owner: - -- @@ -280,7 +281,7 @@ CREATE TABLE tipi_rapporto_lavoro ( -- -- TOC entry 176 (class 1259 OID 17893) --- Dependencies: 2021 2022 6 +-- Dependencies: 2023 2024 6 -- Name: tipi_recapito; Type: TABLE; Schema: public; Owner: - -- @@ -293,7 +294,7 @@ CREATE TABLE tipi_recapito ( -- -- TOC entry 177 (class 1259 OID 17898) --- Dependencies: 2023 2024 2025 6 +-- Dependencies: 2025 2026 2027 6 -- Name: titoli; Type: TABLE; Schema: public; Owner: - -- @@ -307,7 +308,7 @@ CREATE TABLE titoli ( -- -- TOC entry 178 (class 1259 OID 17904) --- Dependencies: 2026 2027 2028 2029 6 +-- Dependencies: 2028 2029 2030 2031 6 -- Name: uffici; Type: TABLE; Schema: public; Owner: - -- @@ -323,7 +324,7 @@ CREATE TABLE uffici ( -- -- TOC entry 179 (class 1259 OID 17913) --- Dependencies: 2030 2031 6 +-- Dependencies: 2032 2033 6 -- Name: ufficio_nodi; Type: TABLE; Schema: public; Owner: - -- @@ -338,7 +339,7 @@ CREATE TABLE ufficio_nodi ( -- -- TOC entry 180 (class 1259 OID 17921) --- Dependencies: 2032 2033 6 +-- Dependencies: 2034 2035 6 -- Name: ufficio_orari; Type: TABLE; Schema: public; Owner: - -- @@ -366,7 +367,7 @@ CREATE TABLE ufficio_orari ( -- -- TOC entry 181 (class 1259 OID 17929) --- Dependencies: 2034 2035 2036 6 +-- Dependencies: 2036 2037 2038 6 -- Name: ufficio_recapiti; Type: TABLE; Schema: public; Owner: - -- @@ -383,7 +384,7 @@ CREATE TABLE ufficio_recapiti ( -- -- TOC entry 182 (class 1259 OID 17938) --- Dependencies: 2037 2038 2039 2040 2041 2042 6 +-- Dependencies: 2039 2040 2041 2042 2043 2044 6 -- Name: ufficio_stanze; Type: TABLE; Schema: public; Owner: - -- @@ -399,8 +400,8 @@ CREATE TABLE ufficio_stanze ( -- --- TOC entry 2044 (class 2606 OID 17951) --- Dependencies: 161 161 2088 +-- TOC entry 2046 (class 2606 OID 17951) +-- Dependencies: 161 161 2090 -- Name: nodi_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -409,8 +410,8 @@ ALTER TABLE ONLY nodi -- --- TOC entry 2046 (class 2606 OID 17953) --- Dependencies: 162 162 2088 +-- TOC entry 2048 (class 2606 OID 17953) +-- Dependencies: 162 162 2090 -- Name: persona_incarichi_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -419,8 +420,8 @@ ALTER TABLE ONLY persona_incarichi -- --- TOC entry 2048 (class 2606 OID 17955) --- Dependencies: 163 163 2088 +-- TOC entry 2050 (class 2606 OID 17955) +-- Dependencies: 163 163 2090 -- Name: persona_nodi_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -429,8 +430,8 @@ ALTER TABLE ONLY persona_nodi -- --- TOC entry 2050 (class 2606 OID 17957) --- Dependencies: 164 164 2088 +-- TOC entry 2052 (class 2606 OID 17957) +-- Dependencies: 164 164 2090 -- Name: persona_nodo_recapiti_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -439,8 +440,8 @@ ALTER TABLE ONLY persona_nodo_recapiti -- --- TOC entry 2052 (class 2606 OID 17959) --- Dependencies: 165 165 2088 +-- TOC entry 2054 (class 2606 OID 17959) +-- Dependencies: 165 165 2090 -- Name: persona_recapiti_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -449,8 +450,8 @@ ALTER TABLE ONLY persona_recapiti -- --- TOC entry 2054 (class 2606 OID 17961) --- Dependencies: 166 166 2088 +-- TOC entry 2056 (class 2606 OID 17961) +-- Dependencies: 166 166 2090 -- Name: persona_uffici_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -459,8 +460,8 @@ ALTER TABLE ONLY persona_uffici -- --- TOC entry 2056 (class 2606 OID 17963) --- Dependencies: 167 167 2088 +-- TOC entry 2058 (class 2606 OID 17963) +-- Dependencies: 167 167 2090 -- Name: persona_ufficio_recapiti_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -469,8 +470,8 @@ ALTER TABLE ONLY persona_ufficio_recapiti -- --- TOC entry 2058 (class 2606 OID 17965) --- Dependencies: 168 168 2088 +-- TOC entry 2060 (class 2606 OID 17965) +-- Dependencies: 168 168 2090 -- Name: persone_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -479,8 +480,8 @@ ALTER TABLE ONLY persone -- --- TOC entry 2060 (class 2606 OID 17967) --- Dependencies: 169 169 2088 +-- TOC entry 2062 (class 2606 OID 17967) +-- Dependencies: 169 169 2090 -- Name: posizioni_economiche_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -489,8 +490,8 @@ ALTER TABLE ONLY posizioni_economiche -- --- TOC entry 2062 (class 2606 OID 17969) --- Dependencies: 170 170 2088 +-- TOC entry 2064 (class 2606 OID 17969) +-- Dependencies: 170 170 2090 -- Name: profili_professionali_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -499,8 +500,8 @@ ALTER TABLE ONLY profili_professionali -- --- TOC entry 2064 (class 2606 OID 17971) --- Dependencies: 171 171 2088 +-- TOC entry 2066 (class 2606 OID 17971) +-- Dependencies: 171 171 2090 -- Name: struttura_indirizzi_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -509,8 +510,8 @@ ALTER TABLE ONLY struttura_indirizzi -- --- TOC entry 2066 (class 2606 OID 17973) --- Dependencies: 172 172 2088 +-- TOC entry 2068 (class 2606 OID 17973) +-- Dependencies: 172 172 2090 -- Name: strutture_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -519,8 +520,8 @@ ALTER TABLE ONLY strutture -- --- TOC entry 2068 (class 2606 OID 17975) --- Dependencies: 173 173 2088 +-- TOC entry 2070 (class 2606 OID 17975) +-- Dependencies: 173 173 2090 -- Name: tipi_nodo_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -529,8 +530,8 @@ ALTER TABLE ONLY tipi_nodo -- --- TOC entry 2070 (class 2606 OID 17977) --- Dependencies: 174 174 2088 +-- TOC entry 2072 (class 2606 OID 17977) +-- Dependencies: 174 174 2090 -- Name: tipi_prestazione_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -539,8 +540,8 @@ ALTER TABLE ONLY tipi_prestazione -- --- TOC entry 2072 (class 2606 OID 17979) --- Dependencies: 175 175 2088 +-- TOC entry 2074 (class 2606 OID 17979) +-- Dependencies: 175 175 2090 -- Name: tipi_rapporto_lavoro_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -549,8 +550,8 @@ ALTER TABLE ONLY tipi_rapporto_lavoro -- --- TOC entry 2074 (class 2606 OID 17981) --- Dependencies: 176 176 2088 +-- TOC entry 2076 (class 2606 OID 17981) +-- Dependencies: 176 176 2090 -- Name: tipi_recapito_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -559,8 +560,8 @@ ALTER TABLE ONLY tipi_recapito -- --- TOC entry 2076 (class 2606 OID 17983) --- Dependencies: 177 177 2088 +-- TOC entry 2078 (class 2606 OID 17983) +-- Dependencies: 177 177 2090 -- Name: titoli_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -569,8 +570,8 @@ ALTER TABLE ONLY titoli -- --- TOC entry 2078 (class 2606 OID 17985) --- Dependencies: 178 178 2088 +-- TOC entry 2080 (class 2606 OID 17985) +-- Dependencies: 178 178 2090 -- Name: uffici_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -579,8 +580,8 @@ ALTER TABLE ONLY uffici -- --- TOC entry 2080 (class 2606 OID 17987) --- Dependencies: 179 179 2088 +-- TOC entry 2082 (class 2606 OID 17987) +-- Dependencies: 179 179 2090 -- Name: ufficio_nodi_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -589,8 +590,8 @@ ALTER TABLE ONLY ufficio_nodi -- --- TOC entry 2082 (class 2606 OID 17989) --- Dependencies: 180 180 2088 +-- TOC entry 2084 (class 2606 OID 17989) +-- Dependencies: 180 180 2090 -- Name: ufficio_orari_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -599,8 +600,8 @@ ALTER TABLE ONLY ufficio_orari -- --- TOC entry 2084 (class 2606 OID 17991) --- Dependencies: 181 181 2088 +-- TOC entry 2086 (class 2606 OID 17991) +-- Dependencies: 181 181 2090 -- Name: ufficio_recapiti_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -609,8 +610,8 @@ ALTER TABLE ONLY ufficio_recapiti -- --- TOC entry 2086 (class 2606 OID 17993) --- Dependencies: 182 182 2088 +-- TOC entry 2088 (class 2606 OID 17993) +-- Dependencies: 182 182 2090 -- Name: ufficio_stanze_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -618,7 +619,7 @@ ALTER TABLE ONLY ufficio_stanze ADD CONSTRAINT ufficio_stanze_pkey PRIMARY KEY (id); --- Completed on 2013-05-25 14:43:45 CEST +-- Completed on 2013-05-25 15:06:40 CEST -- -- PostgreSQL database dump complete diff --git a/src/ufficio.c b/src/ufficio.c index 8296353..3375d38 100644 --- a/src/ufficio.c +++ b/src/ufficio.c @@ -360,7 +360,7 @@ OrganigrammaUfficio gtk_form_set_as_origin (priv->form); - gtk_form_set_sensitive_by_name (priv->form, FALSE, "frame2", "frame12", "frame1", "frame4", NULL); + gtk_form_set_sensitive_by_name (priv->form, FALSE, "hbox2", "hbox19", "hbox4", "hbox9", "hbox21", NULL); } else { @@ -467,7 +467,7 @@ organigramma_ufficio_salva (OrganigrammaUfficio *ufficio, gboolean chiudi) if (priv->id == 0) { priv->id = strtol (gtk_label_get_text (GTK_LABEL (priv->objects[LBL_ID])), NULL, 10); - gtk_form_set_sensitive_by_name (priv->form, TRUE, "frame2", "frame12", "frame1", "frame4", NULL); + gtk_form_set_sensitive_by_name (priv->form, TRUE, "hbox2", "hbox19", "hbox4", "hbox9", "hbox21", NULL); } solipa_message_dialog (priv->w, -- 2.49.0