--- ../../../originals/gnome-utils-1.4.0.2/mini-utils/gless/gless.c Tue Jul 18 15:36:44 2000 +++ gless.c Mon Jul 16 10:46:53 2001 @@ -96,6 +96,7 @@ const char ** start_files = NULL; GList * start_geometries = NULL; gboolean ignore_stdin = FALSE; +gboolean fixed_font = FALSE; /********************************* Arg parsing and session management @@ -112,7 +113,8 @@ const struct poptOption *opt, const char *arg, void *data) { - g_print(_("Reason %d\n"), reason); + /* i assume this is old debugging info, so I commented it out + g_print(_("Reason %d\n"), reason); */ switch (opt->val){ case GEOMETRY_KEY: @@ -129,6 +131,7 @@ {NULL, '\0', POPT_ARG_CALLBACK, &parse_an_arg, 0, NULL, NULL}, {"geometry", '\0', POPT_ARG_STRING, NULL, GEOMETRY_KEY, N_("Where to put the window, and its size"), N_("GEOMETRY")}, {"nostdin", '\0', POPT_ARG_NONE, NULL, NOSTDIN_KEY, N_("Ignore standard input; may be needed in some cases."), NULL}, + {"fixed-font", 'f', POPT_ARG_NONE, &fixed_font, NOSTDIN_KEY, N_("Use a fixed font to display text."), NULL}, {NULL, '\0', 0, NULL, 0} }; @@ -308,7 +311,7 @@ GNOMEUIINFO_END }; -static GnomeUIInfo settings_menu[] = { +static GnomeUIInfo settings_menu[] = { {GNOME_APP_UI_TOGGLEITEM, N_("_Fixed Font"), N_("Display text with a fixed font"), fixed_cb, NULL, NULL, @@ -338,6 +341,7 @@ { GnomeLessApp * app; GtkWidget * app_box; + int i; const gint num_drop_types = sizeof( drop_types ) / sizeof( drop_types [0] ); @@ -390,6 +394,15 @@ app ); app->less = gnome_less_new(); + + if (fixed_font) { + gnome_less_set_fixed_font(GNOME_LESS(app->less), TRUE); + for (i = 0 ; settings_menu[i].label != NULL ; i++) { + if (strcmp(settings_menu[i].label, "_Fixed Font") == 0) { + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(settings_menu[i].widget), TRUE); + } + } + } gtk_box_pack_start(GTK_BOX(app_box), app->less, TRUE, TRUE, GNOME_PAD);