1999-04-06 Federico Mena Quintero <federico@nuclecu.unam.mx>

* glayout.c (create_container): Use gtk_window_set_default_size(),
	not gtk_widget_set_usize().

	* gdesktop.c (get_slot_from_pos): Clamp the slot positions to be
	inside the screen.

	* gmain.c (gnome_check_super_user): Improved the message a bit.
This commit is contained in:
Miguel de Icaza 1999-04-07 01:49:22 +00:00
parent ac4255c10b
commit b069f7b995
5 changed files with 27 additions and 8 deletions

View File

@ -1,3 +1,13 @@
1999-04-06 Federico Mena Quintero <federico@nuclecu.unam.mx>
* glayout.c (create_container): Use gtk_window_set_default_size(),
not gtk_widget_set_usize().
* gdesktop.c (get_slot_from_pos): Clamp the slot positions to be
inside the screen.
* gmain.c (gnome_check_super_user): Improved the message a bit.
1999-04-06 David Martin <dmartina@usa.net>
* gcmd.c: marked message for translation.

View File

@ -134,8 +134,13 @@ static DesktopIconInfo *desktop_icon_info_new (char *filename, char *url, char *
static void
get_slot_from_pos (int x, int y, int *u, int *v)
{
*u = (x + DESKTOP_SNAP_X / 2) / DESKTOP_SNAP_X;
*v = (y + DESKTOP_SNAP_Y / 2) / DESKTOP_SNAP_Y;
int uu, vv;
uu = (x + DESKTOP_SNAP_X / 2) / DESKTOP_SNAP_X;
vv = (y + DESKTOP_SNAP_Y / 2) / DESKTOP_SNAP_Y;
*u = CLAMP (uu, 0, layout_cols - 1);
*v = CLAMP (vv, 0, layout_rows - 1);
}
/* Looks for a free slot in the layout_slots array and returns the coordinates

View File

@ -728,9 +728,10 @@ create_container (Dlg_head *h, char *name, char *geometry)
/* Geometry configuration */
if (width != -1 && height != -1)
gtk_widget_set_usize (GTK_WIDGET (app), width, height);
gtk_window_set_default_size (GTK_WINDOW (app), width, height);
else
gtk_widget_set_usize (GTK_WIDGET (app), 540, 360);
gtk_window_set_default_size (GTK_WINDOW (app), 540, 360);
if (xpos != -1 && ypos != -1)
gtk_widget_set_uposition (GTK_WIDGET (app), xpos, ypos);

View File

@ -630,8 +630,9 @@ gnome_check_super_user (void)
return;
warning_dlg = gnome_message_box_new (
_("You are running the GNOME Midnight Commander as root. \n\n"
"You will not be protected from severly damaging your system."),
_("You are running the GNOME File Manager as root.\n\n"
"As root, you can damage your system if you are not careful, and the "
"GNOME File Manager will not stop you from doing it."),
GNOME_MESSAGE_BOX_WARNING,
GNOME_STOCK_BUTTON_OK, NULL);

View File

@ -2305,14 +2305,16 @@ create_and_setup_pane (WPanel *panel)
else
size = 0;
}
#if 0
gtk_paned_set_position (GTK_PANED (pane), size);
#else
/*
* Hack: set the default startup size for the pane without
* using _set_usize which would set the minimal size
*/
GTK_PANED (pane)->child1_size = size;
GTK_PANED (pane)->position_set = TRUE;
#endif
gtk_widget_show (pane);
return pane;