Commit 854cefe2 authored by Paolo Borelli's avatar Paolo Borelli

update from egg

parent c0793c7e
2006-01-30 Paolo Borelli <pborelli@katamail.com>
* gedit/recent-files/*: sync with libegg.
2006-01-29 Steve Frécinaux <steve@istique.net>
* gedit/gedit-view.c: hide cursor when interactive search is active
......
......@@ -46,6 +46,11 @@
#define EGG_RECENT_MODEL_TIMEOUT_LENGTH 200
#define EGG_RECENT_MODEL_POLL_TIME 3
/* needed for Darwin */
#if !HAVE_DECL_LOCKF
int lockf (int filedes, int function, off_t size);
#endif
#define EGG_RECENT_MODEL_KEY_DIR "/desktop/gnome/recent_files"
#define EGG_RECENT_MODEL_DEFAULT_LIMIT_KEY EGG_RECENT_MODEL_KEY_DIR "/default_limit"
#define EGG_RECENT_MODEL_EXPIRE_KEY EGG_RECENT_MODEL_KEY_DIR "/expire"
......@@ -996,7 +1001,7 @@ egg_recent_model_open_file (EggRecentModel *model,
static gboolean
egg_recent_model_lock_file (FILE *file)
{
#ifdef F_TLOCK
#ifdef HAVE_LOCKF
int fd;
gint try = 5;
......@@ -1028,13 +1033,13 @@ egg_recent_model_lock_file (FILE *file)
return FALSE;
#else
return TRUE;
#endif
#endif /* HAVE_LOCKF */
}
static gboolean
egg_recent_model_unlock_file (FILE *file)
{
#ifdef F_TLOCK
#ifdef HAVE_LOCKF
int fd;
rewind (file);
......@@ -1043,7 +1048,7 @@ egg_recent_model_unlock_file (FILE *file)
return (lockf (fd, F_ULOCK, 0) == 0) ? TRUE : FALSE;
#else
return TRUE;
#endif
#endif /* HAVE_LOCKF */
}
static void
......
......@@ -371,14 +371,16 @@ egg_recent_view_gtk_add_to_menu (EggRecentViewGtk *view,
menu_offset = egg_recent_view_gtk_find_menu_offset (view);
if (item != NULL) {
if (item) {
menu_item = egg_recent_view_gtk_new_menu_item (view, item, display);
if (!menu_item)
return;
/* if present, use the custom tooltip function;
* otherwise, use ours (which has been "borrowed"
* from GEdit)
*/
if (view->tooltip_func != NULL) {
if (view->tooltip_func) {
view->tooltip_func (view->tooltips,
menu_item,
item,
......
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/**
/*
* 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 2 of the
......@@ -832,14 +832,6 @@ egg_recent_view_uimanager_new (GtkUIManager *uimanager,
return EGG_RECENT_VIEW_UIMANAGER (view);
}
/**
* egg_recent_view_uimanager_get_type:
* @:
*
* This returns a GType representing a EggRecentViewUIManager object.
*
* Returns: a GType
*/
GType
egg_recent_view_uimanager_get_type (void)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment