~ubuntu-branches/ubuntu/trusty/xiphos/trusty

« back to all changes in this revision

Viewing changes to src/gnome2/export_bookmarks.c

  • Committer: Package Import Robot
  • Author(s): Dmitrijs Ledkovs, Dmitrijs Ledkovs
  • Date: 2012-03-11 18:43:32 UTC
  • mfrom: (17.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20120311184332-splq3ecpx7tyi87d
Tags: 3.1.5+dfsg-1
[ Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com> ]  
* New upstream release.
* Build using webkit backend
* Contains unpacked source for waf binary (Closes: #654511)
* Update debian/copyright to latest specification

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * Xiphos Bible Study Tool
3
3
 * export_bookmarks.c -
4
4
 *
5
 
 * Copyright (C) 2003-2010 Xiphos Developer Team
 
5
 * Copyright (C) 2003-2011 Xiphos Developer Team
6
6
 *
7
7
 * This program is free software; you can redistribute it and/or modify
8
8
 * it under the terms of the GNU General Public License as published by
25
25
 
26
26
#include <gtk/gtk.h>
27
27
#include <libxml/parser.h>
28
 
#include <glade/glade-xml.h>
 
28
#ifndef USE_GTKBUILDER
 
29
  #include <glade/glade-xml.h>
 
30
#endif
29
31
 
30
32
#include "gui/export_bookmarks.h"
31
33
#include "gui/xiphos.h"
169
171
        xmlNodePtr root_node = NULL;
170
172
        xmlNodePtr cur_node = NULL;
171
173
        xmlDocPtr root_doc;
172
 
        xmlAttrPtr root_attr;
 
174
        //xmlAttrPtr root_attr;
173
175
        gchar filename[256];
174
176
        GString *name = g_string_new(NULL);
175
177
        GString *str = g_string_new ("");
183
185
        if (root_doc != NULL) {
184
186
                root_node = xmlNewNode(NULL, (const xmlChar *)
185
187
                                       "SwordBookmarks");
186
 
                root_attr =
 
188
                //root_attr =
187
189
                    xmlNewProp(root_node, (const xmlChar *)"syntaxVersion",
188
190
                               (const xmlChar *) "1");
189
191
                xmlDocSetRootElement(root_doc, root_node);
261
263
                case PLAIN:
262
264
                        buf = g_strdup_printf("%s\n\n",name->str);
263
265
                        break;
 
266
                default:
 
267
                        buf = g_strdup_printf("bogus data type, cannot happen");
 
268
                        break;
264
269
                }
265
270
                g_string_append(str,buf);
266
271
                g_string_free(name,1);
419
424
        xmlNodePtr root_node = NULL;
420
425
        xmlNodePtr cur_node = NULL;
421
426
        xmlDocPtr root_doc;
422
 
        xmlAttrPtr root_attr;
 
427
//      xmlAttrPtr root_attr;
423
428
        gchar *caption = NULL;
424
429
        gchar filename[256];
425
430
        GtkTreeModel *tm;
439
444
        if (root_doc != NULL) {
440
445
                root_node = xmlNewNode(NULL, (const xmlChar *)
441
446
                                       "SwordBookmarks");
442
 
                root_attr =
 
447
                //root_attr =
443
448
                    xmlNewProp(root_node, (const xmlChar *)"syntaxVersion",
444
449
                               (const xmlChar *) "1");
445
450
                xmlDocSetRootElement(root_doc, root_node);
605
610
checkbutton_include_text_toggled_cb(GtkToggleButton * togglebutton,
606
611
                                                             BK_EXPORT * data)
607
612
{
608
 
        data->with_scripture = togglebutton->active;
 
613
        data->with_scripture = gtk_toggle_button_get_active (togglebutton);
609
614
}
610
615
 
611
616
G_MODULE_EXPORT void
612
617
radiobutton_xiphos_bookmarks_toggled_cb(GtkToggleButton * togglebutton,
613
618
                                                             BK_EXPORT * data)
614
619
{
615
 
        if (togglebutton->active) {
 
620
        if (gtk_toggle_button_get_active (togglebutton)) {
616
621
                data->type = BOOKMARKS;
617
622
                gtk_widget_set_sensitive (data->cb_scripture,FALSE);
618
623
        }
622
627
radiobutton_html_toggled_cb(GtkToggleButton * togglebutton,
623
628
                                                             BK_EXPORT * data)
624
629
{
625
 
        if (togglebutton->active) {
 
630
        if (gtk_toggle_button_get_active (togglebutton)) {
626
631
                data->type = HTML;
627
632
                gtk_widget_set_sensitive (data->cb_scripture,TRUE);
628
633
        }
633
638
radiobutton_plain_text_toggled_cb(GtkToggleButton * togglebutton,
634
639
                                                             BK_EXPORT * data)
635
640
{
636
 
        if (togglebutton->active) {
 
641
        if (gtk_toggle_button_get_active (togglebutton)) {
637
642
                data->type = PLAIN;
638
643
                gtk_widget_set_sensitive (data->cb_scripture,TRUE);
639
644
        }