debian/0000755000000000000000000000000012114717720007170 5ustar debian/dlume.desktop0000644000000000000000000000033212114323127011661 0ustar [Desktop Entry] Name=Dlume Comment=Simple and easy to use addressbook Type=Application Categories=Application;Office;ContactManagement Terminal=false Exec=dlume Icon=dlume.xpm StartupNotify=false X-SingleInstance=true debian/install0000644000000000000000000000014212114323127010550 0ustar debian/*.xpm usr/share/pixmaps *.png usr/share/pixmaps debian/*.desktop usr/share/applications debian/watch0000644000000000000000000000005712114323127010215 0ustar version=3 # This project does not have an URL. debian/rules0000755000000000000000000000176612114323127010254 0ustar #!/usr/bin/make -f PACKAGE = dlume export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed # Modified by the build process KEEP_FILES = \ Makefile.in \ aclocal.m4 \ config.guess \ config.h.in \ config.sub \ configure \ depcomp \ install-sh \ missing \ mkinstalldirs \ src/Makefile.in override_dh_auto_configure: for f in $(KEEP_FILES); do cp -a $$f $$f.orig ; done cp -vf /usr/share/misc/config.sub . cp -vf /usr/share/misc/config.guess . cp -vf $(shell ls /usr/share/automake-*/mkinstalldirs | tail -n 1) . autoreconf -vfi dh_auto_configure override_dh_auto_clean: # Restore original for f in $(KEEP_FILES); do [ ! -f $$f.orig ] || mv $$f.orig $$f; done # Delete build files rm -rf autom4te.cache rm -f Makefile */Makefile rm -f stamp* INSTALL rm -f po/POTFILES rm -f *.cache *.log *.status* config.h po/*.gmo *~ rm -f src/$(PACKAGE) src/*.o rm -f po/Makefile.in %: dh $@ # End of file debian/changelog0000644000000000000000000001317412114323127011042 0ustar dlume (0.2.4-12) unstable; urgency=low * debian/control - (Homepage): No longer at Freecode. Point to FreeBSD page. * debian/copyright - (Comment): Mark all upstream URLs invalid. - (Source): No longer at Freecode. Point to FreeBSD page. -- Jari Aalto Sat, 02 Mar 2013 09:11:24 +0200 dlume (0.2.4-11) unstable; urgency=high * debian/control - (Standards-Version): Update to 3.9.4. * debian/copyright - Update year. * debian/patches - (55): New. XML encode special characters on save (critical; Closes: #700880). -- Jari Aalto Fri, 01 Mar 2013 22:44:51 +0200 dlume (0.2.4-10) unstable; urgency=low * debian/control - (Build-Depends): Rm dpkg-dev; not needed with debhelper 9. - (Standards-Version): Update to 3.9.3.1. * debian/copyright - Update to format 1.0. * debian/dlume.desktop - (Encoding): Remove; UTF-8 is the default. * debian/docs - Delete; no useful files to install. * debian/install - New file. * debian/README.Debian - Delete; instruction from 2006 are no longer relevant. * debian/README.source - Delete; move text to patch 50 where it belongs. * debian/rules - Simplify all rules. Better treatment of original files (save/restore). - Enable all hardening flags. - Use DEB_*_MAINT_* variables. * debian/*.mk - (debian-vars.mk, debian.mk): Delete; no longer used. -- Jari Aalto Fri, 23 Mar 2012 03:40:16 -0400 dlume (0.2.4-9) unstable; urgency=low * debian/compat - Update to 9 * debian/control - (Build-Depends): update to debhelper 9, dpkg-dev 1.16.1. * debian/patches - (50): Refresh. Fix code for gcc hardened format specifiers. * debian/rules - Use hardened CFLAGS (FTBFS; Closes: #646343). http://wiki.debian.org/ReleaseGoals/SecurityHardeningBuildFlags -- Jari Aalto Wed, 08 Feb 2012 15:02:33 -0500 dlume (0.2.4-8) unstable; urgency=low * debian/patches - (50): In add_edit.c, change "key_release_event" to "changed". This makes copy/paste work. Patch chnage thanks to Daniel Altmann . -- Jari Aalto Sun, 22 Jan 2012 21:08:20 +0200 dlume (0.2.4-7) unstable; urgency=low * debian/control - (Build-Depends): Add automake. - (Standards-Version): Update to 3.9.2. * debian/copyright - Correct licence name from LGPL to GPL. * debian/patches - Convert all embedded patches into quilt (FTBFS; Closes: #643095). * debian/rules - (override_dh_auto_configure): run autoreconf -vfi to update files. - (override_dh_auto_clean): Clean all generated or copied of new files. -- Jari Aalto Tue, 27 Sep 2011 10:45:55 +0300 dlume (0.2.4-6) unstable; urgency=low * debian/control - (Build-Depends): Update to debhelper 8. - (Depends): Add ${misc:Depends}. - (Homepage): Move to own field (Closes: 615448). - (Standards-Version): Update to 3.9.1. - (Vcs-*): New. * debian/compat - Update to 8. * debian/copyright - update to DEP5 format. * debian/debian-vars.mk - Update. * debian/dirs - Remove. Not used. * debian/menu - (section): Update "Apps/Text" to "Applications/Data Management". * debian/README.Debian - Cleanup whitespace. * debian/rules - Rewrite to use dh(1). - (override_dh_auto_install): Exclude from install files NEWS, README and TODO which contains nothing more than what is not already in debian/control. * debian/source/format - New file. Use "3.0 (quilt)". * debian/watch - New file. -- Jari Aalto Sat, 09 Apr 2011 16:56:14 +0300 dlume (0.2.4-5) unstable; urgency=low * Moved /usr/share/xsessions/dlume.desktop to /usr/share/applications/dlume.desktop * New feature: Use pure GTK+ dialog to display error messages. -- Jari Aalto Fri, 22 Dec 2006 09:54:07 +0200 dlume (0.2.4-4) unstable; urgency=low * New maintainer. (ITA; Closes: #391423) * src/add_edit.c: () Check existing entry before adding (Closes: #268468). * src/data.h: Added 200+ to fields instead of 15 character. (Closes: #326464). * Added swedish translation, patch from BTS. (Closes: #350331). * repackaged from scratch. Removed cdbs and used dh_make. * debian/copyright: New template. Credit previous packager. * debian/README.Debian: Announce configuration directory change. * debian/control: (Build-Depends): added dpatch * debian/rules: added dpatch * debian/dlume.desktop: Added. * New feature: Added /usr/share/picmap/dlume.xpm icon * New feature: Only one dlume process can be running at a time. * New feature: The XML database is now written using utf-8 encoding. * New feature: Changed configuration directory from ~/.clay to ~/.dlume -- Jari Aalto Sun, 5 Nov 2006 16:50:57 +0200 dlume (0.2.4-3) unstable; urgency=low * QA upload. (ACK NMU; Closes: #268800) * Set maintainer to QA Group; Orphaned: #391423 * Conforms with latest Standards Version 3.7.2 -- Michael Ablassmeier Thu, 19 Oct 2006 09:23:52 +0200 dlume (0.2.4-2) unstable; urgency=low * Updated policy version. * New maintainer's address. -- David Moreno Garza Sun, 4 Sep 2005 23:04:37 -0500 dlume (0.2.4-1) unstable; urgency=low * New upstream release. * Segfault in export function fixed by release (Closes: #258739) -- David Moreno Garza Mon, 26 Jul 2004 23:23:27 -0500 dlume (0.2.2a-1) unstable; urgency=low * Initial Release (Closes: #255966). -- David Moreno Garza Fri, 25 Jun 2004 14:39:45 -0500 debian/menu0000644000000000000000000000024612114323127010053 0ustar ?package(dlume):\ needs="X11"\ section="Applications/Data Management"\ title="Dlume addressbook"\ command="/usr/bin/dlume" \ icon="/usr/share/pixmaps/dlume.xpm" debian/patches/0000755000000000000000000000000012114323127010611 5ustar debian/patches/55-xml-safe-encoding.patch0000644000000000000000000000136312114323127015364 0ustar From: Jari Aalto Subject: XML encode special characters on save (Bug#700880). --- src/data.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/src/data.c +++ b/src/data.c @@ -244,6 +244,8 @@ i = 0; node = list; + xmlChar *content; + while (node) { xmlAddChild(doc->xmlRootNode, xmlNewText("\n")); @@ -256,8 +258,10 @@ for(j=0; j < nfields; j++) if(strlen(fields_ptr[j])) { xmlAddChild(record_node, xmlNewText("\t")); - xmlNewChild(record_node, NULL, fields[j], fields_ptr[j]); + content = xmlEncodeEntitiesReentrant(doc, fields_ptr[j]); + xmlNewChild(record_node, NULL, fields[j], content); xmlAddChild(record_node, xmlNewText("\n")); + free(content); } i++; debian/patches/10-manpage.patch0000644000000000000000000000302612114323127013461 0ustar From de0366e1df4167972c89da9f9b3561e63db768c1 Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Tue, 27 Sep 2011 10:10:30 +0300 Subject: [PATCH] dlume.1: manual pages changes Organization: Private Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Signed-off-by: Jari Aalto --- dlume.1 | 28 ++++++++++++++++++---------- 1 files changed, 18 insertions(+), 10 deletions(-) diff --git a/dlume.1 b/dlume.1 index 6417fbd..d2117b6 100644 --- a/dlume.1 +++ b/dlume.1 @@ -8,19 +8,27 @@ The \fIDlume\fR is nice, gtk2\-based addressbook. You can easily add, edit and d .SH "OPTIONS" Dlume has no options. .SH "FILES" -\fB${prefix}\fR/bin/dlume \- Program executable - -\fB$HOME\fR/.clay/dlume \- User's Dlume configuration - -\fB$HOME\fR/.clay/dlume\-data.xml \- Addressbook data file - -\fB$HOME\fR/.clay/dlume\-accels \- Keyboard accelerators file +.TP +\fB${prefix}\fR/bin/dlume +Program executable +.TP +\fB$HOME\fR/.dlume/dlume +User's Dlume configuration +.TP +\fB$HOME\fR/.dlume/dlume\-data.xml +Addressbook data file +.TP +\fB$HOME\fR/.dlume/dlume\-accels +Keyboard accelerators file +.TP +\fB$HOME\fR/.dlume/*.lock +A lock file containing PID who is using the dlume database. This file +is removed on normal exit. In case of crash, this file must +be deleted manually. .SH "OTHER INFO" The latest version of Dlume is available at .br -http://clay.ll.pl/dlume.html - - +http://freshmeat.net/projects/dlume .SH "AUTHORS" Tomasz Maka .br -- 1.7.6.3 debian/patches/series0000644000000000000000000000015112114323127012023 0ustar 10-manpage.patch 20-sv-po.patch 21-sv-po-configure.patch 50-src-changes.patch 55-xml-safe-encoding.patch debian/patches/20-sv-po.patch0000644000000000000000000001755512114323127013132 0ustar From 8e36323a202fc95e5c9a04a291cf0bf83619611a Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Tue, 27 Sep 2011 10:12:07 +0300 Subject: [PATCH] po/sv.po: new file Organization: Private Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Signed-off-by: Jari Aalto --- po/sv.po | 404 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 404 insertions(+), 0 deletions(-) create mode 100644 po/sv.po diff --git a/po/sv.po b/po/sv.po new file mode 100644 index 0000000..4b73a17 --- /dev/null +++ b/po/sv.po @@ -0,0 +1,404 @@ +# Swedish translation of dlume. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the dlume package. +# Daniel Nylander , 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: dlume 0.2.4-2\n" +"POT-Creation-Date: 2003-09-26 00:14+0200\n" +"PO-Revision-Date: 2006-01-29 01:18+0100\n" +"Last-Translator: Daniel Nylander \n" +"Language-Team: Swedish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "About" +msgstr "Om" + +msgid "CODE" +msgstr "KOD" + +msgid "GRAPHICS" +msgstr "GRAFIK" + +msgid "License" +msgstr "Licens" + +msgid "Select an e-mail..." +msgstr "Välj en e-post..." + +msgid "No e-mails found..." +msgstr "Inga e-post hittades..." + +msgid "Select website..." +msgstr "Välj webbplats..." + +msgid "No websites found..." +msgstr "Inga webbplatser hittades..." + +msgid "Send" +msgstr "Sänd" + +msgid "Launch" +msgstr "Starta" + +msgid "Record added sucessfully." +msgstr "Post lades till." + +msgid "Record needs first or last name!" +msgstr "Post behöver för- eller efternamn!" + +msgid "New contact..." +msgstr "Ny kontakt..." + +msgid "Personal " +msgstr "Personligt " + +msgid "First Name: " +msgstr "Förnamn: " + +msgid "Last Name: " +msgstr "Efternamn: " + +msgid "Birthday: " +msgstr "Födelsedag: " + +msgid "Address: " +msgstr "Adress: " + +msgid "Post Code:" +msgstr "Postkod:" + +msgid "City: " +msgstr "Stad: " + +msgid "Country:" +msgstr "Land:" + +msgid "Home phones " +msgstr "Hemtelefoner " + +msgid "Phone 1:" +msgstr "Telefon 1:" + +msgid "Phone 2:" +msgstr "Telefon 2:" + +msgid "Phone 3:" +msgstr "Telefon 3:" + +msgid "Phone 4:" +msgstr "Telefon 4:" + +msgid "Work phones " +msgstr "Arbetstelefoner " + +msgid "Cell phones " +msgstr "Mobiltelefoner " + +msgid "E-mails " +msgstr "E-post " + +msgid "E-mail 1: " +msgstr "E-post 1: " + +msgid "E-mail 2: " +msgstr "E-post 2: " + +msgid "E-mail 3: " +msgstr "E-post 3: " + +msgid "E-mail 4: " +msgstr "E-post 4: " + +msgid "WWW pages " +msgstr "Webbplatser " + +msgid "URL 1:" +msgstr "URL 1:" + +msgid "URL 2:" +msgstr "URL 2:" + +msgid "URL 3:" +msgstr "URL 3:" + +msgid "URL 4:" +msgstr "URL 4:" + +msgid "Additional info " +msgstr "Ytterligare info " + +msgid "First or last name must be filled!" +msgstr "För- eller efternamn måste fyllas i!" + +msgid "Edit entry..." +msgstr "Redigera post..." + +msgid "Post Code: " +msgstr "Postkod: " + +msgid "Country: " +msgstr "Land: " + +msgid "Home phone 1: " +msgstr "Hemtelefon 1: " + +msgid "Home phone 2: " +msgstr "Hemtelefon 2: " + +msgid "Home phone 3: " +msgstr "Hemtelefon 3: " + +msgid "Home phone 4: " +msgstr "Hemtelefon 4: " + +msgid "Work phone 1: " +msgstr "Arbetstelefon 1: " + +msgid "Work phone 2: " +msgstr "Arbetstelefon 2: " + +msgid "Work phone 3: " +msgstr "Arbetstelefon 3: " + +msgid "Work phone 4: " +msgstr "Arbetstelefon 4: " + +msgid "Cell phone 1: " +msgstr "Mobiltelefon 1: " + +msgid "Cell phone 2: " +msgstr "Mobiltelefon 3: " + +msgid "Cell phone 3: " +msgstr "Mobiltelefon 3: " + +msgid "Cell phone 4: " +msgstr "Mobiltelefon 4: " + +msgid "URL 1: " +msgstr "URL 1: " + +msgid "URL 2: " +msgstr "URL 2: " + +msgid "URL 3: " +msgstr "URL 3: " + +msgid "URL 4: " +msgstr "URL 4: " + +msgid "Additional info" +msgstr "Ytterligare info" + +msgid "Please select record to edit first." +msgstr "Välj post att redigera först." + +#: add_edit.c:1342 +msgid "No records to edit." +msgstr "Inga poster att redigera." + +msgid "Record deleted." +msgstr "Post borttagen." + +msgid "Question" +msgstr "Fråga" + +msgid "Delete current record ?" +msgstr "Ta bort aktuell post?" + +msgid "Please select record to delete first." +msgstr "Välj post att ta bort först." + +msgid "No records to delete." +msgstr "Inga poster att ta bort." + +msgid "Export contacts as CSV file..." +msgstr "Exportera kontakter som CSV-fil..." + +msgid "No records to export." +msgstr "Inga poster att exportera." + +msgid "Export contacts as HTML file..." +msgstr "Exportera kontakter som HTML-fil..." + +msgid "Please select record first." +msgstr "Välj post först." + +msgid "No records found." +msgstr "Inga poster hittades." + +msgid "Idle..." +msgstr "Overksam..." + +msgid "FIRST NAME: " +msgstr "FÖRNAMN: " + +msgid "LAST NAME: " +msgstr "EFTERNAMN: " + +msgid "BIRTHDAY DATE: " +msgstr "FÖDELSEDAG: " + +msgid "ADDRESS: " +msgstr "ADRESS: " + +msgid "POST CODE: " +msgstr "POSTKOD: " + +msgid "CITY: " +msgstr "STAD: " + +msgid "COUNTRY: " +msgstr "LAND: " + +msgid "HOME PHONES:\n" +msgstr "HEMTELEFON:\n" + +msgid "WORK PHONES:\n" +msgstr "ARBETSTELEFON:\n" + +msgid "CELL PHONES:\n" +msgstr "MOBILTELEFON:\n" + +msgid "E-MAILS:\n" +msgstr "E-POST:\n" + +msgid "WEBSITES:\n" +msgstr "WEBBPLATSER:\n" + +msgid "ADDITIONAL INFO:\n" +msgstr "YTTERLIGARE INFO:\n" + +msgid "/_File" +msgstr "/_Arkiv" + +msgid "/File/tearoff" +msgstr "/Arkiv/tearoff" + +msgid "/File/Export as" +msgstr "/Arkiv/Exportera som" + +msgid "/File/Export as/CSV" +msgstr "/Arkiv/Exportera som/CSV" + +msgid "/File/Export as/HTML" +msgstr "/Arkiv/Exportera som/HTML" + +msgid "/File/sep1" +msgstr "/Arkiv/sep1" + +msgid "/File/Quit" +msgstr "/Arkiv/Avsluta" + +msgid "/_Entry" +msgstr "/_Post" + +msgid "/Entry/tearoff" +msgstr "/Post/tearoff" + +msgid "/Entry/Add" +msgstr "/Post/Lägg till" + +msgid "/Entry/Edit" +msgstr "/Post/Redigera" + +msgid "/Entry/Delete" +msgstr "/Post/Ta bort" + +msgid "/_Actions" +msgstr "/_Åtgärder" + +msgid "/Actions/tearoff" +msgstr "/Åtgärder/tearoff" + +msgid "/Actions/Send an e-mail" +msgstr "/Åtgärder/Skicka e-post" + +msgid "/Actions/Launch website" +msgstr "/Åtgärder/Starta webbsida" + +msgid "/Actions/sep1" +msgstr "/Åtgärder/sep1" + +msgid "/Actions/Quick search" +msgstr "/Åtgärder/Snabbsök" + +msgid "/_Options" +msgstr "/_Alternativ" + +msgid "/Options/tearoff" +msgstr "/Alternativ/tearoff" + +msgid "/Options/Preferences" +msgstr "/Alternativ/Inställningar" + +msgid "/_Help" +msgstr "/_Hjälp" + +msgid "/Help/tearoff" +msgstr "/Hjälp/tearoff" + +msgid "/Help/About" +msgstr "/Hjälp/_Om" + +msgid "/Help/License" +msgstr "/Hjälp/Licens" + +msgid "DLUME %s - an address book" +msgstr "DLUME %s - en adressbok" + +msgid "Add" +msgstr "Lägg till" + +msgid "Edit" +msgstr "Redigera" + +msgid "Delete" +msgstr "Ta bort" + +msgid "Quit!" +msgstr "Avsluta!" + +msgid "First name" +msgstr "Förnamn" + +msgid "Last name" +msgstr "Efternamn" + +msgid "Select color" +msgstr "Välj färg" + +msgid "Preferences" +msgstr "Inställningar" + +msgid "First Name" +msgstr "Förnamn" + +msgid "Last Name" +msgstr "Efternamn" + +msgid "Sort by: " +msgstr "Sortera efter: " + +msgid "Web browser: " +msgstr "Webbläsare: " + +msgid "E-mail client: " +msgstr "E-postklient: " + +msgid "Programs " +msgstr "Program " + +msgid "You will need to restart dlume" +msgstr "Du behöver starta om dlume" + +msgid "for colors changes to take effect." +msgstr "för att färgändringar ska bli aktiva." + +msgid "Colors " +msgstr "Färger " + -- 1.7.6.3 debian/patches/50-src-changes.patch0000644000000000000000000002447212114323127014262 0ustar From cf9750cbcc1e5b1210605d543447372dabb93950 Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Wed, 8 Feb 2012 15:08:23 -0500 Subject: [PATCH] Source code changes Organization: Private Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Includes following change: Date: 2012-01-22 From: Daniel Altmann In "add_edit.c" the "changed" signal, instead of "key_released", makes copy/paste work. Still releasing a key does what it should. > 227 g_signal_connect (G_OBJECT(e_entry[FIRST_NAME]), "changed", 228 G_CALLBACK(gui_add_rkey), NULL); .. 245 e_entry[LAST_NAME] = gtk_entry_new(); > 246 g_signal_connect (G_OBJECT(e_entry[LAST_NAME]), "changed", Signed-off-by: Jari Aalto --- src/add_edit.c | 21 +++++--- src/data.c | 7 ++- src/data.h | 22 ++++---- src/export.c | 4 +- src/main.c | 4 ++ src/prefs.c | 151 ++++++++++++++++++++++++++++++++++++++++++++++++++++---- src/prefs.h | 2 + 7 files changed, 178 insertions(+), 33 deletions(-) diff --git a/src/add_edit.c b/src/add_edit.c index 2f3bcd5..0c49a11 100644 --- a/src/add_edit.c +++ b/src/add_edit.c @@ -100,18 +100,23 @@ GtkTextIter a_iter, b_iter; size_notes); - if(strlen(rec_entry.first_name) || strlen(rec_entry.last_name)) { + if(strlen(rec_entry.first_name) && strlen(rec_entry.last_name)) { + if ( find_record(rec_entry.first_name, rec_entry.last_name) >= 0 ) { + gui_show_status(_("ERROR: Same first name and last name already exists")); - data_add_record(&rec_entry); + } else { - gui_display_records_list(); - gui_update_records_list((gchar *)gtk_entry_get_text(GTK_ENTRY(find_entry))); + data_add_record(&rec_entry); - gui_show_status(_("Contact added sucessfully.")); + gui_display_records_list(); + gui_update_records_list((gchar *)gtk_entry_get_text(GTK_ENTRY(find_entry))); + + gui_show_status(_("Contact added successfully.")); + } } else { - gui_show_status(_("Contact needs first or last name!")); + gui_show_status(_("Contact needs first and last name!")); } @@ -219,7 +224,7 @@ GtkSizeGroup *sg_label, *sg_entry; gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); e_entry[FIRST_NAME] = gtk_entry_new(); - g_signal_connect (G_OBJECT(e_entry[FIRST_NAME]), "key_release_event", + g_signal_connect (G_OBJECT(e_entry[FIRST_NAME]), "changed", G_CALLBACK(gui_add_rkey), NULL); gtk_entry_set_max_length(GTK_ENTRY(e_entry[FIRST_NAME]), size_name-1); gtk_widget_show (e_entry[FIRST_NAME]); @@ -237,7 +242,7 @@ GtkSizeGroup *sg_label, *sg_entry; gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); e_entry[LAST_NAME] = gtk_entry_new(); - g_signal_connect (G_OBJECT(e_entry[LAST_NAME]), "key_release_event", + g_signal_connect (G_OBJECT(e_entry[LAST_NAME]), "changed", G_CALLBACK(gui_add_rkey), NULL); gtk_entry_set_max_length(GTK_ENTRY(e_entry[LAST_NAME]), size_name-1); gtk_widget_show (e_entry[LAST_NAME]); diff --git a/src/data.c b/src/data.c index 9f83e4b..0d456a7 100644 --- a/src/data.c +++ b/src/data.c @@ -178,7 +178,7 @@ gint i; records = 0; - if((doc = xmlParseFile(get_data_filename(".clay", DATAFILE)))) { + if((doc = xmlParseFile(get_data_filename(DATADIR, DATAFILE)))) { if(!(cur = xmlDocGetRootElement(doc))) { g_print("WARNING: datafile is empty.\n"); @@ -268,7 +268,10 @@ gint i, j; xmlSetProp(doc->xmlRootNode, "records", c); xmlAddChild(doc->xmlRootNode, xmlNewText("\n")); - xmlSaveFile(get_data_filename(".clay", DATAFILE), doc); + gchar *file = get_data_filename(DATADIR, DATAFILE); + + xmlSaveFormatFileEnc(file, doc, "utf-8", 1); + /* xmlSaveFile(file, doc); */ xmlFreeDoc(doc); return 0; diff --git a/src/data.h b/src/data.h index afb8077..b0e122d 100644 --- a/src/data.h +++ b/src/data.h @@ -22,17 +22,17 @@ #define DATAFILE "dlume-data.xml" -#define size_name 25 -#define size_address 50 -#define size_city 25 -#define size_country 25 -#define size_state 25 -#define size_post_code 15 -#define size_phone 45 -#define size_email 40 -#define size_url 50 -#define size_birthday 25 -#define size_notes 4096 +#define size_name 225 +#define size_address 250 +#define size_city 225 +#define size_country 225 +#define size_state 225 +#define size_post_code 215 +#define size_phone 245 +#define size_email 240 +#define size_url 250 +#define size_birthday 225 +#define size_notes 4096 #define nfields 30 /* number of fields */ diff --git a/src/export.c b/src/export.c index bd2ad3b..3567d2e 100644 --- a/src/export.c +++ b/src/export.c @@ -503,8 +503,8 @@ gchar *html_head[] = { e = (config.selected_fields >> k) & 1; if(e) { - fprintf(filehandle, "\t"); - fprintf(filehandle, html_head[k]); + fprintf(filehandle, "\t"); + fprintf(filehandle, "%s", html_head[k]); fprintf(filehandle, "\n"); } } diff --git a/src/main.c b/src/main.c index 533ff3b..09776b2 100644 --- a/src/main.c +++ b/src/main.c @@ -33,6 +33,9 @@ int main(int argc, char **argv) { read_config (); + char *file = s_getfilename_config(); + s_flock(file); + data_init (); data_read (); @@ -53,6 +56,7 @@ int main(int argc, char **argv) data_close(); write_config (); + s_funlock(file); return 0; } diff --git a/src/prefs.c b/src/prefs.c index 991f603..4cebf4f 100644 --- a/src/prefs.c +++ b/src/prefs.c @@ -32,20 +32,84 @@ struct dlumeprefs config; FILE *prefs_filehandle; + /*---------------------------------------------------------------------------*/ -gchar* s_getdir_config (void) +void exit_with_message (const char *str) { -static gchar cfgdir[MAX_PATH]; -struct stat cfg; + fprintf(stderr, "%s", str); + + struct stat info; + + /* old way; disabled now */ + if ( 0 && stat("/usr/bin/xmessage", &info) == 0 ) + { + execl("/usr/bin/xmessage", "dlume error", str, NULL); + } + + /* http://developer.gnome.org/doc/API/2.4/gtk/GtkMessageDialog.html */ + gtk_init( NULL, NULL); + + GtkWindowType type = GTK_WINDOW_TOPLEVEL; + GtkWidget *parent = gtk_window_new(type); + GtkWidget *dialog = gtk_message_dialog_new( GTK_WINDOW(parent), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_CLOSE, + "%s", + str); + + /* http://developer.gnome.org/doc/API/2.4/gtk/GtkDialog.html#gtk-dialog-run */ + (void) gtk_dialog_run( GTK_DIALOG(dialog)); + gtk_widget_destroy( dialog); + + + /* + gtk_widget_show( info_dialog); + + g_signal_connect( G_OBJECT(info_dialog), + "response", + G_CALLBACK(gtk_widget_destroy), + NULL); + */ - s_strcpy (cfgdir, getenv ("HOME"), MAX_PATH); - s_strcat (cfgdir, "/.clay", MAX_PATH); - if(stat (cfgdir, &cfg) < 0) - mkdir (cfgdir, S_IRUSR | S_IWUSR | S_IXUSR); + /* The execl may fail due to DISPLAY not set. */ + exit(1); +} + +/*---------------------------------------------------------------------------*/ - return cfgdir; +gchar* s_getdir_config (void) +{ + static gchar cfgdir[MAX_PATH]; + gchar oldcfgdir[MAX_PATH]; + struct stat cfg; + + s_strcpy( oldcfgdir, getenv ("HOME"), MAX_PATH); + s_strcat( oldcfgdir, "/", MAX_PATH); + s_strcat( oldcfgdir, ".clay", MAX_PATH); + + s_strcpy( cfgdir, getenv ("HOME"), MAX_PATH); + s_strcat( cfgdir, "/", MAX_PATH); + s_strcat( cfgdir, DATADIR, MAX_PATH); + + if ( stat(oldcfgdir, &cfg) == 0 ) + { + char str[2000]; + sprintf(str, + "[FATAL] dlume: Old config found. Please upgrade " + "by running command: mv %s %s\n", + oldcfgdir, + cfgdir); + + exit_with_message(str); + } + + if ( stat(cfgdir, &cfg) < 0 ) + mkdir (cfgdir, S_IRUSR | S_IWUSR | S_IXUSR); + + return cfgdir; } /*---------------------------------------------------------------------------*/ @@ -76,6 +140,72 @@ static gchar filename[MAX_PATH]; /*---------------------------------------------------------------------------*/ +void s_funlock (gchar *filename) +{ + int MAX = 2000; + char lock[MAX]; + + strcpy( lock, filename); + s_strcpy( lock, filename, MAX); + s_strcat( lock, ".lock", MAX); + + if ( !access(lock, 0) ) + { + if ( unlink(lock) ) + { + char str[MAX * 2]; + + sprintf(str, + "[FATAL] dlume: Cannot remove lock: %s\n", + lock); + + exit_with_message(str); + } + } +} + +void s_flock (gchar *filename) +{ + FILE *handle = NULL; + int MAX = 2000; + pid_t pid = getpid(); + + char lock[MAX]; + + strcpy( lock, filename); + s_strcpy( lock, filename, MAX); + s_strcat( lock, ".lock", MAX); + + if ( !access(lock, 0) ) + { + char str[MAX * 2]; + + sprintf(str, + "[FATAL] dlume: Another process has locked the database: %s\n", + lock); + + exit_with_message(str); + } + + handle = fopen(lock, "wb"); + + if ( handle == NULL ) + { + char str[MAX * 2]; + + sprintf(str, + "[FATAL] dlume: Cannot create lock: %s\n", + lock); + + exit_with_message(str); + } + + fprintf( handle, "%lu\n", (unsigned long) pid); + fclose(handle); +} + +/*---------------------------------------------------------------------------*/ + void* s_prefs_openfile (gchar *filename, gint openmode) { prefs_filehandle = NULL; @@ -126,7 +256,7 @@ gchar text[MAX_LINE_LEN]; s_strcpy (text, "# ", MAX_LINE_LEN); s_strcat (text, comment, MAX_LINE_LEN); - fprintf (prefs_filehandle, text); + fprintf (prefs_filehandle, "%s", text); } /*---------------------------------------------------------------------------*/ @@ -361,8 +491,9 @@ void read_config (void) void write_config(void) { + char *file = s_getfilename_config(); - if (s_prefs_openfile (s_getfilename_config (), P_WRITE)) { + if (s_prefs_openfile (file, P_WRITE)) { s_prefs_put_int ("window_pos_x", config.window_x); s_prefs_put_int ("window_pos_y", config.window_y); diff --git a/src/prefs.h b/src/prefs.h index 58101ad..bb9fb41 100644 --- a/src/prefs.h +++ b/src/prefs.h @@ -22,6 +22,8 @@ #include +#define DATADIR ".dlume" + #define config_filename "dlume" #define config_a_filename "dlume-accels" -- 1.7.9 debian/patches/21-sv-po-configure.patch0000644000000000000000000000134112114323127015074 0ustar From 9ae856c6a310510a9d2e6d8d30ecc45a16d6a577 Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Tue, 27 Sep 2011 10:16:59 +0300 Subject: [PATCH] configure.in: Add SV PO Organization: Private Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Signed-off-by: Jari Aalto --- configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure.in b/configure.in index cbc0c71..f40ee04 100644 --- a/configure.in +++ b/configure.in @@ -23,7 +23,7 @@ PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) AC_SUBST(PACKAGE_CFLAGS) AC_SUBST(PACKAGE_LIBS) -ALL_LINGUAS="" +ALL_LINGUAS="sv" GETTEXT_PACKAGE=dlume AC_SUBST(GETTEXT_PACKAGE) -- 1.7.6.3 debian/source/0000755000000000000000000000000012114323127010462 5ustar debian/source/format0000644000000000000000000000001412114323127011670 0ustar 3.0 (quilt) debian/compat0000644000000000000000000000000212114323127010360 0ustar 9 debian/dlume.xpm0000644000000000000000000001674512114323127011033 0ustar /* XPM */ static char * dlume_xpm[] = { "32 32 339 2", " c None", ". c #323232", "+ c #383838", "@ c #4B4B4B", "# c #545454", "$ c #676767", "% c #858586", "& c #929393", "* c #4D4D4D", "= c #808080", "- c #585959", "; c #A4A5A6", "> c #BFBFC1", ", c #A1A1A3", "' c #757576", ") c #B8B9BA", "! c #646465", "~ c #353535", "{ c #3F3F3F", "] c #454545", "^ c #646464", "/ c #69696A", "( c #B4B4B5", "_ c #BFC0C1", ": c #88898A", "< c #9D9E9F", "[ c #CACBCD", "} c #AAABAC", "| c #717172", "1 c #B6B7B9", "2 c #949597", "3 c #424242", "4 c #707070", "5 c #838383", "6 c #595959", "7 c #9FA0A0", "8 c #C5C6C7", "9 c #B8B9BB", "0 c #6B6C6C", "a c #D4D4D7", "b c #C7C8C9", "c c #818182", "d c #A5A6A7", "e c #C0C1C3", "f c #9B9B9C", "g c #A4A4A5", "h c #BABBBC", "i c #AFB0B1", "j c #949596", "k c #535353", "l c #5A5A5A", "m c #4A4A4A", "n c #7D7D7E", "o c #B1B1B3", "p c #C6C7C8", "q c #BCBDBF", "r c #757677", "s c #DDDEE0", "t c #C9CACC", "u c #717171", "v c #CECFD1", "w c #C7C8CA", "x c #ABABAD", "y c #BDBEBF", "z c #C4C5C7", "A c #BBBCBE", "B c #9A9B9D", "C c #464646", "D c #676768", "E c #ADADAE", "F c #C5C5C7", "G c #8E8F90", "H c #E2E2E5", "I c #DADBDD", "J c #B4B4B6", "K c #A0A0A1", "L c #D9DADC", "M c #C4C4C6", "N c #AEAFB0", "O c #C8C9CB", "P c #C7C8CB", "Q c #C5C6C8", "R c #C4C5C6", "S c #B9B9BA", "T c #C3C4C6", "U c #C1C2C4", "V c #BDBEC0", "W c #B7B8BA", "X c #B2B3B5", "Y c #878788", "Z c #4F4F4F", "` c #939393", " . c #A5A5A6", ".. c #777778", "+. c #7B7C7D", "@. c #DCDDE0", "#. c #DBDCDF", "$. c #B6B6B8", "%. c #89898A", "&. c #E2E4E6", "*. c #E0E1E4", "=. c #D2D4D7", "-. c #D8D9DB", ";. c #D3D4D6", ">. c #CDCED0", ",. c #C2C3C4", "'. c #C3C4C5", "). c #BDBDBE", "!. c #BFC0C2", "~. c #B3B4B6", "{. c #9C9D9F", "]. c #9E9E9E", "^. c #BCBCBD", "/. c #CDCECF", "(. c #C9C9CB", "_. c #DEDFE1", ":. c #DCDDE1", "<. c #AFAFB1", "[. c #BCBDBE", "}. c #E2E3E5", "|. c #E1E2E4", "1. c #DDDDE0", "2. c #DADADD", "3. c #D4D5D7", "4. c #C6C7C9", "5. c #C3C3C5", "6. c #C2C3C5", "7. c #B4B5B7", "8. c #ACADAF", "9. c #939395", "0. c #828281", "a. c #A6A6A6", "b. c #CACACC", "c. c #C1C2C3", "d. c #B2B2B4", "e. c #D7D9DB", "f. c #D6D7D8", "g. c #C8C9CC", "h. c #ADAEB0", "i. c #9E9FA1", "j. c #000000", "k. c #7E7E7E", "l. c #CCCCCE", "m. c #D5D6D9", "n. c #D7D8DA", "o. c #D5D6D8", "p. c #D1D2D3", "q. c #DFE0E2", "r. c #CBCCCE", "s. c #CBCCCD", "t. c #BEBFC1", "u. c #B1B2B4", "v. c #AFB0B2", "w. c #838384", "x. c #373737", "y. c #989999", "z. c #D2D3D5", "A. c #D6D7D9", "B. c #DCDDDF", "C. c #C8C8C9", "D. c #E0E1E3", "E. c #C9CACB", "F. c #ADAEAF", "G. c #8E8E8E", "H. c #111110", "I. c #60605F", "J. c #C5C6C9", "K. c #C2C2C3", "L. c #D0D1D3", "M. c #CACBCC", "N. c #E3E4E6", "O. c #D1D2D4", "P. c #CCCDD0", "Q. c #B3B4B5", "R. c #A7A8A8", "S. c #949593", "T. c #81827E", "U. c #777776", "V. c #3A3A3A", "W. c #949493", "X. c #B9B9BB", "Y. c #DBDCDE", "Z. c #999997", "`. c #7C7C7A", " + c #444443", ".+ c #3A3A39", "++ c #656564", "@+ c #A3A4A4", "#+ c #BEBEC0", "$+ c #BCBDBD", "%+ c #DADADC", "&+ c #B5B6B6", "*+ c #A3A3A3", "=+ c #959594", "-+ c #787877", ";+ c #2E2E2E", ">+ c #0B0B0B", ",+ c #2A2A2A", "'+ c #868686", ")+ c #B7B8B9", "!+ c #D4D5D6", "~+ c #B0B1B1", "{+ c #9D9D9C", "]+ c #888887", "^+ c #333333", "/+ c #1C1C1C", "(+ c #464645", "_+ c #B2B2B3", ":+ c #9B9B9A", "<+ c #828280", "[+ c #626262", "}+ c #0A0A0A", "|+ c #1F1F1F", "1+ c #858585", "2+ c #C4C4C7", "3+ c #D3D3D5", "4+ c #D0D0D2", "5+ c #BEBFBF", "6+ c #AAAAA9", "7+ c #919190", "8+ c #747473", "9+ c #1D1D1D", "0+ c #101010", "a+ c #414141", "b+ c #959596", "c+ c #B7B7B7", "d+ c #ADADAC", "e+ c #929291", "f+ c #767675", "g+ c #494949", "h+ c #222222", "i+ c #A2A2A2", "j+ c #5C5C5B", "k+ c #292928", "l+ c #212121", "m+ c #8997B6", "n+ c #95A3C4", "o+ c #93A0C1", "p+ c #95A0BE", "q+ c #CFD2CA", "r+ c #AFA790", "s+ c #EEE8CC", "t+ c #E4D7B6", "u+ c #444444", "v+ c #616160", "w+ c #515150", "x+ c #9FA1AE", "y+ c #9FA2A7", "z+ c #7882A2", "A+ c #95A2C2", "B+ c #A2AFCF", "C+ c #9AA6C6", "D+ c #9BA6C6", "E+ c #919CBC", "F+ c #818AA6", "G+ c #BBBDB9", "H+ c #C9BB9F", "I+ c #A99D82", "J+ c #746A55", "K+ c #96A2C4", "L+ c #A3AFD1", "M+ c #A3AED1", "N+ c #9DA9CB", "O+ c #A2AED0", "P+ c #A1ACCE", "Q+ c #919BB6", "R+ c #CCCDC0", "S+ c #848AA0", "T+ c #79809B", "U+ c #6F758E", "V+ c #696F86", "W+ c #62667D", "X+ c #5B6076", "Y+ c #515466", "Z+ c #747371", "`+ c #7A7260", " @ c #929FBE", ".@ c #96A3C3", "+@ c #9AA6C7", "@@ c #9BA7C8", "#@ c #9FAACA", "$@ c #98A3C4", "%@ c #8993B2", "&@ c #8189A6", "*@ c #8088A3", "=@ c #787F97", "-@ c #6B7289", ";@ c #5D6479", ">@ c #8F8D8A", ",@ c #908C85", "'@ c #414453", ")@ c #383A47", "!@ c #2E313C", "~@ c #25262F", "{@ c #1E1F26", "]@ c #1A1B21", "^@ c #8089A6", "/@ c #8C96B3", "(@ c #909AB9", "_@ c #8B95B3", ":@ c #8892B0", "<@ c #868FAD", "[@ c #7A84A1", "}@ c #78819E", "|@ c #747C99", "1@ c #6A728C", "2@ c #5D647B", "3@ c #52566A", "4@ c #4B4F60", "5@ c #424554", "6@ c #3D3F4E", "7@ c #393C48", "8@ c #676562", "9@ c #383735", "0@ c #101116", "a@ c #5E667D", "b@ c #61687E", "c@ c #61687F", "d@ c #596177", "e@ c #53596E", "f@ c #4E5366", "g@ c #494E5F", "h@ c #444857", "i@ c #3F4352", "j@ c #333643", "k@ c #282B36", "l@ c #252730", "m@ c #2D3039", "n@ c #1E2027", "o@ c #08090C", "p@ c #414757", "q@ c #454A5B", "r@ c #404555", "s@ c #393E4C", "t@ c #292C35", "u@ c #191A20", "v@ c #202129", "w@ c #16171D", "x@ c #262931", " ", " ", " ", " ", " ", " . + @ # $ # % & ", " * = = - ; > , ' ) ! ", " ~ { ] ^ ^ / ( _ : < [ } | 1 2 ", " 3 4 5 6 7 8 9 0 a b c d e f g h i j ", " k l m n o p q r s t u v w x y z > _ A 1 B ", " ] C k D E F x G H I J K L M N O P Q R S T U V W X Y ", " Z ` ...+.@.#.$.%.&.*.=.w -.;.>.O z ,.'.).e T !.9 ~.{. ", " ].^./.(.X ' _.:.<.[._.}.|.1.2.3.(.8 4.5.R 6.> 4.U A 7.8.9. ", " 0.a.b.c.f d.-.I e.-.L f.f._.#.-.3.c.g.Q p w y w T V 1 h.i. ", " j.k.) w 4.>.l.3.m.n.-.o.p.q.q._.I r.w s.O t t '.Q t.W u.v.w. ", " x.y.,.z r.5.z.3.A.L B.C.D.}.|._.A.'.>.[ E.E.t 4.t.9 X F.G. ", " H.I.F.!.J.r.K.L.A.I B._.M.}.N.|.B.v O.P.t O w 6.Q.R.S.T.U. ", " V.W.X.!.w p s.-.I B.s A.Y.}.*.1.L ;.L.t ,.( a.Z.`. +.+ ", " ++@+#+6.r.$+n.Y.B.s _.%+D.q.I o.p &+*+=+-+k ;+>+ ", " ,+'+)+e t b.E.2.Y.B.B.s I !+'.~+{+]+$ ^+/+ ", " (+@+V Q >.O.-.-.-.z.R _+:+<+[+^+}+ ", " |+1+J 2+r.z.3+4+5+6+7+8+ +9+0+ ", " a+b+V !.c+d+e+f+g+9+j. ", " h+$ } i+<+j+k+l+ m+n+o+p+q+r+s+t+ ", " u+v+w+/+ x+y+z+A+B+C+D+E+F+G+H+I+J+ ", " K+L+L+M+N+O+P+Q+R+S+T+U+V+W+X+Y+Z+`+ ", " @.@+@@@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@]@0+ ", " ^@/@(@_@:@<@[@}@|@1@2@3@4@5@6@7@8@9@0@ ", " a@b@c@d@e@f@g@h@i@j@k@l@!@m@n@o@ ", " p@q@q@r@s@t@u@ ", " v@w@x@ ", " "}; debian/copyright0000644000000000000000000000303512114323127011116 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0 Upstream-Name: dlume Upstream-Contact: None (no valid mail addresses) Source: http://www.freebsd.org/cgi/cvsweb.cgi/ports/deskutils/dlume Comment: Dead upstream. As of 2013-03-02, these URLs no longer contain sources: http://clay.ll.pl/dlume (domain ll.pl is for sale) http://freshmeat.net/projects/dlume (removed) Files: * Copyright: 2003-2004 Tomasz Maka (project lead) 2003-2004 Maja Kocon 2003-2004 Piotr Maka Comment: Upstream addresses are no longer valid. License: GPL-2+ Files: debian/* Copyright: 2007-2013 Jari Aalto 2006 Michael Ablassmeier 2004-2006 David Moreno Garza License: GPL-2+ License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License can be found in "/usr/share/common-licenses/GPL-2". debian/control0000644000000000000000000000155712114323127010575 0ustar Source: dlume Section: utils Priority: optional Maintainer: Jari Aalto Build-Depends: debhelper (>= 9), autotools-dev, automake, pkg-config, libgtk2.0-dev, libxml2-dev Standards-Version: 3.9.4 Vcs-Browser: http://git.debian.org/?p=collab-maint/dlume.git Vcs-Git: git://git.debian.org/git/collab-maint/dlume.git Homepage: http://www.freebsd.org/cgi/cvsweb.cgi/ports/deskutils/dlume Package: dlume Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Description: simple and easy to use addressbook (GTK+) Dlume is a simple, gtk2-based addressbook. You can easily add, edit and delete records to/from an XML-format database. The Quick-search feature allows you find required entry in comfortable way. Export to CSV and HTML formats is also available. Interface design was borrowed and improved from Paddress .