Diff of /trunk/src/html.c

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

revision 1 by harbaum, Sat Jun 20 11:08:47 2009 UTC revision 2 by harbaum, Sat Jun 20 11:44:14 2009 UTC
# Line 247  void html_zoom(appdata_t *appdata, gbool Line 247  void html_zoom(appdata_t *appdata, gbool
247    }    }
248  }  }
249    
250    #ifndef NO_COPY_N_PASTE
251  static void on_destroy_textview(GtkWidget *widget, gpointer data) {  static void on_destroy_textview(GtkWidget *widget, gpointer data) {
252    appdata_t *appdata = (appdata_t*)data;    appdata_t *appdata = (appdata_t*)data;
253    int destroy_active = FALSE;    int destroy_active = FALSE;
# Line 284  static void on_destroy_textview(GtkWidge Line 285  static void on_destroy_textview(GtkWidge
285      gtk_widget_set_sensitive(appdata->menu_paste, FALSE);      gtk_widget_set_sensitive(appdata->menu_paste, FALSE);
286    }    }
287  }  }
288    #endif
289    
290  static void on_destroy_htmlview(GtkWidget *widget, gpointer data) {  static void on_destroy_htmlview(GtkWidget *widget, gpointer data) {
291    http_context_t *context = (http_context_t*)data;    http_context_t *context = (http_context_t*)data;
# Line 312  static void on_destroy_htmlview(GtkWidge Line 314  static void on_destroy_htmlview(GtkWidge
314      load_context = tmp_context;      load_context = tmp_context;
315    }    }
316    
317    #ifndef NO_COPY_N_PASTE
318    on_destroy_textview(widget, context->appdata);    on_destroy_textview(widget, context->appdata);
319    #endif
320    
321    /* destroy context */    /* destroy context */
322    free(data);    free(data);
323  }  }
324    
325    #ifndef NO_COPY_N_PASTE
326  static gboolean focus_in(GtkWidget *widget, GdkEventFocus *event,  static gboolean focus_in(GtkWidget *widget, GdkEventFocus *event,
327                           gpointer data) {                           gpointer data) {
328    appdata_t *appdata = (appdata_t*)data;    appdata_t *appdata = (appdata_t*)data;
# Line 343  static gboolean focus_in(GtkWidget *widg Line 348  static gboolean focus_in(GtkWidget *widg
348  void html_copy_to_clipboard(appdata_t *appdata) {  void html_copy_to_clipboard(appdata_t *appdata) {
349    gtk_html_copy(GTK_HTML(appdata->active_buffer));    gtk_html_copy(GTK_HTML(appdata->active_buffer));
350  }  }
351    #endif
352    
353  /* panning a gtkhtml view currently doesn't work well */  /* panning a gtkhtml view currently doesn't work well */
354  #undef PANNABLE_HTML  #undef PANNABLE_HTML
# Line 424  GtkWidget *html_view(appdata_t *appdata, Line 430  GtkWidget *html_view(appdata_t *appdata,
430      gtk_text_view_set_editable(GTK_TEXT_VIEW(view), FALSE);      gtk_text_view_set_editable(GTK_TEXT_VIEW(view), FALSE);
431      gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(view), FALSE);      gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(view), FALSE);
432    
433    #ifndef NO_COPY_N_PASTE
434      g_signal_connect(G_OBJECT(view), "destroy",      g_signal_connect(G_OBJECT(view), "destroy",
435                       G_CALLBACK(on_destroy_textview), appdata);                       G_CALLBACK(on_destroy_textview), appdata);
436    #endif
437    }    }
438    
439    #ifndef NO_COPY_N_PASTE
440    g_signal_connect(G_OBJECT(view), "focus-in-event",    g_signal_connect(G_OBJECT(view), "focus-in-event",
441                     G_CALLBACK(focus_in), appdata);                     G_CALLBACK(focus_in), appdata);
442    #endif
443    
444    if(scrollwin) {    if(scrollwin) {
445  #ifndef USE_PANNABLE_AREA  #ifndef USE_PANNABLE_AREA

Legend:
Removed from v.1  
changed lines
  Added in v.2