r198 - in trunk/src/target/OM-2007/libraries: . libmokoui
mickey at gta01.hmw-consulting.de
mickey at gta01.hmw-consulting.de
Sun Nov 12 12:59:50 CET 2006
Author: mickey
Date: 2006-11-12 11:59:48 +0000 (Sun, 12 Nov 2006)
New Revision: 198
Added:
trunk/src/target/OM-2007/libraries/libmokocore/
trunk/src/target/OM-2007/libraries/libmokonet/
trunk/src/target/OM-2007/libraries/libmokopim/
trunk/src/target/OM-2007/libraries/libmokoui/
trunk/src/target/OM-2007/libraries/libmokoui/moko-menu-box.c
trunk/src/target/OM-2007/libraries/libmokoui/moko-menu-box.h
trunk/src/target/OM-2007/libraries/libmokoui/moko-paned-window.c
trunk/src/target/OM-2007/libraries/libmokoui/moko-paned-window.h
trunk/src/target/OM-2007/libraries/libmokoui/moko-tool-box.c
trunk/src/target/OM-2007/libraries/libmokoui/moko-tool-box.h
trunk/src/target/OM-2007/libraries/libmokoui/moko-tree-view.c
trunk/src/target/OM-2007/libraries/libmokoui/moko-tree-view.h
trunk/src/target/OM-2007/libraries/libmokoui/mokoui.pro
Removed:
trunk/src/target/OM-2007/libraries/libmokoui/moko-menubox.c
trunk/src/target/OM-2007/libraries/libmokoui/moko-menubox.h
trunk/src/target/OM-2007/libraries/libmokoui/moko-paned-window.c
trunk/src/target/OM-2007/libraries/libmokoui/moko-paned-window.h
trunk/src/target/OM-2007/libraries/libmokoui/moko-toolbox.c
trunk/src/target/OM-2007/libraries/libmokoui/moko-toolbox.h
trunk/src/target/OM-2007/libraries/libmokoui/mokoui.pro
trunk/src/target/OM-2007/libraries/mokocore/
trunk/src/target/OM-2007/libraries/mokonet/
trunk/src/target/OM-2007/libraries/mokopim/
trunk/src/target/OM-2007/libraries/mokoui/
Modified:
trunk/src/target/OM-2007/libraries/libraries.pro
Log:
foo
Copied: trunk/src/target/OM-2007/libraries/libmokocore (from rev 194, trunk/src/target/OM-2007/libraries/mokocore)
Copied: trunk/src/target/OM-2007/libraries/libmokonet (from rev 194, trunk/src/target/OM-2007/libraries/mokonet)
Copied: trunk/src/target/OM-2007/libraries/libmokopim (from rev 194, trunk/src/target/OM-2007/libraries/mokopim)
Copied: trunk/src/target/OM-2007/libraries/libmokoui (from rev 194, trunk/src/target/OM-2007/libraries/mokoui)
Copied: trunk/src/target/OM-2007/libraries/libmokoui/moko-menu-box.c (from rev 195, trunk/src/target/OM-2007/libraries/mokoui/moko-menu-box.c)
Copied: trunk/src/target/OM-2007/libraries/libmokoui/moko-menu-box.h (from rev 195, trunk/src/target/OM-2007/libraries/mokoui/moko-menu-box.h)
Deleted: trunk/src/target/OM-2007/libraries/libmokoui/moko-menubox.c
===================================================================
--- trunk/src/target/OM-2007/libraries/mokoui/moko-menubox.c 2006-11-11 13:37:31 UTC (rev 194)
+++ trunk/src/target/OM-2007/libraries/libmokoui/moko-menubox.c 2006-11-12 11:59:48 UTC (rev 198)
@@ -1,248 +0,0 @@
-/*
- * libmokoui -- OpenMoko Application Framework UI Library
- *
- * Authored By Michael 'Mickey' Lauer <mlauer at vanille-media.de>
- *
- * Copyright (C) 2006 First International Computer Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser Public License as published by
- * the Free Software Foundation; version 2.1 of the license.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser Public License for more details.
- *
- * Current Version: $Rev$ ($Date$) [$Author$]
- */
-#include "moko-menubox.h"
-
-#include <gtk/gtklabel.h>
-#include <gtk/gtkmenubar.h>
-#include <gtk/gtkmenuitem.h>
-
-#include <string.h>
-
-#define MOKO_MENU_BOX_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), MOKO_TYPE_MENU_BOX, MokoMenuBoxPriv));
-
-typedef struct _MokoMenuBoxPriv
-{
- GtkMenuBar* menubar_l;
- GtkMenuItem* appitem;
- GtkMenu* appmenu;
- GtkMenuBar* menubar_r;
- GtkMenuItem* filteritem;
- GtkMenu* filtermenu;
-} MokoMenuBoxPriv;
-
-/* add your signals here */
-enum {
- FILTER_CHANGED,
- LAST_SIGNAL
-};
-
-static void moko_menu_box_class_init (MokoMenuBoxClass *klass);
-static void moko_menu_box_init (MokoMenuBox *f);
-
-static guint moko_menu_box_signals[LAST_SIGNAL] = { 0, };
-
-GType moko_menu_box_get_type (void) /* Typechecking */
-{
- static GType self_type = 0;
-
- if (!self_type)
- {
- static const GTypeInfo f_info =
- {
- sizeof (MokoMenuBoxClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) moko_menu_box_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (MokoMenuBox),
- 0,
- (GInstanceInitFunc) moko_menu_box_init,
- };
-
- /* add the type of your parent class here */
- self_type = g_type_register_static(GTK_TYPE_HBOX, "MokoMenuBox", &f_info, 0);
- }
-
- return self_type;
-}
-
-static void moko_menu_box_class_init (MokoMenuBoxClass *klass) /* Class Initialization */
-{
- g_type_class_add_private(klass, sizeof(MokoMenuBoxPriv));
-
- moko_menu_box_signals[FILTER_CHANGED] =
- g_signal_new ("filter-changed",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET(MokoMenuBoxClass, filter_changed),
- NULL,
- NULL,
- g_cclosure_marshal_VOID__STRING,
- G_TYPE_NONE, 1, G_TYPE_STRING );
-}
-
-static void moko_menu_box_init (MokoMenuBox *self) /* Instance Construction */
-{
- g_debug( "moko_menu_box_init" );
- MokoMenuBoxPriv* priv = MOKO_MENU_BOX_GET_PRIVATE(self);
-
- priv->menubar_l = NULL;
- priv->menubar_r = NULL;
-
-}
-
-GtkWidget* moko_menu_box_new() /* Construction */
-{
- return GTK_WIDGET(g_object_new(moko_menu_box_get_type(), NULL));
-}
-
-void moko_menu_box_clear(MokoMenuBox *f) /* Destruction */
-{
- /* destruct your widgets here */
-}
-
-static gboolean cb_button_release(GtkWidget *widget, GdkEventButton *event, GtkMenu* menu)
-{
- MokoMenuBoxPriv* priv = MOKO_MENU_BOX_GET_PRIVATE( MOKO_MENU_BOX(widget->parent) );
-
- g_debug( "menu open forwarder: clicked on %f, %f", event->x, event->y );
- g_debug( "menu open forwarder: clicked on window %p, whereas our window is %p", event->window, widget->window );
-
- if ( event->window != widget->window ) return FALSE;
-
- if ( !GTK_WIDGET_VISIBLE(menu) )
- {
- g_debug( "menu open forwarder: not yet open -- popping up" );
- /* this is kind of funny, if you don't add the grab manually,
- then Gtk+ won't recognize the next click (selection) */
- gtk_grab_add(GTK_WIDGET(widget) );
- gtk_menu_shell_select_first( GTK_MENU_SHELL(widget), TRUE );
- return TRUE;
- }
- else
- {
- g_debug( "menu open forwarder: already open -- ignoring" );
- gtk_menu_popdown( menu );
- return FALSE;
- }
- g_debug( "menu open forwarder: out of bounds" );
- return FALSE;
-}
-
-static void cb_filter_menu_update( GtkMenu* menu, MokoMenuBox* self )
-{
- MokoMenuBoxPriv* priv = MOKO_MENU_BOX_GET_PRIVATE(self);
-
- gchar* text;
- GtkMenuItem* item = gtk_menu_get_active( menu );
- if (GTK_BIN(item)->child)
- {
- GtkWidget *child = GTK_BIN(item)->child;
- g_assert( GTK_IS_LABEL(child) );
- gtk_label_get(GTK_LABEL (child), &text);
- g_debug(" selection done. menu item text: %s", text );
- }
- if (GTK_BIN(priv->filteritem)->child)
- {
- GtkWidget *child = GTK_BIN(priv->filteritem)->child;
- g_assert( GTK_IS_LABEL(child) );
- gtk_label_set(GTK_LABEL (child), text);
- g_debug(" selection done. menu label updated." );
- }
-
- g_signal_emit( G_OBJECT(self), moko_menu_box_signals[FILTER_CHANGED], 0, text );
-}
-
-void moko_menu_box_set_application_menu(MokoMenuBox* self, GtkMenu* menu)
-{
- g_debug( "moko_menu_box_set_application_menu" );
-
- MokoMenuBoxPriv* priv = MOKO_MENU_BOX_GET_PRIVATE(self);
- if (!priv->menubar_l )
- {
- priv->menubar_l = gtk_menu_bar_new();
- gtk_widget_set_name( GTK_WIDGET(priv->menubar_l), "mokomenubox-application-menubar" );
- gtk_box_pack_start( GTK_BOX(self), GTK_WIDGET(priv->menubar_l), TRUE, TRUE, 0 );
-
- }
- GtkMenuItem* appitem = gtk_menu_item_new_with_label( g_get_application_name() );
- gtk_widget_set_name( GTK_WIDGET(appitem), "transparent" );
- priv->appitem = appitem;
- priv->appmenu = menu;
- gtk_menu_item_set_submenu( appitem, menu );
- gtk_menu_shell_append( GTK_MENU_BAR(priv->menubar_l), appitem );
-
- //FIXME hack to popup the first menu if user clicks on menubar
- g_signal_connect( GTK_WIDGET(priv->menubar_l), "button-press-event", G_CALLBACK(cb_button_release), menu );
-}
-
-void moko_menu_box_set_filter_menu(MokoMenuBox* self, GtkMenu* menu)
-{
- g_debug( "moko_menu_box_set_filter_menu" );
-
- MokoMenuBoxPriv* priv = MOKO_MENU_BOX_GET_PRIVATE(self);
- if (!priv->menubar_r )
- {
- priv->menubar_r = gtk_menu_bar_new();
- gtk_widget_set_name( GTK_WIDGET(priv->menubar_r), "mokomenubox-filter-menubar" );
- gtk_box_pack_end( GTK_BOX(self), GTK_WIDGET(priv->menubar_r), TRUE, TRUE, 0 );
- }
- GtkMenuItem* filtitem = gtk_menu_item_new_with_label( "Filter Menu" );
- gtk_widget_set_name( GTK_WIDGET(filtitem), "transparent" );
- priv->filteritem = filtitem;
- priv->filtermenu = menu;
- g_signal_connect (G_OBJECT(menu), "selection_done", G_CALLBACK(cb_filter_menu_update), self );
- gtk_menu_item_set_submenu( filtitem, menu );
- gtk_menu_shell_append( GTK_MENU_BAR(priv->menubar_r), filtitem );
-
- //FIXME hack to popup the first menu if user clicks on menubar
- g_signal_connect( GTK_WIDGET(priv->menubar_r), "button-press-event", G_CALLBACK(cb_button_release), menu );
-}
-
-void
-moko_menu_box_set_active_filter(MokoMenuBox* self, gchar* text)
-{
- //FIXME this only works with text labels
- g_debug( "moko_menu_box_set_active_filter" );
-
- // wander through all filter menu items, check their labels
- // if one is matching, then select it
-
- MokoMenuBoxPriv* priv = MOKO_MENU_BOX_GET_PRIVATE(self);
-
- guint index = 0;
- GList* child = gtk_container_get_children( GTK_CONTAINER(priv->filtermenu) );
- while (child && GTK_IS_MENU_ITEM(child->data) )
- {
- GtkWidget *label = GTK_BIN(child->data)->child;
- if ( !label )
- {
- ++index;
- child = g_list_next(child);
- continue;
- }
- g_assert( GTK_IS_LABEL(label) );
- gchar* ltext;
- gtk_label_get( GTK_LABEL(label), <ext );
- g_debug( "moko_menu_box_set_active_filter: comparing '%s' with '%s'", ltext, text );
- if ( strcmp( ltext, text ) == 0 )
- {
- g_debug( "moko_menu_box_set_active_filter: match found" );
- //FIXME this is a bit hackish or is it?
- gtk_menu_set_active( GTK_MENU(priv->filtermenu), index );
- cb_filter_menu_update( priv->filtermenu, self ); //need to sync. manually, since we it didn't go through popupmenu
- break;
- }
- ++index;
- child = g_list_next(child);
- }
- if (!child)
- g_warning( "moko_menu_box_set_active_filter: filter menu entry '%s' not found", text );
-}
Deleted: trunk/src/target/OM-2007/libraries/libmokoui/moko-menubox.h
===================================================================
--- trunk/src/target/OM-2007/libraries/mokoui/moko-menubox.h 2006-11-11 13:37:31 UTC (rev 194)
+++ trunk/src/target/OM-2007/libraries/libmokoui/moko-menubox.h 2006-11-12 11:59:48 UTC (rev 198)
@@ -1,74 +0,0 @@
-/*
- * libmokoui -- OpenMoko Application Framework UI Library
- *
- * Authored By Michael 'Mickey' Lauer <mlauer at vanille-media.de>
- *
- * Copyright (C) 2006 First International Computer Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser Public License as published by
- * the Free Software Foundation; version 2.1 of the license.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser Public License for more details.
- *
- * Current Version: $Rev$ ($Date$) [$Author$]
- */
-#ifndef _MOKO_MENU_BOX_H_
-#define _MOKO_MENU_BOX_H_
-
-#include <glib.h>
-#include <glib-object.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtkmenu.h>
-
-G_BEGIN_DECLS
-
-#define MOKO_TYPE_MENU_BOX (moko_menu_box_get_type())
-#define MOKO_MENU_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MOKO_TYPE_MENU_BOX, MokoMenuBox))
-#define MOKO_MENU_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MOKO_TYPE_MENU_BOX, MokoMenuBoxClass))
-#define IS_MOKO_MENU_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MOKO_TYPE_MENU_BOX))
-#define IS_MOKO_MENU_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MOKO_TYPE_MENU_BOX))
-
-typedef struct _MokoMenuBox MokoMenuBox;
-typedef struct _MokoMenuBoxClass MokoMenuBoxClass;
-
-struct _MokoMenuBox
-{
- GtkHBox parent;
- /* add pointers to new members here */
-};
-
-struct _MokoMenuBoxClass
-{
- /* add your parent class here */
- GtkHBoxClass parent_class;
- /* signals */
-
- /**
- * MokoMenuBox::filter_changed:
- * @widget: the object which received the signal
- * @text: the new menu text
- *
- * The changed signal gets emitted when the active
- * filter menu item is changed. The can be due to
- * the user selecting a different item from the list,
- * or due to a call to moko_menubox_set_active_filter().
- */
- void (*filter_changed) (MokoMenuBox *widget, gchar* text);
-};
-
-GType moko_menu_box_get_type (void);
-GtkWidget* moko_menu_box_new (void);
-void moko_menu_box_clear (MokoMenuBox *self);
-
-void moko_menu_box_set_application_menu(MokoMenuBox* self, GtkMenu* menu);
-void moko_menu_box_set_filter_menu(MokoMenuBox* self, GtkMenu* menu);
-
-void moko_menu_box_set_active_filter(MokoMenuBox* self, gchar* text);
-
-G_END_DECLS
-
-#endif /* _MOKO_MENU_BOX_H_ */
Deleted: trunk/src/target/OM-2007/libraries/libmokoui/moko-paned-window.c
===================================================================
--- trunk/src/target/OM-2007/libraries/mokoui/moko-paned-window.c 2006-11-11 13:37:31 UTC (rev 194)
+++ trunk/src/target/OM-2007/libraries/libmokoui/moko-paned-window.c 2006-11-12 11:59:48 UTC (rev 198)
@@ -1,188 +0,0 @@
-/*
- * libmokoui -- OpenMoko Application Framework UI Library
- *
- * Authored By Michael 'Mickey' Lauer <mlauer at vanille-media.de>
- *
- * Copyright (C) 2006 First International Computer Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser Public License as published by
- * the Free Software Foundation; version 2.1 of the license.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser Public License for more details.
- *
- * Current Version: $Rev$ ($Date$) [$Author$]
- */
-#include "moko-paned-window.h"
-
-#include "moko-alignment.h"
-#include "moko-menubox.h"
-#include "moko-toolbox.h"
-
-#include <gtk/gtktoolbar.h>
-#include <gtk/gtkvbox.h>
-#include <gtk/gtkvpaned.h>
-
-#define MOKO_PANED_WINDOW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), MOKO_TYPE_PANED_WINDOW, MokoPanedWindowPriv));
-
-typedef struct _MokoPanedWindowPriv
-{
- GtkVPaned* outerframe;
- GtkVBox* upper;
- MokoAlignment* upperenclosing;
- MokoAlignment* lowerenclosing;
- GtkVBox* lower;
- MokoMenuBox* menubox;
- MokoToolBox* toolbox;
-
-} MokoPanedWindowPriv;
-
-/* add your signals here */
-enum {
- MOKO_PANED_WINDOW_SIGNAL,
- LAST_SIGNAL
-};
-
-static void moko_paned_window_class_init (MokoPanedWindowClass *klass);
-static void moko_paned_window_init (MokoPanedWindow *self);
-
-static guint moko_paned_window_signals[LAST_SIGNAL] = { 0 };
-
-GType moko_paned_window_get_type (void) /* Typechecking */
-{
- static GType self_type = 0;
-
- if (!self_type)
- {
- static const GTypeInfo f_info =
- {
- sizeof (MokoPanedWindowClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) moko_paned_window_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (MokoPanedWindow),
- 0,
- (GInstanceInitFunc) moko_paned_window_init,
- };
-
- /* add the type of your parent class here */
- self_type = g_type_register_static(MOKO_TYPE_WINDOW, "MokoPanedWindow", &f_info, 0);
- }
-
- return self_type;
-}
-
-static void moko_paned_window_class_init (MokoPanedWindowClass *klass) /* Class Initialization */
-{
- g_type_class_add_private(klass, sizeof(MokoPanedWindowPriv));
-
- moko_paned_window_signals[MOKO_PANED_WINDOW_SIGNAL] = g_signal_new ("moko_paned_window",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (MokoPanedWindowClass, moko_paned_window),
- NULL,
- NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-}
-
-static void moko_paned_window_init (MokoPanedWindow *self) /* Instance Construction */
-{
- g_debug( "moko_paned_window_init" );
- MokoPanedWindowPriv* priv = MOKO_PANED_WINDOW_GET_PRIVATE(self);
- priv->outerframe = gtk_vpaned_new();
- gtk_container_add( GTK_CONTAINER(self), GTK_WIDGET(priv->outerframe) );
- priv->upper = gtk_vbox_new( FALSE, 0 );
- gtk_paned_add1( GTK_PANED(priv->outerframe), GTK_WIDGET(priv->upper) );
- priv->lower = gtk_vbox_new( FALSE, 0 );
- gtk_paned_add2( GTK_PANED(priv->outerframe), GTK_WIDGET(priv->lower) );
- priv->menubox = NULL;
- priv->toolbox = NULL;
-}
-
-GtkWidget* moko_paned_window_new() /* Construction */
-{
- return GTK_WIDGET(g_object_new(moko_paned_window_get_type(), NULL));
-}
-
-void moko_paned_window_clear(MokoPanedWindow *self) /* Destruction */
-{
- g_debug( "moko_paned_window_clear" );
- /* destruct your widgets here */
-}
-
-/* PUBLIC API */
-
-MokoMenuBox* moko_paned_window_get_menubox(MokoPanedWindow* self)
-{
- MokoPanedWindowPriv* priv = MOKO_PANED_WINDOW_GET_PRIVATE(self);
- return priv->menubox;
-}
-
-void moko_paned_window_set_application_menu(MokoPanedWindow* self, GtkMenu* menu)
-{
- g_debug( "moko_paned_window_set_application_menu" );
-
- MokoPanedWindowPriv* priv = MOKO_PANED_WINDOW_GET_PRIVATE(self);
- if (!priv->menubox )
- {
- priv->menubox = moko_menu_box_new();
- gtk_box_pack_start( GTK_BOX(priv->upper), GTK_WIDGET(priv->menubox), FALSE, FALSE, 0 );
- }
- moko_menu_box_set_application_menu( priv->menubox, menu );
-}
-
-void moko_paned_window_set_filter_menu(MokoPanedWindow* self, GtkMenu* menu)
-{
- g_debug( "moko_paned_window_set_filter_menu" );
- MokoPanedWindowPriv* priv = MOKO_PANED_WINDOW_GET_PRIVATE(self);
- if (!priv->menubox )
- {
- priv->menubox = moko_menu_box_new();
- gtk_box_pack_start( GTK_BOX(priv->upper), GTK_WIDGET(priv->menubox), FALSE, FALSE, 0 );
- }
- moko_menu_box_set_filter_menu( priv->menubox, menu );
-}
-
-void moko_paned_window_set_upper_pane(MokoPanedWindow* self, GtkWidget* child)
-{
- g_debug( "moko_paned_window_set_upper_pane" );
- MokoPanedWindowPriv* priv = MOKO_PANED_WINDOW_GET_PRIVATE(self);
-
- priv->upperenclosing = moko_alignment_new();
- gtk_widget_set_name( GTK_WIDGET(priv->upperenclosing), "mokopanedwindow-upper-enclosing" );
- //FIXME put into MokoAlignment class
- gtk_alignment_set_padding( GTK_ALIGNMENT(priv->upperenclosing), 7, 7, 11, 11 ); //FIXME get from style (MokoAlignment::padding)
- gtk_box_pack_end( GTK_BOX(priv->upper), GTK_WIDGET(priv->upperenclosing), TRUE, TRUE, 0 );
- gtk_container_add( GTK_CONTAINER(priv->upperenclosing), child );
-}
-
-void moko_paned_window_set_lower_pane(MokoPanedWindow* self, GtkWidget* child)
-{
- g_debug( "moko_paned_window_set_lower_pane" );
- MokoPanedWindowPriv* priv = MOKO_PANED_WINDOW_GET_PRIVATE(self);
-
-#if 0
- gtk_box_pack_start( GTK_BOX(priv->lower), child, TRUE, TRUE, 0 );
-#else
- priv->lowerenclosing = moko_alignment_new();
- gtk_widget_set_name( GTK_WIDGET(priv->lowerenclosing), "mokopanedwindow-lower-enclosing" );
- //FIXME put into MokoAlignment class
- gtk_alignment_set_padding( GTK_ALIGNMENT(priv->lowerenclosing), 7, 7, 11, 11 ); //FIXME get from style (MokoAlignment::padding)
- gtk_box_pack_end( GTK_BOX(priv->lower), GTK_WIDGET(priv->lowerenclosing), TRUE, TRUE, 0 );
- gtk_container_add( GTK_CONTAINER(priv->lowerenclosing), child );
-#endif
-}
-
-void moko_paned_window_add_toolbox(MokoPanedWindow* self, MokoToolBox* toolbox)
-{
- g_debug( "moko_paned_window_add_toolbox" );
- MokoPanedWindowPriv* priv = MOKO_PANED_WINDOW_GET_PRIVATE(self);
- gtk_box_pack_end( GTK_BOX(priv->upper), toolbox, FALSE, FALSE, 0 );
- gtk_box_reorder_child( GTK_BOX(priv->upper), toolbox, 1 );
-}
Copied: trunk/src/target/OM-2007/libraries/libmokoui/moko-paned-window.c (from rev 195, trunk/src/target/OM-2007/libraries/mokoui/moko-paned-window.c)
Deleted: trunk/src/target/OM-2007/libraries/libmokoui/moko-paned-window.h
===================================================================
--- trunk/src/target/OM-2007/libraries/mokoui/moko-paned-window.h 2006-11-11 13:37:31 UTC (rev 194)
+++ trunk/src/target/OM-2007/libraries/libmokoui/moko-paned-window.h 2006-11-12 11:59:48 UTC (rev 198)
@@ -1,73 +0,0 @@
-/*
- * libmokoui -- OpenMoko Application Framework UI Library
- *
- * Authored By Michael 'Mickey' Lauer <mlauer at vanille-media.de>
- *
- * Copyright (C) 2006 First International Computer Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser Public License as published by
- * the Free Software Foundation; version 2.1 of the license.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser Public License for more details.
- *
- * Current Version: $Rev$ ($Date$) [$Author$]
- */
-#ifndef _MOKO_PANED_WINDOW_H_
-#define _MOKO_PANED_WINDOW_H_
-
-#include "moko-window.h"
-#include "moko-menubox.h"
-#include "moko-toolbox.h"
-
-#include <gtk/gtkmenu.h>
-
-#include <glib.h>
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-#define MOKO_TYPE_PANED_WINDOW (moko_paned_window_get_type())
-#define MOKO_PANED_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MOKO_TYPE_PANED_WINDOW, MokoPanedWindow))
-#define MOKO_PANED_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MOKO_TYPE_PANED_WINDOW, MokoPanedWindowClass))
-#define MOKO_IS_PANED_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MOKO_TYPE_PANED_WINDOW))
-#define MOKO_IS_PANED_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MOKO_TYPE_PANED_WINDOW))
-
-typedef struct _MokoPanedWindow MokoPanedWindow;
-typedef struct _MokoPanedWindowClass MokoPanedWindowClass;
-
-struct _MokoPanedWindow
-{
- MokoWindow parent;
- /* add pointers to new members here */
-};
-
-struct _MokoPanedWindowClass
-{
- /* add your parent class here */
- MokoWindowClass parent_class;
- void (*moko_paned_window) (MokoPanedWindow *self);
-};
-
-GType moko_paned_window_get_type (void);
-GtkWidget* moko_paned_window_new (void);
-void moko_paned_window_clear (MokoPanedWindow *self);
-
-/* menu */
-MokoMenuBox* moko_paned_window_get_menubox(MokoPanedWindow* self);
-void moko_paned_window_set_application_menu(MokoPanedWindow* self, GtkMenu* menu);
-void moko_paned_window_set_filter_menu(MokoPanedWindow* self, GtkMenu* menu);
-
-/* toolbox */
-void moko_paned_window_add_toolbox(MokoPanedWindow* self, MokoToolBox* toolbox);
-
-/* panes */
-void moko_paned_window_set_upper_pane(MokoPanedWindow* self, GtkWidget* child);
-void moko_paned_window_set_lower_pane(MokoPanedWindow* self, GtkWidget* child);
-
-G_END_DECLS
-
-#endif /* _MOKO_PANED_WINDOW_H_ */
Copied: trunk/src/target/OM-2007/libraries/libmokoui/moko-paned-window.h (from rev 195, trunk/src/target/OM-2007/libraries/mokoui/moko-paned-window.h)
Copied: trunk/src/target/OM-2007/libraries/libmokoui/moko-tool-box.c (from rev 195, trunk/src/target/OM-2007/libraries/mokoui/moko-tool-box.c)
Copied: trunk/src/target/OM-2007/libraries/libmokoui/moko-tool-box.h (from rev 195, trunk/src/target/OM-2007/libraries/mokoui/moko-tool-box.h)
Deleted: trunk/src/target/OM-2007/libraries/libmokoui/moko-toolbox.c
===================================================================
--- trunk/src/target/OM-2007/libraries/mokoui/moko-toolbox.c 2006-11-11 13:37:31 UTC (rev 194)
+++ trunk/src/target/OM-2007/libraries/libmokoui/moko-toolbox.c 2006-11-12 11:59:48 UTC (rev 198)
@@ -1,208 +0,0 @@
-/*
- * libmokoui -- OpenMoko Application Framework UI Library
- *
- * Authored By Michael 'Mickey' Lauer <mlauer at vanille-media.de>
- *
- * Copyright (C) 2006 First International Computer Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser Public License as published by
- * the Free Software Foundation; version 2.1 of the license.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser Public License for more details.
- *
- * Current Version: $Rev$ ($Date$) [$Author$]
- */
-#include "moko-toolbox.h"
-#include "moko-pixmap-container.h"
-#include "moko-pixmap-button.h"
-
-#include <gtk/gtkentry.h>
-#include <gtk/gtkvbox.h>
-
-#define MOKO_TOOL_BOX_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), MOKO_TYPE_TOOL_BOX, MokoToolBoxPriv));
-
-typedef struct _MokoToolBoxPriv
-{
- MokoPixmapContainer* toolbar_page;
- GtkHBox* buttonbox;
- MokoPixmapContainer* searchbar_page;
- GtkEntry* entry;
-} MokoToolBoxPriv;
-
-/* add your signals here */
-enum {
- SEARCHBOX_VISIBLE,
- SEARCHBOX_INVISIBLE,
- LAST_SIGNAL
-};
-
-static void moko_tool_box_class_init (MokoToolBoxClass *klass);
-static void moko_tool_box_init (MokoToolBox *self);
-
-static guint moko_tool_box_signals[LAST_SIGNAL] = { 0 };
-
-static void _button_release(GtkWidget* w, MokoToolBox* self)
-{
- static int current_page = 1;
- gtk_notebook_set_current_page( GTK_NOTEBOOK(self), current_page );
- g_debug( "moko_tool_box_button_release: current_page is now: %d", current_page );
- current_page = 1 - current_page;
- g_signal_emit( G_OBJECT(self), current_page ? moko_tool_box_signals[SEARCHBOX_INVISIBLE] : moko_tool_box_signals[SEARCHBOX_VISIBLE], 0, NULL );
-}
-
-GType moko_tool_box_get_type (void) /* Typechecking */
-{
- static GType self_type = 0;
-
- if (!self_type)
- {
- static const GTypeInfo self_info =
- {
- sizeof (MokoToolBoxClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) moko_tool_box_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (MokoToolBox),
- 0,
- (GInstanceInitFunc) moko_tool_box_init,
- };
-
- /* add the type of your parent class here */
- self_type = g_type_register_static(GTK_TYPE_NOTEBOOK, "MokoToolBox", &self_info, 0);
- }
-
- return self_type;
-}
-
-static void moko_tool_box_class_init (MokoToolBoxClass *klass) /* Class Initialization */
-{
- g_type_class_add_private(klass, sizeof(MokoToolBoxPriv));
-
- moko_tool_box_signals[SEARCHBOX_VISIBLE] = g_signal_new ("searchbox_visible",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (MokoToolBoxClass, searchbox_visible),
- NULL,
- NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- moko_tool_box_signals[SEARCHBOX_INVISIBLE] = g_signal_new ("searchbox_invisible",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (MokoToolBoxClass, searchbox_invisible),
- NULL,
- NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-}
-
-static void moko_tool_box_init(MokoToolBox* self) /* Instance Construction */
-{
- g_debug( "moko_tool_box_init" );
- gtk_notebook_set_show_border( GTK_NOTEBOOK(self), FALSE );
- gtk_notebook_set_show_tabs( GTK_NOTEBOOK(self), FALSE );
-}
-
-//FIXME 1st: rewrite moko_tool_box_new / moko_tool_box_new_with_search for using g_object properties
-//FIXME 2nd: support enabling/disabling search mode on-the-fly
-GtkWidget* moko_tool_box_new() /* Construction */
-{
- MokoToolBox* self = MOKO_TOOL_BOX(g_object_new(MOKO_TYPE_TOOL_BOX, NULL));
- MokoToolBoxPriv* priv = MOKO_TOOL_BOX_GET_PRIVATE(self);
-
- priv->toolbar_page = moko_pixmap_container_new();
- gtk_widget_set_name( GTK_WIDGET(priv->toolbar_page), "mokotoolbox-normal-mode" );
- priv->buttonbox = gtk_hbox_new( FALSE, 17 ); //FIXME need to get from style
- gtk_fixed_put( GTK_FIXED(priv->toolbar_page), GTK_WIDGET(priv->buttonbox), 1, 7 ); //FIXME need to get from style
-
- gtk_notebook_append_page( GTK_NOTEBOOK(self), priv->toolbar_page, NULL );
-
- return GTK_WIDGET(self);
-}
-
-GtkWidget* moko_tool_box_new_with_search()
-{
- MokoToolBox* self = MOKO_TOOL_BOX(g_object_new(MOKO_TYPE_TOOL_BOX, NULL));
- MokoToolBoxPriv* priv = MOKO_TOOL_BOX_GET_PRIVATE(self);
-
- priv->toolbar_page = moko_pixmap_container_new();
- gtk_widget_set_name( GTK_WIDGET(priv->toolbar_page), "mokotoolbox-normal-mode" );
-
- MokoPixmapButton* search = moko_pixmap_button_new();
- gtk_widget_set_name( GTK_WIDGET(search), "mokotoolbox-search-button" );
- gtk_fixed_put( GTK_FIXED(priv->toolbar_page), search, 0, 0 );
- priv->buttonbox = gtk_hbox_new( FALSE, 17 ); //FIXME need to get from style
- gtk_fixed_put( GTK_FIXED(priv->toolbar_page), GTK_WIDGET(priv->buttonbox), 84, 7 ); //FIXME need to get from style
-
- gtk_notebook_append_page( GTK_NOTEBOOK(self), priv->toolbar_page, NULL );
-
- g_signal_connect( G_OBJECT(search), "clicked", G_CALLBACK(_button_release), self );
-
- priv->searchbar_page = moko_pixmap_container_new();
- gtk_widget_set_name( GTK_WIDGET(priv->searchbar_page), "mokotoolbox-search-mode" );
- gtk_notebook_append_page( GTK_NOTEBOOK(self), priv->searchbar_page, NULL );
-
- MokoPixmapButton* back = moko_pixmap_button_new();
- gtk_widget_set_name( GTK_WIDGET(back), "mokotoolbox-back-button" );
- gtk_fixed_put( GTK_FIXED(priv->searchbar_page), back, 400, 0 ); //FIXME need to get from style
- g_signal_connect( G_OBJECT(back), "clicked", G_CALLBACK(_button_release), self );
-
- priv->entry = gtk_entry_new();
- gtk_entry_set_has_frame( priv->entry, FALSE );
- // gtk_entry_set_inner_border( priv->entry, FALSE );
- gtk_widget_set_name( GTK_WIDGET(priv->entry), "mokotoolbox-search-entry" );
- moko_pixmap_container_set_cargo( priv->searchbar_page, GTK_WIDGET(priv->entry) );
-
- return GTK_WIDGET(self);
-}
-
-void moko_tool_box_clear(MokoToolBox* self) /* Destruction */
-{
- /* destruct your widgets here */
-}
-
-/* add new methods here */
-
-void moko_tool_box_add_search_button(MokoToolBox* self)
-{
-#if 0
- MokoToolBoxPriv* priv = MOKO_TOOL_BOX_GET_PRIVATE(self);
- GtkToolButton* tool_search = GTK_TOOL_BUTTON(gtk_tool_button_new( NULL, "" ));
- GtkImage* icon = gtk_image_new_from_file( "/local/pkg/openmoko/OM-2007/artwork/themes/openmoko-standard/gtk-2.0/openmoko-search-button.png" );
- gtk_tool_button_set_icon_widget( tool_search, icon );
- gtk_widget_set_name( GTK_WIDGET(tool_search), "moko_search_button" );
- gtk_toolbar_insert( priv->toolbar, tool_search, 0 );
-#endif
-}
-
-GtkHBox* moko_tool_box_get_button_box(MokoToolBox* self)
-{
- MokoToolBoxPriv* priv = MOKO_TOOL_BOX_GET_PRIVATE(self);
- return priv->buttonbox;
-}
-
-MokoPixmapButton* moko_tool_box_add_action_button(MokoToolBox* self)
-{
- g_debug( "moko_tool_box_add_action_button" );
- MokoToolBoxPriv* priv = MOKO_TOOL_BOX_GET_PRIVATE(self);
-
- MokoPixmapButton* button = moko_pixmap_button_new();
- gtk_widget_set_name( GTK_WIDGET(button), "mokotoolbox-action-button" );
-
- gtk_box_pack_start( GTK_BOX(priv->buttonbox), GTK_WIDGET(button), FALSE, FALSE, 0 );
-
- return button;
-}
-
-GtkEntry* moko_tool_box_get_entry(MokoToolBox* self)
-{
- MokoToolBoxPriv* priv = MOKO_TOOL_BOX_GET_PRIVATE(self);
- return priv->entry;
-}
Deleted: trunk/src/target/OM-2007/libraries/libmokoui/moko-toolbox.h
===================================================================
--- trunk/src/target/OM-2007/libraries/mokoui/moko-toolbox.h 2006-11-11 13:37:31 UTC (rev 194)
+++ trunk/src/target/OM-2007/libraries/libmokoui/moko-toolbox.h 2006-11-12 11:59:48 UTC (rev 198)
@@ -1,66 +0,0 @@
-/*
- * libmokoui -- OpenMoko Application Framework UI Library
- *
- * Authored By Michael 'Mickey' Lauer <mlauer at vanille-media.de>
- *
- * Copyright (C) 2006 First International Computer Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser Public License as published by
- * the Free Software Foundation; version 2.1 of the license.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser Public License for more details.
- *
- * Current Version: $Rev$ ($Date$) [$Author$]
- */
-#ifndef _MOKO_TOOL_BOX_H_
-#define _MOKO_TOOL_BOX_H_
-
-#include "moko-pixmap-button.h"
-
-#include <gtk/gtkentry.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtknotebook.h>
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-G_BEGIN_DECLS
-
-#define MOKO_TYPE_TOOL_BOX (moko_tool_box_get_type())
-#define MOKO_TOOL_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MOKO_TYPE_TOOL_BOX, MokoToolBox))
-#define MOKO_TOOL_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MOKO_TYPE_TOOL_BOX, MokoToolBoxClass))
-#define MOKO_IS_TOOL_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MOKO_TYPE_TOOL_BOX))
-#define MOKO_IS_TOOL_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MOKO_TYPE_TOOL_BOX))
-
-typedef struct _MokoToolBox MokoToolBox;
-typedef struct _MokoToolBoxClass MokoToolBoxClass;
-
-struct _MokoToolBox
-{
- GtkNotebook parent;
-};
-
-struct _MokoToolBoxClass
-{
- GtkNotebookClass parent_class;
- void (*searchbox_visible) (MokoToolBox *self);
- void (*searchbox_invisible) (MokoToolBox *self);
-};
-
-GType moko_tool_box_get_type();
-GtkWidget* moko_tool_box_new();
-GtkWidget* moko_tool_box_new_with_search();
-void moko_tool_box_clear(MokoToolBox* self);
-
-GtkHBox* moko_tool_box_get_button_box( MokoToolBox* self );
-GtkEntry* moko_tool_box_get_entry(MokoToolBox* self);
-MokoPixmapButton* moko_tool_box_add_action_button(MokoToolBox* self);
-
-G_END_DECLS
-
-#endif /* _MOKO_TOOL_BOX_H_ */
Copied: trunk/src/target/OM-2007/libraries/libmokoui/moko-tree-view.c (from rev 197, trunk/src/target/OM-2007/libraries/mokoui/moko-tree-view.c)
Copied: trunk/src/target/OM-2007/libraries/libmokoui/moko-tree-view.h (from rev 197, trunk/src/target/OM-2007/libraries/mokoui/moko-tree-view.h)
Deleted: trunk/src/target/OM-2007/libraries/libmokoui/mokoui.pro
===================================================================
--- trunk/src/target/OM-2007/libraries/mokoui/mokoui.pro 2006-11-11 13:37:31 UTC (rev 194)
+++ trunk/src/target/OM-2007/libraries/libmokoui/mokoui.pro 2006-11-12 11:59:48 UTC (rev 198)
@@ -1,29 +0,0 @@
-TEMPLATE = lib
-VERSION = 0.0.1
-
-HEADERS = \
- moko-alignment.h \
- moko-pixmap-container.h \
- moko-pixmap-button.h \
- moko-application.h \
- moko-window.h \
- moko-finger-window.h \
- moko-paned-window.h \
- moko-menubox.h \
- moko-toolbox.h \
- moko-search-bar.h
-SOURCES = \
- moko-alignment.c \
- moko-pixmap-container.c \
- moko-pixmap-button.c \
- moko-application.c \
- moko-window.c \
- moko-finger-window.c \
- moko-paned-window.c \
- moko-menubox.c \
- moko-toolbox.c \
- moko-search-bar.c
-
-PKGCONFIG += gtk+-2.0
-
-include ( $(OPENMOKODIR)/devel/qmake/openmoko-include.pro )
Copied: trunk/src/target/OM-2007/libraries/libmokoui/mokoui.pro (from rev 195, trunk/src/target/OM-2007/libraries/mokoui/mokoui.pro)
Modified: trunk/src/target/OM-2007/libraries/libraries.pro
===================================================================
--- trunk/src/target/OM-2007/libraries/libraries.pro 2006-11-12 11:31:47 UTC (rev 197)
+++ trunk/src/target/OM-2007/libraries/libraries.pro 2006-11-12 11:59:48 UTC (rev 198)
@@ -1,3 +1,3 @@
TEMPLATE = subdirs
# SUBDIRS = libgsm mokocore mokonet mokoui mokopim
-SUBDIRS = mokocore mokonet mokoui mokopim
+SUBDIRS = libmokocore libmokonet libmokoui libmokopim
More information about the commitlog
mailing list