summaryrefslogtreecommitdiff
path: root/src/gnome2/commentary_dialog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gnome2/commentary_dialog.c')
-rw-r--r--src/gnome2/commentary_dialog.c53
1 files changed, 21 insertions, 32 deletions
diff --git a/src/gnome2/commentary_dialog.c b/src/gnome2/commentary_dialog.c
index 8758f01..96021cf 100644
--- a/src/gnome2/commentary_dialog.c
+++ b/src/gnome2/commentary_dialog.c
@@ -25,7 +25,11 @@
#include <gtk/gtk.h>
#ifdef USE_GTKMOZEMBED
+#ifdef WIN32
+#include "geckowin/gecko-html.h"
+#else
#include "gecko/gecko-html.h"
+#endif
#else
#include <gtkhtml/gtkhtml.h>
#include "gui/html.h"
@@ -48,45 +52,23 @@
#include "main/navbar_versekey.h"
#include "main/display.hh"
-//static void create_menu(DIALOG_DATA * d, GdkEventButton * event);
+#include "gui/debug_glib_null.h"
+
+#ifndef USE_GTKMOZEMBED
+void commentary_prefixable_link(GtkHTML *html, const gchar *url, gpointer data);
+#endif
extern gboolean dialog_freed;
extern gboolean do_display;
+
/****************************************************************************************
* static - global to this file only
*/
-
DIALOG_DATA *cur_d;
-//static gboolean apply_change;
/******************************************************************************
* Name
- * gui_display_commentary_with_struct
- *
- * Synopsis
- * #include "commentary.h"
- *
- * void gui_display_commentary_with_struct(gchar * key)
- *
- * Description
- * display new key in current commentary
- *
- * Return value
- * void
- */
-
-void gui_display_commentary_with_struct(DIALOG_DATA *d,
- gchar *key)
-{
- strcpy(settings.comm_key, key);
- if (d->key)
- g_free(d->key);
- d->key = g_strdup(key);
-}
-
-/******************************************************************************
- * Name
* on_dialog_destroy
*
* Synopsis
@@ -252,7 +234,7 @@ void commentary_prefixable_link(GtkHTML *html,
*(strrchr(buf, ' ')) = '\0';
gui_prefixable_link_clicked(html, url, data, buf);
}
-#endif
+#endif /* !USE_GTKMOZEMBED */
/******************************************************************************
@@ -312,7 +294,7 @@ _popupmenu_requested_cb (GeckoHtml *html,
gui_menu_popup (NULL, d);
//gui_commentary_dialog_create_menu(d);
}
-#endif
+#endif /* USE_GTKMOZEMBED */
/******************************************************************************
* Name
@@ -337,7 +319,9 @@ void gui_create_commentary_dialog(DIALOG_DATA *d,
GtkWidget *vbox_toolbars;
GtkWidget *toolbar_nav;
GtkWidget *frame19;
-#ifndef USE_GTKMOZEMBED
+#ifdef USE_GTKMOZEMBED
+ GtkWidget *eventbox;
+#else
GtkWidget *scrolledwindow38;
#endif
@@ -376,8 +360,13 @@ void gui_create_commentary_dialog(DIALOG_DATA *d,
gtk_frame_set_shadow_type(GTK_FRAME(frame19), GTK_SHADOW_IN);
#ifdef USE_GTKMOZEMBED
+
+ eventbox = gtk_event_box_new();
+ gtk_widget_show(eventbox);
+ gtk_container_add(GTK_CONTAINER(frame19), eventbox);
+
d->html = GTK_WIDGET(gecko_html_new(((DIALOG_DATA*) d),TRUE,DIALOG_COMMENTARY_TYPE));
- gtk_container_add(GTK_CONTAINER(frame19), d->html);
+ gtk_container_add(GTK_CONTAINER(eventbox), d->html);
gtk_widget_show(d->html);
g_signal_connect((gpointer)d->html,
"popupmenu_requested",