~ubuntu-branches/debian/jessie/xiphos/jessie

« back to all changes in this revision

Viewing changes to src/gnome2/commentary.c

  • Committer: Bazaar Package Importer
  • Author(s): Dmitrijs Ledkovs
  • Date: 2010-03-22 18:15:54 UTC
  • mfrom: (4.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100322181554-qlqchymwhcw28c0c
* New upstream release:
  + Bugfix only
  + Compatible with xulrunner 1.9.2
  + Update translations

* Revert changes introduced in 3.1.2-1ubuntu1. Thank you Chris Coulson
  for temporary fix.
* debian/xiphos.1 - spelling mistake
* waf is now default buildsystem
* help is now licensed under GPL
* Bumped standards version no changes required
* Changed email to @ubuntu.com

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * along with this program; if not, write to the Free Software
19
19
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
20
20
 */
21
 
 
 
21
 
22
22
#ifdef HAVE_CONFIG_H
23
23
#  include <config.h>
24
24
#endif
52
52
#include "gui/tabbed_browser.h"
53
53
#include "gui/widgets.h"
54
54
 
55
 
#ifdef USE_GTKHTML3_14_23
56
55
#include "editor/slib-editor.h"
57
 
#else
58
 
#include "editor/bonobo-editor.h"
59
 
#endif
60
56
 
61
57
#include "main/settings.h"
62
58
#include "main/lists.h"
92
88
        gchar *personal = "Personal";
93
89
        if (!main_is_module(personal))
94
90
                return;
95
 
        
 
91
 
96
92
        editor_create_new (personal,(gchar *) settings.currentverse,NOTE_EDITOR);
97
93
}
98
94
 
124
120
                break;
125
121
        case 2:
126
122
                break;
127
 
        case 3:         
 
123
        case 3:
128
124
                gui_menu_popup (settings.CommWindowModule, NULL);
129
125
                break;
130
126
        }
155
151
                                        GdkEventButton * event,
156
152
                                        gpointer data)
157
153
{
158
 
//#ifdef GTKHTML        
 
154
//#ifdef GTKHTML
159
155
        gchar *key;
160
156
        const gchar *url;
161
 
        
 
157
 
162
158
        settings.whichwindow = COMMENTARY_WINDOW;
163
159
 
164
160
        switch (event->button) {
165
161
        case 1:
166
 
                if (in_url) 
 
162
                if (in_url)
167
163
                        break;
168
164
                key = gui_button_press_lookup(widgets.html_comm);
169
165
                if (key) {
196
192
        case 2:
197
193
                if (!in_url)
198
194
                        break;
199
 
                        
200
 
                url = gtk_html_get_url_at (GTK_HTML(widgets.html_comm),         
 
195
 
 
196
                url = gtk_html_get_url_at (GTK_HTML(widgets.html_comm),
201
197
                                                                event->x,
202
198
                                                                event->y);
203
 
                        
 
199
 
204
200
                if (url) {
205
201
                        if (strstr(url,"sword://")) {
206
202
                                gchar **work_buf = g_strsplit (url,"/",4);
236
232
_popupmenu_requested_cb (GeckoHtml *html,
237
233
                             gchar *uri,
238
234
                             gpointer user_data)
239
 
{       
 
235
{
240
236
        gui_menu_popup (settings.CommWindowModule, NULL);
241
237
}
242
238
#endif
251
247
 *   GtkWidget *gui_create_commentary_pane(void)
252
248
 *
253
249
 * Description
254
 
 *   
 
250
 *
255
251
 *
256
252
 * Return value
257
253
 *   GtkWidget*
260
256
GtkWidget *gui_create_commentary_pane(void)
261
257
{
262
258
        GtkWidget *box_comm;
263
 
#ifdef USE_GTKMOZEMBED  
 
259
#ifdef USE_GTKMOZEMBED
264
260
        GtkWidget *eventbox1;
265
261
#else
266
262
        GtkWidget *scrolledwindow;
267
263
#endif
268
264
        box_comm = gtk_vbox_new(FALSE, 0);
269
265
        gtk_widget_show(box_comm);
270
 
    
271
 
#ifdef USE_GTKMOZEMBED  
 
266
 
 
267
#ifdef USE_GTKMOZEMBED
272
268
        eventbox1 = gtk_event_box_new ();
273
269
        gtk_widget_show (eventbox1);
274
270
        gtk_box_pack_start(GTK_BOX(box_comm),
278
274
        gtk_widget_show(widgets.html_comm);
279
275
        gtk_container_add(GTK_CONTAINER(eventbox1),
280
276
                         widgets.html_comm);
281
 
        
 
277
 
282
278
        g_signal_connect((gpointer)widgets.html_comm,
283
279
                      "popupmenu_requested",
284
280
                      G_CALLBACK (_popupmenu_requested_cb),