1999-02-18 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gmain.h: Removed set_current_panel() since it was never used. * glayout.c (set_current_panel): Made static and renamed from set_new_current_panel(). Removed old toolbar cruft. * gmount.c (get_mountable_devices): Made static. * Makefile.in (ICONS): Added i-floppy.png, i-cdrom.png, i-printer.png. Thanks, Tigert!
Этот коммит содержится в:
родитель
b169beea0e
Коммит
7aec2adddf
@ -1,3 +1,16 @@
|
|||||||
|
1999-02-18 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* gmain.h: Removed set_current_panel() since it was never used.
|
||||||
|
|
||||||
|
* glayout.c (set_current_panel): Made static and renamed from
|
||||||
|
set_new_current_panel().
|
||||||
|
Removed old toolbar cruft.
|
||||||
|
|
||||||
|
* gmount.c (get_mountable_devices): Made static.
|
||||||
|
|
||||||
|
* Makefile.in (ICONS): Added i-floppy.png, i-cdrom.png,
|
||||||
|
i-printer.png. Thanks, Tigert!
|
||||||
|
|
||||||
1999-02-18 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
1999-02-18 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
* gmount.c (gmount_setup_devices): New function to set up the
|
* gmount.c (gmount_setup_devices): New function to set up the
|
||||||
|
@ -88,17 +88,20 @@ GNOMEHDRS = \
|
|||||||
|
|
||||||
ICONS = \
|
ICONS = \
|
||||||
directory.xpm \
|
directory.xpm \
|
||||||
|
i-blockdev.png \
|
||||||
|
i-cdrom.png \
|
||||||
|
i-chardev.png \
|
||||||
|
i-core.png \
|
||||||
i-dirclosed.png \
|
i-dirclosed.png \
|
||||||
i-directory.png \
|
i-directory.png \
|
||||||
i-executable.png \
|
i-executable.png \
|
||||||
i-symlink.png \
|
|
||||||
i-regular.png \
|
|
||||||
i-core.png \
|
|
||||||
i-sock.png \
|
|
||||||
i-fifo.png \
|
i-fifo.png \
|
||||||
i-chardev.png \
|
i-floppy.png \
|
||||||
i-blockdev.png \
|
i-printer.png \
|
||||||
i-stalled.png
|
i-regular.png \
|
||||||
|
i-sock.png \
|
||||||
|
i-stalled.png \
|
||||||
|
i-symlink.png
|
||||||
|
|
||||||
#
|
#
|
||||||
# These objects from ../src do not depend on HAVE_X / HAVE_GNOME??
|
# These objects from ../src do not depend on HAVE_X / HAVE_GNOME??
|
||||||
|
@ -88,18 +88,8 @@ get_other_index (void)
|
|||||||
return UNDEFINED_INDEX;
|
return UNDEFINED_INDEX;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
set_current_panel (int index)
|
set_current_panel (WPanel *panel)
|
||||||
{
|
|
||||||
GList *p;
|
|
||||||
|
|
||||||
for (p = containers; index; p = p->next)
|
|
||||||
index--;
|
|
||||||
current_panel_ptr = p->data;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
set_new_current_panel (WPanel *panel)
|
|
||||||
{
|
{
|
||||||
GList *p;
|
GList *p;
|
||||||
|
|
||||||
@ -406,55 +396,11 @@ panel_enter_event (GtkWidget *widget, GdkEvent *event, WPanel *panel)
|
|||||||
if (get_current_panel () == panel)
|
if (get_current_panel () == panel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
set_new_current_panel (panel);
|
set_current_panel (panel);
|
||||||
dlg_select_widget (panel->widget.parent, panel);
|
dlg_select_widget (panel->widget.parent, panel);
|
||||||
send_message (panel->widget.parent, (Widget *) panel, WIDGET_FOCUS, 0);
|
send_message (panel->widget.parent, (Widget *) panel, WIDGET_FOCUS, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct _TbItems {
|
|
||||||
char *key, *text, *tooltip, *icon;
|
|
||||||
void (*cb) (GtkWidget *, void *);
|
|
||||||
GtkWidget *widget; /* will be filled in */
|
|
||||||
};
|
|
||||||
typedef struct _TbItems TbItems;
|
|
||||||
|
|
||||||
void user_menu_cmd (void);
|
|
||||||
|
|
||||||
static TbItems tb_items[] =
|
|
||||||
{
|
|
||||||
/* 1Help 2Menu 3View 4Edit 5Copy 6RenMov 7Mkdir 8Delete 9PullDn 10Quit */
|
|
||||||
{"F1", "Help", "Interactive help browser", GNOME_STOCK_MENU_BLANK, (void (*) (GtkWidget *, void *)) help_cmd, 0},
|
|
||||||
{"F2", "Menu", "User actions", GNOME_STOCK_MENU_BLANK, (void (*) (GtkWidget *, void *)) user_menu_cmd, 0},
|
|
||||||
{"F3", "View", "View file", GNOME_STOCK_MENU_BLANK, (void (*) (GtkWidget *, void *)) view_panel_cmd, 0},
|
|
||||||
{"F4", "Edit", "Edit file", GNOME_STOCK_MENU_BLANK, (void (*) (GtkWidget *, void *)) edit_panel_cmd, 0},
|
|
||||||
{"F5", "Copy", "Copy file or directory", GNOME_STOCK_MENU_COPY, (void (*) (GtkWidget *, void *)) copy_cmd, 0},
|
|
||||||
{"F6", "Move", "Rename or move a file or directory", GNOME_STOCK_MENU_BLANK, (void (*) (GtkWidget *, void *)) ren_cmd, 0},
|
|
||||||
{"F7", "Mkdir", "Create directory", GNOME_STOCK_MENU_BLANK, (void (*) (GtkWidget *, void *)) mkdir_panel_cmd, 0},
|
|
||||||
{"F8", "Dlete", "Delete file or directory", GNOME_STOCK_MENU_BLANK, (void (*) (GtkWidget *, void *)) delete_cmd, 0},
|
|
||||||
{"F9", "Menu", "Pull down menu", GNOME_STOCK_MENU_BLANK, (void (*) (GtkWidget *, void *)) 0, 0},
|
|
||||||
{"F10", "Quit", "Close and exit", GNOME_STOCK_MENU_QUIT, (void (*) (GtkWidget *, void *)) 0, 0},
|
|
||||||
{0, 0, 0, 0, 0, 0}
|
|
||||||
};
|
|
||||||
|
|
||||||
static GtkWidget *create_toolbar (GtkWidget * window, GtkWidget *widget)
|
|
||||||
{
|
|
||||||
GtkWidget *toolbar;
|
|
||||||
TbItems *t;
|
|
||||||
|
|
||||||
toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
|
|
||||||
|
|
||||||
for (t = &tb_items[0]; t->text; t++){
|
|
||||||
t->widget = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar),
|
|
||||||
t->text,
|
|
||||||
t->tooltip,
|
|
||||||
0,
|
|
||||||
gnome_stock_pixmap_widget (window, t->icon),
|
|
||||||
t->cb,
|
|
||||||
t->cb ? widget : 0);
|
|
||||||
}
|
|
||||||
return toolbar;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
create_new_menu_from (GnomeApp *app, WPanel *panel, char *file)
|
create_new_menu_from (GnomeApp *app, WPanel *panel, char *file)
|
||||||
{
|
{
|
||||||
@ -577,10 +523,6 @@ create_container (Dlg_head *h, char *name, char *geometry)
|
|||||||
gnome_app_set_statusbar(GNOME_APP (app), GTK_WIDGET(panel->ministatus));
|
gnome_app_set_statusbar(GNOME_APP (app), GTK_WIDGET(panel->ministatus));
|
||||||
|
|
||||||
gnome_app_install_menu_hints (GNOME_APP (app), gnome_panel_menu);
|
gnome_app_install_menu_hints (GNOME_APP (app), gnome_panel_menu);
|
||||||
/*
|
|
||||||
* I am trying to unclutter the screen, so this toolbar is gone now
|
|
||||||
*/
|
|
||||||
/* gnome_app_set_toolbar(GNOME_APP (app), GTK_TOOLBAR(create_toolbar(app, 0))); */
|
|
||||||
|
|
||||||
gtk_signal_connect (GTK_OBJECT (app),
|
gtk_signal_connect (GTK_OBJECT (app),
|
||||||
"enter_notify_event",
|
"enter_notify_event",
|
||||||
@ -618,7 +560,7 @@ new_panel_with_geometry_at (char *dir, char *geometry)
|
|||||||
mc_chdir (dir);
|
mc_chdir (dir);
|
||||||
panel = create_container (desktop_dlg, dir, geometry);
|
panel = create_container (desktop_dlg, dir, geometry);
|
||||||
add_widget (desktop_dlg, panel);
|
add_widget (desktop_dlg, panel);
|
||||||
set_new_current_panel (panel);
|
set_current_panel (panel);
|
||||||
x_flush_events ();
|
x_flush_events ();
|
||||||
|
|
||||||
return panel;
|
return panel;
|
||||||
|
@ -30,7 +30,6 @@ void x_redefine_label (WButtonBar *bb, int idx);
|
|||||||
void x_add_widget (Dlg_head *h, Widget_Item *w);
|
void x_add_widget (Dlg_head *h, Widget_Item *w);
|
||||||
int translate_gdk_keysym_to_curses (GdkEventKey *event);
|
int translate_gdk_keysym_to_curses (GdkEventKey *event);
|
||||||
void gnome_init_panels ();
|
void gnome_init_panels ();
|
||||||
void set_current_panel (int index);
|
|
||||||
void bind_gtk_keys (GtkWidget *w, Dlg_head *h);
|
void bind_gtk_keys (GtkWidget *w, Dlg_head *h);
|
||||||
WPanel *new_panel_at (char *dir);
|
WPanel *new_panel_at (char *dir);
|
||||||
WPanel *new_panel_with_geometry_at (char *dir, char *geometry);
|
WPanel *new_panel_with_geometry_at (char *dir, char *geometry);
|
||||||
|
@ -139,8 +139,8 @@ is_block_device_mounted (char *filename)
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
GList *
|
static GList *
|
||||||
get_list_of_mountable_devices (void)
|
get_mountable_devices (void)
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
struct mntent *mnt;
|
struct mntent *mnt;
|
||||||
@ -168,8 +168,8 @@ is_block_device_mountable (char *devname)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
GList *
|
static GList *
|
||||||
get_list_of_mountable_devices ()
|
get_mountable_devices (void)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -245,7 +245,7 @@ setup_devices (void)
|
|||||||
int hd_count;
|
int hd_count;
|
||||||
int generic_count;
|
int generic_count;
|
||||||
|
|
||||||
list = get_list_of_mountable_devices ();
|
list = get_mountable_devices ();
|
||||||
|
|
||||||
floppy_count = hd_count = generic_count = 0;
|
floppy_count = hd_count = generic_count = 0;
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ void gmount_setup_devices (int cleanup);
|
|||||||
#if 0
|
#if 0
|
||||||
gboolean is_block_device_mountable (char *devname);
|
gboolean is_block_device_mountable (char *devname);
|
||||||
gboolean is_block_device_mounted (char *devname);
|
gboolean is_block_device_mounted (char *devname);
|
||||||
GList *get_list_of_mountable_devices (void);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user