diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2007-10-26 15:29:32 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@src.gnome.org> | 2007-10-26 15:29:32 (GMT) |
commit | f75f5694d713ead3d2942127ad0dfeb7259a0357 (patch) | |
tree | 038a48e5fede4b57e0e7d49f849fc9929d605142 /cut-n-paste/recent-files/egg-recent-util.c | |
parent | f7e355c8f2621f8026a9461a25ee4e1d60b28bb7 (diff) |
Removed
2007-10-26 Carlos Garcia Campos <carlosgc@gnome.org>
* configure.ac:
* cut-n-paste/Makefile.am:
* cut-n-paste/recent-files/*: Removed
* help/reference/Makefile.am:
* shell/Makefile.am:
* shell/ev-application.[ch]: (ev_application_shutdown),
(ev_application_init):
* shell/ev-window.c: (ev_window_add_recent),
(ev_window_setup_recent), (ev_window_dispose), (ev_window_init):
Bump requirements to gtk+ 2.10.0 and remove egg-recent code.
svn path=/trunk/; revision=2722
Diffstat (limited to 'cut-n-paste/recent-files/egg-recent-util.c')
-rw-r--r-- | cut-n-paste/recent-files/egg-recent-util.c | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/cut-n-paste/recent-files/egg-recent-util.c b/cut-n-paste/recent-files/egg-recent-util.c deleted file mode 100644 index 4597f03..0000000 --- a/cut-n-paste/recent-files/egg-recent-util.c +++ /dev/null @@ -1,102 +0,0 @@ -#include <config.h> -#include <stdio.h> -#include <string.h> -#include <gtk/gtk.h> -#ifndef USE_STABLE_LIBGNOMEUI -#include <libgnomeui/gnome-icon-lookup.h> -#endif -#include <time.h> -#include <unistd.h> -#include <sys/types.h> -#include <math.h> -#include "egg-recent-util.h" - -#ifdef G_OS_WIN32 -#include <windows.h> -#endif - -#define EGG_RECENT_UTIL_HOSTNAME_SIZE 512 - -/* ripped out of gedit2 */ -gchar* -egg_recent_util_escape_underlines (const gchar* text) -{ - GString *str; - gint length; - const gchar *p; - const gchar *end; - - g_return_val_if_fail (text != NULL, NULL); - - length = strlen (text); - - str = g_string_new (""); - - p = text; - end = text + length; - - while (p != end) - { - const gchar *next; - next = g_utf8_next_char (p); - - switch (*p) - { - case '_': - g_string_append (str, "__"); - break; - default: - g_string_append_len (str, p, next - p); - break; - } - - p = next; - } - - return g_string_free (str, FALSE); -} - -GdkPixbuf * -egg_recent_util_get_icon (GtkIconTheme *theme, const gchar *uri, - const gchar *mime_type, int size) -{ -#ifndef USE_STABLE_LIBGNOMEUI - gchar *icon; - GdkPixbuf *pixbuf; - - icon = gnome_icon_lookup (theme, NULL, uri, NULL, NULL, - mime_type, 0, NULL); - - g_return_val_if_fail (icon != NULL, NULL); - - pixbuf = gtk_icon_theme_load_icon (theme, icon, size, 0, NULL); - g_free (icon); - - return pixbuf; -#endif - return NULL; -} - -gchar * -egg_recent_util_get_unique_id (void) -{ - char hostname[EGG_RECENT_UTIL_HOSTNAME_SIZE]; - time_t the_time; - guint32 rand; - int pid; - -#ifndef G_OS_WIN32 - gethostname (hostname, EGG_RECENT_UTIL_HOSTNAME_SIZE); -#else - { - DWORD size = EGG_RECENT_UTIL_HOSTNAME_SIZE; - GetComputerName (hostname, &size); - } -#endif - - time (&the_time); - rand = g_random_int (); - pid = getpid (); - - return g_strdup_printf ("%s-%d-%d-%d", hostname, (int)time, (int)rand, (int)pid); -} |