+2009-09-01 Jim Evins <evins@snaught.com>
+
+ * data/builder/object-editor.builder:
+ Fixed errant expansion of tab.
+ * src/bc-gnubarcode.c: (gl_barcode_gnubarcode_new):
+ * src/bc-postnet.c: (gl_barcode_postnet_new):
+ * src/bc.c: (id_to_index), (name_to_index):
+ * src/label-barcode.c: (gl_label_barcode_set_props):
+ * src/label-text.c: (set_font_family):
+ * src/merge-properties-dialog.c:
+ (gl_merge_properties_dialog_construct):
+ * src/merge.c: (gl_merge_description_to_name):
+ * src/new-label-dialog.c:
+ * src/object-editor-edit-page.c:
+ * src/object-editor-image-page.c: (update_preview_cb):
+ * src/object-editor-lsize-page.c:
+ * src/object-editor-position-page.c:
+ * src/object-editor-size-page.c:
+ * src/object-editor.c: (gl_object_editor_new):
+ * src/prefs-dialog.c: (update_locale_page_from_prefs):
+ * src/prefs-model.c: (string_to_units):
+ * src/print-op.c: (create_custom_widget_cb):
+ * src/template-designer.c: (gl_template_designer_init),
+ (pg_size_page_changed_cb), (build_template):
+ * src/ui-commands.c: (gl_ui_cmd_help_about):
+ * src/xml-label.c: (xml_parse_pixdata):
+ Fixed various deprecations as of Gtk-2.16.
+
2009-08-31 Jim Evins <evins@snaught.com>
* po/fr.po:
</object>
<packing>
<property name="position">6</property>
- <property name="tab_expand">True</property>
</packing>
</child>
<child type="tab">
gint flags;
/* Assign type flag. Pre-filter by length for subtypes. */
- if (g_strcasecmp (id, "EAN") == 0) {
+ if (g_ascii_strcasecmp (id, "EAN") == 0) {
flags = BARCODE_EAN;
- } else if (g_strcasecmp (id, "EAN-8") == 0) {
+ } else if (g_ascii_strcasecmp (id, "EAN-8") == 0) {
if (!is_length_valid (digits, 7, 8)) {
return NULL;
}
flags = BARCODE_EAN;
- } else if (g_strcasecmp (id, "EAN-8+2") == 0) {
+ } else if (g_ascii_strcasecmp (id, "EAN-8+2") == 0) {
if (!is_length1_valid (digits, 7, 8) || !is_length2_valid (digits, 2, 2)) {
return NULL;
}
flags = BARCODE_EAN;
- } else if (g_strcasecmp (id, "EAN-8+5") == 0) {
+ } else if (g_ascii_strcasecmp (id, "EAN-8+5") == 0) {
if (!is_length1_valid (digits, 7, 8) || !is_length2_valid (digits, 5, 5)) {
return NULL;
}
flags = BARCODE_EAN;
- } else if (g_strcasecmp (id, "EAN-13") == 0) {
+ } else if (g_ascii_strcasecmp (id, "EAN-13") == 0) {
if (!is_length_valid (digits, 12, 13)) {
return NULL;
}
flags = BARCODE_EAN;
- } else if (g_strcasecmp (id, "EAN-13+2") == 0) {
+ } else if (g_ascii_strcasecmp (id, "EAN-13+2") == 0) {
if (!is_length1_valid (digits, 12,13) || !is_length2_valid (digits, 2,2)) {
return NULL;
}
flags = BARCODE_EAN;
- } else if (g_strcasecmp (id, "EAN-13+5") == 0) {
+ } else if (g_ascii_strcasecmp (id, "EAN-13+5") == 0) {
if (!is_length1_valid (digits, 12,13) || !is_length2_valid (digits, 5,5)) {
return NULL;
}
flags = BARCODE_EAN;
- } else if (g_strcasecmp (id, "UPC") == 0) {
+ } else if (g_ascii_strcasecmp (id, "UPC") == 0) {
flags = BARCODE_UPC;
- } else if (g_strcasecmp (id, "UPC-A") == 0) {
+ } else if (g_ascii_strcasecmp (id, "UPC-A") == 0) {
if (!is_length_valid (digits, 11, 12)) {
return NULL;
}
flags = BARCODE_UPC;
- } else if (g_strcasecmp (id, "UPC-A+2") == 0) {
+ } else if (g_ascii_strcasecmp (id, "UPC-A+2") == 0) {
if (!is_length1_valid (digits, 11,12) || !is_length2_valid (digits, 2,2)) {
return NULL;
}
flags = BARCODE_UPC;
- } else if (g_strcasecmp (id, "UPC-A+5") == 0) {
+ } else if (g_ascii_strcasecmp (id, "UPC-A+5") == 0) {
if (!is_length1_valid (digits, 11,12) || !is_length2_valid (digits, 5,5)) {
return NULL;
}
flags = BARCODE_UPC;
- } else if (g_strcasecmp (id, "UPC-E") == 0) {
+ } else if (g_ascii_strcasecmp (id, "UPC-E") == 0) {
if (!is_length_valid (digits, 6, 8)) {
return NULL;
}
flags = BARCODE_UPC;
- } else if (g_strcasecmp (id, "UPC-E+2") == 0) {
+ } else if (g_ascii_strcasecmp (id, "UPC-E+2") == 0) {
if (!is_length1_valid (digits, 6, 8) || !is_length2_valid (digits, 2,2)) {
return NULL;
}
flags = BARCODE_UPC;
- } else if (g_strcasecmp (id, "UPC-E+5") == 0) {
+ } else if (g_ascii_strcasecmp (id, "UPC-E+5") == 0) {
if (!is_length1_valid (digits, 6, 8) || !is_length2_valid (digits, 5,5)) {
return NULL;
}
flags = BARCODE_UPC;
- } else if (g_strcasecmp (id, "ISBN") == 0) {
+ } else if (g_ascii_strcasecmp (id, "ISBN") == 0) {
if (!is_length_valid (digits, 9, 10)) {
return NULL;
}
flags = BARCODE_ISBN;
- } else if (g_strcasecmp (id, "ISBN+5") == 0) {
+ } else if (g_ascii_strcasecmp (id, "ISBN+5") == 0) {
if (!is_length1_valid (digits, 9, 10) || !is_length2_valid (digits, 5,5)) {
return NULL;
}
flags = BARCODE_ISBN;
- } else if (g_strcasecmp (id, "Code39") == 0) {
+ } else if (g_ascii_strcasecmp (id, "Code39") == 0) {
flags = BARCODE_39;
- } else if (g_strcasecmp (id, "Code128") == 0) {
+ } else if (g_ascii_strcasecmp (id, "Code128") == 0) {
flags = BARCODE_128;
- } else if (g_strcasecmp (id, "Code128C") == 0) {
+ } else if (g_ascii_strcasecmp (id, "Code128C") == 0) {
flags = BARCODE_128C;
- } else if (g_strcasecmp (id, "Code128B") == 0) {
+ } else if (g_ascii_strcasecmp (id, "Code128B") == 0) {
flags = BARCODE_128B;
- } else if (g_strcasecmp (id, "I25") == 0) {
+ } else if (g_ascii_strcasecmp (id, "I25") == 0) {
flags = BARCODE_I25;
- } else if (g_strcasecmp (id, "CBR") == 0) {
+ } else if (g_ascii_strcasecmp (id, "CBR") == 0) {
flags = BARCODE_CBR;
- } else if (g_strcasecmp (id, "MSI") == 0) {
+ } else if (g_ascii_strcasecmp (id, "MSI") == 0) {
flags = BARCODE_MSI;
- } else if (g_strcasecmp (id, "PLS") == 0) {
+ } else if (g_ascii_strcasecmp (id, "PLS") == 0) {
flags = BARCODE_PLS;
} else {
g_message( "Illegal barcode id %s", id );
gdouble x;
/* Validate code length for all subtypes. */
- if ( (g_strcasecmp (id, "POSTNET") == 0) ) {
+ if ( (g_ascii_strcasecmp (id, "POSTNET") == 0) ) {
if (!is_length_valid (digits, 5) &&
!is_length_valid (digits, 9) &&
!is_length_valid (digits, 11)) {
return NULL;
}
}
- if ( (g_strcasecmp (id, "POSTNET-5") == 0) ) {
+ if ( (g_ascii_strcasecmp (id, "POSTNET-5") == 0) ) {
if (!is_length_valid (digits, 5)) {
return NULL;
}
}
- if ( (g_strcasecmp (id, "POSTNET-9") == 0) ) {
+ if ( (g_ascii_strcasecmp (id, "POSTNET-9") == 0) ) {
if (!is_length_valid (digits, 9)) {
return NULL;
}
}
- if ( (g_strcasecmp (id, "POSTNET-11") == 0) ) {
+ if ( (g_ascii_strcasecmp (id, "POSTNET-11") == 0) ) {
if (!is_length_valid (digits, 11)) {
return NULL;
}
}
- if ( (g_strcasecmp (id, "CEPNET") == 0) ) {
+ if ( (g_ascii_strcasecmp (id, "CEPNET") == 0) ) {
if (!is_length_valid (digits, 8)) {
return NULL;
}
}
for (i=0; backends[i].id != NULL; i++) {
- if (g_strcasecmp (id, backends[i].id) == 0) {
+ if (g_ascii_strcasecmp (id, backends[i].id) == 0) {
return i;
}
}
g_return_val_if_fail (name!=NULL, 0);
for (i=0; backends[i].id != NULL; i++) {
- if (g_strcasecmp (name, backends[i].name) == 0) {
+ if (strcmp (name, backends[i].name) == 0) {
return i;
}
}
g_return_if_fail (lbc && GL_IS_LABEL_BARCODE (lbc));
if ( ((lbc->priv->id == NULL) && (id != NULL))
- || (g_strcasecmp (lbc->priv->id, id) != 0)
+ || (g_ascii_strcasecmp (lbc->priv->id, id) != 0)
|| (lbc->priv->text_flag != text_flag)
|| (lbc->priv->checksum_flag != checksum_flag)
|| (lbc->priv->format_digits != format_digits)) {
#include <glib/gmessages.h>
#include <pango/pango.h>
#include <math.h>
+#include <string.h>
#include "util.h"
}
if (ltext->priv->font_family) {
- if (g_strcasecmp (ltext->priv->font_family, good_font_family) == 0) {
+ if (strcmp (ltext->priv->font_family, good_font_family) == 0) {
g_free (good_font_family);
gl_debug (DEBUG_LABEL, "END (no change)");
return;
gtk_tree_view_column_set_clickable (column, TRUE);
gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->priv->treeview), column);
renderer = gtk_cell_renderer_text_new ();
- gtk_object_set (GTK_OBJECT (renderer), "yalign", 0.0, NULL);
+ g_object_set (G_OBJECT (renderer), "yalign", 0.0, NULL);
column = gtk_tree_view_column_new_with_attributes (_("Record/Field"), renderer,
"text", RECORD_FIELD_COLUMN,
NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->priv->treeview), column);
gtk_tree_view_set_expander_column (GTK_TREE_VIEW (dialog->priv->treeview), column);
renderer = gtk_cell_renderer_text_new ();
- gtk_object_set (GTK_OBJECT (renderer), "yalign", 0.0, NULL);
+ g_object_set (G_OBJECT (renderer), "yalign", 0.0, NULL);
column = gtk_tree_view_column_new_with_attributes (_("Data"), renderer,
"text", VALUE_COLUMN,
NULL);
#include <gobject/gvaluecollector.h>
#include <string.h>
+#include <libglabels/str.h>
+
#include "debug.h"
/*========================================================*/
GList *p;
Backend *backend;
- if (g_strcasecmp(description, _("None")) == 0) {
+ if (lgl_str_utf8_casecmp(description, _("None")) == 0) {
return g_strdup("None");
}
for ( p=backends; p!=NULL; p=p->next) {
backend = (Backend *)p->data;
- if (g_strcasecmp(description, backend->description) == 0) {
+ if (lgl_str_utf8_casecmp(description, backend->description) == 0) {
return g_strdup(backend->name);
}
}
#include "hig.h"
#include "wdgt-media-select.h"
#include "wdgt-rotate-label.h"
+#include "util.h"
#include "debug.h"
#include "object-editor.h"
#include <glib/gi18n.h>
-#include <gtk/gtktextview.h>
-#include <gtk/gtkcombobox.h>
+#include <gtk/gtk.h>
#include <math.h>
#include "prefs.h"
g_free (filename);
gtk_image_set_from_pixbuf (GTK_IMAGE (preview), pixbuf);
- if (pixbuf)
- gdk_pixbuf_unref (pixbuf);
+ g_object_unref (G_OBJECT (pixbuf));
gtk_file_chooser_set_preview_widget_active (file_chooser,
have_preview);
#include <math.h>
#include "prefs.h"
+#include "util.h"
#include "object-editor-private.h"
#include <math.h>
#include "prefs.h"
+#include "util.h"
#include "object-editor-private.h"
#include "prefs.h"
#include "wdgt-chain-button.h"
+#include "util.h"
#include "object-editor-private.h"
}
- gtk_notebook_set_homogeneous_tabs (GTK_NOTEBOOK(editor->priv->notebook), TRUE);
-
va_start (args, first_option);
gl_object_notebook_construct_valist (editor, label, first_option, args);
va_end (args);
break;
}
- if ( g_strcasecmp(gl_prefs->default_page_size, US_LETTER_ID) == 0)
+ if ( g_ascii_strcasecmp(gl_prefs->default_page_size, US_LETTER_ID) == 0)
{
gtk_toggle_button_set_active (
GTK_TOGGLE_BUTTON(dialog->priv->page_size_us_letter_radio), TRUE);
}
- else if ( g_strcasecmp(gl_prefs->default_page_size, A4_ID) == 0)
+ else if ( g_ascii_strcasecmp(gl_prefs->default_page_size, A4_ID) == 0)
{
gtk_toggle_button_set_active (
GTK_TOGGLE_BUTTON(dialog->priv->page_size_a4_radio), TRUE);
#include <libglabels/db.h>
#include <libglabels/xml.h>
#include <gtk/gtkpapersize.h>
+#include <string.h>
+#include <glib/gstrfuncs.h>
#include "marshal.h"
#include "util.h"
{
lglUnitsType units;
- if (g_strcasecmp (string, "Points") == 0) {
+ if (g_ascii_strcasecmp (string, "Points") == 0) {
units = LGL_UNITS_POINT;
- } else if (g_strcasecmp (string, "Inches") == 0) {
+ } else if (g_ascii_strcasecmp (string, "Inches") == 0) {
units = LGL_UNITS_INCH;
- } else if (g_strcasecmp (string, "Millimeters") == 0) {
+ } else if (g_ascii_strcasecmp (string, "Millimeters") == 0) {
units = LGL_UNITS_MM;
} else {
units = LGL_UNITS_INCH;
#include <libglabels/db.h>
#include "print.h"
#include "label.h"
+#include "util.h"
#include "wdgt-print-copies.h"
#include "wdgt-print-merge.h"
if (error) {
g_critical ("%s\n\ngLabels may not be installed correctly!", error->message);
g_error_free (error);
- return;
+ return NULL;
}
gl_util_get_builder_widgets (builder,
static void
gl_template_designer_init (glTemplateDesigner *dialog)
{
- GtkBuilder *gui;
static gchar *object_ids[] = { "start_page",
"name_page",
"pg_size_page",
paper = lgl_db_lookup_paper_from_name (page_size_name);
- if ( g_strcasecmp (paper->id, "Other") == 0 ) {
+ if ( g_ascii_strcasecmp (paper->id, "Other") == 0 ) {
gtk_widget_set_sensitive (GTK_WIDGET(dialog->priv->pg_w_spin), TRUE);
gtk_widget_set_sensitive (GTK_WIDGET(dialog->priv->pg_h_spin), TRUE);
gtk_widget_set_sensitive (GTK_WIDGET(dialog->priv->pg_w_units_label),
page_size_name =
gtk_combo_box_get_active_text (GTK_COMBO_BOX (dialog->priv->pg_size_combo));
paper = lgl_db_lookup_paper_from_name (page_size_name);
- if ( g_strcasecmp (paper->id, "Other") == 0 ) {
+ if ( g_ascii_strcasecmp (paper->id, "Other") == 0 ) {
paper->width =
gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_w_spin))
/ upp;
#include "ui-commands.h"
#include <glib/gi18n.h>
-#include <gtk/gtkwindow.h>
-#include <gtk/gtkaboutdialog.h>
+#include <gtk/gtk.h>
#include "view.h"
#include "file.h"
pixbuf = gdk_pixbuf_new_from_file (GLABELS_PIXMAP_DIR "glabels-splash.png", NULL);
about = gtk_about_dialog_new ();
- gtk_about_dialog_set_name (GTK_ABOUT_DIALOG(about), _("glabels"));
- gtk_about_dialog_set_version (GTK_ABOUT_DIALOG(about), VERSION);
- gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG(about), copy_text);
- gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG(about), about_text);
- gtk_about_dialog_set_website (GTK_ABOUT_DIALOG(about), url);
- gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG(about), pixbuf);
-
- gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG(about), authors);
- gtk_about_dialog_set_artists (GTK_ABOUT_DIALOG(about), artists);
+ gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG(about), _("glabels"));
+ gtk_about_dialog_set_version (GTK_ABOUT_DIALOG(about), VERSION);
+ gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG(about), copy_text);
+ gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG(about), about_text);
+ gtk_about_dialog_set_website (GTK_ABOUT_DIALOG(about), url);
+ gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG(about), pixbuf);
+
+ gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG(about), authors);
+ gtk_about_dialog_set_artists (GTK_ABOUT_DIALOG(about), artists);
gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG(about),
translator_credits);
gtk_about_dialog_set_license (GTK_ABOUT_DIALOG(about), license);
{
gchar *name, *base64;
guchar *stream;
- guint stream_length;
+ gsize stream_length;
gboolean ret;
GdkPixdata *pixdata;
GdkPixbuf *pixbuf;