gweather applet patch



Small patch to change the detailed forecast font to a fixed font,
instead of variable width.  makes reading the table a lot easier

note: the font "fixed" is hard-coded into the patch.  there is probably
a better way to do this, but this is my first attempt at trying to code
any gnome stuff, and i don't know what the preferred method is.  if
anyone could take a look at it, maybe critique it, i'd really appreciate
it

thanks,
Matt

-- 
Matthew J. Doller
mdoller wpi edu

WPI Box 1977
100 Institute Rd.
Worcester MA, 01609
*** gweather-dialog.c.old	Thu May  3 19:34:17 2001
--- gweather-dialog.c	Thu May  3 17:35:42 2001
***************
*** 400,405 ****
--- 400,406 ----
  void gweather_dialog_update (void)
  {
      const gchar *forecast;
+     GdkFont* detailed_forecast_font = gdk_fontset_load ( "fixed" );
  
      /* Check for parallel network update in progress */
      if(gweather_info == NULL)
***************
*** 429,440 ****
      gtk_text_forward_delete(GTK_TEXT(forecast_text), gtk_text_get_length(GTK_TEXT(forecast_text)));
      forecast = weather_info_get_forecast(gweather_info);
      if (forecast) {
!         gtk_text_insert(GTK_TEXT(forecast_text), NULL, NULL, NULL, forecast, strlen(forecast));
      } else {
          if (gweather_pref.detailed)
!             gtk_text_insert(GTK_TEXT(forecast_text), NULL, NULL, NULL, _("Detailed forecast not available for this location.\nPlease try the state forecast; note that IWIN forecasts are available only for US cities."), -1);
          else
!             gtk_text_insert(GTK_TEXT(forecast_text), NULL, NULL, NULL, _("State forecast not available for this location.\nPlease try the detailed forecast; note that IWIN forecasts are available only for US cities."), -1);
      }
  
      /* Update radar map */
--- 430,441 ----
      gtk_text_forward_delete(GTK_TEXT(forecast_text), gtk_text_get_length(GTK_TEXT(forecast_text)));
      forecast = weather_info_get_forecast(gweather_info);
      if (forecast) {
!         gtk_text_insert(GTK_TEXT(forecast_text), detailed_forecast_font, NULL, NULL, forecast, strlen(forecast));
      } else {
          if (gweather_pref.detailed)
!             gtk_text_insert(GTK_TEXT(forecast_text), detailed_forecast_font, NULL, NULL, _("Detailed forecast not available for this location.\nPlease try the state forecast; note that IWIN forecasts are available only for US cities."), -1);
          else
!             gtk_text_insert(GTK_TEXT(forecast_text), detailed_forecast_font, NULL, NULL, _("State forecast not available for this location.\nPlease try the detailed forecast; note that IWIN forecasts are available only for US cities."), -1);
      }
  
      /* Update radar map */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]