dnl - Library dependencies
dnl ---------------------------------------------------------------------------
dnl Required dependencies
-GLIB_REQUIRED=2.20.0
-GTK_REQUIRED=2.16.0
-GCONF_REQUIRED=2.26.0
+GLIB_REQUIRED=2.22.0
+GTK_REQUIRED=2.18.0
+GCONF_REQUIRED=2.28.0
LIBXML_REQUIRED=2.7.0
dnl Optional dependencies
-LIBEBOOK_REQUIRED=2.26.0
+LIBEBOOK_REQUIRED=2.28.0
LIBBARCODE_REQUIRED=0.98
LIBQRENCODE_REQUIRED=3.1.0
LIBIEC16022_REQUIRED=0.2.4
+++ /dev/null
-<SECTION>
-<FILE>xml-paper</FILE>
-lgl_xml_paper_read_papers_from_file
-lgl_xml_paper_parse_papers_doc
-lgl_xml_paper_parse_paper_node
-</SECTION>
-
-<SECTION>
-<FILE>xml-category</FILE>
-lgl_xml_category_read_categories_from_file
-lgl_xml_category_parse_categories_doc
-lgl_xml_category_parse_category_node
-</SECTION>
-
-<SECTION>
-<FILE>libglabels</FILE>
-</SECTION>
-
-<SECTION>
-<FILE>db</FILE>
-lglDbRegStatus
-lgl_db_init
-lgl_db_get_paper_id_list
-lgl_db_free_paper_id_list
-lgl_db_get_paper_name_list
-lgl_db_free_paper_name_list
-lgl_db_lookup_paper_from_name
-lgl_db_lookup_paper_from_id
-lgl_db_lookup_paper_id_from_name
-lgl_db_lookup_paper_name_from_id
-lgl_db_is_paper_id_known
-lgl_db_is_paper_id_other
-lgl_db_get_category_id_list
-lgl_db_free_category_id_list
-lgl_db_get_category_name_list
-lgl_db_free_category_name_list
-lgl_db_lookup_category_from_name
-lgl_db_lookup_category_from_id
-lgl_db_lookup_category_id_from_name
-lgl_db_lookup_category_name_from_id
-lgl_db_is_category_id_known
-lgl_db_get_brand_list
-lgl_db_free_brand_list
-lgl_db_register_template
-lgl_db_does_template_exist
-lgl_db_does_template_name_exist
-lgl_db_get_template_name_list_unique
-lgl_db_get_template_name_list_all
-lgl_db_free_template_name_list
-lgl_db_lookup_template_from_name
-lgl_db_print_known_papers
-lgl_db_print_known_categories
-lgl_db_print_known_templates
-lgl_db_print_aliases
-</SECTION>
-
-<SECTION>
-<FILE>units</FILE>
-lglUnits
-lgl_units_get_id
-lgl_units_from_id
-lgl_units_get_name
-lgl_units_from_name
-lgl_units_get_points_per_unit
-lgl_units_get_units_per_point
-</SECTION>
-
-<SECTION>
-<FILE>str</FILE>
-lgl_str_utf8_casecmp
-</SECTION>
-
-<SECTION>
-<FILE>template</FILE>
-lglTemplate
-lglTemplateAlias
-lglTemplateFrameAll
-lglTemplateFrameRect
-lglTemplateFrameRound
-lglTemplateFrameCD
-lglTemplateLayout
-lglTemplateMarkupMargin
-lglTemplateMarkupLine
-lglTemplateMarkupCircle
-lglTemplateMarkupRect
-lglTemplateOrigin
-lglTemplateFrameShape
-lglTemplateFrame
-lglTemplateMarkupType
-lglTemplateMarkup
-lgl_template_get_name
-lgl_template_do_templates_match
-lgl_template_does_brand_match
-lgl_template_does_page_size_match
-lgl_template_does_category_match
-lgl_template_frame_get_size
-lgl_template_frame_get_n_labels
-lgl_template_frame_get_origins
-lgl_template_new
-lgl_template_add_alias
-lgl_template_add_category
-lgl_template_add_frame
-lgl_template_frame_rect_new
-lgl_template_alias_new
-lgl_template_frame_round_new
-lgl_template_frame_cd_new
-lgl_template_frame_add_layout
-lgl_template_frame_add_markup
-lgl_template_layout_new
-lgl_template_markup_margin_new
-lgl_template_markup_line_new
-lgl_template_markup_circle_new
-lgl_template_markup_rect_new
-lgl_template_dup
-lgl_template_free
-lgl_template_alias_dup
-lgl_template_alias_free
-lgl_template_frame_dup
-lgl_template_frame_free
-lgl_template_layout_dup
-lgl_template_layout_free
-lgl_template_markup_dup
-lgl_template_markup_free
-</SECTION>
-
-<SECTION>
-<FILE>category</FILE>
-lglCategory
-lgl_category_new
-lgl_category_dup
-lgl_category_free
-</SECTION>
-
-<SECTION>
-<FILE>xml</FILE>
-LGL_XML_NAME_SPACE
-lgl_xml_get_prop_string
-lgl_xml_get_prop_i18n_string
-lgl_xml_get_prop_double
-lgl_xml_get_prop_boolean
-lgl_xml_get_prop_int
-lgl_xml_get_prop_uint
-lgl_xml_get_prop_length
-lgl_xml_set_prop_string
-lgl_xml_set_prop_double
-lgl_xml_set_prop_boolean
-lgl_xml_set_prop_int
-lgl_xml_set_prop_uint_hex
-lgl_xml_set_prop_length
-lgl_xml_is_node
-lgl_xml_get_node_content
-lgl_xml_set_default_units
-</SECTION>
-
-<SECTION>
-<FILE>xml-template</FILE>
-lgl_xml_template_read_templates_from_file
-lgl_xml_template_parse_templates_doc
-lgl_xml_template_parse_template_node
-lgl_xml_template_write_templates_to_file
-lgl_xml_template_write_template_to_file
-lgl_xml_template_create_template_node
-</SECTION>
-
-<SECTION>
-<FILE>paper</FILE>
-lglPaper
-lgl_paper_new
-lgl_paper_dup
-lgl_paper_free
-</SECTION>
-
gint w_screen, h_screen;
GdkWindow *window;
gint x_window, y_window;
- GtkAllocation *allocation;
+ GtkAllocation allocation;
gint x_this, y_this, h_this;
GtkRequisition menu_requisition;
gint h_menu, w_menu;
/*
* Position and size of "this" inside window
*/
- allocation = >K_WIDGET (this)->allocation;
- x_this = allocation->x;
- y_this = allocation->y;
- h_this = allocation->height;
+ gtk_widget_get_allocation (GTK_WIDGET (this), &allocation);
+ x_this = allocation.x;
+ y_this = allocation.y;
+ h_this = allocation.height;
/*
* Size of menu.
gint w_screen, h_screen;
GdkWindow *window;
gint x_window, y_window;
- GtkAllocation *allocation;
+ GtkAllocation allocation;
gint x_this, y_this, h_this;
GtkRequisition menu_requisition;
gint h_menu, w_menu;
/*
* Position and size of "this" inside window
*/
- allocation = >K_WIDGET (this)->allocation;
- x_this = allocation->x;
- y_this = allocation->y;
- h_this = allocation->height;
+ gtk_widget_get_allocation (GTK_WIDGET (this), &allocation);
+ x_this = allocation.x;
+ y_this = allocation.y;
+ h_this = allocation.height;
/*
* Size of menu.
static void
gl_color_swatch_init (glColorSwatch *this)
{
- GTK_WIDGET_SET_FLAGS (GTK_WIDGET (this), GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (this), FALSE);
this->priv = g_new0 (glColorSwatchPrivate, 1);
}
expose_event_cb (GtkWidget *widget,
GdkEventExpose *event)
{
- GdkWindow *window;
- cairo_t *cr;
+ GdkWindow *window;
+ cairo_t *cr;
+ GtkAllocation allocation;
window = gtk_widget_get_window (widget);
event->area.width, event->area.height);
cairo_clip (cr);
- cairo_translate (cr, widget->allocation.x, widget->allocation.y);
+ gtk_widget_get_allocation (widget, &allocation);
+ cairo_translate (cr, allocation.x, allocation.y);
draw_swatch (GL_COLOR_SWATCH (widget), cr);
draw_swatch (glColorSwatch *this,
cairo_t *cr)
{
- GtkStyle *style;
- gdouble w, h;
- guint fill_color, line_color;
+ GtkAllocation allocation;
+ GtkStyle *style;
+ gdouble w, h;
+ guint fill_color, line_color;
cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE);
- w = GTK_WIDGET (this)->allocation.width;
- h = GTK_WIDGET (this)->allocation.height;
+ gtk_widget_get_allocation (GTK_WIDGET (this), &allocation);
+ w = allocation.width;
+ h = allocation.height;
style = gtk_widget_get_style (GTK_WIDGET (this));
- if ( GTK_WIDGET_IS_SENSITIVE (GTK_WIDGET (this)) )
+ if ( gtk_widget_is_sensitive (GTK_WIDGET (this)) )
{
fill_color = this->priv->color;
line_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_NORMAL]);
gint w_screen, h_screen;
GdkWindow *window;
gint x_window, y_window;
- GtkAllocation *allocation;
+ GtkAllocation allocation;
gint x_this, y_this, h_this;
GtkRequisition menu_requisition;
gint h_menu, w_menu;
/*
* Position and size of "this" inside window
*/
- allocation = >K_WIDGET (this)->allocation;
- x_this = allocation->x;
- y_this = allocation->y;
- h_this = allocation->height;
+ gtk_widget_get_allocation (GTK_WIDGET (this), &allocation);
+ x_this = allocation.x;
+ y_this = allocation.y;
+ h_this = allocation.height;
/*
* Size of menu.
gint w_screen, h_screen;
GdkWindow *window;
gint x_window, y_window;
- GtkAllocation *allocation;
+ GtkAllocation allocation;
gint x_this, y_this, h_this;
GtkRequisition menu_requisition;
gint h_menu, w_menu;
/*
* Position and size of "this" inside window
*/
- allocation = >K_WIDGET (this)->allocation;
- x_this = allocation->x;
- y_this = allocation->y;
- h_this = allocation->height;
+ gtk_widget_get_allocation (GTK_WIDGET (this), &allocation);
+ x_this = allocation.x;
+ y_this = allocation.y;
+ h_this = allocation.height;
/*
* Size of menu.
static void
gl_font_sample_init (glFontSample *this)
{
- GTK_WIDGET_SET_FLAGS (GTK_WIDGET (this), GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (this), FALSE);
this->priv = g_new0 (glFontSamplePrivate, 1);
}
expose_event_cb (GtkWidget *widget,
GdkEventExpose *event)
{
- GdkWindow *window;
- cairo_t *cr;
+ GdkWindow *window;
+ cairo_t *cr;
+ GtkAllocation allocation;
window = gtk_widget_get_window (widget);
event->area.width, event->area.height);
cairo_clip (cr);
- cairo_translate (cr, widget->allocation.x, widget->allocation.y);
+ gtk_widget_get_allocation (widget, &allocation);
+ cairo_translate (cr, allocation.x, allocation.y);
draw_sample (GL_FONT_SAMPLE (widget), cr);
draw_sample (glFontSample *this,
cairo_t *cr)
{
+ GtkAllocation allocation;
GtkStyle *style;
gdouble w, h;
guint fill_color, line_color;
gdouble layout_x, layout_y, layout_width, layout_height;
-
- w = GTK_WIDGET (this)->allocation.width;
- h = GTK_WIDGET (this)->allocation.height;
+ gtk_widget_get_allocation (GTK_WIDGET (this), &allocation);
+ w = allocation.width;
+ h = allocation.height;
style = gtk_widget_get_style (GTK_WIDGET (this));
- if ( GTK_WIDGET_IS_SENSITIVE (GTK_WIDGET (this)) )
+ if ( gtk_widget_is_sensitive (GTK_WIDGET (this)) )
{
fill_color = gl_color_from_gdk_color (&style->light[GTK_STATE_NORMAL]);
line_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_NORMAL]);
#include "print-op.h"
#include "file-util.h"
#include "prefs.h"
-#include "font-history.h"
#include "debug.h"
/*============================================*/
gl_merge_init ();
lgl_db_init ();
gl_prefs_init ();
- gl_template_history_init ();
- gl_font_history_init ();
/* now print the files */
for (p = file_list; p; p = p->next) {
gl_merge_text_finalize (GObject *object)
{
glMergeText *merge_text = GL_MERGE_TEXT (object);
- gint i;
gl_debug (DEBUG_MERGE, "START");
gl_merge_text_get_key_list (glMerge *merge)
{
glMergeText *merge_text;
- GList *record_list, *p_rec;
- glMergeRecord *record;
- GList *p_field;
- gint i_field, n_fields_line, n_fields;
+ gint i_field, n_fields;
GList *key_list;
gl_debug (DEBUG_MERGE, "BEGIN");
static void
gl_mini_label_preview_init (glMiniLabelPreview *this)
{
- GTK_WIDGET_SET_FLAGS (GTK_WIDGET (this), GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (this), FALSE);
this->priv = g_new0 (glMiniLabelPreviewPrivate, 1);
}
expose_event_cb (GtkWidget *widget,
GdkEventExpose *event)
{
- GdkWindow *window;
- cairo_t *cr;
+ GdkWindow *window;
+ cairo_t *cr;
+ GtkAllocation allocation;
window = gtk_widget_get_window (widget);
event->area.width, event->area.height);
cairo_clip (cr);
- cairo_translate (cr, widget->allocation.x, widget->allocation.y);
+ gtk_widget_get_allocation (widget, &allocation);
+ cairo_translate (cr, allocation.x, allocation.y);
draw_preview (GL_MINI_LABEL_PREVIEW (widget), cr);
draw_preview (glMiniLabelPreview *this,
cairo_t *cr)
{
+ GtkAllocation allocation;
GtkStyle *style;
gdouble w, h;
guint fill_color, line_color, shadow_color;
gdouble scale;
- w = GTK_WIDGET (this)->allocation.width;
- h = GTK_WIDGET (this)->allocation.height;
+ gtk_widget_get_allocation (GTK_WIDGET (this), &allocation);
+ w = allocation.width;
+ h = allocation.height;
style = gtk_widget_get_style (GTK_WIDGET (this));
- if ( GTK_WIDGET_IS_SENSITIVE (GTK_WIDGET (this)) )
+ if ( gtk_widget_is_sensitive (GTK_WIDGET (this)) )
{
fill_color = gl_color_from_gdk_color (&style->light[GTK_STATE_NORMAL]);
line_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_NORMAL]);
gtk_event_box_set_visible_window (GTK_EVENT_BOX (this), FALSE);
this->priv->canvas = gtk_drawing_area_new ();
- GTK_WIDGET_SET_FLAGS (this->priv->canvas, GTK_NO_WINDOW);
+ gtk_widget_set_has_window(this->priv->canvas, FALSE);
gtk_container_add (GTK_CONTAINER (this), this->priv->canvas);
g_signal_connect (G_OBJECT (this->priv->canvas), "expose-event",
set_transform_and_get_scale (glMiniPreview *this,
cairo_t *cr)
{
- lglTemplate *template = this->priv->template;
- gdouble w, h;
- gdouble scale;
- gdouble offset_x, offset_y;
+ lglTemplate *template = this->priv->template;
+ GtkAllocation allocation;
+ gdouble w, h;
+ gdouble scale;
+ gdouble offset_x, offset_y;
/* Establish scale and origin. */
- w = GTK_WIDGET (this)->allocation.width;
- h = GTK_WIDGET (this)->allocation.height;
+ gtk_widget_get_allocation (GTK_WIDGET (this), &allocation);
+ w = allocation.width;
+ h = allocation.height;
/* establish scale. */
scale = MIN( (w - 2*MARGIN - 2*SHADOW_OFFSET)/template->page_width,
{
GdkWindow *window;
cairo_t *cr;
+ GtkAllocation allocation;
gl_debug (DEBUG_MINI_PREVIEW, "START");
event->area.x, event->area.y,
event->area.width, event->area.height);
cairo_clip (cr);
- cairo_translate (cr, widget->allocation.x, widget->allocation.y);
+
+ gtk_widget_get_allocation (widget, &allocation);
+ cairo_translate (cr, allocation.x, allocation.y);
draw (this, cr);
editor->priv->edit_insert_field_button = gl_field_button_new (_("Insert merge field"));
gtk_box_pack_start (GTK_BOX (editor->priv->edit_insert_field_vbox),
editor->priv->edit_insert_field_button, FALSE, FALSE, 0);
- GTK_WIDGET_UNSET_FLAGS (editor->priv->edit_insert_field_button,
- GTK_CAN_FOCUS | GTK_CAN_DEFAULT);
+
+ gtk_widget_set_can_focus (editor->priv->edit_insert_field_button, FALSE);
+ gtk_widget_set_can_default (editor->priv->edit_insert_field_button, FALSE);
/* Un-hide */
gtk_widget_show_all (editor->priv->edit_page_vbox);
gtk_widget_modify_bg (GTK_WIDGET (view->canvas), GTK_STATE_NORMAL, bg_color);
g_free (bg_color);
- GTK_WIDGET_SET_FLAGS (GTK_WIDGET (view->canvas), GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (GTK_WIDGET (view->canvas), TRUE);
gtk_widget_add_events (GTK_WIDGET (view->canvas),
(GDK_FOCUS_CHANGE_MASK |
void
gl_view_zoom_to_fit (glView *view)
{
- gint w_view, h_view;
- gdouble w_label, h_label;
- gdouble x_scale, y_scale, scale;
+ GtkAllocation allocation;
+ gint w_view, h_view;
+ gdouble w_label, h_label;
+ gdouble x_scale, y_scale, scale;
gl_debug (DEBUG_VIEW, "");
- if ( ! GTK_WIDGET_VISIBLE(view)) {
+ if ( ! gtk_widget_get_window (GTK_WIDGET (view)) ) {
set_zoom_real (view, 1.0, TRUE);
return;
}
- w_view = GTK_WIDGET(view)->allocation.width;
- h_view = GTK_WIDGET(view)->allocation.height;
+ gtk_widget_get_allocation (GTK_WIDGET (view), &allocation);
+ w_view = allocation.width;
+ h_view = allocation.height;
gl_label_get_size (GL_LABEL(view->label), &w_label, &h_label);
focus_in_event_cb (glView *view,
GdkEventFocus *event)
{
- GTK_WIDGET_SET_FLAGS (GTK_WIDGET (view->canvas), GTK_HAS_FOCUS);
-
return FALSE;
}
focus_out_event_cb (glView *view,
GdkEventFocus *event)
{
- GTK_WIDGET_UNSET_FLAGS (GTK_WIDGET (view->canvas), GTK_HAS_FOCUS);
-
return FALSE;
}
GdkEventExpose *eevent,
glWdgtChainButton *button)
{
+ GtkAllocation allocation;
GdkPoint points[3];
GdkPoint buf;
GtkShadowType shadow;
g_return_val_if_fail (GL_WDGT_IS_CHAIN_BUTTON (button), FALSE);
- points[0].x = widget->allocation.width / 2;
- points[0].y = widget->allocation.height / 2;
+ gtk_widget_get_allocation (widget, &allocation);
+ points[0].x = allocation.width / 2;
+ points[0].y = allocation.height / 2;
which_line = (widget == button->line1) ? 1 : -1;
points[1].x = points[0].x - SHORT_LINE;
points[1].y = points[0].y;
points[2].x = points[1].x;
- points[2].y = (which_line == 1) ? widget->allocation.height - 1 : 0;
+ points[2].y = (which_line == 1) ? allocation.height - 1 : 0;
shadow = GTK_SHADOW_ETCHED_IN;
break;
case GL_WDGT_CHAIN_RIGHT:
points[1].x = points[0].x + SHORT_LINE;
points[1].y = points[0].y;
points[2].x = points[1].x;
- points[2].y = (which_line == 1) ? widget->allocation.height - 1 : 0;
+ points[2].y = (which_line == 1) ? allocation.height - 1 : 0;
shadow = GTK_SHADOW_ETCHED_OUT;
break;
case GL_WDGT_CHAIN_TOP:
points[0].y += SHORT_LINE;
points[1].x = points[0].x;
points[1].y = points[0].y - SHORT_LINE;
- points[2].x = (which_line == 1) ? widget->allocation.width - 1 : 0;
+ points[2].x = (which_line == 1) ? allocation.width - 1 : 0;
points[2].y = points[1].y;
shadow = GTK_SHADOW_ETCHED_OUT;
break;
points[0].y -= SHORT_LINE;
points[1].x = points[0].x;
points[1].y = points[0].y + SHORT_LINE;
- points[2].x = (which_line == 1) ? widget->allocation.width - 1 : 0;
+ points[2].x = (which_line == 1) ? allocation.width - 1 : 0;
points[2].y = points[1].y;
shadow = GTK_SHADOW_ETCHED_IN;
break;