[uim-commit] r375 - in trunk: . helper pixmaps

tkng@freedesktop.org tkng@freedesktop.org
Thu Jan 27 22:49:57 PST 2005


Author: tkng
Date: 2005-01-27 22:49:54 -0800 (Thu, 27 Jan 2005)
New Revision: 375

Added:
   trunk/pixmaps/
   trunk/pixmaps/Makefile.am
   trunk/pixmaps/switcher-icon.png
Modified:
   trunk/Makefile.am
   trunk/configure.ac
   trunk/helper/toolbar-common-gtk.c
Log:
* helper/toolbar-common-gtk.c:
 -(switcher_button_create): Use icon.

* pixmaps/: New directory for pixmaps.
 - switcher-icon.png: Icon for switcher. Thanks to UTUMI Hirosi.



Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am	2005-01-28 05:58:00 UTC (rev 374)
+++ trunk/Makefile.am	2005-01-28 06:49:54 UTC (rev 375)
@@ -1,5 +1,5 @@
 AUTOMAKE_OPTIONS = foreign
-SUBDIRS = m4 doc scm uim xim helper po gtk tables test fep data examples
+SUBDIRS = m4 doc scm uim xim helper po gtk tables test fep data examples pixmaps
 EXTRA_DIST = README.ja INSTALL.ja test.sh.in uim.spec.in \
 	intltool-extract.in intltool-merge.in intltool-update.in \
 	uim.pc.in

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2005-01-28 05:58:00 UTC (rev 374)
+++ trunk/configure.ac	2005-01-28 06:49:54 UTC (rev 375)
@@ -182,6 +182,8 @@
 # define XLIB directory
 AC_DEFINE_UNQUOTED(XLIB_DIR, "$x_libraries", [X11 Library Directory])
 
+AC_DEFINE_UNQUOTED(UIM_PIXMAPSDIR, "${DATADIR}/${PACKAGE}/pixmaps", [pixmaps directory])
+
 AC_ARG_WITH(gtk2,
   AC_HELP_STRING([--without-gtk2],
                  [don't build against Gtk+2]),
@@ -439,6 +441,7 @@
                  data/icons/Makefile
 		 examples/Makefile
 		 examples/uim-custom/Makefile
+		 pixmaps/Makefile
 		 uim.pc])
 
 AC_OUTPUT

Modified: trunk/helper/toolbar-common-gtk.c
===================================================================
--- trunk/helper/toolbar-common-gtk.c	2005-01-28 05:58:00 UTC (rev 374)
+++ trunk/helper/toolbar-common-gtk.c	2005-01-28 06:49:54 UTC (rev 375)
@@ -1,6 +1,6 @@
 /*
 
-  Copyright (c) 2003,2004 uim Project http://uim.freedesktop.org/
+  Copyright (c) 2003-2005 uim Project http://uim.freedesktop.org/
 
   All rights reserved.
 
@@ -43,7 +43,7 @@
 #include "uim/uim-helper.h"
 #include "uim/gettext.h"
 
-#define BUTTON_WIDTH 22
+#define BUTTON_WIDTH  22
 #define BUTTON_HEIGHT 22
 
 static GtkWidget *hbox;
@@ -461,40 +461,23 @@
 static GtkWidget *
 switcher_button_create(void)
 {
-
-  /*
-   * 2004-09-24 Kazuki Ohta <mover@hct.zaq.ne.jp>
-   *
-   * FIXME!:
-   *   Please create switcher.png to display the button with icon.
-   */
-  /*
-  gchar *path;
-  GtkWidget *image;
-  GtkWidget *event_box;
-  
-  path = g_strconcat(UIM_DATADIR, "/icons/", "swithcher.png", NULL);
-  image = gtk_image_new_from_file(path);  
-  event_box = gtk_event_box_new();
-  gtk_container_add(GTK_CONTAINER(event_box), image);
-  g_signal_connect(G_OBJECT(event_box), 
-		    "button_press_event",
-		    G_CALLBACK(switcher_button_pressed),
-		    NULL);
-  return event_box;
-  */
-
   GtkWidget *button;
   GtkTooltips *tooltip;
-  button = gtk_button_new_with_label(_("sw"));
+  GtkWidget *img;
+  gchar *path;
+  button = gtk_button_new();
+  path = g_strconcat(UIM_PIXMAPSDIR, "/switcher-icon.png", NULL);
+  img = gtk_image_new_from_file(path);
+  g_free(path);
+  gtk_container_add(GTK_CONTAINER(button), img);
   gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
   gtk_size_group_add_widget(button_size_group, button);
   g_signal_connect(G_OBJECT(button), "button_press_event",
 		   G_CALLBACK(switcher_button_pressed), NULL);
-
+  
   /* tooltip */
   tooltip = gtk_tooltips_new();
-  gtk_tooltips_set_tip(tooltip, button, _("exec im-switcher"), NULL);
+  gtk_tooltips_set_tip(tooltip, button, _("Exec uim's input method switcher."), NULL);
 
   return button;
 }

Added: trunk/pixmaps/Makefile.am
===================================================================
--- trunk/pixmaps/Makefile.am	2005-01-28 05:58:00 UTC (rev 374)
+++ trunk/pixmaps/Makefile.am	2005-01-28 06:49:54 UTC (rev 375)
@@ -0,0 +1,3 @@
+EXTRA_DIST = $(pixmaps_DATA)
+pixmapsdir =  $(datadir)/uim/pixmaps
+pixmaps_DATA = switcher-icon.png

Added: trunk/pixmaps/switcher-icon.png
===================================================================
(Binary files differ)


Property changes on: trunk/pixmaps/switcher-icon.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream



More information about the Uim-commit mailing list