*** empty log message ***
Этот коммит содержится в:
родитель
5cf9dcb99e
Коммит
566c79dc42
@ -1,3 +1,13 @@
|
|||||||
|
Fri Mar 6 14:48:34 1998 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* gwidget.c (x_create_radio): Connect to the "toggled" signal to
|
||||||
|
keep track of the radio button.
|
||||||
|
|
||||||
|
* gwidget.c (x_update_input): This can be invoked before the
|
||||||
|
widget X resources have been allocated. Take care of this.
|
||||||
|
|
||||||
|
(x_create_input): update the cursor position as well.
|
||||||
|
|
||||||
1998-03-06 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
1998-03-06 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
* gmain.c (get_color): Make it use GdkColorContext correctly.
|
* gmain.c (get_color): Make it use GdkColorContext correctly.
|
||||||
|
@ -157,22 +157,19 @@ get_panel_widget (int index)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gnome_listing_cmd (void)
|
gnome_listing_cmd (GtkWidget *widget, WPanel *panel)
|
||||||
{
|
{
|
||||||
|
GtkAllocation *alloc = >K_WIDGET (panel->list)->allocation;
|
||||||
int view_type, use_msformat;
|
int view_type, use_msformat;
|
||||||
char *user, *status;
|
char *user, *status;
|
||||||
WPanel *p;
|
|
||||||
int index = 0;
|
|
||||||
|
|
||||||
fprintf (stderr, "FIXME: index is hardcoded to 0 now\n");
|
view_type = display_box (panel, &user, &status, &use_msformat, index);
|
||||||
|
|
||||||
p = (WPanel *)get_panel_widget (index);
|
|
||||||
|
|
||||||
view_type = display_box (p, &user, &status, &use_msformat, index);
|
|
||||||
|
|
||||||
if (view_type == -1)
|
if (view_type == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
configure_panel_listing (panel, view_type, use_msformat, user, status);
|
||||||
|
panel_switch_new_display_mode (panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
void configure_box (void);
|
void configure_box (void);
|
||||||
@ -228,15 +225,14 @@ create_container (Dlg_head *h, char *name)
|
|||||||
container->splitted = 0;
|
container->splitted = 0;
|
||||||
app = gnome_app_new ("gmc", name);
|
app = gnome_app_new ("gmc", name);
|
||||||
gtk_widget_set_usize (GTK_WIDGET (app), 400, 200);
|
gtk_widget_set_usize (GTK_WIDGET (app), 400, 200);
|
||||||
|
panel = panel_new (name);
|
||||||
|
|
||||||
vbox = gtk_vbox_new (0, 0);
|
vbox = gtk_vbox_new (0, 0);
|
||||||
gtk_widget_show (vbox);
|
gtk_widget_show (vbox);
|
||||||
gnome_app_set_contents (GNOME_APP (app), vbox);
|
gnome_app_set_contents (GNOME_APP (app), vbox);
|
||||||
gnome_app_create_menus (GNOME_APP (app), gnome_panel_menu);
|
gnome_app_create_menus_with_data (GNOME_APP (app), gnome_panel_menu, panel);
|
||||||
gtk_widget_show (app);
|
gtk_widget_show (app);
|
||||||
|
|
||||||
panel = panel_new (name);
|
|
||||||
|
|
||||||
gtk_signal_connect (GTK_OBJECT (app),
|
gtk_signal_connect (GTK_OBJECT (app),
|
||||||
"enter_notify_event",
|
"enter_notify_event",
|
||||||
GTK_SIGNAL_FUNC (panel_enter_event),
|
GTK_SIGNAL_FUNC (panel_enter_event),
|
||||||
|
@ -193,7 +193,7 @@ x_adjust_top_file (WPanel *panel)
|
|||||||
#define COLUMN_INSET 3
|
#define COLUMN_INSET 3
|
||||||
#define CELL_SPACING 1
|
#define CELL_SPACING 1
|
||||||
|
|
||||||
static void
|
void
|
||||||
panel_file_list_configure_contents (GtkWidget *file_list, WPanel *panel, int main_width, int height)
|
panel_file_list_configure_contents (GtkWidget *file_list, WPanel *panel, int main_width, int height)
|
||||||
{
|
{
|
||||||
format_e *format = panel->format;
|
format_e *format = panel->format;
|
||||||
@ -750,6 +750,21 @@ panel_create_file_list (WPanel *panel)
|
|||||||
return file_list;
|
return file_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
panel_switch_new_display_mode (WPanel *panel)
|
||||||
|
{
|
||||||
|
GtkWidget *old_list = panel->list;
|
||||||
|
|
||||||
|
panel->list = panel_create_file_list (panel);
|
||||||
|
gtk_widget_destroy (old_list);
|
||||||
|
gtk_table_attach (GTK_TABLE (panel->table), panel->list, 0, 1, 1, 2,
|
||||||
|
GTK_EXPAND | GTK_FILL | GTK_SHRINK,
|
||||||
|
GTK_EXPAND | GTK_FILL | GTK_SHRINK,
|
||||||
|
0, 0);
|
||||||
|
gtk_widget_show (panel->list);
|
||||||
|
panel_update_contents (panel);
|
||||||
|
}
|
||||||
|
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
panel_create_cwd (WPanel *panel)
|
panel_create_cwd (WPanel *panel)
|
||||||
{
|
{
|
||||||
|
@ -10,6 +10,7 @@ void x_sort_label_start (WPanel *panel);
|
|||||||
void x_reset_sort_labels (WPanel *panel);
|
void x_reset_sort_labels (WPanel *panel);
|
||||||
|
|
||||||
WPanel *create_container (Dlg_head *h, char *str);
|
WPanel *create_container (Dlg_head *h, char *str);
|
||||||
|
void panel_file_list_configure_contents (GtkWidget *file_list, WPanel *panel, int main_width, int height);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int splitted;
|
int splitted;
|
||||||
|
@ -76,6 +76,16 @@ x_button_set (WButton *b, char *text)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Radio buttons */
|
/* Radio buttons */
|
||||||
|
void
|
||||||
|
radio_toggle (GtkObject *object, WRadio *r)
|
||||||
|
{
|
||||||
|
int idx = (int) gtk_object_get_data (object, "index");
|
||||||
|
|
||||||
|
g_return_if_fail (idx != 0);
|
||||||
|
idx--;
|
||||||
|
r->sel = idx;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
x_create_radio (Dlg_head *h, widget_data parent, WRadio *r)
|
x_create_radio (Dlg_head *h, widget_data parent, WRadio *r)
|
||||||
{
|
{
|
||||||
@ -91,6 +101,8 @@ x_create_radio (Dlg_head *h, widget_data parent, WRadio *r)
|
|||||||
} else {
|
} else {
|
||||||
w = gtk_radio_button_new_with_label (group, r->texts [i]);
|
w = gtk_radio_button_new_with_label (group, r->texts [i]);
|
||||||
}
|
}
|
||||||
|
gtk_signal_connect (GTK_OBJECT (w), "toggled", GTK_SIGNAL_FUNC (radio_toggle), r);
|
||||||
|
gtk_object_set_data (GTK_OBJECT (w), "index", (void *) (i+1));
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), w);
|
gtk_box_pack_start_defaults (GTK_BOX (vbox), w);
|
||||||
gtk_widget_show (w);
|
gtk_widget_show (w);
|
||||||
}
|
}
|
||||||
@ -123,6 +135,7 @@ x_create_input (Dlg_head *h, widget_data parent, WInput *in)
|
|||||||
gtk_widget_show (entry);
|
gtk_widget_show (entry);
|
||||||
in->widget.wdata = (widget_data) entry;
|
in->widget.wdata = (widget_data) entry;
|
||||||
gtk_entry_set_text (GTK_ENTRY (entry), in->buffer);
|
gtk_entry_set_text (GTK_ENTRY (entry), in->buffer);
|
||||||
|
gtk_entry_set_position (GTK_ENTRY (entry), in->point);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,6 +144,10 @@ x_update_input (WInput *in)
|
|||||||
{
|
{
|
||||||
GtkEntry *entry = GTK_ENTRY (in->widget.wdata);
|
GtkEntry *entry = GTK_ENTRY (in->widget.wdata);
|
||||||
|
|
||||||
|
/* If the widget has not been initialized yet (done by WIDGET_INIT) */
|
||||||
|
if (!entry)
|
||||||
|
return;
|
||||||
|
|
||||||
gtk_entry_set_text (entry, in->buffer);
|
gtk_entry_set_text (entry, in->buffer);
|
||||||
gtk_entry_set_position (entry, in->point);
|
gtk_entry_set_position (entry, in->point);
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Fri Mar 6 14:24:19 1998 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* screen.c (string_file_name): In GNOME, the CList widget does the
|
||||||
|
filename truncation, so we do not do it here.
|
||||||
|
|
||||||
Thu Mar 5 10:28:40 1998 Norbert Warmuth <k3190@fh-sw.de>
|
Thu Mar 5 10:28:40 1998 Norbert Warmuth <k3190@fh-sw.de>
|
||||||
|
|
||||||
* popt.c (poptParseArgvString): make it compile with the native
|
* popt.c (poptParseArgvString): make it compile with the native
|
||||||
|
76
src/cmd.c
76
src/cmd.c
@ -1379,6 +1379,47 @@ save_setup_cmd (void)
|
|||||||
message (0, " Setup ", " Setup saved to ~/" PROFILE_NAME);
|
message (0, " Setup ", " Setup saved to ~/" PROFILE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
configure_panel_listing (WPanel *p, int view_type, int use_msformat, char *user, char *status)
|
||||||
|
{
|
||||||
|
int err;
|
||||||
|
|
||||||
|
p->user_mini_status = use_msformat;
|
||||||
|
p->list_type = view_type;
|
||||||
|
|
||||||
|
if (view_type == list_user || use_msformat){
|
||||||
|
|
||||||
|
free (p->user_format);
|
||||||
|
p->user_format = user;
|
||||||
|
|
||||||
|
free (p->user_status_format [view_type]);
|
||||||
|
p->user_status_format [view_type] = status;
|
||||||
|
|
||||||
|
err = set_panel_formats (p);
|
||||||
|
|
||||||
|
if (err){
|
||||||
|
if (err & 0x01){
|
||||||
|
free (p->user_format);
|
||||||
|
p->user_format = strdup (DEFAULT_USER_FORMAT);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (err & 0x02){
|
||||||
|
free (p->user_status_format [view_type]);
|
||||||
|
p->user_status_format [view_type] = strdup (DEFAULT_USER_FORMAT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
free (user);
|
||||||
|
free (status);
|
||||||
|
}
|
||||||
|
|
||||||
|
set_panel_formats (p);
|
||||||
|
paint_panel (p);
|
||||||
|
|
||||||
|
do_refresh ();
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef HAVE_GNOME
|
#ifndef HAVE_GNOME
|
||||||
void
|
void
|
||||||
info_cmd_no_menu (void)
|
info_cmd_no_menu (void)
|
||||||
@ -1422,40 +1463,7 @@ listing_cmd (void)
|
|||||||
|
|
||||||
p = MENU_PANEL_IDX == 0 ? left_panel : right_panel;
|
p = MENU_PANEL_IDX == 0 ? left_panel : right_panel;
|
||||||
|
|
||||||
p->user_mini_status = use_msformat;
|
configure_panel_listing (p, view_type, use_msformat, user, status);
|
||||||
p->list_type = view_type;
|
|
||||||
|
|
||||||
if (view_type == list_user || use_msformat){
|
|
||||||
|
|
||||||
free (p->user_format);
|
|
||||||
p->user_format = user;
|
|
||||||
|
|
||||||
free (p->user_status_format [view_type]);
|
|
||||||
p->user_status_format [view_type] = status;
|
|
||||||
|
|
||||||
err = set_panel_formats (p);
|
|
||||||
|
|
||||||
if (err){
|
|
||||||
if (err & 0x01){
|
|
||||||
free (p->user_format);
|
|
||||||
p->user_format = strdup (DEFAULT_USER_FORMAT);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (err & 0x02){
|
|
||||||
free (p->user_status_format [view_type]);
|
|
||||||
p->user_status_format [view_type] = strdup (DEFAULT_USER_FORMAT);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
free (user);
|
|
||||||
free (status);
|
|
||||||
}
|
|
||||||
|
|
||||||
set_panel_formats (p);
|
|
||||||
paint_panel (p);
|
|
||||||
|
|
||||||
do_refresh ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -62,4 +62,5 @@ void quick_cmd_no_menu (void);
|
|||||||
void info_cmd_no_menu (void);
|
void info_cmd_no_menu (void);
|
||||||
void quick_view_cmd (void);
|
void quick_view_cmd (void);
|
||||||
void toggle_listing_cmd (void);
|
void toggle_listing_cmd (void);
|
||||||
|
void configure_panel_listing (WPanel *p, int view_type, int use_msformat, char *user, char *status);
|
||||||
#endif /* __CMD_H */
|
#endif /* __CMD_H */
|
||||||
|
@ -2874,7 +2874,9 @@ int main (int argc, char *argv [])
|
|||||||
|
|
||||||
load_setup ();
|
load_setup ();
|
||||||
|
|
||||||
#ifndef HAVE_GNOME
|
#ifdef HAVE_GNOME
|
||||||
|
init_colors ();
|
||||||
|
#else
|
||||||
init_curses ();
|
init_curses ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
11
src/screen.c
11
src/screen.c
@ -315,6 +315,14 @@ string_file_ctime (file_entry *fe, int len)
|
|||||||
return file_date (fe->buf.st_ctime);
|
return file_date (fe->buf.st_ctime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_GNOME
|
||||||
|
/* In GNOME, the CList truncates the names */
|
||||||
|
char *
|
||||||
|
string_file_name (file_entry *fe, int len)
|
||||||
|
{
|
||||||
|
return fe->fname;
|
||||||
|
}
|
||||||
|
#else
|
||||||
char *
|
char *
|
||||||
string_file_name (file_entry *fe, int len)
|
string_file_name (file_entry *fe, int len)
|
||||||
{
|
{
|
||||||
@ -323,6 +331,7 @@ string_file_name (file_entry *fe, int len)
|
|||||||
else
|
else
|
||||||
return fe->fname;
|
return fe->fname;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
char *
|
char *
|
||||||
string_space (file_entry *fe, int len)
|
string_space (file_entry *fe, int len)
|
||||||
@ -2030,7 +2039,9 @@ static key_map panel_keymap [] = {
|
|||||||
{ XCTRL('t'), mark_file },
|
{ XCTRL('t'), mark_file },
|
||||||
{ ALT('o'), chdir_other_panel },
|
{ ALT('o'), chdir_other_panel },
|
||||||
{ ALT('l'), chdir_to_readlink },
|
{ ALT('l'), chdir_to_readlink },
|
||||||
|
#ifndef HAVE_X
|
||||||
{ KEY_DC, delete_cmd},
|
{ KEY_DC, delete_cmd},
|
||||||
|
#endif
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user