diff options
| author | rbuj <[email protected]> | 2021-11-23 13:48:00 +0100 | 
|---|---|---|
| committer | Victor Kareh <[email protected]> | 2022-07-18 08:31:26 -0400 | 
| commit | 5a89697d32317b45c70a15ce0e6c67ebced75251 (patch) | |
| tree | 6b83415793135f5afc18ca57b82022bcadd37405 | |
| parent | e81e15ed093783d496b5165bfacc021b5392020c (diff) | |
| download | mate-terminal-5a89697d32317b45c70a15ce0e6c67ebced75251.tar.bz2 mate-terminal-5a89697d32317b45c70a15ce0e6c67ebced75251.tar.xz | |
Remove time.h
| -rw-r--r-- | src/terminal-app.c | 1 | ||||
| -rw-r--r-- | src/terminal-util.c | 4 | ||||
| -rw-r--r-- | src/terminal-window.c | 7 | ||||
| -rw-r--r-- | src/terminal.c | 4 | 
4 files changed, 9 insertions, 7 deletions
| diff --git a/src/terminal-app.c b/src/terminal-app.c index 8c938a9..d54da49 100644 --- a/src/terminal-app.c +++ b/src/terminal-app.c @@ -40,7 +40,6 @@  #include "terminal-encoding.h"  #include <string.h>  #include <stdlib.h> -#include <time.h>  #ifdef HAVE_SMCLIENT  #include "eggsmclient.h" diff --git a/src/terminal-util.c b/src/terminal-util.c index ce97f41..3ef9040 100644 --- a/src/terminal-util.c +++ b/src/terminal-util.c @@ -24,7 +24,6 @@  #include <string.h>  #include <stdlib.h> -#include <time.h>  #include <unistd.h>  #include <sys/types.h> @@ -49,7 +48,8 @@ terminal_util_set_unique_role (GtkWindow *window, const char *prefix)  {  	char *role; -	role = g_strdup_printf ("%s-%d-%d-%d", prefix, getpid (), g_random_int (), (int) time (NULL)); +	role = g_strdup_printf ("%s-%d-%d-%" G_GINT64_FORMAT, prefix, getpid (), g_random_int (), +	                        g_get_real_time () / G_USEC_PER_SEC);  	gtk_window_set_role (window, role);  	g_free (role);  } diff --git a/src/terminal-window.c b/src/terminal-window.c index c690dd2..0d3d1e9 100644 --- a/src/terminal-window.c +++ b/src/terminal-window.c @@ -106,7 +106,10 @@ struct _TerminalWindowPrivate      guint disposed : 1;      guint present_on_insert : 1; -    time_t focus_time; +    /* Workaround until gtk+ bug #535557 is fixed */ +    guint icon_title_set : 1; + +    gint64 focus_time;      /* should we copy selection to clibpoard */      int copy_selection; @@ -2430,7 +2433,7 @@ terminal_window_focus_in_event (GtkWidget *widget,    TerminalWindowPrivate *priv = window->priv;    if (event->in) -    priv->focus_time = time(NULL); +    priv->focus_time = g_get_real_time () / G_USEC_PER_SEC;    return FALSE;  } diff --git a/src/terminal.c b/src/terminal.c index 0be68cf..b4efd39 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -25,7 +25,6 @@  #include <errno.h>  #include <locale.h>  #include <stdlib.h> -#include <time.h>  #include <unistd.h>  #include <glib.h> @@ -525,7 +524,8 @@ main (int argc, char **argv)  	if (options->startup_id == NULL)  	{ -		options->startup_id = g_strdup_printf ("_TIME%lu", g_get_monotonic_time () / 1000); +		options->startup_id = g_strdup_printf ("_TIME%" G_GINT64_FORMAT, +		                                       g_get_monotonic_time () / 1000);  	}  	gdk_init (&argc, &argv); | 
