mirror of https://github.com/GNOME/gimp.git
app/main.c Wrapped the 'plugin_domains' definition and initialization and
1999-12-07 Michael Natterer <mitch@gimp.org> * app/main.c * app/menus.c: Wrapped the 'plugin_domains' definition and initialization and menu_translate() with '#ifdef ENABLE_NLS'. * app/palette.c: Removed another trailing comma from an enum. * app/tile_cache.c (tile_idle_thread): Changed tile->swap to tile->swap_offset because tile->swap doesn't exist. Note that I don't understand at all what's going on there. I commited this because (1) this way it compiles and (2) it at least _looks_ like the right thing to do. Garry, could you check this please?
This commit is contained in:
parent
b269824e10
commit
661cbb9d0f
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
|||
1999-12-07 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/main.c
|
||||
* app/menus.c: Wrapped the 'plugin_domains' definition and
|
||||
initialization and menu_translate() with '#ifdef ENABLE_NLS'.
|
||||
|
||||
* app/palette.c: Removed another trailing comma from an enum.
|
||||
|
||||
* app/tile_cache.c (tile_idle_thread): Changed tile->swap to
|
||||
tile->swap_offset because tile->swap doesn't exist. Note that I
|
||||
don't understand at all what's going on there. I commited this
|
||||
because (1) this way it compiles and (2) it at least _looks_ like
|
||||
the right thing to do. Garry, could you check this please?
|
||||
|
||||
Tue Dec 7 15:04:11 CET 1999 Stanislav Brabec <utx@penguin.cz>
|
||||
|
||||
* tips/gimp_tips.cs.txt: Added translation.
|
||||
|
|
|
@ -272,53 +272,55 @@ tile_idle_thread (void *data)
|
|||
TileList *list;
|
||||
int count;
|
||||
|
||||
fprintf (stderr,_("starting tile preswapper\n"));
|
||||
fprintf (stderr, "starting tile preswapper\n");
|
||||
|
||||
count = 0;
|
||||
while(1)
|
||||
while (1)
|
||||
{
|
||||
CACHE_LOCK;
|
||||
if (count > 5 || dirty_list.first == NULL) {
|
||||
CACHE_UNLOCK;
|
||||
count = 0;
|
||||
pthread_mutex_lock(&dirty_mutex);
|
||||
pthread_cond_wait(&dirty_signal,&dirty_mutex);
|
||||
pthread_mutex_unlock(&dirty_mutex);
|
||||
CACHE_LOCK;
|
||||
}
|
||||
if (count > 5 || dirty_list.first == NULL)
|
||||
{
|
||||
CACHE_UNLOCK;
|
||||
count = 0;
|
||||
pthread_mutex_lock (&dirty_mutex);
|
||||
pthread_cond_wait (&dirty_signal, &dirty_mutex);
|
||||
pthread_mutex_unlock (&dirty_mutex);
|
||||
CACHE_LOCK;
|
||||
}
|
||||
|
||||
if ((tile = dirty_list.first))
|
||||
{
|
||||
CACHE_UNLOCK;
|
||||
TILE_MUTEX_LOCK (tile);
|
||||
CACHE_LOCK;
|
||||
|
||||
if (tile->dirty || tile->swap == -1)
|
||||
if (tile->dirty || tile->swap_offset == -1)
|
||||
{
|
||||
list = tile->listhead;
|
||||
|
||||
|
||||
if (list == &dirty_list) cur_cache_dirty -= tile_size (tile);
|
||||
|
||||
|
||||
if (tile->next)
|
||||
tile->next->prev = tile->prev;
|
||||
else
|
||||
list->last = tile->prev;
|
||||
|
||||
|
||||
if (tile->prev)
|
||||
tile->prev->next = tile->next;
|
||||
else
|
||||
list->first = tile->next;
|
||||
|
||||
|
||||
tile->next = NULL;
|
||||
tile->prev = clean_list.last;
|
||||
tile->listhead = &clean_list;
|
||||
|
||||
|
||||
if (clean_list.last) clean_list.last->next = tile;
|
||||
else clean_list.first = tile;
|
||||
clean_list.last = tile;
|
||||
|
||||
CACHE_UNLOCK;
|
||||
|
||||
tile_swap_out(tile);
|
||||
tile_swap_out (tile);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -54,8 +54,14 @@ static void menus_create_items (GtkItemFactory *item_factory,
|
|||
gpointer callback_data,
|
||||
guint callback_type);
|
||||
static void menus_init (void);
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
static gchar *menu_translate (const gchar *path,
|
||||
gpointer data);
|
||||
#else
|
||||
#define menu_translate NULL
|
||||
#endif
|
||||
|
||||
static void tearoff_cmd_callback (GtkWidget *widget,
|
||||
gpointer callback_data,
|
||||
guint callback_action);
|
||||
|
@ -64,6 +70,8 @@ static void help_debug_cmd_callback (GtkWidget *widget,
|
|||
gpointer callback_data,
|
||||
guint callback_action);
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
|
||||
/* from main.c */
|
||||
extern gchar *plugin_domains[];
|
||||
extern gint n_plugin_domains;
|
||||
|
@ -110,6 +118,8 @@ static gchar G_GNUC_UNUSED *dummy_entries[] =
|
|||
N_("/Video/Encode")
|
||||
};
|
||||
|
||||
#endif /* ENABLE_NLS */
|
||||
|
||||
static GSList *last_opened_raw_filenames = NULL;
|
||||
|
||||
/***** <Toolbox> *****/
|
||||
|
@ -1707,6 +1717,8 @@ menus_init (void)
|
|||
g_free (filename);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
|
||||
static gchar *
|
||||
menu_translate (const gchar *path,
|
||||
gpointer data)
|
||||
|
@ -1744,6 +1756,8 @@ menu_translate (const gchar *path,
|
|||
return retval;
|
||||
}
|
||||
|
||||
#endif /* ENABLE_NLS */
|
||||
|
||||
static gint
|
||||
tearoff_delete_cb (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
|
|
|
@ -74,7 +74,7 @@ typedef enum
|
|||
{
|
||||
GRAD_IMPORT = 0,
|
||||
IMAGE_IMPORT = 1,
|
||||
INDEXED_IMPORT = 2,
|
||||
INDEXED_IMPORT = 2
|
||||
} ImportType;
|
||||
|
||||
typedef struct _ImportDialog ImportDialog;
|
||||
|
|
|
@ -78,10 +78,12 @@ gchar *alternate_gimprc;
|
|||
gchar *alternate_system_gimprc;
|
||||
gchar **batch_cmds;
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
gchar *plugin_domains[] = { "gimp-std-plugins",
|
||||
"gimp-perl" };
|
||||
gint n_plugin_domains = (sizeof (plugin_domains) /
|
||||
sizeof (plugin_domains[0]));
|
||||
#endif
|
||||
|
||||
/* LOCAL data */
|
||||
static gint gimp_argc;
|
||||
|
@ -127,8 +129,10 @@ main (int argc, char **argv)
|
|||
|
||||
INIT_LOCALE ("gimp");
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
for (i = 0; i < n_plugin_domains; i++)
|
||||
bindtextdomain (plugin_domains[i], LOCALEDIR);
|
||||
#endif
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
|
|
14
app/menus.c
14
app/menus.c
|
@ -54,8 +54,14 @@ static void menus_create_items (GtkItemFactory *item_factory,
|
|||
gpointer callback_data,
|
||||
guint callback_type);
|
||||
static void menus_init (void);
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
static gchar *menu_translate (const gchar *path,
|
||||
gpointer data);
|
||||
#else
|
||||
#define menu_translate NULL
|
||||
#endif
|
||||
|
||||
static void tearoff_cmd_callback (GtkWidget *widget,
|
||||
gpointer callback_data,
|
||||
guint callback_action);
|
||||
|
@ -64,6 +70,8 @@ static void help_debug_cmd_callback (GtkWidget *widget,
|
|||
gpointer callback_data,
|
||||
guint callback_action);
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
|
||||
/* from main.c */
|
||||
extern gchar *plugin_domains[];
|
||||
extern gint n_plugin_domains;
|
||||
|
@ -110,6 +118,8 @@ static gchar G_GNUC_UNUSED *dummy_entries[] =
|
|||
N_("/Video/Encode")
|
||||
};
|
||||
|
||||
#endif /* ENABLE_NLS */
|
||||
|
||||
static GSList *last_opened_raw_filenames = NULL;
|
||||
|
||||
/***** <Toolbox> *****/
|
||||
|
@ -1707,6 +1717,8 @@ menus_init (void)
|
|||
g_free (filename);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
|
||||
static gchar *
|
||||
menu_translate (const gchar *path,
|
||||
gpointer data)
|
||||
|
@ -1744,6 +1756,8 @@ menu_translate (const gchar *path,
|
|||
return retval;
|
||||
}
|
||||
|
||||
#endif /* ENABLE_NLS */
|
||||
|
||||
static gint
|
||||
tearoff_delete_cb (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
|
|
|
@ -54,8 +54,14 @@ static void menus_create_items (GtkItemFactory *item_factory,
|
|||
gpointer callback_data,
|
||||
guint callback_type);
|
||||
static void menus_init (void);
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
static gchar *menu_translate (const gchar *path,
|
||||
gpointer data);
|
||||
#else
|
||||
#define menu_translate NULL
|
||||
#endif
|
||||
|
||||
static void tearoff_cmd_callback (GtkWidget *widget,
|
||||
gpointer callback_data,
|
||||
guint callback_action);
|
||||
|
@ -64,6 +70,8 @@ static void help_debug_cmd_callback (GtkWidget *widget,
|
|||
gpointer callback_data,
|
||||
guint callback_action);
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
|
||||
/* from main.c */
|
||||
extern gchar *plugin_domains[];
|
||||
extern gint n_plugin_domains;
|
||||
|
@ -110,6 +118,8 @@ static gchar G_GNUC_UNUSED *dummy_entries[] =
|
|||
N_("/Video/Encode")
|
||||
};
|
||||
|
||||
#endif /* ENABLE_NLS */
|
||||
|
||||
static GSList *last_opened_raw_filenames = NULL;
|
||||
|
||||
/***** <Toolbox> *****/
|
||||
|
@ -1707,6 +1717,8 @@ menus_init (void)
|
|||
g_free (filename);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
|
||||
static gchar *
|
||||
menu_translate (const gchar *path,
|
||||
gpointer data)
|
||||
|
@ -1744,6 +1756,8 @@ menu_translate (const gchar *path,
|
|||
return retval;
|
||||
}
|
||||
|
||||
#endif /* ENABLE_NLS */
|
||||
|
||||
static gint
|
||||
tearoff_delete_cb (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
|
|
|
@ -74,7 +74,7 @@ typedef enum
|
|||
{
|
||||
GRAD_IMPORT = 0,
|
||||
IMAGE_IMPORT = 1,
|
||||
INDEXED_IMPORT = 2,
|
||||
INDEXED_IMPORT = 2
|
||||
} ImportType;
|
||||
|
||||
typedef struct _ImportDialog ImportDialog;
|
||||
|
|
|
@ -272,53 +272,55 @@ tile_idle_thread (void *data)
|
|||
TileList *list;
|
||||
int count;
|
||||
|
||||
fprintf (stderr,_("starting tile preswapper\n"));
|
||||
fprintf (stderr, "starting tile preswapper\n");
|
||||
|
||||
count = 0;
|
||||
while(1)
|
||||
while (1)
|
||||
{
|
||||
CACHE_LOCK;
|
||||
if (count > 5 || dirty_list.first == NULL) {
|
||||
CACHE_UNLOCK;
|
||||
count = 0;
|
||||
pthread_mutex_lock(&dirty_mutex);
|
||||
pthread_cond_wait(&dirty_signal,&dirty_mutex);
|
||||
pthread_mutex_unlock(&dirty_mutex);
|
||||
CACHE_LOCK;
|
||||
}
|
||||
if (count > 5 || dirty_list.first == NULL)
|
||||
{
|
||||
CACHE_UNLOCK;
|
||||
count = 0;
|
||||
pthread_mutex_lock (&dirty_mutex);
|
||||
pthread_cond_wait (&dirty_signal, &dirty_mutex);
|
||||
pthread_mutex_unlock (&dirty_mutex);
|
||||
CACHE_LOCK;
|
||||
}
|
||||
|
||||
if ((tile = dirty_list.first))
|
||||
{
|
||||
CACHE_UNLOCK;
|
||||
TILE_MUTEX_LOCK (tile);
|
||||
CACHE_LOCK;
|
||||
|
||||
if (tile->dirty || tile->swap == -1)
|
||||
if (tile->dirty || tile->swap_offset == -1)
|
||||
{
|
||||
list = tile->listhead;
|
||||
|
||||
|
||||
if (list == &dirty_list) cur_cache_dirty -= tile_size (tile);
|
||||
|
||||
|
||||
if (tile->next)
|
||||
tile->next->prev = tile->prev;
|
||||
else
|
||||
list->last = tile->prev;
|
||||
|
||||
|
||||
if (tile->prev)
|
||||
tile->prev->next = tile->next;
|
||||
else
|
||||
list->first = tile->next;
|
||||
|
||||
|
||||
tile->next = NULL;
|
||||
tile->prev = clean_list.last;
|
||||
tile->listhead = &clean_list;
|
||||
|
||||
|
||||
if (clean_list.last) clean_list.last->next = tile;
|
||||
else clean_list.first = tile;
|
||||
clean_list.last = tile;
|
||||
|
||||
CACHE_UNLOCK;
|
||||
|
||||
tile_swap_out(tile);
|
||||
tile_swap_out (tile);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -54,8 +54,14 @@ static void menus_create_items (GtkItemFactory *item_factory,
|
|||
gpointer callback_data,
|
||||
guint callback_type);
|
||||
static void menus_init (void);
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
static gchar *menu_translate (const gchar *path,
|
||||
gpointer data);
|
||||
#else
|
||||
#define menu_translate NULL
|
||||
#endif
|
||||
|
||||
static void tearoff_cmd_callback (GtkWidget *widget,
|
||||
gpointer callback_data,
|
||||
guint callback_action);
|
||||
|
@ -64,6 +70,8 @@ static void help_debug_cmd_callback (GtkWidget *widget,
|
|||
gpointer callback_data,
|
||||
guint callback_action);
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
|
||||
/* from main.c */
|
||||
extern gchar *plugin_domains[];
|
||||
extern gint n_plugin_domains;
|
||||
|
@ -110,6 +118,8 @@ static gchar G_GNUC_UNUSED *dummy_entries[] =
|
|||
N_("/Video/Encode")
|
||||
};
|
||||
|
||||
#endif /* ENABLE_NLS */
|
||||
|
||||
static GSList *last_opened_raw_filenames = NULL;
|
||||
|
||||
/***** <Toolbox> *****/
|
||||
|
@ -1707,6 +1717,8 @@ menus_init (void)
|
|||
g_free (filename);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
|
||||
static gchar *
|
||||
menu_translate (const gchar *path,
|
||||
gpointer data)
|
||||
|
@ -1744,6 +1756,8 @@ menu_translate (const gchar *path,
|
|||
return retval;
|
||||
}
|
||||
|
||||
#endif /* ENABLE_NLS */
|
||||
|
||||
static gint
|
||||
tearoff_delete_cb (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
|
|
|
@ -74,7 +74,7 @@ typedef enum
|
|||
{
|
||||
GRAD_IMPORT = 0,
|
||||
IMAGE_IMPORT = 1,
|
||||
INDEXED_IMPORT = 2,
|
||||
INDEXED_IMPORT = 2
|
||||
} ImportType;
|
||||
|
||||
typedef struct _ImportDialog ImportDialog;
|
||||
|
|
Loading…
Reference in New Issue