1
1

don't remember exactly what I did -- much of this is from before the CVS

machine went down and I went on vacation.  Newer toolbars...  It now
compiles too (gicon.c had some broken code in it)
Этот коммит содержится в:
Jonathan Blandford 1999-01-18 21:25:55 +00:00
родитель b37abf7e28
Коммит 366f5e774b
8 изменённых файлов: 107 добавлений и 37 удалений

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

@ -1,3 +1,7 @@
1999-01-13 Jonathan Blandford <jrb@redhat.com>
* Make.common.in (gnewdir): new path.
Sun Jan 17 03:19:47 1999 Timur Bakeyev <mc@bat.ru>
* configure.in: Add comments before "Let" and "the" - typo. Add new

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

@ -22,6 +22,7 @@ corbadir = $(sysconfdir)/CORBA/servers
libdir = $(exec_prefix)/lib/mc
idldir = $(prefix)/share/idl
suppbindir = $(libdir)/bin
gnewdir = $(prefix)/share/mc/templates
tidir = $(libdir)/term
extfsdir = $(libdir)/extfs
datadir = @datadir@

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

@ -1,3 +1,7 @@
1999-01-18 Jonathan Blandford <jrb@redhat.com>
* gtkdtree.c (gtk_dtree_construct): change ctree_set_reorderable.
1999-01-18 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdesktop.c (icon_event): Rewrote event handling for icons on the
@ -43,6 +47,8 @@
* glayout.c (create_container): finished the New->menu. Looks
better now.
(create_container): Moved the statusbar creaton. Now you can get
the hints.
* gcmd.c (gnome_run_new): new function.

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

@ -292,10 +292,10 @@ gicon_get_icon_for_file (file_entry *fe)
return gicon_get_icon_for_file_speed (fe, TRUE);
}
typedef lookup_name_closure_t {
typedef struct lookup_name_closure_t {
char *name;
void *image;
};
} lookup_name_closure_t;
void
search_image (gpointer key, gpointer value, gpointer user_data)
@ -318,7 +318,7 @@ gicon_image_to_name (GdkImlibImage *image)
closure.image = image;
closure.name = NULL;
g_hash_table_foreach (icon_hash, check_key, &search_image, &closure);
g_hash_table_foreach (icon_hash, &search_image, &closure);
if (closure.name == NULL)
return g_strdup (ICONDIR "i-regular.png");

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

@ -280,7 +280,7 @@ void configure_box (void);
GtkCheckMenuItem *gnome_toggle_snap (void);
GnomeUIInfo gnome_panel_new_menu [] = {
{ GNOME_APP_UI_ITEM, N_("_Terminal"), N_("Launch a new terminal in the current directory"), NULL},
{ GNOME_APP_UI_ITEM, N_("_Terminal"), N_("Launch a new terminal in the current directory"), gnome_open_terminal},
/* If this ever changes, make sure you update create_new_menu accordingly. */
{ GNOME_APP_UI_ITEM, N_("_Directory..."), N_("Creates a new directory"), gnome_mkdir_cmd },
{ GNOME_APP_UI_ENDOFINFO, 0, 0 }
@ -575,6 +575,11 @@ create_container (Dlg_head *h, char *name, char *geometry)
gnome_app_set_contents (GNOME_APP (app), vbox);
gnome_app_create_menus_with_data (GNOME_APP (app), gnome_panel_menu, panel);
create_new_menu (GNOME_APP (app), panel);
panel->ministatus = GNOME_APPBAR(gnome_appbar_new(FALSE, TRUE, GNOME_PREFERENCES_NEVER));
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
*/

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

@ -81,6 +81,7 @@ GtkWidget *drag_multiple_ok = NULL;
static void panel_file_list_configure_contents (GtkWidget *sw, WPanel *panel, int main_width, int height);
#define CLIST_FROM_SW(panel_list) GTK_CLIST (GTK_BIN (panel_list)->child)
@ -2170,6 +2171,42 @@ button_switch_to_custom_listing (WPanel *panel)
{
return button_switch_to (listing_custom_xpm, GTK_SIGNAL_FUNC (do_switch_to_custom_listing), panel);
}
static GnomeUIInfo viewbar[] = {
{ GNOME_APP_UI_ITEM, N_("Icon"), N_("Switch view to an Icon view"), button_switch_to_icon, NULL, NULL, \
GNOME_APP_PIXMAP_DATA, listing_iconic_xpm, 0, (GdkModifierType) 0, NULL },
{ GNOME_APP_UI_ITEM, N_("Brief"), N_("Switch view to show just file name and type"), button_switch_to_brief_listing, NULL, NULL, \
GNOME_APP_PIXMAP_DATA, listing_brief_list_xpm, 0, (GdkModifierType) 0, NULL },
{ GNOME_APP_UI_ITEM, N_("Detailed"), N_("Switch view to show detailed file statistics"), button_switch_to_full_listing, NULL, NULL, \
GNOME_APP_PIXMAP_DATA, listing_list_xpm, 0, (GdkModifierType) 0, NULL },
{ GNOME_APP_UI_ITEM, N_("Custom"), N_("Switch view to show custom determined statistics"), button_switch_to_custom_listing, NULL, NULL, \
GNOME_APP_PIXMAP_DATA, listing_custom_xpm, 0, (GdkModifierType) 0, NULL },
GNOMEUIINFO_END
};
static GnomeUIInfo toolbar[] = {
GNOMEUIINFO_ITEM_STOCK (N_("Back"), N_("Go to the previously visited directory"),
panel_back, GNOME_STOCK_PIXMAP_BACK),
GNOMEUIINFO_ITEM_STOCK (N_("Up"), N_("Go up a level in the directory heirarchy"),
panel_up, GNOME_STOCK_PIXMAP_UP),
GNOMEUIINFO_ITEM_STOCK (N_("Forward"), N_("Go to the next directory"),
panel_fwd, GNOME_STOCK_PIXMAP_FORWARD),
GNOMEUIINFO_SEPARATOR,
GNOMEUIINFO_ITEM_STOCK (N_("Home"), N_("Go to your home directory"),
panel_fwd, GNOME_STOCK_PIXMAP_HOME),
GNOMEUIINFO_SEPARATOR,
GNOMEUIINFO_RADIOLIST(viewbar),
GNOMEUIINFO_END
};
static void
do_ui_signal_connect (GnomeUIInfo *uiinfo, gchar *signal_name,
GnomeUIBuilderData *uibdata)
{
if (uiinfo->moreinfo)
gtk_signal_connect (GTK_OBJECT (uiinfo->widget),
signal_name, uiinfo->moreinfo, uibdata->data ?
uibdata->data : uiinfo->user_data);
}
static void
tree_size_allocate (GtkWidget *widget, GtkAllocation *allocation, WPanel *panel)
@ -2189,11 +2226,11 @@ void
x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel)
{
GtkWidget *status_line, *filter, *vbox, *ministatus_box;
GtkWidget *frame, *cwd, *back_p, *fwd_p, *up_p;
GtkWidget *cwd, *back_p, *fwd_p, *up_p;
GtkWidget *hbox, *evbox, *dock, *box;
GtkWidget *table_frame;
int display;
GnomeUIBuilderData uibdata;
panel->xwindow = gtk_widget_get_toplevel (GTK_WIDGET (panel->widget.wdata));
panel->table = gtk_table_new (2, 1, 0);
@ -2262,39 +2299,53 @@ x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel)
/* We do not want the focus by default (and the previos add_widget just gave it to us) */
h->current = h->current->prev;
/*
* History buttons, and updir.
* We go through a lot of pain, wrestling with gnome_app* and gmc's @#$&*#$ internal structure and
* make the #@$*&@#$ toolbars here...
*/
back_p = gnome_stock_pixmap_widget_new (panel->xwindow, GNOME_STOCK_MENU_BACK);
fwd_p = gnome_stock_pixmap_widget_new (panel->xwindow, GNOME_STOCK_MENU_FORWARD);
up_p = gnome_stock_pixmap_widget_new (panel->xwindow, GNOME_STOCK_MENU_UP);
panel->up_b = gtk_button_new ();
panel->back_b = gtk_button_new ();
panel->fwd_b = gtk_button_new ();
gtk_container_add (GTK_CONTAINER (panel->back_b), back_p);
gtk_container_add (GTK_CONTAINER (panel->fwd_b), fwd_p);
gtk_container_add (GTK_CONTAINER (panel->up_b), up_p);
gtk_signal_connect (GTK_OBJECT (panel->back_b), "clicked", GTK_SIGNAL_FUNC(panel_back), panel);
gtk_signal_connect (GTK_OBJECT (panel->fwd_b), "clicked", GTK_SIGNAL_FUNC(panel_fwd), panel);
gtk_signal_connect (GTK_OBJECT (panel->up_b), "clicked", GTK_SIGNAL_FUNC(panel_up), panel);
status_line = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
uibdata.connect_func = do_ui_signal_connect;
uibdata.data = panel;
uibdata.is_interp = FALSE;
uibdata.relay_func = NULL;
uibdata.destroy_func = NULL;
gnome_app_fill_toolbar_custom (GTK_TOOLBAR (status_line), toolbar, &uibdata, NULL);
gnome_app_add_toolbar (GNOME_APP (panel->xwindow),
GTK_TOOLBAR (status_line),
"gmc-toolbar0",
GNOME_DOCK_ITEM_BEH_EXCLUSIVE,
GNOME_DOCK_TOP,
2, 0, 0);
panel->back_b = toolbar[0].widget;
panel->up_b = toolbar[1].widget;
panel->fwd_b = toolbar[2].widget;
panel_update_marks (panel);
/*
* Here we make the toolbars
* Here we make the view buttons.
*/
status_line = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
gtk_container_set_border_width (GTK_CONTAINER (status_line), 3);
evbox = gtk_event_box_new ();
hbox = gtk_hbox_new (FALSE, 2);
gtk_container_add (GTK_CONTAINER (evbox), hbox);
gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_("Location:")), FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), cwd, FALSE, FALSE, 0);
gtk_toolbar_append_widget (GTK_TOOLBAR (status_line),
evbox,
NULL, NULL);
gtk_toolbar_append_space (GTK_TOOLBAR (status_line));
gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_("Location:")), FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), cwd, FALSE, FALSE, 0);
dock = gnome_dock_item_new ("gmc-toolbar1", GNOME_DOCK_ITEM_BEH_EXCLUSIVE | GNOME_DOCK_ITEM_BEH_NEVER_VERTICAL);
gtk_container_add (GTK_CONTAINER(dock),status_line);
gnome_dock_add_item (GNOME_DOCK(GNOME_APP (panel->xwindow)->dock),
GNOME_DOCK_ITEM (dock), GNOME_DOCK_TOP, 1, 0, 0, FALSE);
gtk_widget_show_all (dock);
#if 0
status_line = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
gtk_toolbar_append_widget (GTK_TOOLBAR (status_line),
panel->back_b,
"Go to the previous directory", NULL);
@ -2317,11 +2368,14 @@ x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel)
gtk_toolbar_append_widget (GTK_TOOLBAR (status_line),
button_switch_to_custom_listing (panel),
"Custom view", NULL);
dock = gnome_dock_item_new ("gmc-toolbar", GNOME_DOCK_ITEM_BEH_EXCLUSIVE | GNOME_DOCK_ITEM_BEH_NEVER_VERTICAL);
gtk_container_add (GTK_CONTAINER(dock),status_line);
gnome_dock_add_item (GNOME_DOCK(GNOME_APP (panel->xwindow)->dock),
GNOME_DOCK_ITEM (dock), GNOME_DOCK_TOP, 1, 0, 0, FALSE);
gtk_widget_show_all (dock);
gnome_app_add_toolbar (GNOME_APP (panel->xwindow),
GTK_TOOLBAR (status_line),
"gmc-toolbar2",
GNOME_DOCK_ITEM_BEH_EXCLUSIVE,
GNOME_DOCK_TOP,
2, 0, 0);
gtk_widget_show_all (status_line);
#endif
panel->view_table = gtk_table_new (1, 1, 0);
gtk_widget_show (panel->view_table);
@ -2329,8 +2383,6 @@ x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel)
/*
* The status bar.
*/
panel->ministatus = GNOME_APPBAR(gnome_appbar_new(FALSE, TRUE, GNOME_PREFERENCES_NEVER));
gnome_app_set_statusbar(GNOME_APP (panel->xwindow), GTK_WIDGET(panel->ministatus));
ministatus_box = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME(ministatus_box), GTK_SHADOW_IN);

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

@ -532,7 +532,7 @@ gtk_dtree_construct (GtkDTree *dtree)
gtk_clist_columns_autosize (clist);
gtk_ctree_set_line_style (ctree, GTK_CTREE_LINES_DOTTED);
gtk_ctree_set_reorderable (ctree, FALSE);
gtk_clist_set_reorderable (GTK_CLIST (ctree), FALSE);
gdk_dtree_load_pixmaps (dtree);
gtk_dtree_load_root_tree (dtree);

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

@ -29,6 +29,7 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h> /* For chdir(), readlink() and getwd()/getcwd() */
#endif
/*#include "mc.h"*/
#include "mem.h"
#include "mad.h"
@ -2563,7 +2564,8 @@ panel_re_sort (WPanel *panel)
char *filename;
int i;
g_return_if_fail (panel != NULL);
if (panel == NULL)
return;
filename = strdup (selection (panel)->fname);
unselect_item (panel);