r2099 - in trunk/src/target/OM-2007/openmoko-libs: . libmokoui

thomas at sita.openmoko.org thomas at sita.openmoko.org
Wed May 30 10:15:39 CEST 2007


Author: thomas
Date: 2007-05-30 10:15:38 +0200 (Wed, 30 May 2007)
New Revision: 2099

Modified:
   trunk/src/target/OM-2007/openmoko-libs/ChangeLog
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-application.c
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-application.h
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-tool-box.c
Log:
* libmokoui/moko-application.c:
* libmokoui/moko-application.h:
Remove moko_application_get_style_pixmap_dir()

* libmokoui/moko-finger-tool-box.c: (cb_configure): Don't use
moko_applicatoin_get_style_pixmap () as it uses some false assumptions.


Modified: trunk/src/target/OM-2007/openmoko-libs/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/ChangeLog	2007-05-29 21:51:32 UTC (rev 2098)
+++ trunk/src/target/OM-2007/openmoko-libs/ChangeLog	2007-05-30 08:15:38 UTC (rev 2099)
@@ -1,3 +1,12 @@
+2007-05-30  Thomas Wood  <thomas at openedhand.com>
+
+	* libmokoui/moko-application.c:
+	* libmokoui/moko-application.h:
+	Remove moko_application_get_style_pixmap_dir()
+
+	* libmokoui/moko-finger-tool-box.c: (cb_configure): Don't use
+	moko_applicatoin_get_style_pixmap () as it uses some false assumptions.
+
 2007-05-29  Thomas Wood  <thomas at openedhand.com>
 
 	Patch by: Neil J Patel <njp at o-hand.com>

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-application.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-application.c	2007-05-29 21:51:32 UTC (rev 2098)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-application.c	2007-05-30 08:15:38 UTC (rev 2099)
@@ -422,18 +422,6 @@
 }
 
 /**
- * moko_application_get_style_pixmap_dir:
- *
- * @returns the style pixmap directory
- * @note this is not necessarily $GTK_DATA_DIR/themes/$THEME_NAME/gtk-2.0/
- **/
-gchar* moko_application_get_style_pixmap_dir()
-{
-    GtkStyle* style = gtk_rc_get_style_by_paths( gtk_settings_get_default(), "GtkWidget", "GtkWidget", GTK_TYPE_WIDGET );
-    return g_path_get_dirname( style->rc_style->bg_pixmap_name[GTK_STATE_NORMAL] );
-}
-
-/**
  * moko_application_add_stock_icons:
  *
  * register a number of stock icons given by name

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-application.h
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-application.h	2007-05-29 21:51:32 UTC (rev 2098)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-application.h	2007-05-30 08:15:38 UTC (rev 2099)
@@ -53,7 +53,6 @@
 GtkWidget* moko_application_get_main_window(MokoApplication* self);
 void moko_application_add_window (MokoApplication *self, MokoWindow *window);
 
-gchar* moko_application_get_style_pixmap_dir();
 void moko_application_add_stock_icons(MokoApplication* self, ...);
 
 GtkWidget* moko_application_execute_dialog(MokoApplication* self, const gchar* title, GtkWidget* contents);

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-tool-box.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-tool-box.c	2007-05-29 21:51:32 UTC (rev 2098)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-tool-box.c	2007-05-30 08:15:38 UTC (rev 2099)
@@ -190,7 +190,14 @@
     {
         gchar *filename;
         if (filename = style->rc_style->bg_pixmap_name[GTK_STATE_NORMAL])
-            priv->background_pixbuf = gdk_pixbuf_new_from_file( style->rc_style->bg_pixmap_name[GTK_STATE_NORMAL], NULL);
+        {
+          priv->background_pixbuf = gdk_pixbuf_new_from_file( filename, NULL);
+          if (!priv->background_pixbuf)
+          {
+            g_warning ("moko_finger_tool_box: could not load pixbuf for the finger tool box: %s", filename);
+            return;
+          }
+        }
         else
         {
             g_warning ("moko_finger_tool_box: theme does not specify a background image for the finger tool box");
@@ -199,9 +206,6 @@
 
     }
     GdkPixbuf* pixbuf = gdk_pixbuf_scale_simple( priv->background_pixbuf, a->width, a->height, GDK_INTERP_BILINEAR );
-    
-    if ( !priv->button_pixbuf )
-        priv->button_pixbuf = gdk_pixbuf_new_from_file( g_build_filename( moko_application_get_style_pixmap_dir(), "btn_type03.png", NULL ), NULL );
     guint w = gdk_pixbuf_get_width( priv->button_pixbuf );
     guint h = gdk_pixbuf_get_height( priv->button_pixbuf );
     guint x = padding_left - 1;





More information about the commitlog mailing list