1
1

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.
Этот коммит содержится в:
Miguel de Icaza 1999-04-07 01:49:22 +00:00
родитель ac4255c10b
Коммит b069f7b995
5 изменённых файлов: 27 добавлений и 8 удалений

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

@ -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> 1999-04-06 David Martin <dmartina@usa.net>
* gcmd.c: marked message for translation. * gcmd.c: marked message for translation.

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

@ -134,8 +134,13 @@ static DesktopIconInfo *desktop_icon_info_new (char *filename, char *url, char *
static void static void
get_slot_from_pos (int x, int y, int *u, int *v) get_slot_from_pos (int x, int y, int *u, int *v)
{ {
*u = (x + DESKTOP_SNAP_X / 2) / DESKTOP_SNAP_X; int uu, vv;
*v = (y + DESKTOP_SNAP_Y / 2) / DESKTOP_SNAP_Y;
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 /* Looks for a free slot in the layout_slots array and returns the coordinates

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

@ -728,9 +728,10 @@ create_container (Dlg_head *h, char *name, char *geometry)
/* Geometry configuration */ /* Geometry configuration */
if (width != -1 && height != -1) 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 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) if (xpos != -1 && ypos != -1)
gtk_widget_set_uposition (GTK_WIDGET (app), xpos, ypos); gtk_widget_set_uposition (GTK_WIDGET (app), xpos, ypos);

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

@ -630,8 +630,9 @@ gnome_check_super_user (void)
return; return;
warning_dlg = gnome_message_box_new ( warning_dlg = gnome_message_box_new (
_("You are running the GNOME Midnight Commander as root. \n\n" _("You are running the GNOME File Manager as root.\n\n"
"You will not be protected from severly damaging your system."), "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_MESSAGE_BOX_WARNING,
GNOME_STOCK_BUTTON_OK, NULL); GNOME_STOCK_BUTTON_OK, NULL);

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

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