Changeset 298


Ignore:
Timestamp:
12/05/06 02:34:22 (6 years ago)
Author:
mickey
Message:

mokoui: application menu item now is a GtkImageMenuItem?. next step is to implement generic icon handling in the framework

Location:
trunk/src/target/OM-2007
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/target/OM-2007/artwork/themes/openmoko-standard/gtk-2.0/mokomenubox

    r233 r298  
    55            recolorable     = TRUE 
    66            file            = "openmoko-application-menu-bg.png" 
    7             border          = { 40, 20, 0, 0 } 
     7            border          = { 0, 20, 0, 0 } 
    88            stretch         = TRUE 
    99        } 
    1010    } 
    11     xthickness = 30 
     11    xthickness = 5 
    1212} 
    1313widget "*.mokomenubox-application-menubar" style "mokomenubox-application-menubar" 
  • trunk/src/target/OM-2007/devel/qmake/openmoko-include.pro

    r219 r298  
    6060 
    6161contains( CONFIG, debug ) { 
    62         APPDIR = $(OPENMOKODIR)/applications/$$TARGET/data 
    63         DEFINES += PKGDATADIR=\\\"$$APPDIR/\\\" 
     62        !contains( TEMPLATE, lib ) { 
     63                APPDIR = $(OPENMOKODIR)/applications/$$TARGET/data 
     64                DEFINES += PKGDATADIR=\\\"$$APPDIR/\\\" 
     65        } 
     66    contains( TEMPLATE, lib ) { 
     67                APPDIR = $(OPENMOKODIR)/openmoko-libs/data 
     68                DEFINES += PKGDATADIR=\\\"$$APPDIR/\\\" 
     69        } 
    6470} 
    6571!contains( CONFIG, debug ) { 
  • trunk/src/target/OM-2007/examples/openmoko-finger-demo/src/demo-main.c

    r294 r298  
    4848} 
    4949 
     50void cb_tool_button_clicked( GtkButton* button, MokoFingerWindow* window ) 
     51{ 
     52    if (!tools) return; 
     53    GtkButton* newbutton = moko_finger_tool_box_add_button( tools ); 
     54    g_signal_connect( G_OBJECT(newbutton), "clicked", G_CALLBACK(cb_tool_button_clicked), window ); 
     55} 
     56 
    5057void cb_black_button_clicked( GtkButton* button, MokoFingerWindow* window ) 
    5158{ 
     
    5663    { 
    5764        tools = moko_finger_window_get_toolbox(window); 
    58         for ( int i = 0; i < 1; ++i ) 
    59             moko_finger_tool_box_add_button( tools ); 
     65        for ( int i = 0; i < 4; ++i ) 
     66        { 
     67            GtkButton* newbutton = moko_finger_tool_box_add_button( tools ); 
     68            g_signal_connect( G_OBJECT(newbutton), "clicked", G_CALLBACK(cb_tool_button_clicked), window ); 
     69        } 
    6070    } 
    6171 
     
    7080void cb_dialer_button_clicked( GtkButton* button, MokoFingerWindow* window ) 
    7181{ 
    72     if (!tools) return; 
    73     moko_finger_tool_box_add_button( tools ); 
     82    // ... 
    7483} 
    7584 
     
    101110    GtkLabel* label1 = gtk_label_new( "Populate this area with finger widgets\n \nThere are three types of finger buttons:" ); 
    102111 
    103     GtkLabel* label2 = gtk_label_new( "Orange button toggles finger scrolling wheel\nBlack button toggles finger toolbar\nDialer Button adds a tool button" ); 
     112    GtkLabel* label2 = gtk_label_new( "Orange button toggles finger scrolling wheel\nBlack button toggles finger toolbar\nDialer Button shows a dialog\n \n \n" ); 
    104113 
    105114    GtkHBox* hbox = gtk_hbox_new( TRUE, 10 ); 
  • trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-menu-box.c

    r275 r298  
    1919#include "moko-menu-box.h" 
    2020 
     21#include <gtk/gtkimage.h> 
     22#include <gtk/gtkimagemenuitem.h> 
    2123#include <gtk/gtklabel.h> 
    2224#include <gtk/gtkmenubar.h> 
     
    3537{ 
    3638    GtkMenuBar* menubar_l; 
    37     GtkMenuItem* appitem; 
     39    GtkImageMenuItem* appitem; 
    3840    GtkMenu* appmenu; 
    3941    GtkMenuBar* menubar_r; 
     
    154156 
    155157    } 
    156     GtkMenuItem* appitem = gtk_menu_item_new_with_label( g_get_application_name() ); 
     158    GtkImageMenuItem* appitem = gtk_image_menu_item_new_with_label( g_get_application_name() ); 
     159    //FIXME implement icon handling properly in moko_application 
     160    GtkImage* appicon = gtk_image_new_from_file( PKGDATADIR "/unknown" ); // openmoko-logo-alpha.png" ); 
     161    gtk_image_menu_item_set_image( appitem, appicon ); 
    157162    gtk_widget_set_name( GTK_WIDGET(appitem), "transparent" ); 
    158163    priv->appitem = appitem; 
     
    188193} 
    189194 
    190 void 
    191 moko_menu_box_set_active_filter(MokoMenuBox* self, gchar* text) 
     195void moko_menu_box_set_active_filter(MokoMenuBox* self, gchar* text) 
    192196{ 
    193197    //FIXME this only works with text labels 
Note: See TracChangeset for help on using the changeset viewer.