mirror of https://github.com/MidnightCommander/mc
1998-11-12 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gmain.c (session_save_state): Use gnome_geometry_string.
This commit is contained in:
parent
5305f827ed
commit
13bd569914
|
@ -1,3 +1,12 @@
|
|||
1998-11-12 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||
|
||||
* gmain.c (session_save_state): Use gnome_geometry_string.
|
||||
|
||||
1998-11-06 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||
|
||||
* gscreen.c (panel_file_list_compute_lines): Quick hack to get mc
|
||||
to compile with the new CList.
|
||||
|
||||
1998-11-10 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* Makefile.in: Removed gtrans.c from the list of sources.
|
||||
|
|
|
@ -575,14 +575,13 @@ session_save_state (GnomeClient *client, gint phase, GnomeRestartStyle save_styl
|
|||
for (i = 1, l = containers; l; l = l->next){
|
||||
PanelContainer *pc = l->data;
|
||||
int x, y, w, h;
|
||||
char *buffer = g_malloc (32);
|
||||
char *geom;
|
||||
|
||||
gdk_window_get_origin (GTK_WIDGET (pc->panel->widget.wdata)->window, &x, &y);
|
||||
gdk_window_get_size (GTK_WIDGET (pc->panel->widget.wdata)->window, &w, &h);
|
||||
sprintf (buffer, "%dx%d+%d+%d", w, h, x, y);
|
||||
geom = gnome_geometry_string (GTK_WIDGET (pc->panel->widget.wdata)->window);
|
||||
|
||||
argv [i++] = pc->panel->cwd;
|
||||
argv [i++] = "--geometry";
|
||||
argv [i++] = buffer;
|
||||
argv [i++] = geom;
|
||||
free_list = g_list_append (free_list, buffer);
|
||||
}
|
||||
|
||||
|
|
|
@ -436,6 +436,7 @@ panel_file_list_configure_contents (GtkWidget *sw, WPanel *panel, int main_width
|
|||
|
||||
char_width = gdk_string_width (sw->style->font, "xW") / 2;
|
||||
width = main_width - lost_pixels;
|
||||
|
||||
extra_pixels = width % char_width;
|
||||
usable_pixels = width - extra_pixels;
|
||||
total_columns = usable_pixels / char_width;
|
||||
|
@ -853,14 +854,12 @@ static void
|
|||
panel_file_list_compute_lines (GtkScrolledWindow *sw, WPanel *panel, int height)
|
||||
{
|
||||
int lost_pixels = 0;
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (sw->hscrollbar)) {
|
||||
int scrollbar_width = GTK_WIDGET (sw->hscrollbar)->requisition.width;
|
||||
int scrollbar_space = GTK_SCROLLED_WINDOW_CLASS (GTK_OBJECT (sw)->klass)->scrollbar_spacing;
|
||||
|
||||
lost_pixels = scrollbar_space + scrollbar_width;
|
||||
}
|
||||
|
||||
panel->widget.lines = (height-lost_pixels) / (GTK_CLIST (sw->viewport)->row_height + CELL_SPACING);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue