Send commitlog mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r1069 - in
      trunk/src/target/OM-2007/applications/openmoko-contacts: .        src
      ([EMAIL PROTECTED])
   2. r1070 - trunk/src/target/u-boot/patches
      ([EMAIL PROTECTED])
   3. r1071 - trunk/src/target/u-boot/patches
      ([EMAIL PROTECTED])
   4. r1072 - trunk/src/target/OM-2007/openmoko-libs/libmokoui
      ([EMAIL PROTECTED])
   5. r1073 - trunk/src/target/OM-2007/openmoko-libs/libmokoui
      ([EMAIL PROTECTED])
   6. r1074 - in
      trunk/src/target/OM-2007/applications/openmoko-contacts: .        src
      ([EMAIL PROTECTED])
--- Begin Message ---
Author: thomas
Date: 2007-02-21 14:21:09 +0100 (Wed, 21 Feb 2007)
New Revision: 1069

Modified:
   trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
   
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c
Log:
* src/contacts-contact-pane.c:

- Add support for handling multi-valued attributes.
- Prevent removal of a field if it is the last of its type in the editor.


Modified: trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog   
2007-02-21 03:00:42 UTC (rev 1068)
+++ trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog   
2007-02-21 13:21:09 UTC (rev 1069)
@@ -1,3 +1,10 @@
+2007-02-21  Thomas Wood  <[EMAIL PROTECTED]>
+
+       * src/contacts-contact-pane.c:
+
+       - Add support for handling multi-valued attributes.
+       - Prevent removal of a field if it is the last of its type in the 
editor.
+
 2007-02-06  Thomas Wood  <[EMAIL PROTECTED]>
 
        * src/contacts-main.c: (start_query), (opened_book), (main): Fixed 
variable

Modified: 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c
 2007-02-21 03:00:42 UTC (rev 1068)
+++ 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c
 2007-02-21 13:21:09 UTC (rev 1069)
@@ -66,6 +66,7 @@
 
 static GQuark attr_quark = 0;
 static GQuark field_quark = 0;
+static GQuark entry_quark = 0;
 
 static FieldInfo fields[] = {
   { EVC_FN, "Name", NULL, TRUE, "<big><b>%s</b></big>", NULL },
@@ -185,8 +186,16 @@
   
   /* TODO: this only handles single-valued attributes at the moment */
   e_vcard_attribute_remove_values (attr);
-  e_vcard_attribute_add_value (attr, value);
 
+  int i = 0;
+  gchar* s;
+  gchar** values = g_strsplit (value, ";", 0);
+  while ((s = values[i])) {
+    e_vcard_attribute_add_value (attr, g_strstrip (s));
+    i++;
+  }
+  g_strfreev (values);
+
   pane->priv->dirty = TRUE;
 }
 
@@ -309,17 +318,45 @@
 static void
 field_button_remove_cb (GtkWidget *button,  ContactsContactPane *pane)
 {
-  GtkWidget*box;
+  GtkWidget *box, *entry;
   EVCardAttribute *attr;
+  FieldInfo *info;
+  GList *attrs;
+  gboolean remove = FALSE;
+  gchar *type, *old_type;
 
   box = button->parent->parent;
   if (!GTK_IS_HBOX (box))
     return;
 
   attr = g_object_get_qdata (G_OBJECT (box), attr_quark);
-  e_vcard_remove_attribute (E_VCARD (pane->priv->contact), attr);
+  entry = g_object_get_qdata (G_OBJECT (box), entry_quark);
+  info = g_object_get_qdata (G_OBJECT (box), field_quark);
 
-  gtk_container_remove (GTK_CONTAINER (pane), box);
+  /* check this wasn't the last attribute of it's type before removing it */
+  old_type = get_type (attr);
+  if (old_type) {
+    for (attrs = e_vcard_get_attributes (E_VCARD (pane->priv->contact));
+         (attrs = g_list_next (attrs)); ) {
+      type = get_type (attrs->data);
+      if (type && !strcmp (type, old_type)) {
+        remove = TRUE;
+        break;
+      }
+
+    }
+  }
+
+  if (remove) {
+    gtk_container_remove (GTK_CONTAINER (pane), box);
+    e_vcard_remove_attribute (E_VCARD (pane->priv->contact), attr);
+  }
+  else {
+    /* clear the attribute and entry widget */
+    e_vcard_attribute_remove_values (attr);
+    field_set_blank (GTK_ENTRY (entry), info);
+  }
+
 }
 
 static GtkWidget *
@@ -424,9 +461,23 @@
   
   /* The value field itself */
 
-  /* FIXME: fix this for multivalued attributes */
-  attr_value = e_vcard_attribute_get_value (attr);
+  /* load the attribute value, returning a semicolon seperated string for
+   * multivalue attributes
+   */
+  GList *l = e_vcard_attribute_get_values (attr);
+  if (l)
+  {
+    attr_value = g_strdup (l->data);
 
+    while ((l = g_list_next (l)))
+    {
+      gchar *old = attr_value;
+      attr_value = g_strdup_printf ("%s; %s", old, (gchar*) l->data);
+      g_free (old);
+    }
+  }
+
+
   if (pane->priv->editable) {
     value = gtk_entry_new ();
     if (attr_value)
@@ -459,6 +510,7 @@
   /****/
   g_object_set_qdata (G_OBJECT (box), attr_quark, attr);
   g_object_set_qdata (G_OBJECT (box), field_quark, (gpointer)info);
+  g_object_set_qdata (G_OBJECT (box), entry_quark, value);
 
 
   gtk_widget_show_all (box);
@@ -588,6 +640,8 @@
   /* Initialise the quarks */
   attr_quark = g_quark_from_static_string("contact-pane-attribute");
   field_quark = g_quark_from_static_string("contact-pane-fieldinfo");
+  entry_quark = g_quark_from_static_string("contact-pane-entry");
+
 }
 
 static void




--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-02-21 15:56:17 +0100 (Wed, 21 Feb 2007)
New Revision: 1070

Modified:
   trunk/src/target/u-boot/patches/uboot-20061030-qt2410.patch
Log:
* fix compilation due to missing last line in qt2410.c
* update config to become closer to what neo1973.h does these days


Modified: trunk/src/target/u-boot/patches/uboot-20061030-qt2410.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-20061030-qt2410.patch 2007-02-21 
13:21:09 UTC (rev 1069)
+++ trunk/src/target/u-boot/patches/uboot-20061030-qt2410.patch 2007-02-21 
14:56:17 UTC (rev 1070)
@@ -5,8 +5,8 @@
 
 Index: u-boot/Makefile
 ===================================================================
---- u-boot.orig/Makefile       2007-02-16 23:01:22.000000000 +0100
-+++ u-boot/Makefile    2007-02-16 23:02:54.000000000 +0100
+--- u-boot.orig/Makefile       2007-02-21 10:57:09.000000000 +0100
++++ u-boot/Makefile    2007-02-21 15:52:58.000000000 +0100
 @@ -1928,6 +1928,9 @@
  sbc2410x_config: unconfig
        @$(MKCONFIG) $(@:_config=) arm arm920t sbc2410x NULL s3c24x0
@@ -20,7 +20,7 @@
 Index: u-boot/board/qt2410/Makefile
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/qt2410/Makefile       2007-02-16 23:02:55.000000000 +0100
++++ u-boot/board/qt2410/Makefile       2007-02-21 10:58:40.000000000 +0100
 @@ -0,0 +1,47 @@
 +#
 +# (C) Copyright 2000, 2001, 2002
@@ -72,7 +72,7 @@
 Index: u-boot/board/qt2410/config.mk
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/qt2410/config.mk      2007-02-16 23:02:55.000000000 +0100
++++ u-boot/board/qt2410/config.mk      2007-02-21 10:58:40.000000000 +0100
 @@ -0,0 +1,25 @@
 +#
 +# (C) Copyright 2002
@@ -102,7 +102,7 @@
 Index: u-boot/board/qt2410/flash.c
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/qt2410/flash.c        2007-02-16 23:02:55.000000000 +0100
++++ u-boot/board/qt2410/flash.c        2007-02-21 10:58:40.000000000 +0100
 @@ -0,0 +1,435 @@
 +/*
 + * (C) Copyright 2002
@@ -542,7 +542,7 @@
 Index: u-boot/board/qt2410/lowlevel_init.S
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/qt2410/lowlevel_init.S        2007-02-16 23:02:55.000000000 
+0100
++++ u-boot/board/qt2410/lowlevel_init.S        2007-02-21 10:58:40.000000000 
+0100
 @@ -0,0 +1,173 @@
 +/*
 + * Memory Setup stuff - taken from blob memsetup.S
@@ -720,8 +720,8 @@
 Index: u-boot/board/qt2410/qt2410.c
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/qt2410/qt2410.c       2007-02-16 23:02:55.000000000 +0100
-@@ -0,0 +1,127 @@
++++ u-boot/board/qt2410/qt2410.c       2007-02-21 15:27:13.000000000 +0100
+@@ -0,0 +1,128 @@
 +/*
 + * (C) 2006 by OpenMoko, Inc.
 + * Author: Harald Welte <[EMAIL PROTECTED]>
@@ -849,10 +849,11 @@
 +      gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
 +
 +      return 0;
++}
 Index: u-boot/board/qt2410/u-boot.lds
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/qt2410/u-boot.lds     2007-02-16 23:02:55.000000000 +0100
++++ u-boot/board/qt2410/u-boot.lds     2007-02-21 10:58:40.000000000 +0100
 @@ -0,0 +1,58 @@
 +/*
 + * (C) Copyright 2002
@@ -915,8 +916,8 @@
 Index: u-boot/include/configs/qt2410.h
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/include/configs/qt2410.h    2007-02-16 23:04:11.000000000 +0100
-@@ -0,0 +1,216 @@
++++ u-boot/include/configs/qt2410.h    2007-02-21 15:48:39.000000000 +0100
+@@ -0,0 +1,285 @@
 +/*
 + * (C) Copyright 2002
 + * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
@@ -948,13 +949,14 @@
 +#ifndef __CONFIG_H
 +#define __CONFIG_H
 +
-+#if 1
++#if 0
 +/* If we want to start u-boot from usb bootloader in NOR flash */
 +#define CONFIG_SKIP_RELOCATE_UBOOT    1
 +#define       CONFIG_SKIP_LOWLEVEL_INIT       1
 +#else
 +/* If we want to start u-boot directly from within NAND flash */
 +#define CONFIG_S3C2410_NAND_BOOT      1
++#define CONFIG_S3C2410_NAND_SKIP_BAD  1
 +#endif
 +
 +/*
@@ -971,20 +973,21 @@
 +
 +#define USE_920T_MMU          1
 +#define CONFIG_USE_IRQ                1
-+//#undef CONFIG_USE_IRQ                       /* we don't need IRQ/FIQ stuff 
*/
 +
 +/*
 + * Size of malloc() pool
 + */
-+#define CFG_MALLOC_LEN                (CFG_ENV_SIZE + 128*1024)
++#define CFG_MALLOC_LEN                (CFG_ENV_SIZE + 400*1024)
 +#define CFG_GBL_DATA_SIZE     128     /* size in bytes reserved for initial 
data */
 +
 +/*
 + * Hardware drivers
 + */
++#if 0
 +#define CONFIG_DRIVER_CS8900  1       /* we have a CS8900 on-board */
 +#define CS8900_BASE           0x19000300
 +#define CS8900_BUS16          1 /* the Linux driver does accesses as shorts */
++#endif
 +
 +/*
 + * select serial console configuration
@@ -1005,28 +1008,48 @@
 +/***********************************************************
 + * Command definition
 + ***********************************************************/
-+#define CONFIG_COMMANDS \
-+                      (CONFIG_CMD_DFL  | \
-+                      CFG_CMD_BSP      | \
++#define CONFIG_COMMANDS (\
++                      CFG_CMD_BDI      | \
++                      CFG_CMD_LOADS    | \
++                      CFG_CMD_LOADB    | \
++                      CFG_CMD_IMI      | \
 +                      CFG_CMD_CACHE    | \
++                      CFG_CMD_MEMORY   | \
++                      CFG_CMD_ENV      | \
++                      /* CFG_CMD_IRQ   | */ \
++                      CFG_CMD_BOOTD    | \
++                      CFG_CMD_CONSOLE  | \
++                      CFG_CMD_BMP      | \
++                      CFG_CMD_ASKENV   | \
++                      CFG_CMD_RUN      | \
++                      CFG_CMD_ECHO     | \
++                      CFG_CMD_I2C      | \
++                      CFG_CMD_REGINFO  | \
++                      CFG_CMD_IMMAP    | \
 +                      CFG_CMD_DATE     | \
-+                      CFG_CMD_DHCP     | \
++                      CFG_CMD_AUTOSCRIPT | \
++                      CFG_CMD_BSP      | \
++                      CFG_CMD_ELF      | \
++                      CFG_CMD_MISC     | \
++                      /* CFG_CMD_USB   | */ \
++                      CFG_CMD_JFFS2    | \
 +                      CFG_CMD_DIAG     | \
-+                      CFG_CMD_ELF      | \
-+                      CFG_CMD_EXT2     | \
-+                      CFG_CMD_FAT      | \
 +                      CFG_CMD_HWFLOW   | \
-+                      /* CFG_CMD_IDE   | */ \
-+                      /* CFG_CMD_IRQ   | */ \
-+                      CFG_CMD_JFFS2    | \
-+                      CFG_CMD_MMC      | \
++                      CFG_CMD_SAVES    | \
 +                      CFG_CMD_NAND     | \
-+                      CFG_CMD_PING     | \
 +                      CFG_CMD_PORTIO   | \
-+                      CFG_CMD_REGINFO  | \
-+                      CFG_CMD_SAVES    | \
-+                      CFG_CMD_USB)
++                      CFG_CMD_MMC      | \
++                      CFG_CMD_FAT      | \
++                      CFG_CMD_EXT2     | \
++                      0)
 +
++#if 0
++                      CFG_CMD_DHCP     | \
++                      CFG_CMD_PING     | \
++                      CFG_CMD_NET      | \
++
++#endif
++
 +/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
 +#include <cmd_confdefs.h>
 +
@@ -1054,7 +1077,7 @@
 +#define       CFG_PROMPT              "QT2410 # "     /* Monitor Command 
Prompt       */
 +#define       CFG_CBSIZE              256             /* Console I/O Buffer 
Size      */
 +#define       CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer 
Size */
-+#define       CFG_MAXARGS             16              /* max number of 
command args   */
++#define       CFG_MAXARGS             64              /* max number of 
command args   */
 +#define CFG_BARGSIZE          CFG_CBSIZE      /* Boot Argument Buffer Size    
*/
 +
 +#define CFG_MEMTEST_START     0x30000000      /* memtest works on     */
@@ -1084,6 +1107,18 @@
 +
 +#define CONFIG_USB_OHCI               1
 +
++#define CONFIG_USB_DEVICE     1
++#define CONFIG_USB_TTY                1
++#define CFG_CONSOLE_IS_IN_ENV 1
++#define CONFIG_USBD_VENDORID          0x1457     /* Linux/NetChip */
++#define CONFIG_USBD_PRODUCTID_GSERIAL 0x5120    /* gserial */
++#define CONFIG_USBD_PRODUCTID_CDCACM  0x5119    /* CDC ACM */
++#define CONFIG_USBD_MANUFACTURER      "Armzone"
++#define CONFIG_USBD_PRODUCT_NAME      "QT2410 Bootloader " U_BOOT_VERSION
++#define CONFIG_EXTRA_ENV_SETTINGS     "usbtty=cdc_acm\0"
++#define CONFIG_USBD_DFU                       1
++#define CONFIG_USBD_DFU_XFER_SIZE     0x4000
++
 +/*-----------------------------------------------------------------------
 + * Physical Memory Map
 + */
@@ -1112,7 +1147,7 @@
 +
 +#define       CFG_ENV_IS_IN_NAND      1
 +#define CFG_ENV_SIZE          0x4000          /* 16k Total Size of 
Environment Sector */
-+#define CFG_ENV_OFFSET                0x30000         /* environment after 
bootloader */
++#define CFG_ENV_OFFSET_OOB    1               /* Location of ENV stored in 
block 0 OOB */
 +
 +#define NAND_MAX_CHIPS                1
 +#define CFG_NAND_BASE         0x4e000000
@@ -1127,9 +1162,44 @@
 +#define CONFIG_FAT            1
 +#define CONFIG_SUPPORT_VFAT   1
 +
++#if 1
++/* JFFS2 driver */
++#define CONFIG_JFFS2_CMDLINE  1
++#define CONFIG_JFFS2_NAND     1
++#define CONFIG_JFFS2_NAND_DEV 0
++//#define CONFIG_JFFS2_NAND_OFF               0x634000
++//#define CONFIG_JFFS2_NAND_SIZE      0x39cc000
++#endif
++
 +/* ATAG configuration */
 +#define CONFIG_INITRD_TAG             1
 +#define CONFIG_SETUP_MEMORY_TAGS      1
 +#define CONFIG_CMDLINE_TAG            1
 +
++#define CONFIG_DRIVER_S3C24X0_I2C     1
++#define CONFIG_HARD_I2C                       1
++#define CFG_I2C_SPEED                 400000  /* 400kHz according to PCF50606 
data sheet */
++#define CFG_I2C_SLAVE                 0x7f
++
++#define CONFIG_VIDEO
++#define CONFIG_VIDEO_S3C2410
++#define CONFIG_CFB_CONSOLE
++#define CONFIG_VIDEO_LOGO
++#define CONFIG_SPLASH_SCREEN
++#define CFG_VIDEO_LOGO_MAX_SIZE               (640*480+1024+100) /* 100 = 
slack */
++#define CONFIG_VIDEO_BMP_GZIP
++#define CONFIG_VGA_AS_SINGLE_DEVICE
++#define CONFIG_UNZIP
++
++#define VIDEO_KBD_INIT_FCT     0
++#define VIDEO_TSTC_FCT         serial_tstc
++#define VIDEO_GETC_FCT         serial_getc
++
++#define LCD_VIDEO_ADDR         0x33d00000
++
++#define CONFIG_S3C2410_NAND_BBT       1
++
++#define MTDIDS_DEFAULT                "nand0=qt2410-nand"
++#define MTPARTS_DEFAULT               
"qt2410-nand:192k(u-boot),8k(u-boot_env),2M(kernel),2M(splash),-(jffs2)"
++
 +#endif        /* __CONFIG_H */




--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-02-21 15:56:55 +0100 (Wed, 21 Feb 2007)
New Revision: 1071

Added:
   trunk/src/target/u-boot/patches/uboot-qt2410-resume.patch
Modified:
   trunk/src/target/u-boot/patches/series
Log:
* add QT2410 port of fluffs' resume patch

This eventually needs to move into cpu/arm920/start.S


Modified: trunk/src/target/u-boot/patches/series
===================================================================
--- trunk/src/target/u-boot/patches/series      2007-02-21 14:56:17 UTC (rev 
1070)
+++ trunk/src/target/u-boot/patches/series      2007-02-21 14:56:55 UTC (rev 
1071)
@@ -16,6 +16,7 @@
 env_nand_oob.patch
 uboot-s3c2410_fb.patch
 uboot-20061030-qt2410.patch 
+uboot-qt2410-resume.patch
 uboot-20061030-neo1973.patch 
 uboot-neo1973-resume.patch
 

Added: trunk/src/target/u-boot/patches/uboot-qt2410-resume.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-qt2410-resume.patch   2007-02-21 
14:56:17 UTC (rev 1070)
+++ trunk/src/target/u-boot/patches/uboot-qt2410-resume.patch   2007-02-21 
14:56:55 UTC (rev 1071)
@@ -0,0 +1,57 @@
+Resume support for low-level uboot code, Version 5
+
+Signed-off-by: Ben Dooks <[EMAIL PROTECTED]>
+
+Index: u-boot/board/qt2410/lowlevel_init.S
+===================================================================
+--- u-boot.orig/board/qt2410/lowlevel_init.S   2007-02-21 10:58:40.000000000 
+0100
++++ u-boot/board/qt2410/lowlevel_init.S        2007-02-21 15:54:14.000000000 
+0100
+@@ -42,6 +42,8 @@
+  *
+  */
+ 
++#include "s3c2410.h"
++      
+ #define BWSCON        0x48000000
+ 
+ /* BWSCON */
+@@ -132,6 +134,17 @@
+ 
+ .globl lowlevel_init
+ lowlevel_init:
++      /* take sdram out of power down */
++      ldr     r0, =0x56000080         /* misccr */
++      ldr     r1, [ r0 ]
++      bic     r1, r1, #(S3C2410_MISCCR_nEN_SCLK0 | S3C2410_MISCCR_nEN_SCLK1 | 
S3C2410_MISCCR_nEN_SCLKE)
++      str     r1, [ r0 ]
++
++      /* ensure signals stabalise */
++      mov     r1, #128
++1:    subs    r1, r1, #1
++      bpl     1b
++      
+       /* memory control configuration */
+       /* make r0 relative the current location so that it */
+       /* reads SMRDATA out of FLASH rather than memory ! */
+@@ -150,6 +163,21 @@
+       mrc     p15, 0, r1 ,c1 ,c0, 0
+       orr     r1, r1, #0xc0000000
+       mcr     p15, 0, r1, c1, c0, 0
++      
++      /* ensure some refresh has happened */
++      mov     r1, #4096
++1:    subs    r1, r1, #1
++      bpl     1b
++      
++      /* test for resume */
++      ldr     r1, =0x560000B4         /* gstatus2 */
++      ldr     r0, [ r1 ]
++      tst     r0, #0x02               /* is this resume from power down */
++      beq     not_resuming
++
++      ldr     pc, [r1, #4]            /* gstatus3 */
++      
++not_resuming:
+ 
+       /* everything is fine now */
+       mov     pc, lr




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-02-21 16:09:45 +0100 (Wed, 21 Feb 2007)
New Revision: 1072

Modified:
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-alignment.c
Log:
Actually commit the changes for r1053


Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-alignment.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-alignment.c   
2007-02-21 14:56:55 UTC (rev 1071)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-alignment.c   
2007-02-21 15:09:45 UTC (rev 1072)
@@ -33,16 +33,6 @@
 
 static GtkAlignmentClass* parent_class = NULL;
 
-//FIXME this is a bit hackish
-#define GTK_ALIGNMENT_GET_PRIVATE(o)  (G_TYPE_INSTANCE_GET_PRIVATE ((o), 
GTK_TYPE_ALIGNMENT, GtkAlignmentPrivate))
-typedef struct _GtkAlignmentPrivate
-{
-  guint padding_top;
-  guint padding_bottom;
-  guint padding_left;
-  guint padding_right;
-};
-
 typedef struct _MokoAlignmentPrivate
 {
 } MokoAlignmentPrivate;
@@ -57,7 +47,6 @@
 moko_alignment_class_init (MokoAlignmentClass *klass)
 {
     /* hook parent */
-    GObjectClass *object_class = G_OBJECT_CLASS (klass);
     parent_class = g_type_class_peek_parent(klass);
     GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
 
@@ -135,7 +124,6 @@
     gint width, height;
     gint border_width;
     gint padding_horizontal, padding_vertical;
-    GtkAlignmentPrivate *priv;
 
     padding_horizontal = 0;
     padding_vertical = 0;
@@ -160,10 +148,12 @@
 
         border_width = GTK_CONTAINER (alignment)->border_width;
 
-        priv = GTK_ALIGNMENT_GET_PRIVATE (widget);
-        padding_horizontal = priv->padding_left + priv->padding_right;
-        padding_vertical = priv->padding_top + priv->padding_bottom;
+        guint p_top, p_bottom, p_left, p_right;
+        gtk_alignment_get_padding (GTK_ALIGNMENT (widget), &p_top, &p_bottom, 
&p_left, &p_right);
 
+        padding_horizontal = p_left + p_right;
+        padding_vertical = p_top + p_bottom;
+
         width = allocation->width - padding_horizontal - 2 * border_width;
         height = allocation->height - padding_vertical - 2 * border_width;
 
@@ -184,20 +174,20 @@
         if (GTK_WIDGET_NO_WINDOW (widget))
         {
             if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
-                child_allocation.x = (1.0 - alignment->xalign) * (width - 
child_allocation.width) + allocation->x + border_width + priv->padding_right;
+                child_allocation.x = (1.0 - alignment->xalign) * (width - 
child_allocation.width) + allocation->x + border_width + p_right;
             else
-                child_allocation.x = alignment->xalign * (width - 
child_allocation.width) + allocation->x + border_width + priv->padding_left;
+                child_allocation.x = alignment->xalign * (width - 
child_allocation.width) + allocation->x + border_width + p_left;
 
-            child_allocation.y = alignment->yalign * (height - 
child_allocation.height) + allocation->y + border_width + priv->padding_top;
+            child_allocation.y = alignment->yalign * (height - 
child_allocation.height) + allocation->y + border_width + p_top;
         }
         else
         {
             if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
-                child_allocation.x = (1.0 - alignment->xalign) * (width - 
child_allocation.width) + border_width + priv->padding_right;
+                child_allocation.x = (1.0 - alignment->xalign) * (width - 
child_allocation.width) + border_width + p_right;
             else
-                child_allocation.x = alignment->xalign * (width - 
child_allocation.width) + border_width + priv->padding_left;
+                child_allocation.x = alignment->xalign * (width - 
child_allocation.width) + border_width + p_left;
 
-            child_allocation.y = alignment->yalign * (height - 
child_allocation.height) + border_width + priv->padding_top;
+            child_allocation.y = alignment->yalign * (height - 
child_allocation.height) + border_width + p_top;
         }
         gtk_widget_size_allocate (bin->child, &child_allocation);
     }




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-02-21 16:38:23 +0100 (Wed, 21 Feb 2007)
New Revision: 1073

Modified:
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-search-bar.c
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tree-view.c
Log:
* Fix some compiler warnings


Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-search-bar.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-search-bar.c  
2007-02-21 15:09:45 UTC (rev 1072)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-search-bar.c  
2007-02-21 15:38:23 UTC (rev 1073)
@@ -51,11 +51,11 @@
 {
     GtkToolItem* item = gtk_tool_item_new();
     gtk_widget_set_size_request( GTK_WIDGET(item), 320, 10 ); //FIXME get from 
style
-    GtkEntry* entry = gtk_entry_new();
-    gtk_widget_set_name( GTK_WIDGET(entry), "moko_search_entry" );
-    gtk_entry_set_has_frame( entry, FALSE );
+    GtkWidget* entry = gtk_entry_new();
+    gtk_widget_set_name( entry, "moko_search_entry" );
+    gtk_entry_set_has_frame( GTK_ENTRY (entry), FALSE );
     gtk_entry_set_text( GTK_ENTRY(entry), "foo" );
-    gtk_container_add( GTK_CONTAINER(item), GTK_WIDGET(entry) );
+    gtk_container_add( GTK_CONTAINER(item), entry );
     gtk_toolbar_insert( GTK_TOOLBAR (self), GTK_TOOL_ITEM(item), 0 );
 }
 

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tree-view.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tree-view.c   
2007-02-21 15:09:45 UTC (rev 1072)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tree-view.c   
2007-02-21 15:38:23 UTC (rev 1073)
@@ -94,10 +94,10 @@
 
 GtkWidget* moko_tree_view_put_into_scrolled_window(MokoTreeView* self)
 {
-    GtkScrolledWindow* scrolledwindow = gtk_scrolled_window_new( NULL, NULL );
+    GtkWidget* scrolledwindow = gtk_scrolled_window_new( NULL, NULL );
     //FIXME get from style or (even better) set as initial size hint in 
MokoPanedWindow (also via style sheet of course)
-    gtk_widget_set_size_request( GTK_WIDGET(scrolledwindow), 0, 170 );
-    gtk_scrolled_window_set_policy( scrolledwindow, GTK_POLICY_NEVER, 
GTK_POLICY_ALWAYS );
-    gtk_container_add( scrolledwindow, GTK_WIDGET(self) );
-    return GTK_WIDGET (scrolledwindow);
+    gtk_widget_set_size_request( scrolledwindow, 0, 170 );
+    gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW (scrolledwindow), 
GTK_POLICY_NEVER, GTK_POLICY_ALWAYS );
+    gtk_container_add( GTK_CONTAINER (scrolledwindow), GTK_WIDGET (self) );
+    return scrolledwindow;
 }




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-02-21 17:00:11 +0100 (Wed, 21 Feb 2007)
New Revision: 1074

Modified:
   trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
   trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-main.c
Log:
* src/contacts-main.c: (main): Fix some compiler warnings


Modified: trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog   
2007-02-21 15:38:23 UTC (rev 1073)
+++ trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog   
2007-02-21 16:00:11 UTC (rev 1074)
@@ -1,5 +1,9 @@
 2007-02-21  Thomas Wood  <[EMAIL PROTECTED]>
 
+       * src/contacts-main.c: (main): Fix some compiler warnings
+
+2007-02-21  Thomas Wood  <[EMAIL PROTECTED]>
+
        * src/contacts-contact-pane.c:
 
        - Add support for handling multi-valued attributes.

Modified: 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-main.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-main.c 
2007-02-21 15:38:23 UTC (rev 1073)
+++ trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-main.c 
2007-02-21 16:00:11 UTC (rev 1074)
@@ -176,7 +176,7 @@
        data->ui = g_new0 (ContactsUI, 1);
        data->initialising = TRUE; /* initialising until contacts have been 
loaded for the first time */
        bacon_message_connection_set_callback (
-               mc, contacts_bacon_cb, data);
+               mc, (BaconMessageReceivedFunc)contacts_bacon_cb, data);
 
        /* Set critical errors to close application */
        //g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
@@ -201,10 +201,10 @@
 #endif
 
        /* Start */
-       g_idle_add (open_book, data);
+       g_idle_add ((GSourceFunc)open_book, data);
        if (argv[1] != NULL) {
                data->file = argv[1];
-               g_idle_add (contacts_import_from_param, data);
+               g_idle_add ((GSourceFunc)contacts_import_from_param, data);
        }
        
        widget = data->ui->main_window;




--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to