From: Jim Evins Date: Fri, 20 Sep 2002 01:38:31 +0000 (+0000) Subject: When creating origins for labels, y is now sorted in reverse. X-Git-Tag: glabels-2_3_0~760 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2b89542781d98e153fd7269a23109f53e5cc6416;p=glabels When creating origins for labels, y is now sorted in reverse. Removed inappropriate freeing of pi->template in print_info_new(). git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@125 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- diff --git a/glabels2/src/hig.c b/glabels2/src/hig.c index 93baaf49..a3343721 100644 --- a/glabels2/src/hig.c +++ b/glabels2/src/hig.c @@ -105,19 +105,11 @@ gl_hig_dialog_init (glHigDialog *hig_dialog) gtk_container_set_border_width (GTK_CONTAINER(hig_dialog), HIG_DIALOG_BORDER); -#if 0 hig_dialog->vbox = gtk_vbox_new (FALSE, HIG_DIALOG_VBOX_SPACING); gtk_box_pack_start (GTK_BOX(GTK_DIALOG(hig_dialog)->vbox), hig_dialog->vbox, FALSE, FALSE, 0); -#else - hig_dialog->vbox = GTK_DIALOG(hig_dialog)->vbox; gtk_box_set_spacing (GTK_BOX(GTK_DIALOG(hig_dialog)->vbox), HIG_DIALOG_VBOX_SPACING); -#endif - - /* FIXME: Doesn't seem to accomplish anything. */ - gtk_container_set_border_width (GTK_CONTAINER(GTK_DIALOG(hig_dialog)->action_area), - HIG_DIALOG_ACTION_BORDER); } static void diff --git a/glabels2/src/print.c b/glabels2/src/print.c index 5e0a7a8d..5b1bee86 100644 --- a/glabels2/src/print.c +++ b/glabels2/src/print.c @@ -55,7 +55,7 @@ typedef struct _PrintInfo { GnomePrintConfig *config; /* gLabels Template */ - const glTemplate *template; + glTemplate *template; gboolean label_rotate_flag; } PrintInfo; @@ -369,32 +369,9 @@ print_info_new (GnomePrintMaster * master, GL_PRINT_DEFAULT_PAPER); } -#if 1 - /* gnome_print_config_dump (pi->config); */ - { - GList *p, *list; - GnomePrintPaper *paper; - gchar *name; - - list = gnome_print_paper_get_list(); - for ( p=list; p != NULL; p=p->next ) { - paper = (GnomePrintPaper *)p->data; - gl_debug (DEBUG_PRINT, " \"%s\"", paper->name); - } - gl_debug (DEBUG_PRINT, - "template->page_size = \"%s\"", template->page_size); - - name = gnome_print_config_get (pi->config, - GNOME_PRINT_KEY_PAPER_SIZE); - gl_debug (DEBUG_PRINT, "config = \"%s\"", name); - } -#endif - pi->template = template; pi->label_rotate_flag = gl_label_get_rotate_flag (label); - gl_template_free (&template); - gl_debug (DEBUG_PRINT, "END"); return pi; @@ -408,6 +385,8 @@ print_info_free (PrintInfo ** pi) { gl_debug (DEBUG_PRINT, "START"); + gl_template_free (&(*pi)->template); + gnome_print_context_close ((*pi)->pc); g_free (*pi); diff --git a/glabels2/src/template.c b/glabels2/src/template.c index 9e994619..8110cece 100644 --- a/glabels2/src/template.c +++ b/glabels2/src/template.c @@ -1050,9 +1050,9 @@ compare_origins (gconstpointer a, const glTemplateOrigin *a_origin = a, *b_origin = b; if ( a_origin->y < b_origin->y ) { - return -1; - } else if ( a_origin->y > b_origin->y ) { return +1; + } else if ( a_origin->y > b_origin->y ) { + return -1; } else { if ( a_origin->x < b_origin->x ) { return -1; diff --git a/glabels2/src/wdgt-media-select.c b/glabels2/src/wdgt-media-select.c index a212dba9..05ddb0df 100644 --- a/glabels2/src/wdgt-media-select.c +++ b/glabels2/src/wdgt-media-select.c @@ -248,6 +248,11 @@ gl_wdgt_media_select_construct (glWdgtMediaSelect * media_select) wvbox1 = gtk_vbox_new (FALSE, GL_HIG_SPACING); gtk_box_pack_start (GTK_BOX (whbox), wvbox1, FALSE, FALSE, 0); + whbox1 = gtk_hbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX (wvbox1), whbox1, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (whbox1), + gtk_label_new (""), + FALSE, FALSE, 0); whbox1 = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (wvbox1), whbox1, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (whbox1), @@ -274,6 +279,11 @@ gl_wdgt_media_select_construct (glWdgtMediaSelect * media_select) wvbox1 = gtk_vbox_new (FALSE, GL_HIG_SPACING); gtk_box_pack_start (GTK_BOX (whbox), wvbox1, FALSE, FALSE, 0); + whbox1 = gtk_hbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX (wvbox1), whbox1, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (whbox1), + gtk_label_new (""), + FALSE, FALSE, 0); whbox1 = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (wvbox1), whbox1, FALSE, FALSE, 0); media_select->desc_label = gtk_label_new (""); diff --git a/glabels2/src/wdgt-mini-preview.c b/glabels2/src/wdgt-mini-preview.c index 78717228..51a97d38 100644 --- a/glabels2/src/wdgt-mini-preview.c +++ b/glabels2/src/wdgt-mini-preview.c @@ -390,7 +390,7 @@ mini_outline_list_new (GnomeCanvas *canvas, break; } g_object_set_data (G_OBJECT (item), "i", - GINT_TO_POINTER (i)); + GINT_TO_POINTER (i+1)); list = g_list_append (list, item); }