From 085060df2c2d327b9d56b805b0a196ee80951e01 Mon Sep 17 00:00:00 2001
From: Emmanuel Milou <manu@manu-eeepc.(none)>
Date: Sun, 7 Jun 2009 10:22:54 -0400
Subject: [PATCH] [#1214] Do not need timestamp files anymore

---
 sflphone-client-gnome/src/Makefile.am         |  3 +-
 sflphone-client-gnome/src/contacts/calltree.h |  1 -
 sflphone-client-gnome/src/timestamp.c         | 69 -------------------
 sflphone-client-gnome/src/timestamp.h         | 40 -----------
 4 files changed, 1 insertion(+), 112 deletions(-)
 delete mode 100644 sflphone-client-gnome/src/timestamp.c
 delete mode 100644 sflphone-client-gnome/src/timestamp.h

diff --git a/sflphone-client-gnome/src/Makefile.am b/sflphone-client-gnome/src/Makefile.am
index e8132a273d..b32b86fac2 100644
--- a/sflphone-client-gnome/src/Makefile.am
+++ b/sflphone-client-gnome/src/Makefile.am
@@ -24,11 +24,10 @@ sflphone_client_gnome_SOURCES = \
   sliders.c \
   statusicon.c \
   codeclist.c \
-  timestamp.c \
   reqaccount.c
 
 noinst_HEADERS =  actions.h sflnotify.h mainwindow.h dialpad.h codeclist.h \
-                  assistant.h timestamp.h reqaccount.h errors.h sflphone_const.h \
+                  assistant.h reqaccount.h errors.h sflphone_const.h \
                   menus.h accountlist.h sliders.h statusicon.h callable_obj.h toolbar.h
 
 
diff --git a/sflphone-client-gnome/src/contacts/calltree.h b/sflphone-client-gnome/src/contacts/calltree.h
index 0df870543d..8626de319f 100644
--- a/sflphone-client-gnome/src/contacts/calltree.h
+++ b/sflphone-client-gnome/src/contacts/calltree.h
@@ -22,7 +22,6 @@
 
 #include <gtk/gtk.h>
 #include <calltab.h>
-#include <timestamp.h>
 #include <mainwindow.h>
 
 /** @file calltree.h
diff --git a/sflphone-client-gnome/src/timestamp.c b/sflphone-client-gnome/src/timestamp.c
deleted file mode 100644
index 35e2545ac4..0000000000
--- a/sflphone-client-gnome/src/timestamp.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- *  Copyright (C) 2008 Savoir-Faire Linux inc.
- *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
- *
- *  This program 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 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program 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, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <timestamp.h>
-
-
-  gchar*
-timestamp_get_call_date( void )
-{
-    struct tm* ptr;
-    time_t lt;
-    unsigned char str[100];
-
-    time(&lt);
-    ptr = gmtime(&lt);
-
-    // result function of the current locale
-    strftime((char *)str, 100, "%c",
-                               (const struct tm *)ptr);
-    return g_markup_printf_escaped("\n%s\n" , str);
-}
-
-  gchar*
-process_call_duration( callable_obj_t* c )
-{
-    /*
-  gchar * res;
-  DEBUG("Start = %i - Stop = %i  - Call duration = %i", (int)c->_start , (int)c->_stop , (int)(c->_stop - c->_start));
-
-  if( c->history_state == MISSED && c->_stop == 0 )
-    return g_markup_printf_escaped(_("<small>Missed call</small>"));
-
-  int duration = c->_stop - c->_start;
-
-  if( duration / 60 == 0 )
-  {
-    if( duration < 10 )
-      res = g_markup_printf_escaped("00:0%i", duration);
-    else
-      res = g_markup_printf_escaped("00:%i", duration);
-  }
-  else
-  {
-    if( duration%60 < 10 )
-      res = g_markup_printf_escaped("%i:0%i" , duration/60 , duration%60);
-    else
-      res = g_markup_printf_escaped("%i:%i" , duration/60 , duration%60);
-  }
-  return g_markup_printf_escaped(_("<small>Duration:</small> %s"), res);
-    */
-    return "toto";
-}
-
diff --git a/sflphone-client-gnome/src/timestamp.h b/sflphone-client-gnome/src/timestamp.h
deleted file mode 100644
index b8dc6e0648..0000000000
--- a/sflphone-client-gnome/src/timestamp.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *  Copyright (C) 2008 Savoir-Faire Linux inc.
- *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
- *                                                                              
- *  This program 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 3 of the License, or
- *  (at your option) any later version.
- *                                                                                
- *  This program 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, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-
-#ifndef __TIMESTAMP_H__
-#define __TIMESTAMP_H__
-
-/** @file timestamp.h
-  * @brief Introduces time notion in SFLphone, like call duration, call time, etc...
-  * Useful for the history
-  */
-
-#include <time.h>
-#include <gtk/gtk.h>
-
-#include <calllist.h>
-#include <callable_obj.h>
-#include <sflphone_const.h>
-
-gchar* timestamp_get_call_date( void );
-
-gchar* process_call_duration( callable_obj_t* c );
-
-#endif
-- 
GitLab