nlink_t patch for some sysvr3 system by Philippe De Muyter

This commit is contained in:
Miguel de Icaza 1998-03-23 17:49:04 +00:00
parent e06cd1968c
commit 92ecd7af62
8 changed files with 57 additions and 18 deletions

View File

@ -43,9 +43,12 @@
#undef STAT_STATFS4
#undef STAT_STATVFS
/* Does your system provide the umode_t typedef? */
/* Define umode_t if your system does not provide it */
#undef umode_t
/* Define nlink_t if your system does not provide it */
#undef nlink_t
/* Does the file command accepts the -L option */
#undef FILE_L

View File

@ -258,6 +258,7 @@ AC_CHECK_TYPE(umode_t, int)
AC_CHECK_TYPE(off_t, long)
AC_TYPE_PID_T
AC_TYPE_UID_T
AC_CHECK_TYPE(nlink_t, unsigned int)
AC_FUNC_MMAP
AC_FUNC_ALLOCA

View File

@ -67,3 +67,8 @@ gnome_quit_cmd (void)
gtk_main_quit ();
}
void
gnome_open_panel (GtkWidget *widget, WPanel *panel)
{
new_panel_at (panel->cwd);
}

View File

@ -6,5 +6,6 @@ void gnome_compare_panels (void);
void gnome_open_terminal (void);
void gnome_about_cmd (void);
void gnome_quit_cmd (void);
void gnome_open_panel (GtkWidget *widget, WPanel *panel);
#endif /* __GCMD_H */

View File

@ -526,7 +526,7 @@ desktop_icon_make_draggable (desktop_icon_t *di)
char *drag_types [] = { "icon/root", "url:ALL" };
/* To artificially start up drag and drop */
gtk_signal_connect (obj, "motion_notify_event", GTK_SIGNAL_FUNC (start_icon_drag), di);
/* gtk_signal_connect (obj, "motion_notify_event", GTK_SIGNAL_FUNC (start_icon_drag), di); */
gtk_widget_dnd_drag_set (di->widget, TRUE, drag_types, ELEMENTS (drag_types));
gtk_signal_connect (obj, "drag_request_event", GTK_SIGNAL_FUNC (desktop_icon_drag_request), di);
@ -628,8 +628,10 @@ get_transparent_window_for_dentry (GnomeDesktopEntry *dentry)
static int
dentry_button_click (GtkWidget *widget, GdkEventButton *event, desktop_icon_t *di)
{
if (event->type == GDK_2BUTTON_PRESS && event->button == 1){
dentry_execute (di);
if (event->button == 1){
if (event->type == GDK_2BUTTON_PRESS)
dentry_execute (di);
return TRUE;
}

View File

@ -186,6 +186,7 @@ void save_panel_types (void)
void configure_box (void);
GnomeUIInfo gnome_panel_file_menu [] = {
{ GNOME_APP_UI_ITEM, "New panel", "Opens a new panel", gnome_open_panel },
{ GNOME_APP_UI_ITEM, "Open Terminal", "Opens a terminal", gnome_open_terminal },
{ GNOME_APP_UI_SEPARATOR },
{ GNOME_APP_UI_ITEM, "Copy", "Copy files", copy_cmd },

View File

@ -70,7 +70,7 @@ repaint_file (WPanel *panel, int file_index, int move, int attr, int isstatus)
void
show_dir (WPanel *panel)
{
gtk_label_set (GTK_LABEL (panel->current_dir), panel->cwd);
gtk_entry_set_text (GTK_ENTRY (panel->current_dir), panel->cwd);
}
static void
@ -902,13 +902,29 @@ panel_switch_new_display_mode (WPanel *panel)
panel_update_contents (panel);
}
static GtkWidget *
panel_create_cwd (WPanel *panel)
static void
change_cwd (GtkWidget *entry, WPanel *panel)
{
GtkWidget *label = gtk_label_new ("");
printf ("Cambiando a...%s\n", "xxx");
}
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT);
return label;
static GtkWidget *
panel_create_cwd (Dlg_head *h, WPanel *panel, GtkWidget **the_entry)
{
WInput *in;
in = input_new (0, 0, 0, 10, "", "cwd");
add_widget (h, in);
/* Force the creation of the gtk widget */
send_message_to (h, (Widget *) in, WIDGET_INIT, 0);
*the_entry = gnome_entry_gtk_entry (GNOME_ENTRY (in->widget.wdata));
gtk_signal_connect (GTK_OBJECT (*the_entry),
"activate",
GTK_SIGNAL_FUNC (change_cwd), panel);
return GTK_WIDGET (in->widget.wdata);
}
static void
@ -1176,13 +1192,13 @@ panel_create_filter (Dlg_head *h, WPanel *panel, GtkWidget **filter_w)
/* Force the creation of the gtk widget */
send_message_to (h, (Widget *) in, WIDGET_INIT, 0);
*filter_w = (GtkWidget *) in->widget.wdata;
/* We do not want the focus by default (and the previos add_widget just gave it to us) */
h->current = h->current->prev;
gtk_signal_connect (GTK_OBJECT (gnome_entry_gtk_entry (GNOME_ENTRY (*filter_w))),
"activate",
(GtkSignalFunc) panel_change_filter,
GTK_SIGNAL_FUNC (panel_change_filter),
panel);
gtk_box_pack_start (GTK_BOX (fhbox), *filter_w, TRUE, TRUE, 0);
@ -1194,14 +1210,14 @@ panel_create_filter (Dlg_head *h, WPanel *panel, GtkWidget **filter_w)
void
x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel)
{
GtkWidget *status_line, *filter, *statusbar, *vbox;
GtkWidget *ministatus_align;
GtkWidget *status_line, *filter, *vbox;
GtkWidget *ministatus_align, *frame, *cwd;
panel->table = gtk_table_new (2, 1, 0);
panel->list = panel_create_file_list (panel);
panel->current_dir = panel_create_cwd (panel);
cwd = panel_create_cwd (h, panel, &panel->current_dir);
filter = panel_create_filter (h, panel, (GtkWidget **) &panel->filter_w);
@ -1212,10 +1228,15 @@ x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel)
status_line = gtk_hbox_new (0, 0);
gtk_box_pack_start (GTK_BOX (status_line), panel->current_dir, 1, 1, 0);
gtk_box_pack_start (GTK_BOX (status_line), cwd, 1, 1, 0);
gtk_box_pack_end (GTK_BOX (status_line), filter, 0, 0, 0);
panel->status = statusbar = gtk_label_new ("");
/* The statusbar */
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 3);
panel->status = gtk_label_new ("");
gtk_container_add (GTK_CONTAINER (frame), panel->status);
gtk_table_attach (GTK_TABLE (panel->table), panel->list, 0, 1, 1, 2,
GTK_EXPAND | GTK_FILL | GTK_SHRINK,
@ -1229,7 +1250,7 @@ x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel)
GTK_EXPAND | GTK_FILL | GTK_SHRINK,
0, 0, 0);
gtk_table_attach (GTK_TABLE (panel->table), statusbar, 0, 1, 3, 4,
gtk_table_attach (GTK_TABLE (panel->table), frame, 0, 1, 3, 4,
GTK_EXPAND | GTK_FILL,
0, 0, 0);

View File

@ -1,3 +1,8 @@
Mon Mar 23 14:04:07 1998 Philippe De Muyter <phdm@macqel.be>
* configure.in (nlink_t): Check it using AC_CHECK_TYPE.
* acconfig.h (nlink_t): New define slot.
Mon Mar 23 08:17:55 1998 Pavel Roskin <pavel@absolute.spb.su>
* src/main.c: mcedit can be named mce or mcedit.exe - only