1
1

1999-07-01 Federico Mena Quintero <federico@nuclecu.unam.mx>

* gcorba.c (corba_create_window): Ensure that the directory we
	pass to the CORBA server is not NULL.

	* gscreen.c: Removed a bunch of unused functions for filters.
Этот коммит содержится в:
Miguel de Icaza 1999-07-01 23:15:08 +00:00
родитель 14210197f9
Коммит ea6b8036f5
6 изменённых файлов: 65 добавлений и 224 удалений

Просмотреть файл

@ -1,3 +1,10 @@
1999-07-01 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gcorba.c (corba_create_window): Ensure that the directory we
pass to the CORBA server is not NULL.
* gscreen.c: Removed a bunch of unused functions for filters.
1999-06-30 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gscreen.c (x_select_item): Removed icon list hacks.

Просмотреть файл

@ -120,7 +120,7 @@ static POA_GNOME_FileManagerFactory__vepv impl_GNOME_FileManagerFactory_vepv =
/*** Stub implementations ***/
static GNOME_FileManagerWindow
static GNOME_FileManagerWindow
impl_GNOME_FileManagerWindow__create(PortableServer_POA poa,
impl_POA_GNOME_FileManagerWindow **servant,
CORBA_Environment *ev)
@ -165,7 +165,7 @@ impl_GNOME_FileManagerWindow_close(impl_POA_GNOME_FileManagerWindow *servant,
gnome_close_panel (GTK_WIDGET (servant->panel->xwindow), servant->panel);
}
static GNOME_FileManagerFactory
static GNOME_FileManagerFactory
impl_GNOME_FileManagerFactory__create(PortableServer_POA poa,
impl_POA_GNOME_FileManagerFactory **servant,
CORBA_Environment *ev)
@ -334,11 +334,11 @@ create_server (void)
/**
* corba_init_server:
* @void:
*
* @void:
*
* Initializes the CORBA factory object for gmc. Returns whether initialization
* was successful or not, and sets the global corba_have_server variable.
*
*
* Return value: TRUE if successful, FALSE otherwise.
**/
int
@ -358,23 +358,22 @@ corba_init_server (void)
/**
* corba_create_window:
* @void:
*
* @dir: The directory in which to create the window, or NULL for the cwd.
*
* Creates a GMC window using a CORBA call to the server.
**/
void
corba_create_window (const char *startup_dir)
corba_create_window (const char *dir)
{
CORBA_Environment ev;
char cwd[MC_MAXPATHLEN];
char *dir = cwd;
if (this_dir == NULL)
if (dir == NULL) {
mc_get_current_wd (cwd, MC_MAXPATHLEN);
else
dir = this_dir;
dir = cwd;
}
CORBA_exception_init (&ev);
GNOME_FileManagerFactory_create_window (gmc_server, startup_dir, &ev);
GNOME_FileManagerFactory_create_window (gmc_server, dir, &ev);
CORBA_exception_free (&ev);
}

Просмотреть файл

@ -18,7 +18,7 @@ extern CORBA_ORB orb;
int corba_init_server (void);
void corba_create_window (const char *startup_dir);
void corba_create_window (const char *dir);
#endif

Просмотреть файл

@ -418,7 +418,6 @@ x_set_idle (Dlg_head *h, int enable_idle)
int
dialog_panel_callback (struct Dlg_head *h, int id, int msg)
{
WInput *in;
Widget_Item *dh;
void *current_widget; /* The current widget */
@ -497,13 +496,7 @@ non_corba_create_panels (char *startup_dir)
desktop_destroy ();
}
/*
* Only at startup we have a strange condition: if more than one
* panel is created, then the code hangs inside X, it keeps waiting
* for a reply for something in Imlib that never returns.
*
* Creating the panels on the idle loop takes care of this
*/
/* The GNOME version of create_panels() */
void
create_panels (void)
{

Просмотреть файл

@ -1619,164 +1619,6 @@ panel_create_cwd (Dlg_head *h, WPanel *panel, void **entry)
return GTK_WIDGET (in->widget.wdata);
}
/* FIXME: for now, this list is hardcoded. We want a way to let the user configure it. */
static struct filter_item {
char *text;
char *glob;
} filter_items [] = {
{ N_("All files"),
"*" },
{ N_("Archives and compressed files"),
"*.(tar|gz|tgz|taz|zip|lha|zoo|pak|sit|arc|arj|rar|huf|lzh)" },
{ N_("RPM/DEB files"),
"*.(rpm|deb)" },
{ N_("Text/Document files"),
"*.(txt|tex|doc|rtf)" },
{ N_("HTML and SGML files"),
"*.(html|htm|sgml|sgm)" },
{ N_("Postscript and PDF files"),
"*.(ps|pdf)" },
{ N_("Spreadsheet files"),
"*.(xls|wks|wk1)" },
{ N_("Image files"),
"*.(png|jpg|jpeg|xcf|gif|tif|tiff|xbm|xpm|pbm|pgm|ppm|tga|rgb|iff|lbm|ilbm|"
"bmp|pcx|pic|pict|psd|gbr|pat|ico|fig|cgm|rle|fits)" },
{ N_("Video/animation files"),
"*.(mpg|mpeg|mov|avi|fli|flc|flh|flx|dl)" },
{ N_("Audio files"),
"*.(au|wav|mp3|snd|mod|s3m|ra)" },
{ N_("C program files"),
"*.[ch]" },
{ N_("C++ program files"),
"*.(cc|C|cpp|cxx|h|H)" },
{ N_("Objective-C program files"),
"*.[mh]" },
{ N_("Scheme program files"),
"*.scm" },
{ N_("Assembler program files"),
"*.(s|S|asm)" },
{ N_("Misc. program files"),
"*.(awk|sed|lex|l|y|sh|idl|pl|py|am|in|f|el|bas|pas|java|sl|p|m4|tcl|pov)" },
{ N_("Font files"),
"*.(pfa|pfb|afm|ttf|fon|pcf|pcf.gz|spd)" }
};
static GtkWidget *filter_menu;
static void
filter_item_select (GtkWidget *widget, gpointer data)
{
/* FIXME: the hintbar resizes horribly and screws the panel */
#if 0
struct filter_item *fi = gtk_object_get_user_data (GTK_OBJECT (widget));
set_hintbar (easy_patterns ? fi->glob : fi->regexp);
#endif
}
static void
filter_item_deselect (GtkWidget *widget, gpointer data)
{
/* set_hintbar (""); */
}
static void
filter_item_activate (GtkWidget *widget, gpointer data)
{
struct filter_item *fi = gtk_object_get_user_data (GTK_OBJECT (widget));
WPanel *panel = data;
char *pattern;
if (easy_patterns)
pattern = g_strdup (fi->glob);
else {
/* This is sort of a hack to force convert_pattern() to actually convert the thing */
easy_patterns = 1;
pattern = convert_pattern (fi->glob, match_file, 0);
easy_patterns = 0;
}
set_panel_filter_to (panel, pattern);
}
static void
build_filter_menu (WPanel *panel, GtkWidget *button)
{
GtkWidget *item;
int i;
if (filter_menu)
return;
/* FIXME: the filter menu is global, and it is never destroyed */
filter_menu = gtk_menu_new ();
gtk_object_set_user_data (GTK_OBJECT (filter_menu), button);
for (i = 0; i < ELEMENTS (filter_items); i++) {
item = gtk_menu_item_new_with_label (_(filter_items[i].text));
gtk_object_set_user_data (GTK_OBJECT (item), &filter_items[i]);
gtk_signal_connect (GTK_OBJECT (item), "select",
(GtkSignalFunc) filter_item_select,
panel);
gtk_signal_connect (GTK_OBJECT (item), "deselect",
(GtkSignalFunc) filter_item_deselect,
panel);
gtk_signal_connect (GTK_OBJECT (item), "activate",
(GtkSignalFunc) filter_item_activate,
panel);
gtk_widget_show (item);
gtk_menu_append (GTK_MENU (filter_menu), item);
}
}
static void
position_filter_popup (GtkMenu *menu, gint *x, gint *y, gpointer data)
{
int screen_width, screen_height;
GtkWidget *wmenu = GTK_WIDGET (menu);
GtkWidget *button = GTK_WIDGET (data);
/* This code is mostly ripped off from gtkmenu.c - Federico */
screen_width = gdk_screen_width ();
screen_height = gdk_screen_height ();
gdk_window_get_origin (button->window, x, y);
*y += button->allocation.height;
if ((*x + wmenu->requisition.width) > screen_width)
*x -= (*x + wmenu->requisition.width) - screen_width;
if ((*y + wmenu->requisition.height) > screen_height)
*y -= (*y + wmenu->requisition.height) - screen_height;
if (*y < 0)
*y = 0;
}
static void
show_filter_popup (GtkWidget *button, gpointer data)
{
WPanel *panel;
panel = data;
build_filter_menu (panel, button);
gtk_menu_popup (GTK_MENU (filter_menu), NULL, NULL,
position_filter_popup,
button,
1,
GDK_CURRENT_TIME);
}
void
display_mini_info (WPanel *panel)
{
@ -2426,7 +2268,7 @@ tree_size_allocate (GtkWidget *widget, GtkAllocation *allocation, WPanel *panel)
void
x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel)
{
GtkWidget *status_line, *filter, *vbox, *ministatus_box;
GtkWidget *status_line, *vbox, *ministatus_box;
GtkWidget *cwd;
GtkWidget *dock;
GnomeUIBuilderData uibdata;

Просмотреть файл

@ -66,7 +66,7 @@
/* #undef HAVE_BROKEN_READDIR */
#define HAVE_ERRNO_DECL 1
#define HAVE_LONGLONG 1
/* #undef HAVE_OFF64_T */
#define HAVE_OFF64_T 1
/* #undef HAVE_REMSH */
/* #undef HAVE_UNSIGNED_CHAR */
#define HAVE_UTIMBUF 1
@ -103,18 +103,18 @@
/* #undef FTRUNCATE_NEEDS_ROOT */
/* #undef HAVE_TRAPDOOR_UID */
/* #undef HAVE_ROOT */
#define HAVE_UNION_SEMUN 1
/* #undef HAVE_UNION_SEMUN */
#define HAVE_NETMASK_IFCONF 1
#define HAVE_GETTIMEOFDAY_TZ 1
/* #undef HAVE_SOCK_SIN_LEN */
/* #undef STAT_READ_FILSYS */
#define STAT_STATFS2_BSIZE 1
/* #undef STAT_STATFS2_BSIZE */
/* #undef STAT_STATFS2_FSIZE */
/* #undef STAT_STATFS2_FS_DATA */
/* #undef STAT_STATFS3_OSF1 */
/* #undef STAT_STATFS4 */
/* #undef STAT_STATVFS */
/* #undef STAT_STATVFS64 */
#define STAT_STATVFS64 1
/* #undef HAVE_NETMASK_IFREQ */
/* #undef HAVE_NETMASK_AIX */
#define HAVE_CRYPT 1
@ -139,10 +139,10 @@
#define HAVE_SETRESUID 1
/* #undef WITH_NETATALK */
/* #undef HAVE_INO64_T */
/* #undef HAVE_STRUCT_FLOCK64 */
#define HAVE_STRUCT_FLOCK64 1
/* #undef SIZEOF_INO_T */
/* #undef SIZEOF_OFF_T */
/* #undef STAT_STATVFS64 */
#define STAT_STATVFS64 1
#define HAVE_LIBREADLINE 1
/* #undef HAVE_KERNEL_OPLOCKS */
/* #undef HAVE_IRIX_SPECIFIC_CAPABILITIES */
@ -157,19 +157,19 @@
#define HAVE_GETSPNAM 1
/* #undef HAVE_BIGCRYPT */
/* #undef HAVE_GETPRPWNAM */
/* #undef HAVE_FSTAT64 */
/* #undef HAVE_LSTAT64 */
/* #undef HAVE_STAT64 */
#define HAVE_FSTAT64 1
#define HAVE_LSTAT64 1
#define HAVE_STAT64 1
#define HAVE_SETRESGID 1
/* #undef HAVE_SETRESGID_DECL */
#define HAVE_SHADOW_H 1
#define HAVE_MEMSET 1
#define HAVE_STRCASECMP 1
/* #undef HAVE_STRUCT_DIRENT64 */
#define HAVE_STRUCT_DIRENT64 1
/* #undef HAVE_TRUNCATED_SALT */
#define BROKEN_NISPLUS_INCLUDE_FILES 1
/* #undef HAVE_RPC_AUTH_ERROR_CONFLICT */
/* #undef HAVE_EXPLICIT_LARGEFILE_SUPPORT */
#define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
/* #undef USE_BOTH_CRYPT_CALLS */
/* The number of bytes in a int. */
@ -185,16 +185,16 @@
/* #undef HAVE___ACL */
/* Define if you have the __chdir function. */
#define HAVE___CHDIR 1
/* #undef HAVE___CHDIR */
/* Define if you have the __close function. */
#define HAVE___CLOSE 1
/* Define if you have the __closedir function. */
#define HAVE___CLOSEDIR 1
/* #undef HAVE___CLOSEDIR */
/* Define if you have the __dup function. */
#define HAVE___DUP 1
/* #undef HAVE___DUP */
/* Define if you have the __dup2 function. */
#define HAVE___DUP2 1
@ -221,10 +221,10 @@
#define HAVE___FXSTAT 1
/* Define if you have the __getcwd function. */
#define HAVE___GETCWD 1
/* #undef HAVE___GETCWD */
/* Define if you have the __getdents function. */
#define HAVE___GETDENTS 1
/* #undef HAVE___GETDENTS */
/* Define if you have the __llseek function. */
/* #undef HAVE___LLSEEK */
@ -248,25 +248,25 @@
/* #undef HAVE___OPEN64 */
/* Define if you have the __opendir function. */
#define HAVE___OPENDIR 1
/* #undef HAVE___OPENDIR */
/* Define if you have the __pread function. */
/* #undef HAVE___PREAD */
/* Define if you have the __pread64 function. */
/* #undef HAVE___PREAD64 */
#define HAVE___PREAD64 1
/* Define if you have the __pwrite function. */
/* #undef HAVE___PWRITE */
/* Define if you have the __pwrite64 function. */
/* #undef HAVE___PWRITE64 */
#define HAVE___PWRITE64 1
/* Define if you have the __read function. */
#define HAVE___READ 1
/* Define if you have the __readdir function. */
#define HAVE___READDIR 1
/* #undef HAVE___READDIR */
/* Define if you have the __readdir64 function. */
/* #undef HAVE___READDIR64 */
@ -281,7 +281,7 @@
/* #undef HAVE___STAT64 */
/* Define if you have the __sys_llseek function. */
#define HAVE___SYS_LLSEEK 1
/* #undef HAVE___SYS_LLSEEK */
/* Define if you have the __telldir function. */
/* #undef HAVE___TELLDIR */
@ -413,7 +413,7 @@
#define HAVE_CONNECT 1
/* Define if you have the creat64 function. */
/* #undef HAVE_CREAT64 */
#define HAVE_CREAT64 1
/* Define if you have the crypt function. */
#define HAVE_CRYPT 1
@ -431,19 +431,19 @@
#define HAVE_EXECL 1
/* Define if you have the fopen64 function. */
/* #undef HAVE_FOPEN64 */
#define HAVE_FOPEN64 1
/* Define if you have the fseek64 function. */
/* #undef HAVE_FSEEK64 */
/* Define if you have the fseeko64 function. */
/* #undef HAVE_FSEEKO64 */
#define HAVE_FSEEKO64 1
/* Define if you have the fstat function. */
#define HAVE_FSTAT 1
/* Define if you have the fstat64 function. */
/* #undef HAVE_FSTAT64 */
#define HAVE_FSTAT64 1
/* Define if you have the fsync function. */
#define HAVE_FSYNC 1
@ -452,13 +452,13 @@
/* #undef HAVE_FTELL64 */
/* Define if you have the ftello64 function. */
/* #undef HAVE_FTELLO64 */
#define HAVE_FTELLO64 1
/* Define if you have the ftruncate function. */
#define HAVE_FTRUNCATE 1
/* Define if you have the ftruncate64 function. */
/* #undef HAVE_FTRUNCATE64 */
#define HAVE_FTRUNCATE64 1
/* Define if you have the getauthuid function. */
/* #undef HAVE_GETAUTHUID */
@ -491,7 +491,7 @@
#define HAVE_GLOB 1
/* Define if you have the grantpt function. */
/* #undef HAVE_GRANTPT */
#define HAVE_GRANTPT 1
/* Define if you have the initgroups function. */
#define HAVE_INITGROUPS 1
@ -503,10 +503,10 @@
#define HAVE_LLSEEK 1
/* Define if you have the lseek64 function. */
/* #undef HAVE_LSEEK64 */
#define HAVE_LSEEK64 1
/* Define if you have the lstat64 function. */
/* #undef HAVE_LSTAT64 */
#define HAVE_LSTAT64 1
/* Define if you have the memmove function. */
#define HAVE_MEMMOVE 1
@ -518,10 +518,10 @@
#define HAVE_MKTIME 1
/* Define if you have the mmap64 function. */
/* #undef HAVE_MMAP64 */
#define HAVE_MMAP64 1
/* Define if you have the open64 function. */
/* #undef HAVE_OPEN64 */
#define HAVE_OPEN64 1
/* Define if you have the pathconf function. */
#define HAVE_PATHCONF 1
@ -530,19 +530,19 @@
#define HAVE_PIPE 1
/* Define if you have the pread function. */
/* #undef HAVE_PREAD */
#define HAVE_PREAD 1
/* Define if you have the pread64 function. */
/* #undef HAVE_PREAD64 */
#define HAVE_PREAD64 1
/* Define if you have the putprpwnam function. */
/* #undef HAVE_PUTPRPWNAM */
/* Define if you have the pwrite function. */
/* #undef HAVE_PWRITE */
#define HAVE_PWRITE 1
/* Define if you have the pwrite64 function. */
/* #undef HAVE_PWRITE64 */
#define HAVE_PWRITE64 1
/* Define if you have the rand function. */
#define HAVE_RAND 1
@ -554,7 +554,7 @@
/* #undef HAVE_RDCHK */
/* Define if you have the readdir64 function. */
/* #undef HAVE_READDIR64 */
#define HAVE_READDIR64 1
/* Define if you have the rename function. */
#define HAVE_RENAME 1
@ -620,7 +620,7 @@
#define HAVE_SRANDOM 1
/* Define if you have the stat64 function. */
/* #undef HAVE_STAT64 */
#define HAVE_STAT64 1
/* Define if you have the strcasecmp function. */
#define HAVE_STRCASECMP 1
@ -725,7 +725,7 @@
#define HAVE_RPC_RPC_H 1
/* Define if you have the <rpcsvc/nis.h> header file. */
/* #undef HAVE_RPCSVC_NIS_H */
#define HAVE_RPCSVC_NIS_H 1
/* Define if you have the <rpcsvc/yp_prot.h> header file. */
#define HAVE_RPCSVC_YP_PROT_H 1
@ -752,7 +752,7 @@
#define HAVE_STRINGS_H 1
/* Define if you have the <stropts.h> header file. */
/* #undef HAVE_STROPTS_H */
#define HAVE_STROPTS_H 1
/* Define if you have the <sys/acl.h> header file. */
/* #undef HAVE_SYS_ACL_H */
@ -824,7 +824,7 @@
#define HAVE_SYS_STATFS_H 1
/* Define if you have the <sys/statvfs.h> header file. */
/* #undef HAVE_SYS_STATVFS_H */
#define HAVE_SYS_STATVFS_H 1
/* Define if you have the <sys/syscall.h> header file. */
#define HAVE_SYS_SYSCALL_H 1