r138 - in trunk/src/target/OM-2007: artwork/themes/openmoko-standard/gtk-2.0 devel/qmake examples/openmoko-paned-demo libraries/mokoui
mickey at gta01.hmw-consulting.de
mickey at gta01.hmw-consulting.de
Sat Oct 28 14:43:24 CEST 2006
Author: mickey
Date: 2006-10-28 12:43:23 +0000 (Sat, 28 Oct 2006)
New Revision: 138
Modified:
trunk/src/target/OM-2007/artwork/themes/openmoko-standard/gtk-2.0/gtkmenuitem
trunk/src/target/OM-2007/artwork/themes/openmoko-standard/gtk-2.0/mokotoolbox
trunk/src/target/OM-2007/devel/qmake/openmoko-include.pro
trunk/src/target/OM-2007/examples/openmoko-paned-demo/demo-main.c
trunk/src/target/OM-2007/libraries/mokoui/moko-pixmap-button.c
trunk/src/target/OM-2007/libraries/mokoui/moko-toolbox.c
Log:
theme: don't show focus on pixmap buttons in mokotoolbox
mokoui: enable no-search mode for mokotoolbox
Modified: trunk/src/target/OM-2007/artwork/themes/openmoko-standard/gtk-2.0/gtkmenuitem
===================================================================
--- trunk/src/target/OM-2007/artwork/themes/openmoko-standard/gtk-2.0/gtkmenuitem 2006-10-27 23:51:50 UTC (rev 137)
+++ trunk/src/target/OM-2007/artwork/themes/openmoko-standard/gtk-2.0/gtkmenuitem 2006-10-28 12:43:23 UTC (rev 138)
@@ -3,7 +3,7 @@
image {
function = BOX
recolorable = TRUE
- file = "transparent100.png"
+ file = "transparency100.png"
border = { 0, 0, 0, 0 }
stretch = TRUE
}
Modified: trunk/src/target/OM-2007/artwork/themes/openmoko-standard/gtk-2.0/mokotoolbox
===================================================================
--- trunk/src/target/OM-2007/artwork/themes/openmoko-standard/gtk-2.0/mokotoolbox 2006-10-27 23:51:50 UTC (rev 137)
+++ trunk/src/target/OM-2007/artwork/themes/openmoko-standard/gtk-2.0/mokotoolbox 2006-10-28 12:43:23 UTC (rev 138)
@@ -12,7 +12,7 @@
}
widget "*.mokotoolbox-search-mode" style "mokotoolbox-search-mode"
-style "mokotoolbox-normal-mode-search-button" {
+style "mokotoolbox-normal-mode-search-button" {
engine "pixmap" {
image {
function = BOX
@@ -23,6 +23,7 @@
}
}
MokoPixmapButton::size-request = { 0, 68, 0, 52 }
+ GtkButton::focus-line-width = 0
}
widget "*.mokotoolbox-search-button" style "mokotoolbox-normal-mode-search-button"
@@ -37,6 +38,7 @@
}
}
MokoPixmapButton::size-request = { 0, 80, 0, 52 }
+ GtkButton::focus-line-width = 0
}
widget "*.mokotoolbox-back-button" style "mokotoolbox-search-mode-back-button"
@@ -56,6 +58,7 @@
}
}
MokoPixmapButton::size-request = { 0, 82, 0, 38 }
+ GtkButton::focus-line-width = 0
}
widget "*.mokotoolbox-action-button" style "mokotoolbox-action-button"
Modified: trunk/src/target/OM-2007/devel/qmake/openmoko-include.pro
===================================================================
--- trunk/src/target/OM-2007/devel/qmake/openmoko-include.pro 2006-10-27 23:51:50 UTC (rev 137)
+++ trunk/src/target/OM-2007/devel/qmake/openmoko-include.pro 2006-10-28 12:43:23 UTC (rev 138)
@@ -55,5 +55,4 @@
DESTDIR = $(OPENMOKODIR)/lib
}
-#DEFINES += 'G_LOG_DOMAIN=\"$$TARGET\"'
-
+DEFINES += G_LOG_DOMAIN=\\\"$$TARGET\\\"
Modified: trunk/src/target/OM-2007/examples/openmoko-paned-demo/demo-main.c
===================================================================
--- trunk/src/target/OM-2007/examples/openmoko-paned-demo/demo-main.c 2006-10-27 23:51:50 UTC (rev 137)
+++ trunk/src/target/OM-2007/examples/openmoko-paned-demo/demo-main.c 2006-10-28 12:43:23 UTC (rev 138)
@@ -22,18 +22,12 @@
#include <mokoui/moko-toolbox.h>
#include <gtk/gtkactiongroup.h>
-#include <gtk/gtkbutton.h>
+#include <gtk/gtklabel.h>
#include <gtk/gtkcheckmenuitem.h>
#include <gtk/gtkmain.h>
#include <gtk/gtkmenu.h>
-#include <gtk/gtkmenutoolbutton.h>
-#include <gtk/gtkstock.h>
-#include <gtk/gtktoolbutton.h>
-#include <gtk/gtkuimanager.h>
-#include <gtk/gtkvpaned.h>
-#include <gtk/gtkvbox.h>
-#include <stdlib.h>
+static gboolean searchmode = TRUE;
int main( int argc, char** argv )
{
@@ -41,6 +35,12 @@
/* Initialize GTK+ */
gtk_init( &argc, &argv );
+ if ( argc > 1 && strcmp( argv[1], "-no-search" ) == 0)
+ {
+ g_debug( "disabling search mode" );
+ searchmode = FALSE;
+ }
+
/* application object */
MokoApplication* app = MOKO_APPLICATION(moko_application_get_instance());
g_set_application_name( "Paned-Demo" );
@@ -69,18 +69,28 @@
g_signal_connect( G_OBJECT(window), "delete_event", G_CALLBACK( gtk_main_quit ), NULL );
/* navigation area */
- GtkButton* navigationlist = gtk_button_new_with_label( "Hello Navigation Area!" );
- moko_paned_window_set_upper_pane( window, GTK_WIDGET(navigationlist) );
+ GtkLabel* navigation = gtk_label_new( "Add your widget for navigating\nthrough appplication specific\ndata here" );
+ moko_paned_window_set_upper_pane( window, GTK_WIDGET(navigation) );
/* tool bar */
- MokoToolBox* toolbox = MOKO_TOOL_BOX(moko_tool_box_new_with_search());
+ MokoToolBox* toolbox;
+ if (!searchmode)
+ {
+ toolbox = MOKO_TOOL_BOX(moko_tool_box_new());
+ moko_tool_box_add_action_button( toolbox );
+ moko_tool_box_add_action_button( toolbox );
+ moko_tool_box_add_action_button( toolbox );
+ moko_tool_box_add_action_button( toolbox );
+ moko_tool_box_add_action_button( toolbox );
+ } else {
+ toolbox = MOKO_TOOL_BOX(moko_tool_box_new_with_search());
+ moko_tool_box_add_action_button( toolbox );
+ moko_tool_box_add_action_button( toolbox );
+ moko_tool_box_add_action_button( toolbox );
+ moko_tool_box_add_action_button( toolbox );
+ }
moko_paned_window_add_toolbox( window, toolbox );
- moko_tool_box_add_action_button( toolbox );
- moko_tool_box_add_action_button( toolbox );
- moko_tool_box_add_action_button( toolbox );
- moko_tool_box_add_action_button( toolbox );
-
#if 0
GtkToolButton* tool_action1 = GTK_TOOL_BUTTON(gtk_tool_button_new( NULL, "action1" ));
gtk_toolbar_insert( GTK_TOOLBAR(toolbar), tool_action1, -1 );
@@ -103,9 +113,9 @@
GtkToolButton* tool_action4 = GTK_TOOL_BUTTON(gtk_tool_button_new( NULL, "action4" ));
gtk_toolbar_insert( GTK_TOOLBAR(toolbar), tool_action4, -1 );
#endif
- /* details area */
- GtkButton* detailslist = gtk_button_new_with_label( "Hello Details Area!" );
- moko_paned_window_set_lower_pane( window, GTK_WIDGET(detailslist) );
+ /* details area */
+ GtkLabel* details = gtk_label_new( "Add your widget for showing\ndetails for the selected\ndata entry here" );
+ moko_paned_window_set_lower_pane( window, GTK_WIDGET(details) );
/* show everything and run main loop */
gtk_widget_show_all( GTK_WIDGET(window) );
Modified: trunk/src/target/OM-2007/libraries/mokoui/moko-pixmap-button.c
===================================================================
--- trunk/src/target/OM-2007/libraries/mokoui/moko-pixmap-button.c 2006-10-27 23:51:50 UTC (rev 137)
+++ trunk/src/target/OM-2007/libraries/mokoui/moko-pixmap-button.c 2006-10-28 12:43:23 UTC (rev 138)
@@ -72,7 +72,6 @@
moko_pixmap_button_init (MokoPixmapButton *self)
{
g_debug( "moko_pixmap_button_init" );
- gtk_button_set_focus_on_click( GTK_BUTTON(self), FALSE );
}
MokoPixmapButton*
@@ -91,7 +90,7 @@
gint focus_width;
gint focus_pad;
- //gtk_button_get_props (button, &default_border, NULL, NULL);
+ //gtk_button_get_props (button, &default_border, NULL, NULL); //FIXME what are we going to do w/ default borders?
gtk_widget_style_get (GTK_WIDGET (widget),
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
Modified: trunk/src/target/OM-2007/libraries/mokoui/moko-toolbox.c
===================================================================
--- trunk/src/target/OM-2007/libraries/mokoui/moko-toolbox.c 2006-10-27 23:51:50 UTC (rev 137)
+++ trunk/src/target/OM-2007/libraries/mokoui/moko-toolbox.c 2006-10-28 12:43:23 UTC (rev 138)
@@ -91,9 +91,21 @@
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 */
{
- return GTK_WIDGET(g_object_new(moko_tool_box_get_type(), NULL));
+ 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()
@@ -105,7 +117,7 @@
g_debug( "button_release: current_page is now: %d", current_page );
current_page = 1 - current_page;
}
- MokoToolBox* self = MOKO_TOOL_BOX(moko_tool_box_new());
+ 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();
@@ -116,7 +128,6 @@
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_widget_set_size_request( GTK_WIDGET(priv->buttonbox), 400, 52 ); //FIXME need to get from style
gtk_notebook_append_page( GTK_NOTEBOOK(self), priv->toolbar_page, NULL );
More information about the commitlog
mailing list