[Xfce4-commits] [apps/xfce4-screensaver] 151/425: Remove some old code after GLIB and GTK2 minimum version bump

noreply at xfce.org noreply at xfce.org
Mon Oct 15 01:49:58 CEST 2018


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-screensaver.

commit c3291dc17754e015c8994352fba2d8c7a5db6ef9
Author: Stefano Karapetsas <stefano at karapetsas.com>
Date:   Wed Jul 2 16:46:26 2014 +0200

    Remove some old code after GLIB and GTK2 minimum version bump
---
 src/gs-listener-dbus.c             | 25 +------------------------
 src/mate-screensaver-command.c     |  4 ----
 src/mate-screensaver-dialog.c      | 11 -----------
 src/mate-screensaver-gl-helper.c   |  2 --
 src/mate-screensaver-preferences.c |  2 --
 5 files changed, 1 insertion(+), 43 deletions(-)

diff --git a/src/gs-listener-dbus.c b/src/gs-listener-dbus.c
index dcccc33..7f4acaa 100644
--- a/src/gs-listener-dbus.c
+++ b/src/gs-listener-dbus.c
@@ -834,29 +834,6 @@ out:
 	return removed;
 }
 
-#if GLIB_CHECK_VERSION(2,12,0)
-#define _g_time_val_to_iso8601(t) g_time_val_to_iso8601(t)
-#else
-/* copied from GLib */
-static gchar *
-_g_time_val_to_iso8601 (GTimeVal *time_)
-{
-	gchar *retval;
-
-	g_return_val_if_fail (time_->tv_usec >= 0 && time_->tv_usec < G_USEC_PER_SEC, NULL);
-
-#define ISO_8601_LEN    21
-#define ISO_8601_FORMAT "%Y-%m-%dT%H:%M:%SZ"
-	retval = g_new0 (gchar, ISO_8601_LEN + 1);
-
-	strftime (retval, ISO_8601_LEN,
-	          ISO_8601_FORMAT,
-	          gmtime (&(time_->tv_sec)));
-
-	return retval;
-}
-#endif
-
 static void
 accumulate_ref_entry (gpointer            key,
                       GSListenerRefEntry *entry,
@@ -865,7 +842,7 @@ accumulate_ref_entry (gpointer            key,
 	char *description;
 	char *time;
 
-	time = _g_time_val_to_iso8601 (&entry->since);
+	time = g_time_val_to_iso8601 (&entry->since);
 
 	description = g_strdup_printf ("Application=\"%s\"; Since=\"%s\"; Reason=\"%s\";",
 	                               entry->application,
diff --git a/src/mate-screensaver-command.c b/src/mate-screensaver-command.c
index a87ea55..d4f7657 100644
--- a/src/mate-screensaver-command.c
+++ b/src/mate-screensaver-command.c
@@ -499,10 +499,6 @@ main (int    argc,
 	textdomain (GETTEXT_PACKAGE);
 #endif
 
-#if !GLIB_CHECK_VERSION (2, 36, 0)
-	g_type_init ();
-#endif
-
 	g_set_prgname (argv[0]);
 
 	if (setlocale (LC_ALL, "") == NULL)
diff --git a/src/mate-screensaver-dialog.c b/src/mate-screensaver-dialog.c
index 28e5ff8..79be649 100644
--- a/src/mate-screensaver-dialog.c
+++ b/src/mate-screensaver-dialog.c
@@ -560,17 +560,6 @@ int main(int argc, char** argv)
 		textdomain(GETTEXT_PACKAGE);
 	#endif
 
-#if !GLIB_CHECK_VERSION (2, 32, 0)
-	if (!g_thread_supported())
-	{
-		g_thread_init(NULL);
-	}
-#endif
-
-#if !GLIB_CHECK_VERSION (2, 36, 0)
-	g_type_init();
-#endif
-
 	gs_profile_start(NULL);
 
 	if (!privileged_initialization(&argc, argv, verbose))
diff --git a/src/mate-screensaver-gl-helper.c b/src/mate-screensaver-gl-helper.c
index 814c79f..acf23ef 100644
--- a/src/mate-screensaver-gl-helper.c
+++ b/src/mate-screensaver-gl-helper.c
@@ -48,8 +48,6 @@ main (int    argc,
 	textdomain (GETTEXT_PACKAGE);
 #endif
 
-	g_type_init ();
-
 	g_set_prgname (argv[0]);
 	if (! gtk_init_with_args (&argc, &argv, NULL, NULL, NULL, &error))
 	{
diff --git a/src/mate-screensaver-preferences.c b/src/mate-screensaver-preferences.c
index 8259ab4..02ae11d 100644
--- a/src/mate-screensaver-preferences.c
+++ b/src/mate-screensaver-preferences.c
@@ -694,9 +694,7 @@ setup_treeview (GtkWidget *tree,
 
 	g_object_unref (store);
 
-#if GTK_CHECK_VERSION(2,10,0)
 	g_object_set (tree, "show-expanders", FALSE, NULL);
-#endif
 
 	renderer = gtk_cell_renderer_text_new ();
 	column = gtk_tree_view_column_new_with_attributes ("Name", renderer,

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list