[Goodies-commits] r3975 - in xfbib/trunk: . po src
Jesper Karlsson
zarper at xfce.org
Tue Feb 19 20:40:24 CET 2008
Author: zarper
Date: 2008-02-19 19:40:23 +0000 (Tue, 19 Feb 2008)
New Revision: 3975
Added:
xfbib/trunk/po/sv.po
Removed:
xfbib/trunk/po/sv_SE.po
Modified:
xfbib/trunk/TODO
xfbib/trunk/po/LINGUAS
xfbib/trunk/po/xfbib.pot
xfbib/trunk/src/entry_edit_dialog.c
xfbib/trunk/src/menubar.c
xfbib/trunk/src/open_dialog.c
xfbib/trunk/src/save_dialog.c
xfbib/trunk/src/string_edit_dialog.c
xfbib/trunk/src/treeview.c
Log:
Xfbib: Added support for translating more of the application and updated the swedish translation.
Modified: xfbib/trunk/TODO
===================================================================
--- xfbib/trunk/TODO 2008-02-19 18:13:27 UTC (rev 3974)
+++ xfbib/trunk/TODO 2008-02-19 19:40:23 UTC (rev 3975)
@@ -1,11 +1,5 @@
- Added information to the statusbar when the mouse is over buttons, e.g. print "Open file" when the mouse is over the open button.
-- If a bibtex file has a comment, then write the comment back to the file when saving the newly edited file.
-
- Add coloring to the keyentry and the combobox in the edit dialog to show that they should be set.
- Autogenerate a bibtexkey for a new entry (should of course be modifiable).
-
-- Translate the array of tooltips.
-
-- Add better support for translations.
Modified: xfbib/trunk/po/LINGUAS
===================================================================
--- xfbib/trunk/po/LINGUAS 2008-02-19 18:13:27 UTC (rev 3974)
+++ xfbib/trunk/po/LINGUAS 2008-02-19 19:40:23 UTC (rev 3975)
@@ -1 +1 @@
-hu sv_SE
+hu sv
Copied: xfbib/trunk/po/sv.po (from rev 3973, xfbib/trunk/po/sv_SE.po)
===================================================================
--- xfbib/trunk/po/sv.po (rev 0)
+++ xfbib/trunk/po/sv.po 2008-02-19 19:40:23 UTC (rev 3975)
@@ -0,0 +1,244 @@
+# translation of sv.po to Swedish
+# Copyright (C) 2008
+# This file is distributed under the same license as the Xfbib package.
+#
+# Jesper Karlsson <zarper at gmail.com>, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: sv\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-02-19 19:02+0100\n"
+"PO-Revision-Date: 2008-02-19 20:24+0100\n"
+"Last-Translator: Jesper Karlsson <zarper at gmail.com>\n"
+"Language-Team: Swedish\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#: ../src/entry_edit_dialog.c:321
+msgid "Add entry"
+msgstr "Lägg till element"
+
+#: ../src/string_edit_dialog.c:42
+msgid "Add variable"
+msgstr "Lägg till variabel"
+
+#: ../src/entry_edit_dialog.c:290
+msgid "Address of publisher"
+msgstr "Adress till förlag"
+
+#: ../src/open_dialog.c:48 ../src/save_dialog.c:43
+msgid "All files"
+msgstr "Alla filer"
+
+#: ../src/entry_edit_dialog.c:291
+msgid "Annotation for annotated bibliography styles"
+msgstr "Kommentar för kommenterad bibliografistil"
+
+#: ../src/treeview.c:104
+msgid "Author"
+msgstr "Författare"
+
+#: ../src/about_dialog.c:38
+msgid "BibTeX editor for Xfce"
+msgstr "BibTeX editor för Xfce"
+
+#: ../src/open_dialog.c:42 ../src/save_dialog.c:39
+msgid "BibTeX files"
+msgstr "BibTeX filer"
+
+#: ../src/entry_edit_dialog.c:294
+msgid "Chapter number"
+msgstr "Kapitel nummer"
+
+#: ../src/entry_edit_dialog.c:295
+msgid "Citation key of the cross-referenced entry"
+msgstr "Citatnyckel för the korsrefererade elementet"
+
+#: ../src/about_dialog.c:28
+msgid "Developers:"
+msgstr "Utvecklare:"
+
+#: ../src/menubar.c:161
+msgid "E_ntry"
+msgstr "E_lement"
+
+#: ../src/entry_edit_dialog.c:321
+msgid "Edit entry"
+msgstr "Editera element"
+
+#: ../src/string_edit_dialog.c:42
+msgid "Edit variable"
+msgstr "Editera variabel"
+
+#: ../src/entry_edit_dialog.c:296
+msgid "Edition of the book (such as \"first\" or \"second\")"
+msgstr "Utgåva av boken (t.ex. \"första\" eller \"andra\")"
+
+#: ../src/menubar.c:119
+msgid "File"
+msgstr "Arkiv"
+
+#: ../src/menubar.c:204
+msgid "Help"
+msgstr "Hjälp"
+
+#: ../src/entry_edit_dialog.c:302
+msgid ""
+"Hidden field used for specifying or overriding the alphabetical order of "
+"entries"
+msgstr "Gömt fält som använst för att specifiera eller överskugga den alfabetiska ordningen på elementen"
+
+#: ../src/entry_edit_dialog.c:300
+msgid "Institution that was involved in the publishing"
+msgstr "Instutitionen som var involverad i publikationen"
+
+#: ../src/entry_edit_dialog.c:313
+msgid "Internet address"
+msgstr "Internet adress"
+
+#: ../src/entry_edit_dialog.c:301
+msgid "Journal or magazine in which the work was published"
+msgstr "Tidskrift eller magasin i vilket verket var publicerat"
+
+#: ../src/treeview.c:104
+msgid "Key"
+msgstr "Nyckel"
+
+#: ../src/entry_edit_dialog.c:241
+msgid "Key used when citing the publication"
+msgstr "Nyckel som används när publikationen citeras"
+
+#: ../src/entry_edit_dialog.c:254
+msgid "Key: "
+msgstr "Nyckel: "
+
+#: ../src/entry_edit_dialog.c:361
+msgid "Misc"
+msgstr "Övrigt"
+
+#: ../src/entry_edit_dialog.c:304
+msgid "Miscellaneous extra information"
+msgstr "Övrig extra information"
+
+#: ../src/entry_edit_dialog.c:303
+msgid "Month of publication or creation if unpublished"
+msgstr "Månaden för publikation eller skapelse om verket är opublicerat"
+
+#: ../src/entry_edit_dialog.c:308
+msgid "Name of publisher"
+msgstr "Namnet på utgivare"
+
+#: ../src/entry_edit_dialog.c:292
+msgid "Name(s) of the author(s), separated by 'and' if more than one"
+msgstr "Namn på författarna, separerade med 'and' om fler än en"
+
+#: ../src/entry_edit_dialog.c:297
+msgid "Name(s) of the editor(s), separated by 'and' if more than one"
+msgstr "Namn på redaktör(er), separerade med 'and' om flera"
+
+#: ../src/entry_edit_dialog.c:391
+msgid "No key was selected"
+msgstr "Ingen nyckel vald"
+
+#: ../src/entry_edit_dialog.c:387
+msgid "No type was selected"
+msgstr "Ingen typ vald"
+
+#: ../src/entry_edit_dialog.c:305
+msgid "Number of journal, magazine, or tech-report"
+msgstr "Antal tidskrifter, magasin eller tekniska rapporter"
+
+#: ../src/entry_edit_dialog.c:314
+msgid "Number of the volume"
+msgstr "Nummer på volymen"
+
+#: ../src/open_dialog.c:36
+msgid "Open"
+msgstr "Öppna"
+
+#: ../src/entry_edit_dialog.c:307
+msgid "Page numbers separated by commas or double-hyphens"
+msgstr "Sidnummer separerade med komma eller dubbla bindestreck"
+
+#: ../src/entry_edit_dialog.c:359
+msgid "Publication"
+msgstr "Publikation"
+
+#: ../src/entry_edit_dialog.c:360
+msgid "Publisher"
+msgstr "Förlag"
+
+#: ../src/entry_edit_dialog.c:299
+msgid "Publishing method if the method is nonstandard"
+msgstr "Publikationsmetod om metoden inte är standard"
+
+#: ../src/save_dialog.c:33
+msgid "Save As"
+msgstr "Spara som"
+
+#: ../src/entry_edit_dialog.c:309
+msgid "School where thesis was written"
+msgstr "Skolan där rapporten skrevs"
+
+#: ../src/entry_edit_dialog.c:310
+msgid "Series of books in which the book was published"
+msgstr "Bokserien i vilken boken var publicerad"
+
+#: ../src/menubar.c:186
+msgid "Show _Toolbar"
+msgstr "Visa _Verktygsfält"
+
+#: ../src/entry_edit_dialog.c:298
+msgid "Specification of electronic publication"
+msgstr "Specifikation av den elektroniska utgåvan"
+
+#: ../src/entry_edit_dialog.c:306
+msgid "Sponsor of the conference"
+msgstr "Sponsor av konferensen"
+
+#: ../src/entry_edit_dialog.c:358 ../src/treeview.c:104
+msgid "Title"
+msgstr "Titel"
+
+#: ../src/entry_edit_dialog.c:293
+msgid "Title of the book, if only part of it is being cited"
+msgstr "Titel på boken, om endas delar av den citeras"
+
+#: ../src/entry_edit_dialog.c:311
+msgid "Title of the work"
+msgstr "Titel på verket"
+
+#: ../src/treeview.c:104
+msgid "Type"
+msgstr "Typ"
+
+#: ../src/entry_edit_dialog.c:312
+msgid "Type of technical report"
+msgstr "Typ av teknisk rapport"
+
+#: ../src/entry_edit_dialog.c:251
+msgid "Type: "
+msgstr "Typ: "
+
+#: ../src/string_edit_dialog.c:39
+msgid "Value: "
+msgstr "Värde: "
+
+#: ../src/treeview.c:78
+msgid "Variable"
+msgstr "Variabel"
+
+#: ../src/string_edit_dialog.c:39
+msgid "Variable name: "
+msgstr "Variabel namn: "
+
+#: ../src/entry_edit_dialog.c:315
+msgid "Year of publication or creation if unpublished"
+msgstr "Utgivningsår eller skrivningsår om outgiven"
+
+#: ../src/menubar.c:184
+msgid "_View"
+msgstr "_Visa"
+
Deleted: xfbib/trunk/po/sv_SE.po
Modified: xfbib/trunk/po/xfbib.pot
===================================================================
--- xfbib/trunk/po/xfbib.pot 2008-02-19 18:13:27 UTC (rev 3974)
+++ xfbib/trunk/po/xfbib.pot 2008-02-19 19:40:23 UTC (rev 3975)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-01-28 09:02+0100\n"
+"POT-Creation-Date: 2008-02-19 19:02+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -16,82 +16,228 @@
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../src/menubar.c:72
-msgid "File"
+#: ../src/entry_edit_dialog.c:321
+msgid "Add entry"
msgstr ""
-#: ../src/menubar.c:110
-msgid "Help"
+#: ../src/string_edit_dialog.c:42
+msgid "Add variable"
msgstr ""
-#: ../src/treeview.c:58
-msgid "Key"
+#: ../src/entry_edit_dialog.c:290
+msgid "Address of publisher"
msgstr ""
-#: ../src/treeview.c:58
-msgid "Type"
+#: ../src/open_dialog.c:48 ../src/save_dialog.c:43
+msgid "All files"
msgstr ""
-#: ../src/treeview.c:58
+#: ../src/entry_edit_dialog.c:291
+msgid "Annotation for annotated bibliography styles"
+msgstr ""
+
+#: ../src/treeview.c:104
msgid "Author"
msgstr ""
-#: ../src/treeview.c:58 ../src/edit_dialog.c:302
-msgid "Title"
+#: ../src/about_dialog.c:38
+msgid "BibTeX editor for Xfce"
msgstr ""
-#: ../src/edit_dialog.c:220
-msgid "Type: "
+#: ../src/open_dialog.c:42 ../src/save_dialog.c:39
+msgid "BibTeX files"
msgstr ""
-#: ../src/edit_dialog.c:223
-msgid "Key: "
+#: ../src/entry_edit_dialog.c:294
+msgid "Chapter number"
msgstr ""
-#: ../src/edit_dialog.c:260
-msgid "Add entry"
+#: ../src/entry_edit_dialog.c:295
+msgid "Citation key of the cross-referenced entry"
msgstr ""
-#: ../src/edit_dialog.c:260
+#: ../src/about_dialog.c:28
+msgid "Developers:"
+msgstr ""
+
+#: ../src/menubar.c:161
+msgid "E_ntry"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:321
msgid "Edit entry"
msgstr ""
-#: ../src/edit_dialog.c:303
-msgid "Publication"
+#: ../src/string_edit_dialog.c:42
+msgid "Edit variable"
msgstr ""
-#: ../src/edit_dialog.c:304
-msgid "Publisher"
+#: ../src/entry_edit_dialog.c:296
+msgid "Edition of the book (such as \"first\" or \"second\")"
msgstr ""
-#: ../src/edit_dialog.c:305
+#: ../src/menubar.c:119
+msgid "File"
+msgstr ""
+
+#: ../src/menubar.c:204
+msgid "Help"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:302
+msgid ""
+"Hidden field used for specifying or overriding the alphabetical order of "
+"entries"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:300
+msgid "Institution that was involved in the publishing"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:313
+msgid "Internet address"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:301
+msgid "Journal or magazine in which the work was published"
+msgstr ""
+
+#: ../src/treeview.c:104
+msgid "Key"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:241
+msgid "Key used when citing the publication"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:254
+msgid "Key: "
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:361
msgid "Misc"
msgstr ""
-#: ../src/edit_dialog.c:332
-msgid "No type was selected"
+#: ../src/entry_edit_dialog.c:304
+msgid "Miscellaneous extra information"
msgstr ""
-#: ../src/edit_dialog.c:336
+#: ../src/entry_edit_dialog.c:303
+msgid "Month of publication or creation if unpublished"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:308
+msgid "Name of publisher"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:292
+msgid "Name(s) of the author(s), separated by 'and' if more than one"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:297
+msgid "Name(s) of the editor(s), separated by 'and' if more than one"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:391
msgid "No key was selected"
msgstr ""
-#: ../src/save_dialog.c:30
-msgid "Save As"
+#: ../src/entry_edit_dialog.c:387
+msgid "No type was selected"
msgstr ""
-#: ../src/save_dialog.c:36
-msgid "BibTeX files"
+#: ../src/entry_edit_dialog.c:305
+msgid "Number of journal, magazine, or tech-report"
msgstr ""
-#: ../src/open_dialog.c:33
+#: ../src/entry_edit_dialog.c:314
+msgid "Number of the volume"
+msgstr ""
+
+#: ../src/open_dialog.c:36
msgid "Open"
msgstr ""
-#: ../src/about_dialog.c:28
-msgid "Developers:"
+#: ../src/entry_edit_dialog.c:307
+msgid "Page numbers separated by commas or double-hyphens"
msgstr ""
-#: ../src/about_dialog.c:38
-msgid "BibTeX editor for Xfce"
+#: ../src/entry_edit_dialog.c:359
+msgid "Publication"
msgstr ""
+
+#: ../src/entry_edit_dialog.c:360
+msgid "Publisher"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:299
+msgid "Publishing method if the method is nonstandard"
+msgstr ""
+
+#: ../src/save_dialog.c:33
+msgid "Save As"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:309
+msgid "School where thesis was written"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:310
+msgid "Series of books in which the book was published"
+msgstr ""
+
+#: ../src/menubar.c:186
+msgid "Show _Toolbar"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:298
+msgid "Specification of electronic publication"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:306
+msgid "Sponsor of the conference"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:358 ../src/treeview.c:104
+msgid "Title"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:293
+msgid "Title of the book, if only part of it is being cited"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:311
+msgid "Title of the work"
+msgstr ""
+
+#: ../src/treeview.c:104
+msgid "Type"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:312
+msgid "Type of technical report"
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:251
+msgid "Type: "
+msgstr ""
+
+#: ../src/string_edit_dialog.c:39
+msgid "Value: "
+msgstr ""
+
+#: ../src/treeview.c:78
+msgid "Variable"
+msgstr ""
+
+#: ../src/string_edit_dialog.c:39
+msgid "Variable name: "
+msgstr ""
+
+#: ../src/entry_edit_dialog.c:315
+msgid "Year of publication or creation if unpublished"
+msgstr ""
+
+#: ../src/menubar.c:184
+msgid "_View"
+msgstr ""
Modified: xfbib/trunk/src/entry_edit_dialog.c
===================================================================
--- xfbib/trunk/src/entry_edit_dialog.c 2008-02-19 18:13:27 UTC (rev 3974)
+++ xfbib/trunk/src/entry_edit_dialog.c 2008-02-19 19:40:23 UTC (rev 3975)
@@ -40,34 +40,6 @@
"Number", "Organization", "Pages", "Publisher", "School",
"Series", "Title", "Type", "URL", "Volume", "Year"};
-const char *tooltips[] = { "Address of publisher",
- "Annotation for annotated bibliography styles",
- "Name(s) of the author(s), separated by 'and' if more than one",
- "Title of the book, if only part of it is being cited",
- "Chapter number",
- "Citation key of the cross-referenced entry",
- "Edition of the book (such as \"first\" or \"second\")",
- "Name(s) of the editor(s), separated by 'and' if more than one",
- "Specification of electronic publication",
- "Publishing method if the method is nonstandard",
- "Institution that was involved in the publishing",
- "Journal or magazine in which the work was published",
- "Hidden field used for specifying or overriding the alphabetical order of entries",
- "Month of publication or creation if unpublished",
- "Miscellaneous extra information",
- "Number of journal, magazine, or tech-report",
- "Sponsor of the conference",
- "Page numbers separated by commas or double-hyphens",
- "Name of publisher",
- "School where thesis was written",
- "Series of books in which the book was published",
- "Title of the work",
- "Type of technical report",
- "Internet address",
- "Number of the volume",
- "Year of publication or creation if unpublished"};
-
-
static void set_color_base(GtkWidget *entry, int selected_color)
{
@@ -275,9 +247,6 @@
g_signal_connect (G_OBJECT (GTK_COMBO_BOX(*combobox)), "changed",
G_CALLBACK (combobox_changed_event), edit_entry);
- //gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0);
- //combobox_changed_event(GTK_COMBO_BOX(combobox), note);
-
hbox = gtk_hbox_new(FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(_("Type: ")), TRUE, FALSE, 10);
gtk_box_pack_start(GTK_BOX(hbox), *combobox, TRUE, FALSE, 10);
@@ -310,6 +279,7 @@
void show_entry_edit_dialog(struct xfbib *xfbib, struct entry *selected)
{
_DEBUG(("show_entry_edit_dialog"));
+
GtkWidget *dialog, *notebook, *hbox, *key_entry, *combobox, *vbox[4];
struct edit_entry edit_entry[N_ENTRIES];
int i, pos;
@@ -317,8 +287,36 @@
char *type;
const gchar *value, *key;
struct node *node = xfbib->list;
+ const char *tooltips[] = {_("Address of publisher"),
+ _("Annotation for annotated bibliography styles"),
+ _("Name(s) of the author(s), separated by 'and' if more than one"),
+ _("Title of the book, if only part of it is being cited"),
+ _("Chapter number"),
+ _("Citation key of the cross-referenced entry"),
+ _("Edition of the book (such as \"first\" or \"second\")"),
+ _("Name(s) of the editor(s), separated by 'and' if more than one"),
+ _("Specification of electronic publication"),
+ _("Publishing method if the method is nonstandard"),
+ _("Institution that was involved in the publishing"),
+ _("Journal or magazine in which the work was published"),
+ _("Hidden field used for specifying or overriding the alphabetical order of entries"),
+ _("Month of publication or creation if unpublished"),
+ _("Miscellaneous extra information"),
+ _("Number of journal, magazine, or tech-report"),
+ _("Sponsor of the conference"),
+ _("Page numbers separated by commas or double-hyphens"),
+ _("Name of publisher"),
+ _("School where thesis was written"),
+ _("Series of books in which the book was published"),
+ _("Title of the work"),
+ _("Type of technical report"),
+ _("Internet address"),
+ _("Number of the volume"),
+ _("Year of publication or creation if unpublished")};
+
xfce_textdomain (PACKAGE, LOCALEDIR, "ISO-8859-1");
+ gtk_window_set_icon_name(GTK_WINDOW(dialog), "xfbib");
dialog = xfce_titled_dialog_new_with_buttons ((selected == NULL) ? _("Add entry") : _("Edit entry"), NULL,
GTK_DIALOG_MODAL,
@@ -326,8 +324,6 @@
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
-
- gtk_window_set_icon_name(GTK_WINDOW(dialog), "xfbib");
hbox = create_hbox(&combobox, &key_entry, edit_entry);
Modified: xfbib/trunk/src/menubar.c
===================================================================
--- xfbib/trunk/src/menubar.c 2008-02-19 18:13:27 UTC (rev 3974)
+++ xfbib/trunk/src/menubar.c 2008-02-19 19:40:23 UTC (rev 3975)
@@ -15,8 +15,9 @@
*/
#include <gtk/gtk.h>
-//#include <libxfcegui4/libxfcegui4.h> /* TODO: This file is blocking the translation of everything in this file */
+#include <libxfcegui4/libxfcegui4.h>
#include <libintl.h>
+#include <config.h>
#include "menubar.h"
#include "window.h"
@@ -29,9 +30,6 @@
#include "entry_edit_dialog.h"
#include "treeview.h"
-#define _(String) dgettext (PACKAGE, String)
-#define N_(String) (String)
-
static void file_new_event_handler(struct xfbib *xfbib)
{
_DEBUG(("file_new_event_handler"));
Modified: xfbib/trunk/src/open_dialog.c
===================================================================
--- xfbib/trunk/src/open_dialog.c 2008-02-19 18:13:27 UTC (rev 3974)
+++ xfbib/trunk/src/open_dialog.c 2008-02-19 19:40:23 UTC (rev 3975)
@@ -14,12 +14,11 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-
-
-//#include <gtk/gtk.h>
+#include <libxfcegui4/libxfcegui4.h>
#include <libintl.h>
#include <string.h>
#include <stdlib.h>
+#include <config.h>
#include "open_dialog.h"
#include "parser_interface.h"
@@ -29,10 +28,6 @@
#include "window.h"
#include "debug.h"
-# define _(String) dgettext (PACKAGE, String)
-# define N_(String) (String)
-
-
void show_open_dialog(struct xfbib *xfbib)
{
_DEBUG(("show_open_dialog"));
@@ -44,13 +39,13 @@
GtkFileFilter *filter;
filter = gtk_file_filter_new();
- gtk_file_filter_set_name(filter, _(("BibTeX files")));
+ gtk_file_filter_set_name(filter, _("BibTeX files"));
gtk_file_filter_add_pattern(filter, N_("*.bib"));
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(open), filter);
/* BibTeX files should have the .bib prefix so "All files" probably can be deleted */
filter = gtk_file_filter_new();
- gtk_file_filter_set_name(filter, _(("All files")));
+ gtk_file_filter_set_name(filter, _("All files"));
gtk_file_filter_add_pattern(filter, N_("*"));
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(open), filter);
/* ____ */
Modified: xfbib/trunk/src/save_dialog.c
===================================================================
--- xfbib/trunk/src/save_dialog.c 2008-02-19 18:13:27 UTC (rev 3974)
+++ xfbib/trunk/src/save_dialog.c 2008-02-19 19:40:23 UTC (rev 3975)
@@ -15,6 +15,8 @@
*/
#include <libintl.h>
+#include <libxfcegui4/libxfcegui4.h>
+#include <config.h>
#include "xfbib.h"
#include "save_dialog.h"
@@ -23,9 +25,6 @@
#include "debug.h"
#include "save.h"
-# define _(String) dgettext (PACKAGE, String)
-# define N_(String) (String)
-
void show_save_dialog(struct xfbib *xfbib)
{
_DEBUG(("show_save_dialog"));
@@ -37,11 +36,11 @@
GtkFileFilter *filter;
filter = gtk_file_filter_new();
- gtk_file_filter_set_name(filter, (_("BibTeX files")));
+ gtk_file_filter_set_name(filter, _("BibTeX files"));
gtk_file_filter_add_pattern(filter, N_("*.bib"));
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter);
filter = gtk_file_filter_new();
- gtk_file_filter_set_name(filter, _(("All files")));
+ gtk_file_filter_set_name(filter, _("All files"));
gtk_file_filter_add_pattern(filter, N_("*"));
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter);
Modified: xfbib/trunk/src/string_edit_dialog.c
===================================================================
--- xfbib/trunk/src/string_edit_dialog.c 2008-02-19 18:13:27 UTC (rev 3974)
+++ xfbib/trunk/src/string_edit_dialog.c 2008-02-19 19:40:23 UTC (rev 3975)
@@ -30,14 +30,13 @@
gtk_entry_set_text(entry, text);
}
-
void show_string_edit_dialog(struct xfbib *xfbib, struct string *selected)
{
_DEBUG(("show_string_edit_dialog"));
GtkWidget *dialog, *hbox[2], *label[2], *entry[2];
int i;
- const char *label_strings[] = {"Variable name: ", "Value: "};
+ const char *label_strings[] = {_("Variable name: "), _("Value: ")};
xfce_textdomain (PACKAGE, LOCALEDIR, "ISO-8859-1");
dialog = xfce_titled_dialog_new_with_buttons ((selected == NULL) ? _("Add variable") : _("Edit variable"), NULL,
@@ -49,7 +48,6 @@
gtk_window_set_icon_name(GTK_WINDOW(dialog), "xfbib");
-
for (i = 0; i < 2; i++) {
hbox[i] = gtk_hbox_new(FALSE, 10);
label[i] = gtk_label_new(label_strings[i]);
@@ -59,13 +57,11 @@
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox[i], FALSE, FALSE, 10);
}
-
if (selected != NULL) {
set_entry_text(GTK_ENTRY(entry[VARIABLE]), selected->variable);
set_entry_text(GTK_ENTRY(entry[VALUE]), selected->value);
}
-
gtk_widget_show_all(dialog);
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) {
@@ -77,5 +73,4 @@
_DEBUG(("Response Cancel"));
}
gtk_widget_destroy (dialog);
-
}
Modified: xfbib/trunk/src/treeview.c
===================================================================
--- xfbib/trunk/src/treeview.c 2008-02-19 18:13:27 UTC (rev 3974)
+++ xfbib/trunk/src/treeview.c 2008-02-19 19:40:23 UTC (rev 3975)
@@ -14,8 +14,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-//#include <gtk/gtk.h>
+#include <libxfcegui4/libxfcegui4.h>
#include <libintl.h>
+#include <config.h>
#include "treeview.h"
#include "xfbib.h"
@@ -25,8 +26,6 @@
#include "strings.h"
#include "debug.h"
-# define _(String) dgettext (PACKAGE, String)
-
static void main_row_activated_event (GtkTreeView *view, GtkTreePath *path,
GtkTreeViewColumn *column, gpointer xfbib)
{
@@ -39,13 +38,11 @@
gtk_tree_model_get(model, &iter, COLUMN_ENTRY, &node, -1);
if (node->node_type == ENTRY_NODE) {
show_entry_edit_dialog(xfbib, node->node);
- } else {
+ } else
_DEBUG(("Not an entry in main list"));
- }
}
}
-
static void var_row_activated_event (GtkTreeView *view, GtkTreePath *path,
GtkTreeViewColumn *column, gpointer xfbib)
{
@@ -58,9 +55,8 @@
gtk_tree_model_get(model, &iter, VAR_COLUMN_STRING, &node, -1);
if (node->node_type == STRING_NODE) {
show_string_edit_dialog(xfbib, node->node);
- } else {
+ } else
_DEBUG(("Not a string in variable list"));
- }
}
}
@@ -78,11 +74,11 @@
g_signal_connect(treeview, "row-activated", (GCallback) var_row_activated_event, xfbib);
- renderer = gtk_cell_renderer_text_new();
- column = gtk_tree_view_column_new_with_attributes(_("Variable"), renderer, "text", 0, NULL);
- gtk_tree_view_column_set_resizable(GTK_TREE_VIEW_COLUMN(column), TRUE);
- gtk_tree_view_column_set_min_width(GTK_TREE_VIEW_COLUMN(column), 100);
- gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column);
+ renderer = gtk_cell_renderer_text_new();
+ column = gtk_tree_view_column_new_with_attributes(_("Variable"), renderer, "text", 0, NULL);
+ gtk_tree_view_column_set_resizable(GTK_TREE_VIEW_COLUMN(column), TRUE);
+ gtk_tree_view_column_set_min_width(GTK_TREE_VIEW_COLUMN(column), 100);
+ gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column);
list = gtk_list_store_new (VAR_N_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER);
@@ -97,7 +93,6 @@
GtkListStore *list;
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
-
int n;
treeview = gtk_tree_view_new();
@@ -106,7 +101,7 @@
g_signal_connect(treeview, "row-activated", (GCallback) main_row_activated_event, xfbib);
- char *fields[4]= {_("Key"),_("Type"),_("Author"),_("Title")};
+ const char *fields[]= {_("Key"),_("Type"),_("Author"),_("Title")};
for (n = 0; n < 4; n++) {
renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(fields[n], renderer, "text", n, NULL);
More information about the Goodies-commits
mailing list