Diff of /trunk/src/cache.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 139 by harbaum, Tue Oct 20 13:25:04 2009 UTC revision 140 by harbaum, Thu Oct 22 14:02:43 2009 UTC
# Line 22  Line 22 
22    
23  static GtkWidget *cache_description(appdata_t *appdata, cache_t *cache) {  static GtkWidget *cache_description(appdata_t *appdata, cache_t *cache) {
24    return html_view(appdata, cache->long_description,    return html_view(appdata, cache->long_description,
25                     cache->long_is_html, TRUE, cache, NULL);             cache->long_is_html?HTML_HTML:HTML_PLAIN_TEXT, TRUE, cache, NULL);
26  }  }
27    
28  #ifndef USE_MAEMO  // maemos touchscreen doesn't support tooltips  #ifndef USE_MAEMO  // maemos touchscreen doesn't support tooltips
# Line 226  static GtkWidget *cache_overview(cache_c Line 226  static GtkWidget *cache_overview(cache_c
226    if(cache->short_description)    if(cache->short_description)
227      gtk_box_pack_start_defaults(GTK_BOX(vbox),      gtk_box_pack_start_defaults(GTK_BOX(vbox),
228          html_view(appdata, cache->short_description,          html_view(appdata, cache->short_description,
229                    cache->short_is_html, TRUE, cache, NULL));            cache->short_is_html?HTML_HTML:HTML_PLAIN_TEXT, TRUE, cache, NULL));
230    
231    return vbox;    return vbox;
232  }  }
# Line 272  static void on_decrypt(GtkWidget *widget Line 272  static void on_decrypt(GtkWidget *widget
272  static GtkWidget *cache_hint(appdata_t *appdata, cache_t *cache) {  static GtkWidget *cache_hint(appdata_t *appdata, cache_t *cache) {
273    /* encrypting/decrypting html is nothing we want to do */    /* encrypting/decrypting html is nothing we want to do */
274    if(cache->hint_is_html)    if(cache->hint_is_html)
275      return html_view(appdata, cache->hint, TRUE, TRUE, NULL, NULL);      return html_view(appdata, cache->hint, HTML_HTML, TRUE, NULL, NULL);
276    
277    /* we can now be sure that we are talking about pain text */    /* we can now be sure that we are talking about pain text */
278    GtkWidget *vbox = gtk_vbox_new(FALSE, 0);    GtkWidget *vbox = gtk_vbox_new(FALSE, 0);
279    
280    char *hint = strdup(cache->hint);    char *hint = strdup(cache->hint);
281    rot13(hint);    rot13(hint);
282    GtkWidget *view = html_view(appdata, hint, FALSE, TRUE, NULL, NULL);    GtkWidget *view =
283        html_view(appdata, hint, HTML_PLAIN_TEXT, TRUE, NULL, NULL);
284    gtk_box_pack_start_defaults(GTK_BOX(vbox), view);    gtk_box_pack_start_defaults(GTK_BOX(vbox), view);
285    free(hint);    free(hint);
286    
# Line 556  static GtkWidget *cache_logs(appdata_t * Line 557  static GtkWidget *cache_logs(appdata_t *
557    
558      if(log->text) {      if(log->text) {
559        gtk_table_attach_defaults(GTK_TABLE(table),        gtk_table_attach_defaults(GTK_TABLE(table),
560                  html_view(appdata, log->text, is_html, FALSE, NULL, NULL),          html_view(appdata, log->text,
561                  0, 3, cnt+3, cnt+4);                    is_html?HTML_HTML:HTML_CUSTOM_MARKUP, FALSE, NULL, NULL),
562                                    0, 3, cnt+3, cnt+4);
563      }      }
564    
565      log = log->next;      log = log->next;
566      cnt+=4;      cnt+=4;
567    }    }

Legend:
Removed from v.139  
changed lines
  Added in v.140