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. r1779 - in
      trunk/src/target/OM-2007/applications/openmoko-contacts: .        src
      ([EMAIL PROTECTED])
   2. r1780 - in trunk/oe/packages: . openmoko-apps vte
      ([EMAIL PROTECTED])
   3. r1781 - in trunk/src/target/OM-2007/openmoko-libs: .
      libmokoui ([EMAIL PROTECTED])
   4. r1782 -
      trunk/src/target/OM-2007/artwork/themes/openmoko-standard/gtk-2.0
      ([EMAIL PROTECTED])
   5. r1783 - in
      trunk/src/target/OM-2007/applications/openmoko-contacts: .        src
      ([EMAIL PROTECTED])
   6. r1784 - in trunk/src/target/OM-2007:
      applications/openmoko-rssreader/src openmoko-libs/libmokoui
      ([EMAIL PROTECTED])
   7. r1785 - trunk/src/target/OM-2007/openmoko-libs/libmokoui
      ([EMAIL PROTECTED])
--- Begin Message ---
Author: thomas
Date: 2007-04-16 14:23:49 +0200 (Mon, 16 Apr 2007)
New Revision: 1779

Modified:
   trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
   
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-groups-editor.c
   trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.c
Log:
* src/contacts-groups-editor.c:
(contacts_groups_pane_update_selection), (contacts_groups_new_cb):
* src/contacts-omoko.c: (add_menu_item),
(contacts_ui_update_groups_list):

Add a "No Groups" message to the details pane when there are no groups defined


Modified: trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog   
2007-04-15 22:02:23 UTC (rev 1778)
+++ trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog   
2007-04-16 12:23:49 UTC (rev 1779)
@@ -1,3 +1,12 @@
+2007-04-16  Thomas Wood  <[EMAIL PROTECTED]>
+
+       * src/contacts-groups-editor.c:
+       (contacts_groups_pane_update_selection), (contacts_groups_new_cb):
+       * src/contacts-omoko.c: (add_menu_item),
+       (contacts_ui_update_groups_list):
+
+       Add a "No Groups" message to the details pane when there are no groups 
defined
+
 2007-04-13  Thomas Wood  <[EMAIL PROTECTED]>
 
        * src/contacts-callbacks-ui.c: (contacts_selection_cb): Don't try to 
commit a

Modified: 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-groups-editor.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-groups-editor.c
        2007-04-15 22:02:23 UTC (rev 1778)
+++ 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-groups-editor.c
        2007-04-16 12:23:49 UTC (rev 1779)
@@ -85,6 +85,12 @@
 
 }
 
+static void
+container_remove (GtkWidget *child, GtkWidget *container)
+{
+       gtk_container_remove (GTK_CONTAINER (container), child);
+}
+
 void
 contacts_groups_new_cb (GtkWidget *button, ContactsData *data)
 {
@@ -116,6 +122,10 @@
        if (!text || !strcmp (text, ""))
                return;
 
+       /* if there were no previous groups, remove the "no groups" label */
+       if (g_list_length (data->contacts_groups) == 0)
+               gtk_container_foreach (GTK_CONTAINER (data->ui->groups_vbox), 
(GtkCallback) container_remove, data->ui->groups_vbox);
+
        /* add the group to the list of groups */
        if (!g_list_find_custom (data->contacts_groups, text, (GCompareFunc) 
strcmp))
                data->contacts_groups = g_list_append (data->contacts_groups, 
text);

Modified: 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.c    
    2007-04-15 22:02:23 UTC (rev 1778)
+++ 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.c    
    2007-04-16 12:23:49 UTC (rev 1779)
@@ -269,6 +269,12 @@
        gtk_menu_shell_append (GTK_MENU_SHELL (menu), 
gtk_menu_item_new_with_label (group));
 }
 
+static void
+container_remove (GtkWidget *child, GtkWidget *container)
+{
+       gtk_container_remove (GTK_CONTAINER (container), child);
+}
+
 void
 contacts_ui_update_groups_list (ContactsData *data)
 {
@@ -292,6 +298,14 @@
        /* add group editor checkboxes */
        GtkWidget *widget;
        GList *cur;
+
+       if (g_list_length (data->contacts_groups) == 0)
+               gtk_box_pack_start (GTK_BOX (data->ui->groups_vbox), 
gtk_label_new (_("No Groups")), TRUE, TRUE, 0);
+       else if (g_hash_table_size (data->groups_widgets_hash) == 0)
+               /* there are groups defined, but no checkboxes yet, so make 
sure the pane is
+                * empty */
+               gtk_container_foreach (GTK_CONTAINER (data->ui->groups_vbox), 
(GtkCallback) container_remove, data->ui->groups_vbox);
+
        for (cur = data->contacts_groups; cur; cur = g_list_next (cur))
        {
                if (g_hash_table_lookup (data->groups_widgets_hash, cur->data))




--- End Message ---
--- Begin Message ---
Author: mickey
Date: 2007-04-16 15:21:20 +0200 (Mon, 16 Apr 2007)
New Revision: 1780

Added:
   trunk/oe/packages/vte/
   trunk/oe/packages/vte/vte_0.11.15.bb
Modified:
   trunk/oe/packages/openmoko-apps/openmoko-simplemediaplayer_svn.bb
Log:
oe: add own version of vte, fixing #468


Modified: trunk/oe/packages/openmoko-apps/openmoko-simplemediaplayer_svn.bb
===================================================================
--- trunk/oe/packages/openmoko-apps/openmoko-simplemediaplayer_svn.bb   
2007-04-16 12:23:49 UTC (rev 1779)
+++ trunk/oe/packages/openmoko-apps/openmoko-simplemediaplayer_svn.bb   
2007-04-16 13:21:20 UTC (rev 1780)
@@ -2,12 +2,10 @@
 SECTION = "openmoko/applications"
 DEPENDS += "alsa-lib dbus-glib id3lib libvorbis"
 PV = "0.0.1+svn${SRCDATE}"
-PR = "r2"
+PR = "r3"
 
 inherit openmoko
 
 FILES_${PN} = "${bindir}/* \
-              ${libdir}/* \
-              ${datadir}/applications \
-              ${datadir}/images \
-             "
+               ${libdir}/* \
+               ${datadir}/*"

Added: trunk/oe/packages/vte/vte_0.11.15.bb
===================================================================
--- trunk/oe/packages/vte/vte_0.11.15.bb        2007-04-16 12:23:49 UTC (rev 
1779)
+++ trunk/oe/packages/vte/vte_0.11.15.bb        2007-04-16 13:21:20 UTC (rev 
1780)
@@ -0,0 +1,11 @@
+DESCRIPTION = "vte is a virtual terminal emulator"
+LICENSE = "LGPL"
+PR = "r1"
+
+inherit gnome
+
+EXTRA_OECONF = "--disable-gtk-doc"
+
+do_stage() {
+    autotools_stage_all
+}




--- End Message ---
--- Begin Message ---
Author: rob
Date: 2007-04-16 17:32:41 +0200 (Mon, 16 Apr 2007)
New Revision: 1781

Modified:
   trunk/src/target/OM-2007/openmoko-libs/ChangeLog
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-message-dialog.c
Log:
2007-04-16  Rob Bradford  <[EMAIL PROTECTED]>

        * libmokoui/moko-message-dialog.c: (moko_message_dialog_map),
        (moko_message_dialog_class_init), (moko_message_dialog_realize_cb),
        (moko_message_dialog_expose_event_cb), (moko_message_dialog_init):
        Add support for pseudo-transparent blending of the dialog box's
        background.



Modified: trunk/src/target/OM-2007/openmoko-libs/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/ChangeLog    2007-04-16 13:21:20 UTC 
(rev 1780)
+++ trunk/src/target/OM-2007/openmoko-libs/ChangeLog    2007-04-16 15:32:41 UTC 
(rev 1781)
@@ -1,3 +1,11 @@
+2007-04-16  Rob Bradford  <[EMAIL PROTECTED]>
+
+       * libmokoui/moko-message-dialog.c: (moko_message_dialog_map),
+       (moko_message_dialog_class_init), (moko_message_dialog_realize_cb),
+       (moko_message_dialog_expose_event_cb), (moko_message_dialog_init):
+       Add support for pseudo-transparent blending of the dialog box's
+       background.
+
 2007-04-13 Dodji Seketeli <[EMAIL PROTECTED]>
 
        * openmoko-libs/libmokojournal/src/moko-journal.c:

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-message-dialog.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-message-dialog.c      
2007-04-16 13:21:20 UTC (rev 1780)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-message-dialog.c      
2007-04-16 15:32:41 UTC (rev 1781)
@@ -1,4 +1,4 @@
-/*  moko-dialog.c
+/*  moko-message-dialog.c
  *
  *  Authored (in part) by Rob Bradford <[EMAIL PROTECTED]>
  *
@@ -61,6 +61,9 @@
   GtkWidget *image;
   GtkWidget *image_alignment;
   gboolean window_shaped;
+  GdkPixbuf *background_pixbuf;
+  GdkPixbuf *root_pixbuf;
+  GdkPixbuf *pixbuf;
 };
 
 static void
@@ -96,10 +99,46 @@
   G_OBJECT_CLASS (moko_message_dialog_parent_class)->finalize (object);
 }
 
+/* 
+ * We need to override the map event handling to grab the root window before
+ * our widget gets drawn onto it.
+ */
 static void
+moko_message_dialog_map (GObject *object)
+{
+  MokoMessageDialogPrivate *priv = MESSAGE_DIALOG_PRIVATE (object);
+  MokoMessageDialog *dialog = MOKO_MESSAGE_DIALOG (object);
+
+  gint w, h;
+  GdkWindow *root_window;
+  GdkPixbuf *root_pixbuf;
+
+  GdkPixbuf *old_pixbuf;
+
+  /* Grab the root window and its dimensions */
+  root_window = gtk_widget_get_root_window (GTK_WIDGET(dialog));
+  gdk_drawable_get_size (root_window, &w, &h);
+
+  /* Generate a pixbuf from this root window */
+  root_pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, w, h);
+  gdk_pixbuf_get_from_drawable (root_pixbuf, root_window, NULL, 0, 0, 0, 0, w, 
h);
+
+  old_pixbuf = priv->root_pixbuf;
+  priv->root_pixbuf = root_pixbuf;
+  g_object_unref (old_pixbuf);
+
+  g_object_unref (priv->pixbuf);
+  priv->pixbuf = NULL;
+
+  if (GTK_WIDGET_CLASS (moko_message_dialog_parent_class)->map)
+    GTK_WIDGET_CLASS (moko_message_dialog_parent_class)->map (object);
+}
+
+static void
 moko_message_dialog_class_init (MokoMessageDialogClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
+  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
 
   g_type_class_add_private (klass, sizeof (MokoMessageDialogPrivate));
 
@@ -107,8 +146,11 @@
   object_class->set_property = moko_message_dialog_set_property;
   object_class->dispose = moko_message_dialog_dispose;
   object_class->finalize = moko_message_dialog_finalize;
+
+  widget_class->map = moko_message_dialog_map;
 }
 
+/*
 static void
 moko_message_dialog_shape_window (GtkWidget *widget)
 {
@@ -141,17 +183,73 @@
 
   priv->window_shaped = TRUE;
 }
+*/
 
+/* 
+ * Need to grab the pixbuf for background in the realize callback since we
+ * need to have the style setup
+ */
 static void
 moko_message_dialog_realize_cb (GtkWidget *widget, gpointer user_data)
 {
   MokoMessageDialogPrivate* priv = MESSAGE_DIALOG_PRIVATE (widget);
 
-  if (!priv->window_shaped)
-    moko_message_dialog_shape_window (widget);
+  GtkRcStyle *rc_style;
+  GError *error = NULL;
 
+  if (!priv->background_pixbuf)
+  {
+    rc_style = widget->style->rc_style;
+
+    priv->background_pixbuf = gdk_pixbuf_new_from_file 
(rc_style->bg_pixmap_name[GTK_STATE_NORMAL], &error);
+
+    if (priv->background_pixbuf == NULL)
+    {
+      g_warning ("Error loading background pixbuf: %s", error->message);
+      g_clear_error (&error);
+      return;
+    }
+  }
 }
 
+static gboolean
+moko_message_dialog_expose_event_cb (GtkWidget *widget, GdkEventExpose *event, 
gpointer user_data)
+{
+  MokoMessageDialogPrivate *priv = MESSAGE_DIALOG_PRIVATE (widget);
+  int x, y, w, h;
+  
+  gdk_drawable_get_size (widget->window, &w, &h);
+
+  if (!priv->pixbuf)
+  {
+    gdk_window_get_origin (widget->window, &x, &y);
+
+    /* 
+     * Extract a sub pixbuf for the area of the root window which the window
+     * now covers
+     */
+    priv->pixbuf = gdk_pixbuf_new_subpixbuf (priv->root_pixbuf, x, y, w, h);
+
+    /* Composite the background pixbuf over said subpixbuf */
+    gdk_pixbuf_composite (priv->background_pixbuf, priv->pixbuf, 
+        0, 0, 
+        w, h, 
+        0, 0, 
+        1, 1, 
+        GDK_INTERP_BILINEAR, 
+        255);  
+  }
+
+  /* Draw our pixbuf onto the window */
+  gdk_draw_pixbuf (widget->window, NULL, priv->pixbuf, 
+      0, 0, 
+      0, 0, 
+      w, h, 
+      GDK_RGB_DITHER_NONE, 0, 0);
+
+  return FALSE;
+}
+
 static void
 moko_message_dialog_init (MokoMessageDialog *self)
 {
@@ -190,14 +288,23 @@
 
   gtk_dialog_set_has_separator (GTK_DIALOG (self), FALSE);
 
-  gtk_widget_set_size_request (GTK_WIDGET (self), 320, 480);
+  gtk_widget_set_size_request (GTK_WIDGET (self), 480, 560);
   gtk_window_set_decorated (GTK_WINDOW (self), FALSE);
   gtk_window_set_resizable (GTK_WINDOW (self), FALSE);
 
+
+  /* Indicate that we want to paint this ourselves */
+  gtk_widget_set_app_paintable (self, TRUE);
+
   g_signal_connect (self, "realize", G_CALLBACK 
(moko_message_dialog_realize_cb), NULL);
+  g_signal_connect (self, "expose-event", G_CALLBACK 
(moko_message_dialog_expose_event_cb), NULL);
 
   priv->image_alignment = image_alignment;
   priv->label = label;
+
+  priv->root_pixbuf = NULL;
+  priv->background_pixbuf = NULL;
+  priv->pixbuf = NULL;
 }
 
 void




--- End Message ---
--- Begin Message ---
Author: rob
Date: 2007-04-16 17:33:59 +0200 (Mon, 16 Apr 2007)
New Revision: 1782

Modified:
   
trunk/src/target/OM-2007/artwork/themes/openmoko-standard/gtk-2.0/openmoko-message-dialog-background.png
Log:
Add new background artwork for MokoMessageDialog


Modified: 
trunk/src/target/OM-2007/artwork/themes/openmoko-standard/gtk-2.0/openmoko-message-dialog-background.png
===================================================================
(Binary files differ)




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-04-16 18:45:18 +0200 (Mon, 16 Apr 2007)
New Revision: 1783

Modified:
   trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
   trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.c
Log:
* src/contacts-omoko.c: (create_contacts_list),
(create_main_window): Don't use MokoNavigationView. Fixes bug 472.


Modified: trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog   
2007-04-16 15:33:59 UTC (rev 1782)
+++ trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog   
2007-04-16 16:45:18 UTC (rev 1783)
@@ -1,5 +1,10 @@
 2007-04-16  Thomas Wood  <[EMAIL PROTECTED]>
 
+       * src/contacts-omoko.c: (create_contacts_list),
+       (create_main_window): Don't use MokoNavigationView. Fixes bug 472.
+
+2007-04-16  Thomas Wood  <[EMAIL PROTECTED]>
+
        * src/contacts-groups-editor.c:
        (contacts_groups_pane_update_selection), (contacts_groups_new_cb):
        * src/contacts-omoko.c: (add_menu_item),

Modified: 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.c    
    2007-04-16 15:33:59 UTC (rev 1782)
+++ 
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.c    
    2007-04-16 16:45:18 UTC (rev 1783)
@@ -37,8 +37,7 @@
 GtkWidget *
 create_contacts_list (ContactsData *data)
 {
-       MokoNavigationList *moko_navigation_list = moko_navigation_list_new ();
-       GtkWidget *treeview = GTK_WIDGET (moko_navigation_list_get_tree_view 
(moko_navigation_list));
+       GtkWidget *treeview = moko_tree_view_new ();
 
        gtk_tree_view_set_model (GTK_TREE_VIEW (treeview),
                                 GTK_TREE_MODEL (data->contacts_filter));
@@ -53,16 +52,16 @@
        column = gtk_tree_view_column_new_with_attributes (_("Name"), renderer,
                                                        "text", 
CONTACT_NAME_COL, NULL);
        gtk_tree_view_column_set_sort_column_id (column, CONTACT_NAME_COL);
-       moko_navigation_list_append_column (moko_navigation_list, column);
+       moko_tree_view_append_column (MOKO_TREE_VIEW (treeview), column);
 
        /* mobile column */
        renderer = gtk_cell_renderer_text_new ();
        column = gtk_tree_view_column_new_with_attributes (_("Cell Phone"), 
renderer,
                                                        "text", 
CONTACT_CELLPHONE_COL, NULL);
        gtk_tree_view_column_set_sort_column_id (column, CONTACT_CELLPHONE_COL);
-       moko_navigation_list_append_column (moko_navigation_list, column);
+       moko_tree_view_append_column (MOKO_TREE_VIEW (treeview), column);
 
-       return GTK_WIDGET (moko_navigation_list);
+       return treeview;
 }
 
 void
@@ -139,12 +138,14 @@
 
        /*** contacts list ***/
 
-       GtkWidget *moko_navigation_list = create_contacts_list (contacts_data);
+       widget = create_contacts_list (contacts_data);
        g_object_unref (contacts_data->contacts_liststore);
 
-       moko_paned_window_set_upper_pane (MOKO_PANED_WINDOW (ui->main_window), 
GTK_WIDGET (moko_navigation_list));
-       ui->contacts_treeview = GTK_WIDGET (moko_navigation_list_get_tree_view 
(MOKO_NAVIGATION_LIST (moko_navigation_list)));
+       moko_paned_window_set_upper_pane (MOKO_PANED_WINDOW (ui->main_window),
+      moko_tree_view_put_into_scrolled_window (MOKO_TREE_VIEW (widget)));
 
+       ui->contacts_treeview = widget;
+
        /* Connect signal for selection changed event */
        GtkTreeSelection *selection;
        selection = gtk_tree_view_get_selection (GTK_TREE_VIEW 
(ui->contacts_treeview));




--- End Message ---
--- Begin Message ---
Author: mickey
Date: 2007-04-16 20:47:17 +0200 (Mon, 16 Apr 2007)
New Revision: 1784

Modified:
   trunk/src/target/OM-2007/applications/openmoko-rssreader/src/callbacks.c
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tool-box.c
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tool-box.h
Log:
openmoko-libs: rename moko_search_box_make_visible to 
moko_search_box_set_visible to be more in tune with the gtk naming scheme
openmoko-rssreader: catch up with above change


Modified: 
trunk/src/target/OM-2007/applications/openmoko-rssreader/src/callbacks.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-rssreader/src/callbacks.c    
2007-04-16 16:45:18 UTC (rev 1783)
+++ trunk/src/target/OM-2007/applications/openmoko-rssreader/src/callbacks.c    
2007-04-16 18:47:17 UTC (rev 1784)
@@ -256,7 +256,7 @@
  * route this to the search box
  */
 gboolean cb_treeview_keypress_event( GtkWidget *tree_view, GdkEventKey *key, 
struct RSSReaderData *data ) {
-    moko_tool_box_make_search_visible (data->box, TRUE);
+    moko_tool_box_set_search_visible (data->box, TRUE);
     gtk_entry_set_text (GTK_ENTRY(moko_tool_box_get_entry(data->box)), "");
 
     /*

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tool-box.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tool-box.c    
2007-04-16 16:45:18 UTC (rev 1783)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tool-box.c    
2007-04-16 18:47:17 UTC (rev 1784)
@@ -57,7 +57,7 @@
 static void _button_release(GtkWidget* w, MokoToolBox* self)
 {
     MokoToolBoxPriv *priv = MOKO_TOOL_BOX_GET_PRIVATE(self);
-    moko_tool_box_make_search_visible (self, !GTK_WIDGET_DRAWABLE(priv->entry) 
);
+    moko_tool_box_set_search_visible (self, !GTK_WIDGET_DRAWABLE(priv->entry) 
);
 }
 
 static gboolean _entry_focus_in(GtkWidget *widget, GdkEventFocus *event, 
MokoToolBox* self)
@@ -172,7 +172,7 @@
 }
 
 /* add new methods here */
-void moko_tool_box_make_search_visible(MokoToolBox *self, gboolean visible)
+void moko_tool_box_set_search_visible(MokoToolBox *self, gboolean visible)
 {
     MokoToolBoxPriv *priv = MOKO_TOOL_BOX_GET_PRIVATE(self);
     g_return_if_fail (priv->entry != NULL);

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tool-box.h
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tool-box.h    
2007-04-16 16:45:18 UTC (rev 1783)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tool-box.h    
2007-04-16 18:47:17 UTC (rev 1784)
@@ -57,7 +57,7 @@
 GtkWidget*     moko_tool_box_new_with_search();
 void           moko_tool_box_clear(MokoToolBox* self);
 
-void moko_tool_box_make_search_visible(MokoToolBox *self, gboolean visible);
+void moko_tool_box_set_search_visible(MokoToolBox *self, gboolean visible);
 
 GtkWidget* moko_tool_box_get_button_box(MokoToolBox* self );
 GtkWidget* moko_tool_box_get_entry(MokoToolBox* self);




--- End Message ---
--- Begin Message ---
Author: mickey
Date: 2007-04-16 21:06:08 +0200 (Mon, 16 Apr 2007)
New Revision: 1785

Modified:
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-pixmap-button.c
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tree-view.c
Log:
libmokoui: remove some warnings


Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-pixmap-button.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-pixmap-button.c       
2007-04-16 18:47:17 UTC (rev 1784)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-pixmap-button.c       
2007-04-16 19:06:08 UTC (rev 1785)
@@ -65,12 +65,12 @@
 moko_pixmap_button_class_init (MokoPixmapButtonClass *klass)
 {
     GObjectClass *object_class = G_OBJECT_CLASS (klass);
-    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
 
     /* register private data */
     g_type_class_add_private (klass, sizeof (MokoPixmapButtonPrivate));
 
     /* hook virtual methods */
+    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
     widget_class->size_request = moko_pixmap_button_size_request;
 
     /* install properties */
@@ -123,14 +123,14 @@
 moko_pixmap_button_init (MokoPixmapButton *self)
 {
     MokoPixmapButtonPrivate* priv = MOKO_PIXMAP_BUTTON_GET_PRIVATE (self);
-    
+
     moko_debug( "moko_pixmap_button_init" );
     gtk_button_set_focus_on_click( GTK_BUTTON(self), FALSE ); //FIXME probably 
don't need this when focus is invisible
     GTK_WIDGET_UNSET_FLAGS( GTK_WIDGET(self), GTK_CAN_FOCUS); // The default 
value of can-focus is TRUE, So it is necessory
 
     priv->buttonvbox = gtk_vbox_new (FALSE, 0);
     gtk_container_add (GTK_CONTAINER (self), priv->buttonvbox);
-    
+
     g_signal_connect( G_OBJECT(self), "clicked", 
G_CALLBACK(cb_button_clicked), NULL );
 }
 
@@ -150,7 +150,7 @@
                           "focus-padding", &focus_pad,
                           "size-request", &size_request, // modified
                           NULL);
-    
+
     if ( size_request && size_request->left + size_request->right + 
size_request->top + size_request->bottom ) // new fixed thing
     {
         moko_debug( "moko_pixmap_button_size_request: style requested size = 
'%d x %d'", size_request->right, size_request->bottom );
@@ -162,7 +162,7 @@
             GtkRequisition child_requisition;
             gtk_widget_size_request (GTK_BIN (button)->child, 
&child_requisition);
         }
-        
+
     }
     else // old dynamic routine
     {
@@ -213,18 +213,18 @@
 moko_pixmap_button_set_action_btn_upper_stock (MokoPixmapButton* self, const 
gchar *stock_name)
 {
     MokoPixmapButtonPrivate* priv = MOKO_PIXMAP_BUTTON_GET_PRIVATE (self);
-         
+
     if ( priv->actionbtnstockimage )
         return;
-         
+
     GtkWidget *upperalignment = gtk_alignment_new (0.5, 0.5, 1, 1);
     gtk_box_pack_start (GTK_BOX (priv->buttonvbox), upperalignment, TRUE, 
TRUE, 0);
-    
+
     priv->actionbtnstockimage = gtk_image_new_from_stock (stock_name, 
GTK_ICON_SIZE_BUTTON);
     gtk_container_add (GTK_CONTAINER (upperalignment), 
priv->actionbtnstockimage);
-         
+
     gtk_misc_set_alignment (GTK_MISC (priv->actionbtnstockimage), 0.5, 0.0);
-    
+
     gtk_widget_show_all (GTK_WIDGET (priv->buttonvbox));
 }
 
@@ -235,26 +235,26 @@
 
     if ( priv->actionbtnlowerlabel )
         return;
-    
+
     GtkWidget *loweralignment = gtk_alignment_new (0.5, 0.5, 1, 1);
     gtk_box_pack_start (GTK_BOX (priv->buttonvbox), loweralignment, TRUE, 
TRUE, 0);
-    
+
     priv->actionbtnlowerlabel = gtk_label_new (label);
-    
+
     gtk_container_add (GTK_CONTAINER (loweralignment), 
priv->actionbtnlowerlabel);
-    
+
     gtk_widget_set_size_request (priv->actionbtnlowerlabel, 38, 23);  //FIXME 
get size from style
     gtk_misc_set_alignment (GTK_MISC (priv->actionbtnlowerlabel), 0.5, 0.0);
-    
+
     gtk_widget_show_all (GTK_WIDGET (priv->buttonvbox));
-    
+
 }
 
 void
 moko_pixmap_button_set_center_stock (MokoPixmapButton* self, const gchar 
*stock_name)
 {
     MokoPixmapButtonPrivate* priv = MOKO_PIXMAP_BUTTON_GET_PRIVATE (self);
-         
+
     if ( priv->centerimage )
         return;
 
@@ -263,7 +263,7 @@
 
     priv->centerimage = gtk_image_new_from_stock (stock_name, 
GTK_ICON_SIZE_DND);
     gtk_container_add (GTK_CONTAINER (loweralignment), priv->centerimage);
-         
+
     gtk_widget_show_all (GTK_WIDGET (priv->buttonvbox));
 }
 
@@ -272,7 +272,7 @@
 moko_pixmap_button_set_center_image (MokoPixmapButton* self, GtkWidget* image)
 {
     MokoPixmapButtonPrivate* priv = MOKO_PIXMAP_BUTTON_GET_PRIVATE (self);
-         
+
     if ( priv->centerimage )
         return;
 
@@ -281,7 +281,7 @@
 
     priv->centerimage = image;
     gtk_container_add (GTK_CONTAINER (loweralignment), priv->centerimage);
-         
+
     gtk_widget_show_all (GTK_WIDGET (priv->buttonvbox));
 }
 
@@ -300,22 +300,22 @@
 moko_pixmap_button_set_finger_toolbox_btn_center_image_pixbuf 
(MokoPixmapButton* self, GdkPixbuf* pixbuf)
 {
     MokoPixmapButtonPrivate* priv = MOKO_PIXMAP_BUTTON_GET_PRIVATE (self);
-         
+
     GdkPixbuf *dest_pixbuf = gdk_pixbuf_scale_simple (pixbuf, 35, 35, 
GDK_INTERP_NEAREST);
 
     if ( priv->fingertoolboxbtnimage == NULL )
     {
         priv->fingertoolboxbtnloweralignment = gtk_alignment_new (0.45, 0.28, 
0, 0);
         gtk_box_pack_start (GTK_BOX (priv->buttonvbox), 
priv->fingertoolboxbtnloweralignment, TRUE, TRUE, 0);
-    
+
     }
     else
     {
         gtk_container_remove (GTK_CONTAINER 
(priv->fingertoolboxbtnloweralignment), priv->fingertoolboxbtnimage);
     }
-         
+
     priv->fingertoolboxbtnimage = gtk_image_new_from_pixbuf (dest_pixbuf);
     gtk_container_add (GTK_CONTAINER (priv->fingertoolboxbtnloweralignment), 
priv->fingertoolboxbtnimage);
-    
+
     gtk_widget_show_all (GTK_WIDGET (priv->buttonvbox));
 }

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-04-16 18:47:17 UTC (rev 1784)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tree-view.c   
2007-04-16 19:06:08 UTC (rev 1785)
@@ -18,16 +18,27 @@
 
 #include "moko-tree-view.h"
 
-G_DEFINE_TYPE (MokoTreeView, moko_tree_view, GTK_TYPE_TREE_VIEW);
+#undef DEBUG_THIS_FILE
+#ifdef DEBUG_THIS_FILE
+#define moko_debug(fmt,...) g_debug(fmt,##__VA_ARGS__)
+#define moko_debug_minder(predicate) moko_debug( __FUNCTION__ ); 
g_return_if_fail(predicate)
+#else
+#define moko_debug(fmt,...)
+#endif
 
+G_DEFINE_TYPE (MokoTreeView, moko_tree_view, GTK_TYPE_TREE_VIEW)
+
 #define TREE_VIEW_PRIVATE(o)     (G_TYPE_INSTANCE_GET_PRIVATE ((o), 
MOKO_TYPE_TREE_VIEW, MokoTreeViewPrivate))
 
 typedef struct _MokoTreeViewPrivate
 {
 } MokoTreeViewPrivate;
 
+/* parent class pointer */
+GObjectClass* parent_class = NULL;
+
 /* forward declarations */
-/* ... */
+void moko_tree_view_size_request(GtkWidget* widget, GtkRequisition* 
requisition);
 
 static void
 moko_tree_view_dispose (GObject *object)
@@ -45,13 +56,16 @@
 static void
 moko_tree_view_class_init (MokoTreeViewClass *klass)
 {
-    GObjectClass *object_class = G_OBJECT_CLASS (klass);
+    /* hook parent */
+    GObjectClass *object_class = G_OBJECT_CLASS(klass);
+    parent_class = g_type_class_peek_parent( klass );
 
     /* register private data */
-    g_type_class_add_private (klass, sizeof (MokoTreeViewPrivate));
+    g_type_class_add_private( klass, sizeof (MokoTreeViewPrivate) );
 
     /* hook virtual methods */
-    /* ... */
+    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
+    widget_class->size_request = moko_tree_view_size_request;
 
     /* install properties */
     /* ... */
@@ -79,6 +93,30 @@
     return GTK_WIDGET(g_object_new(moko_tree_view_get_type(), "model", model, 
NULL));
 }
 
+/* reimplemented to enforce entry-height granularity */
+void moko_tree_view_size_request(GtkWidget* widget, GtkRequisition* 
requisition)
+{
+    moko_debug( "moko_tree_view_size_request" );
+    MokoTreeView* self = MOKO_TREE_VIEW(widget);
+    GTK_WIDGET_CLASS(parent_class)->size_request( widget, requisition );
+#if 0 /* it doesn't work with size_request... should we try overwriting 
size_alloc? */
+    moko_debug( "-- [old] requesting %d, %d", requisition->width, 
requisition->height );
+
+    // compute height as a whole-number factor of the cell height
+    GtkTreeViewColumn* first_column = gtk_tree_view_get_column( 
GTK_TREE_VIEW(self), 0 );
+    g_assert( first_column ); // fail here if no columns added yet
+    gint cr_x_offset;
+    gint cr_y_offset;
+    gint cr_width;
+    gint cr_height;
+    gtk_tree_view_column_cell_get_size( first_column, NULL, &cr_x_offset, 
&cr_y_offset, &cr_width, &cr_height );
+
+    // prevent half cells to be visible
+    requisition->height -= requisition->height % (cr_height+2);
+    moko_debug( "-- [old] requesting %d, %d", requisition->width, 
requisition->height );
+#endif
+}
+
 void moko_tree_view_append_column(MokoTreeView* self, GtkTreeViewColumn* 
column)
 {
     gtk_tree_view_column_set_alignment( column, 0.5 );
@@ -90,13 +128,13 @@
 
     g_object_set( G_OBJECT(column),
                   "resizable", TRUE,
-                  "reorderable", TRUE,
+                  "reorderable", FALSE,
                   "sort-indicator", TRUE,
                   NULL );
 
 }
 
-_moko_tree_view_adjustment_changed(GtkAdjustment* adj, MokoTreeView* self)
+void _moko_tree_view_adjustment_changed(GtkAdjustment* adj, MokoTreeView* self)
 {
     // compute value for vadjustment
     gtk_tree_view_set_fixed_height_mode( GTK_TREE_VIEW(self), TRUE );




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

Reply via email to