From e19f2af33f075b51a7ad60f3940cea022a344b7e Mon Sep 17 00:00:00 2001 From: Jonathan Blandford Date: Thu, 7 Jan 1999 05:19:09 +0000 Subject: [PATCH] 1999-01-07 Jonathan Blandford * gscreen.c (x_create_panel): now uses gnome-appbar instead of the old, psuedo status bar. --- gnome/ChangeLog | 5 +++++ gnome/glayout.c | 3 ++- gnome/gscreen.c | 35 +++++++++++++++++++++++------------ 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/gnome/ChangeLog b/gnome/ChangeLog index b8bdf84ce..dd02f58e3 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,3 +1,8 @@ +1999-01-07 Jonathan Blandford + + * gscreen.c (x_create_panel): now uses gnome-appbar instead of the + old, psuedo status bar. + 1999-01-06 Jonathan Blandford * gcmd.c (gnome_external_panelize): Now it works. Just need to save diff --git a/gnome/glayout.c b/gnome/glayout.c index dae305e32..db9edec59 100644 --- a/gnome/glayout.c +++ b/gnome/glayout.c @@ -454,7 +454,8 @@ create_container (Dlg_head *h, char *name, char *geometry) gtk_widget_set_uposition (GTK_WIDGET (app), xpos, ypos); panel = panel_new (name); - vbox = gtk_vbox_new (0, 0); + vbox = gtk_vbox_new (FALSE, 0); + gtk_container_set_border_width (vbox, 0); gnome_app_set_contents (GNOME_APP (app), vbox); gnome_app_create_menus_with_data (GNOME_APP (app), gnome_panel_menu, panel); diff --git a/gnome/gscreen.c b/gnome/gscreen.c index 730159ffd..31a05d609 100644 --- a/gnome/gscreen.c +++ b/gnome/gscreen.c @@ -1572,13 +1572,14 @@ show_filter_popup (GtkWidget *button, gpointer data) void display_mini_info (WPanel *panel) { - GtkLabel *label = GTK_LABEL (panel->ministatus); + GnomeAppBar *bar = GNOME_APPBAR (panel->ministatus); if (panel->searching) { char *buf; buf = g_strdup_printf (_("Search: %s"), panel->search_buffer); - gtk_label_set (label, buf); + gnome_appbar_pop (bar); + gnome_appbar_push (bar, buf); g_free (buf); return; } @@ -1589,7 +1590,8 @@ display_mini_info (WPanel *panel) buf = g_strdup_printf ((panel->marked == 1) ? _("%s bytes in %d file") : _("%s bytes in %d files"), size_trunc_sep (panel->total), panel->marked); - gtk_label_set (label, buf); + gnome_appbar_pop (bar); + gnome_appbar_push (bar, buf); g_free (buf); return; } @@ -1606,10 +1608,13 @@ display_mini_info (WPanel *panel) link_target [len] = 0; /* FIXME: Links should be handled differently */ /* str = copy_strings ("-> ", link_target, NULL); */ - gtk_label_set (label, " "); - /*free (str); */ - } else - gtk_label_set (label, _("")); + gnome_appbar_pop (bar); + gnome_appbar_push (bar, " "); + /*free (str); */ + } else { + gnome_appbar_pop (bar); + gnome_appbar_push (bar, _("")); + } return; } @@ -1620,12 +1625,14 @@ display_mini_info (WPanel *panel) buffer = xmalloc (len + 2, "display_mini_info"); format_file (buffer, panel, panel->selected, panel->estimated_total-2, 0, 1); buffer [len] = 0; - gtk_label_set (label, buffer); + gnome_appbar_pop (bar); + gnome_appbar_push (bar, buffer); free (buffer); } if (panel->list_type == list_icons){ if (panel->marked == 0){ - gtk_label_set (label, " "); + gnome_appbar_pop (bar); + gnome_appbar_push (bar, " "); } } } @@ -2253,20 +2260,23 @@ x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel) /* * ministatus */ + panel->ministatus = GNOME_APPBAR(gnome_appbar_new(FALSE, TRUE, GNOME_PREFERENCES_USER)); + gnome_app_set_statusbar(GNOME_APP (panel->xwindow), GTK_WIDGET(panel->ministatus)); +#if 0 panel->ministatus = gtk_label_new (" "); /* was a cliplabel */ gtk_widget_set_usize (panel->ministatus, 0, -1); gtk_misc_set_alignment (GTK_MISC (panel->ministatus), 0.0, 0.0); gtk_misc_set_padding (GTK_MISC (panel->ministatus), 3, 0); gtk_widget_show (panel->ministatus); gtk_label_set_justify (GTK_LABEL (panel->ministatus), GTK_JUSTIFY_LEFT); - /* * The statusbar * This status bar now holds the ministatus. */ + frame = gtk_frame_new (NULL); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN); - gtk_container_set_border_width (GTK_CONTAINER (frame), 3); + gtk_container_set_border_width (GTK_CONTAINER (frame), 0); panel->status = gtk_label_new (""); /* used to be a cliplabel */ @@ -2278,6 +2288,7 @@ x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel) gtk_label_set_justify (GTK_LABEL (panel->status), GTK_JUSTIFY_LEFT); gtk_widget_show_all (frame); +#endif panel->view_table = gtk_table_new (1, 1, 0); gtk_widget_show (panel->view_table); @@ -2328,10 +2339,10 @@ x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel) GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, 0, 0); -#endif gtk_table_attach (GTK_TABLE (panel->table), frame, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, 0, 0, 0); +#endif /* Ultra nasty hack: pull the vbox from wdata */ vbox = GTK_WIDGET (panel->widget.wdata);