]> git.sur5r.net Git - glabels/commitdiff
When creating origins for labels, y is now sorted in reverse.
authorJim Evins <evins@snaught.com>
Fri, 20 Sep 2002 01:38:31 +0000 (01:38 +0000)
committerJim Evins <evins@snaught.com>
Fri, 20 Sep 2002 01:38:31 +0000 (01:38 +0000)
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

glabels2/src/hig.c
glabels2/src/print.c
glabels2/src/template.c
glabels2/src/wdgt-media-select.c
glabels2/src/wdgt-mini-preview.c

index 93baaf490cc3f45e1780e3f776db67e42c806fb5..a334372136e24d0d4feae2b8626fac2aaa1a9b0e 100644 (file)
@@ -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
index 5e0a7a8d69eae0e3408d0c807b7fb266d600195e..5b1bee86f6bb83aee8d3f2937f62a3d195e0da7d 100644 (file)
@@ -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);
index 9e9946197c822b99d4d7b388c25b7a9d0bf146e1..8110cececc1f5a337102de3237fc0e9d35d1573a 100644 (file)
@@ -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;
index a212dba972d527c63757a81f4622a736d9122ccf..05ddb0dfa13bf9c53069383a03b922903007b711 100644 (file)
@@ -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 ("");
index 7871722872209cb673748a50999ea7d43e4a74ee..51a97d3866d08a1ebfa64cf123181624611c6727 100644 (file)
@@ -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);
        }