Commit d0519fd3 authored by Manish Singh's avatar Manish Singh

use G_OS_WIN32 and G_HAVE_CYGWIN #defines

* app/app_procs.c
* app/gdisplay_color.[ch]
* app/gdisplay_color_ui.c: make the ui usable

* app/gdisplay.c: enable cdisplay support

* modules/Makefile.am
* modules/cdisplay_gamma.c: moved gamma functionality to separate

-Yosh
parent 7f54f56e
Mon Oct 4 12:16:44 PDT 1999 Manish Singh <yosh@gimp.org>
* app/app_procs.c
* app/appenv.h
* app/batch.c
* app/datafiles.c
* app/errorconsole.c
* app/errors.c
* app/fileops.[ch]
* app/general.c
* app/gimprc.c
* app/install.c
* app/main.c
* app/module_db.c
* app/plug_in.[ch]
* app/temp_buf.c
* app/tile_swap.c
* libgimp/gimp.[ch]
* libgimp/gimpenv.c
* libgimp/gimpfileselection.c
* libgimp/gimpwire.c
* libgimp/parasite.c
* plug-ins/FractalExplorer/FractalExplorer.c
* plug-ins/common/gbr.c
* plug-ins/common/gz.c
* plug-ins/common/hrz.c
* plug-ins/common/pat.c
* plug-ins/common/pnm.c
* plug-ins/common/ps.c
* plug-ins/faxg3/faxg3.c
* plug-ins/gap/gap_lib.h
* plug-ins/gfig/gfig.c
* plug-ins/gimpressionist/gimpressionist.c
* plug-ins/script-fu/interp_slib.c
* plug-ins/script-fu/script-fu-console.c
* plug-ins/script-fu/script-fu-scripts.c
* plug-ins/script-fu/script-fu.c
* tools/gcg/gcg.c: use G_OS_WIN32 and G_HAVE_CYGWIN #defines
* app/app_procs.c
* app/gdisplay_color.[ch]
* app/gdisplay_color_ui.c: make the ui usable
* app/gdisplay.c: enable cdisplay support
* modules/Makefile.am
* modules/cdisplay_gamma.c: moved gamma functionality to separate lib
Mon Oct 4 19:02:08 CEST 1999 Olof S Kylander <olof@gimp.org> Mon Oct 4 19:02:08 CEST 1999 Olof S Kylander <olof@gimp.org>
* Makefile.am fix of a typo * Makefile.am fix of a typo
......
...@@ -42,17 +42,17 @@ ...@@ -42,17 +42,17 @@
#include <unistd.h> #include <unistd.h>
#endif #endif
#ifdef WIN32 #if defined(G_OS_WIN32) || defined(G_HAVE_CYGWIN)
#define STRICT #define STRICT
#include <windows.h> #include <windows.h>
#include <process.h> #include <process.h>
#ifdef NATIVE_WIN32 #ifdef G_OS_WIN32
#include <fcntl.h> #include <fcntl.h>
#include <io.h> #include <io.h>
#endif #endif
#ifdef __CYGWIN32__ #ifdef G_HAVE_CYGWIN
#define O_TEXT 0x0100 /* text file */ #define O_TEXT 0x0100 /* text file */
#define _O_TEXT 0x0100 /* text file */ #define _O_TEXT 0x0100 /* text file */
#define O_BINARY 0x0200 /* binary file */ #define O_BINARY 0x0200 /* binary file */
...@@ -183,7 +183,7 @@ static ProcRecord *last_plug_in = NULL; ...@@ -183,7 +183,7 @@ static ProcRecord *last_plug_in = NULL;
static int shm_ID = -1; static int shm_ID = -1;
static guchar *shm_addr = NULL; static guchar *shm_addr = NULL;
#ifdef WIN32 #if defined(G_OS_WIN32) || defined(G_HAVE_CYGWIN)
static HANDLE shm_handle; static HANDLE shm_handle;
#endif #endif
...@@ -220,7 +220,7 @@ plug_in_init_shm (void) ...@@ -220,7 +220,7 @@ plug_in_init_shm (void)
#endif #endif
} }
#else #else
#ifdef WIN32 #if defined(G_OS_WIN32) || defined(G_HAVE_CYGWIN)
/* Use Win32 shared memory mechanisms for /* Use Win32 shared memory mechanisms for
* transfering tile data. * transfering tile data.
*/ */
...@@ -421,7 +421,7 @@ plug_in_kill (void) ...@@ -421,7 +421,7 @@ plug_in_kill (void)
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef WIN32 #if defined(G_OS_WIN32) || defined(G_HAVE_CYGWIN)
CloseHandle (shm_handle); CloseHandle (shm_handle);
#else #else
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
...@@ -829,7 +829,7 @@ plug_in_open (PlugIn *plug_in) ...@@ -829,7 +829,7 @@ plug_in_open (PlugIn *plug_in)
return 0; return 0;
} }
#if defined(__CYGWIN32__) || defined(__EMX__) #if defined(G_HAVE_CYGWIN) || defined(__EMX__)
/* Set to binary mode */ /* Set to binary mode */
setmode(my_read[0], _O_BINARY); setmode(my_read[0], _O_BINARY);
setmode(my_write[0], _O_BINARY); setmode(my_write[0], _O_BINARY);
...@@ -837,7 +837,7 @@ plug_in_open (PlugIn *plug_in) ...@@ -837,7 +837,7 @@ plug_in_open (PlugIn *plug_in)
setmode(my_write[1], _O_BINARY); setmode(my_write[1], _O_BINARY);
#endif #endif
#ifndef NATIVE_WIN32 #ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]); plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]); plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]); plug_in->his_read = g_io_channel_unix_new (my_write[0]);
...@@ -852,7 +852,7 @@ plug_in_open (PlugIn *plug_in) ...@@ -852,7 +852,7 @@ plug_in_open (PlugIn *plug_in)
/* Remember the file descriptors for the pipes. /* Remember the file descriptors for the pipes.
*/ */
#ifndef NATIVE_WIN32 #ifndef G_OS_WIN32
sprintf (plug_in->args[2], "%d", sprintf (plug_in->args[2], "%d",
g_io_channel_unix_get_fd (plug_in->his_read)); g_io_channel_unix_get_fd (plug_in->his_read));
sprintf (plug_in->args[3], "%d", sprintf (plug_in->args[3], "%d",
...@@ -889,7 +889,7 @@ plug_in_open (PlugIn *plug_in) ...@@ -889,7 +889,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_read[0], F_SETFD, 1); fcntl(my_read[0], F_SETFD, 1);
fcntl(my_write[1], F_SETFD, 1); fcntl(my_write[1], F_SETFD, 1);
#endif #endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) #if defined(G_OS_WIN32) || defined (G_HAVE_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1) if (plug_in->pid == -1)
#else #else
...@@ -926,7 +926,7 @@ plug_in_open (PlugIn *plug_in) ...@@ -926,7 +926,7 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write); g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL; plug_in->his_write = NULL;
#ifdef NATIVE_WIN32 #ifdef G_OS_WIN32
/* The plug-in tells us its thread id */ /* The plug-in tells us its thread id */
if (!plug_in->query) if (!plug_in->query)
{ {
...@@ -961,7 +961,7 @@ plug_in_close (PlugIn *plug_in, ...@@ -961,7 +961,7 @@ plug_in_close (PlugIn *plug_in,
int kill_it) int kill_it)
{ {
int status; int status;
#ifndef NATIVE_WIN32 #ifndef G_OS_WIN32
struct timeval tv; struct timeval tv;
#endif #endif
...@@ -978,7 +978,7 @@ plug_in_close (PlugIn *plug_in, ...@@ -978,7 +978,7 @@ plug_in_close (PlugIn *plug_in,
plug_in_pop (); plug_in_pop ();
/* give the plug-in some time (10 ms) */ /* give the plug-in some time (10 ms) */
#ifndef NATIVE_WIN32 #ifndef G_OS_WIN32
tv.tv_sec = 0; tv.tv_sec = 0;
tv.tv_usec = 100; /* But this is 0.1 ms? */ tv.tv_usec = 100; /* But this is 0.1 ms? */
select (0, NULL, NULL, NULL, &tv); select (0, NULL, NULL, NULL, &tv);
...@@ -989,7 +989,7 @@ plug_in_close (PlugIn *plug_in, ...@@ -989,7 +989,7 @@ plug_in_close (PlugIn *plug_in,
/* If necessary, kill the filter. /* If necessary, kill the filter.
*/ */
#ifndef NATIVE_WIN32 #ifndef G_OS_WIN32
if (kill_it && plug_in->pid) if (kill_it && plug_in->pid)
status = kill (plug_in->pid, SIGKILL); status = kill (plug_in->pid, SIGKILL);
...@@ -1364,7 +1364,7 @@ plug_in_handle_message (WireMessage *msg) ...@@ -1364,7 +1364,7 @@ plug_in_handle_message (WireMessage *msg)
gtk_main_quit (); gtk_main_quit ();
break; break;
case GP_REQUEST_WAKEUPS: case GP_REQUEST_WAKEUPS:
#ifdef NATIVE_WIN32 #ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write, g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id, current_plug_in->his_thread_id,
current_plug_in->his_read_fd); current_plug_in->his_read_fd);
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <unistd.h> #include <unistd.h>
#endif #endif
#ifdef NATIVE_WIN32 #ifdef G_OS_WIN32
#include <process.h> /* For _getpid() */ #include <process.h> /* For _getpid() */
#endif #endif
...@@ -494,7 +494,7 @@ app_init (void) ...@@ -494,7 +494,7 @@ app_init (void)
RESET_BAR(); RESET_BAR();
internal_procs_init (); internal_procs_init ();
gdisplay_color_init (); color_display_init ();
RESET_BAR(); RESET_BAR();
parse_buffers_init (); parse_buffers_init ();
...@@ -789,7 +789,7 @@ toast_old_temp_files (void) ...@@ -789,7 +789,7 @@ toast_old_temp_files (void)
*/ */
int pid = atoi (entry->d_name + 9); int pid = atoi (entry->d_name + 9);
#ifndef NATIVE_WIN32 #ifndef G_OS_WIN32
if (kill (pid, 0)) if (kill (pid, 0))
#else #else
/* On Windows, you can't remove open files anyhow, /* On Windows, you can't remove open files anyhow,
......
...@@ -47,7 +47,7 @@ extern int we_are_exiting; /* this is used in session_get_window_info() */ ...@@ -47,7 +47,7 @@ extern int we_are_exiting; /* this is used in session_get_window_info() */
extern GimpSet* image_context; extern GimpSet* image_context;
extern MessageHandlerType message_handler; extern MessageHandlerType message_handler;
#ifdef NATIVE_WIN32 #ifdef G_OS_WIN32
char *quote_spaces (char *string); char *quote_spaces (char *string);
#endif #endif
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#ifdef NATIVE_WIN32 #ifdef G_OS_WIN32
#include <process.h> /* For _getpid() */ #include <process.h> /* For _getpid() */
#endif #endif
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <pthread.h> #include <pthread.h>
#endif #endif
#ifdef NATIVE_WIN32 #ifdef G_OS_WIN32
#include <io.h> #include <io.h>
#endif #endif
......
...@@ -70,7 +70,7 @@ batch_init () ...@@ -70,7 +70,7 @@ batch_init ()
{ {
if (!read_from_stdin) if (!read_from_stdin)
{ {
#ifndef NATIVE_WIN32 /* for now */ #ifndef G_OS_WIN32 /* for now */
g_print ("reading batch commands from stdin\n"); g_print ("reading batch commands from stdin\n");
gdk_input_add (STDIN_FILENO, GDK_INPUT_READ, batch_read, NULL); gdk_input_add (STDIN_FILENO, GDK_INPUT_READ, batch_read, NULL);
read_from_stdin = TRUE; read_from_stdin = TRUE;
...@@ -129,7 +129,7 @@ batch_run_cmd (char *cmd) ...@@ -129,7 +129,7 @@ batch_run_cmd (char *cmd)
return; return;
} }
#ifndef NATIVE_WIN32 #ifndef G_OS_WIN32
static void static void
batch_read (gpointer data, batch_read (gpointer data,
...@@ -185,7 +185,7 @@ batch_read (gpointer data, ...@@ -185,7 +185,7 @@ batch_read (gpointer data,
} }
} }
#endif /* !NATIVE_WIN32 */ #endif /* !G_OS_WIN32 */
static void static void
batch_pserver (int run_mode, batch_pserver (int run_mode,
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include <dirent.h> #include <dirent.h>
#endif #endif
#ifdef NATIVE_WIN32 #ifdef G_OS_WIN32
#ifndef S_ISDIR #ifndef S_ISDIR
#define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) #define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
#define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) #define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
......
...@@ -340,6 +340,9 @@ gdisplay_delete (GDisplay *gdisp) ...@@ -340,6 +340,9 @@ gdisplay_delete (GDisplay *gdisp)
gdisp->idle_render.active = FALSE; gdisp->idle_render.active = FALSE;
} }
/* detach any color displays */
gdisplay_color_detach_all (gdisp);
/* get rid of signals handled by this display */ /* get rid of signals handled by this display */
gtk_signal_disconnect_by_data (GTK_OBJECT (gdisp->gimage), gdisp); gtk_signal_disconnect_by_data (GTK_OBJECT (gdisp->gimage), gdisp);
...@@ -1256,6 +1259,12 @@ gdisplay_display_area (GDisplay *gdisp, ...@@ -1256,6 +1259,12 @@ gdisplay_display_area (GDisplay *gdisp,
int x2, y2; int x2, y2;
int dx, dy; int dx, dy;
int i, j; int i, j;
GList *list;
guchar *buf;
int bpp;
buf = gximage_get_data ();
bpp = gximage_get_bpp ();
sx = SCALEX (gdisp, gdisp->gimage->width); sx = SCALEX (gdisp, gdisp->gimage->width);
sy = SCALEY (gdisp, gdisp->gimage->height); sy = SCALEY (gdisp, gdisp->gimage->height);
...@@ -1333,6 +1342,15 @@ gdisplay_display_area (GDisplay *gdisp, ...@@ -1333,6 +1342,15 @@ gdisplay_display_area (GDisplay *gdisp,
dx, dy, dx, dy,
0, 0, 0, 0); 0, 0, 0, 0);
#endif #endif
list = gdisp->cd_list;
while (list)
{
ColorDisplayNode *node = (ColorDisplayNode *) list->data;
node->cd_convert (node->cd_ID, buf, dx, dy, bpp);
list = list->next;
}
gximage_put (gdisp->canvas->window, gximage_put (gdisp->canvas->window,
j, i, dx, dy, j, i, dx, dy,
gdisp->offset_x, gdisp->offset_x,
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include <dirent.h> #include <dirent.h>
#endif #endif
#ifdef NATIVE_WIN32 #ifdef G_OS_WIN32
#ifndef S_ISDIR #ifndef S_ISDIR
#define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) #define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
#define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) #define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
......
...@@ -453,7 +453,7 @@ valid_module_name (const char *filename) ...@@ -453,7 +453,7 @@ valid_module_name (const char *filename)
len = strlen (basename); len = strlen (basename);
#if !defined(WIN32) && !defined(__EMX__) #if !defined(G_OS_WIN32) && !defined(G_HAVE_CYGWIN) && !defined(__EMX__)
if (len < 3 + 1 + 3) if (len < 3 + 1 + 3)
return FALSE; return FALSE;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "libgimp/gimpintl.h" #include "libgimp/gimpintl.h"
#include "libgimp/gimpenv.h" #include "libgimp/gimpenv.h"
#ifndef NATIVE_WIN32 #ifndef G_OS_WIN32
# ifndef __EMX__ # ifndef __EMX__
# define USER_INSTALL "user_install" # define USER_INSTALL "user_install"
# else # else
...@@ -339,7 +339,7 @@ help_quit_callback (GtkWidget *widget, ...@@ -339,7 +339,7 @@ help_quit_callback (GtkWidget *widget,
gtk_exit (0); gtk_exit (0);
} }
#ifdef NATIVE_WIN32 #ifdef G_OS_WIN32
char * char *
quote_spaces (char *string) quote_spaces (char *string)
...@@ -430,7 +430,7 @@ install_run (InstallCallback callback) ...@@ -430,7 +430,7 @@ install_run (InstallCallback callback)
/* Realize the text widget before inserting text strings */ /* Realize the text widget before inserting text strings */
gtk_widget_realize (text); gtk_widget_realize (text);
#ifndef NATIVE_WIN32 #ifndef G_OS_WIN32
gtk_text_insert (GTK_TEXT (text), font_strong, NULL, NULL, _("User Installation Log\n\n"), -1); gtk_text_insert (GTK_TEXT (text), font_strong, NULL, NULL, _("User Installation Log\n\n"), -1);
#endif #endif
...@@ -456,7 +456,7 @@ install_run (InstallCallback callback) ...@@ -456,7 +456,7 @@ install_run (InstallCallback callback)
if (executable == TRUE) if (executable == TRUE)
{ {
#ifdef NATIVE_WIN32 #ifdef G_OS_WIN32
char *quoted_data_dir, *quoted_user_dir; char *quoted_data_dir, *quoted_user_dir;
/* On Windows, it is common for the GIMP data directory /* On Windows, it is common for the GIMP data directory
...@@ -519,7 +519,7 @@ install_run (InstallCallback callback) ...@@ -519,7 +519,7 @@ install_run (InstallCallback callback)
} }
else else
executable = FALSE; executable = FALSE;
#endif /* !NATIVE_WIN32 */ #endif /* !G_OS_WIN32 */
} }
if (executable == FALSE) if (executable == FALSE)
...@@ -538,7 +538,7 @@ install_continue_callback (GtkWidget *widget, ...@@ -538,7 +538,7 @@ install_continue_callback (GtkWidget *widget,
{ {
InstallCallback callback; InstallCallback callback;
#ifdef NATIVE_WIN32 #ifdef G_OS_WIN32
FreeConsole (); FreeConsole ();
#endif #endif
......
...@@ -340,6 +340,9 @@ gdisplay_delete (GDisplay *gdisp) ...@@ -340,6 +340,9 @@ gdisplay_delete (GDisplay *gdisp)
gdisp->idle_render.active = FALSE; gdisp->idle_render.active = FALSE;
} }
/* detach any color displays */
gdisplay_color_detach_all (gdisp);
/* get rid of signals handled by this display */ /* get rid of signals handled by this display */
gtk_signal_disconnect_by_data (GTK_OBJECT (gdisp->gimage), gdisp); gtk_signal_disconnect_by_data (GTK_OBJECT (gdisp->gimage), gdisp);
...@@ -1256,6 +1259,12 @@ gdisplay_display_area (GDisplay *gdisp, ...@@ -1256,6 +1259,12 @@ gdisplay_display_area (GDisplay *gdisp,
int x2, y2; int x2, y2;
int dx, dy; int dx, dy;
int i, j; int i, j;
GList *list;
guchar *buf;
int bpp;
buf = gximage_get_data ();
bpp = gximage_get_bpp ();
sx = SCALEX (gdisp, gdisp->gimage->width); sx = SCALEX (gdisp, gdisp->gimage->width);
sy = SCALEY (gdisp, gdisp->gimage->height); sy = SCALEY (gdisp, gdisp->gimage->height);
...@@ -1333,6 +1342,15 @@ gdisplay_display_area (GDisplay *gdisp, ...@@ -1333,6 +1342,15 @@ gdisplay_display_area (GDisplay *gdisp,
dx, dy, dx, dy,
0, 0, 0, 0); 0, 0, 0, 0);
#endif #endif
list = gdisp->cd_list;
while (list)
{
ColorDisplayNode *node = (ColorDisplayNode *) list->data;
node->cd_convert (node->cd_ID, buf, dx, dy, bpp);
list = list->next;
}
gximage_put (gdisp->canvas->window, gximage_put (gdisp->canvas->window,
j, i, dx, dy, j, i, dx, dy,
gdisp->offset_x, gdisp->offset_x,
......
...@@ -29,11 +29,21 @@ typedef struct _ColorDisplayDialog ColorDisplayDialog; ...@@ -29,11 +29,21 @@ typedef struct _ColorDisplayDialog ColorDisplayDialog;
struct _ColorDisplayDialog struct _ColorDisplayDialog
{ {
GtkWidget *shell; GtkWidget *shell;
GtkWidget *src; GtkWidget *src;
GtkWidget *dest; GtkWidget *dest;
gint src_row;
gint dest_row;
gboolean modified;
GList *old_nodes;
GDisplay *gdisp;
}; };
static ColorDisplayDialog cdd = { NULL, NULL, NULL }; static ColorDisplayDialog cdd = { NULL, NULL, NULL, 0, 0, FALSE, NULL, NULL };
typedef void (*ButtonCallback) (GtkWidget *, gpointer); typedef void (*ButtonCallback) (GtkWidget *, gpointer);
...@@ -45,17 +55,38 @@ struct _ButtonInfo ...@@ -45,17 +55,38 @@ struct _ButtonInfo
ButtonCallback callback; ButtonCallback callback;
}; };
static void color_display_ok_callback (GtkWidget *, gpointer); static void color_display_ok_callback (GtkWidget *widget,
static void color_display_cancel_callback (GtkWidget *, gpointer); gpointer data);
static gint color_display_destroy_callback (GtkWidget *, gpointer); static void color_display_cancel_callback (GtkWidget *widget,
static void color_display_add_callback (GtkWidget *, gpointer); gpointer data);
static void color_display_remove_callback (GtkWidget *, gpointer); static void color_display_add_callback (GtkWidget *widget,
static void color_display_up_callback (GtkWidget *, gpointer); gpointer data);
static void color_display_down_callback (GtkWidget *, gpointer); static void color_display_remove_callback (GtkWidget *widget,
static void color_display_configure_callback (GtkWidget *, gpointer); gpointer data);
static void color_display_up_callback (GtkWidget *widget,
static void src_list_populate (const char *name, gpointer data);
gpointer user_data); static void color_display_down_callback (GtkWidget *widget,
gpointer data);
static void color_display_configure_callback (GtkWidget *widget,
gpointer data);
static void src_list_populate (const char *name,
gpointer data);
static void dest_list_populate (GList *node_list);
static void select_src (GtkWidget *widget,
gint row,
gint column,
GdkEventButton *event,
gpointer data);
static void select_dest (GtkWidget *widget,
gint row,
gint column,
GdkEventButton *event,
gpointer data);
#define LIST_WIDTH 180
#define LIST_HEIGHT 180
static void static void
make_dialog (void) make_dialog (void)
...@@ -102,10 +133,15 @@ make_dialog (void) ...@@ -102,10 +133,15 @@ make_dialog (void)
titles[0] = _("Available Filters"); titles[0] = _("Available Filters");
titles[1] = NULL; titles[1] = NULL;
cdd.src = gtk_clist_new_with_titles (1, titles); cdd.src = gtk_clist_new_with_titles (1, titles);
gtk_widget_set_usize (cdd.src, LIST_WIDTH, LIST_HEIGHT);
gtk_clist_column_titles_passive (GTK_CLIST (cdd.src)); gtk_clist_column_titles_passive (GTK_CLIST (cdd.src));
gtk_clist_set_auto_sort (GTK_CLIST (cdd.src), TRUE); gtk_clist_set_auto_sort (GTK_CLIST (cdd.src), TRUE);
gtk_container_add (GTK_CONTAINER (scrolled_win), cdd.src); gtk_container_add (GTK_CONTAINER (scrolled_win), cdd.src);
gtk_signal_connect (GTK_OBJECT (cdd.src), "select_row",
GTK_SIGNAL_FUNC (select_src),
NULL);
vbbox = gtk_vbutton_box_new (); vbbox = gtk_vbutton_box_new ();
gtk_vbutton_box_set_layout_default (GTK_BUTTONBOX_START); gtk_vbutton_box_set_layout_default (GTK_BUTTONBOX_START);
gtk_box_pack_start (GTK_BOX (hbox), vbbox, FALSE, FALSE, 2); gtk_box_pack_start (GTK_BOX (hbox), vbbox, FALSE, FALSE, 2);
...@@ -120,9 +156,14 @@ make_dialog (void) ...@@ -120,9 +156,14 @@ make_dialog (void)
titles[0] = _("Active Filters"); titles[0] = _("Active Filters");
titles[1] = NULL; titles[1] = NULL;
cdd.dest = gtk_clist_new_with_titles (1, titles); cdd.dest = gtk_clist_new_with_titles (1, titles);