diff --git a/gnome/ChangeLog b/gnome/ChangeLog index d43479f18..4fb4bde7f 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,3 +1,16 @@ +1999-02-18 Federico Mena Quintero + + * 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 * gmount.c (gmount_setup_devices): New function to set up the diff --git a/gnome/Makefile.in b/gnome/Makefile.in index 56804d22d..4848e0335 100644 --- a/gnome/Makefile.in +++ b/gnome/Makefile.in @@ -88,17 +88,20 @@ GNOMEHDRS = \ ICONS = \ directory.xpm \ + i-blockdev.png \ + i-cdrom.png \ + i-chardev.png \ + i-core.png \ i-dirclosed.png \ i-directory.png \ i-executable.png \ - i-symlink.png \ - i-regular.png \ - i-core.png \ - i-sock.png \ i-fifo.png \ - i-chardev.png \ - i-blockdev.png \ - i-stalled.png + i-floppy.png \ + i-printer.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?? diff --git a/gnome/glayout.c b/gnome/glayout.c index e4c781ed0..ccc0d7ff9 100644 --- a/gnome/glayout.c +++ b/gnome/glayout.c @@ -88,18 +88,8 @@ get_other_index (void) return UNDEFINED_INDEX; } -void -set_current_panel (int index) -{ - GList *p; - - for (p = containers; index; p = p->next) - index--; - current_panel_ptr = p->data; -} - -void -set_new_current_panel (WPanel *panel) +static void +set_current_panel (WPanel *panel) { GList *p; @@ -406,55 +396,11 @@ panel_enter_event (GtkWidget *widget, GdkEvent *event, WPanel *panel) if (get_current_panel () == panel) return; - set_new_current_panel (panel); + set_current_panel (panel); dlg_select_widget (panel->widget.parent, panel); 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 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_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), "enter_notify_event", @@ -618,7 +560,7 @@ new_panel_with_geometry_at (char *dir, char *geometry) mc_chdir (dir); panel = create_container (desktop_dlg, dir, geometry); add_widget (desktop_dlg, panel); - set_new_current_panel (panel); + set_current_panel (panel); x_flush_events (); return panel; diff --git a/gnome/gmain.h b/gnome/gmain.h index 9bf004408..715ed2efd 100644 --- a/gnome/gmain.h +++ b/gnome/gmain.h @@ -30,7 +30,6 @@ void x_redefine_label (WButtonBar *bb, int idx); void x_add_widget (Dlg_head *h, Widget_Item *w); int translate_gdk_keysym_to_curses (GdkEventKey *event); void gnome_init_panels (); -void set_current_panel (int index); void bind_gtk_keys (GtkWidget *w, Dlg_head *h); WPanel *new_panel_at (char *dir); WPanel *new_panel_with_geometry_at (char *dir, char *geometry); diff --git a/gnome/gmount.c b/gnome/gmount.c index 8243be4b3..0b6eb5865 100644 --- a/gnome/gmount.c +++ b/gnome/gmount.c @@ -139,8 +139,8 @@ is_block_device_mounted (char *filename) return retval; } -GList * -get_list_of_mountable_devices (void) +static GList * +get_mountable_devices (void) { FILE *f; struct mntent *mnt; @@ -168,8 +168,8 @@ is_block_device_mountable (char *devname) return FALSE; } -GList * -get_list_of_mountable_devices () +static GList * +get_mountable_devices (void) { return NULL; } @@ -245,7 +245,7 @@ setup_devices (void) int hd_count; int generic_count; - list = get_list_of_mountable_devices (); + list = get_mountable_devices (); floppy_count = hd_count = generic_count = 0; diff --git a/gnome/gmount.h b/gnome/gmount.h index d9bdd5e9f..02d003ecd 100644 --- a/gnome/gmount.h +++ b/gnome/gmount.h @@ -16,7 +16,6 @@ void gmount_setup_devices (int cleanup); #if 0 gboolean is_block_device_mountable (char *devname); gboolean is_block_device_mounted (char *devname); -GList *get_list_of_mountable_devices (void); #endif #endif