rpms/gcin/F-13 gtk-deprecated.patch, NONE, 1.1 configure.patch, 1.4, 1.5 gcin.spec, 1.51, 1.52

Chung-Yen Chang candyz at fedoraproject.org
Wed May 5 02:00:13 UTC 2010


Author: candyz

Update of /cvs/pkgs/rpms/gcin/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv18926

Modified Files:
	configure.patch gcin.spec 
Added Files:
	gtk-deprecated.patch 
Log Message:
patch to add -lm to LDFLAGS
patch to stop using GTK+ deprecated AP


gtk-deprecated.patch:
 anthy.cpp       |    4 ++++
 eggtrayicon.cpp |    8 ++++++++
 eve.cpp         |   12 ++++++++++++
 gtab.cpp        |    4 ++++
 tray.cpp        |    4 ++++
 win-gtab.cpp    |    4 ++++
 win0.cpp        |    8 ++++++++
 win1.cpp        |    8 ++++++++
 8 files changed, 52 insertions(+)

--- NEW FILE gtk-deprecated.patch ---
diff -urN --exclude configure gcin-1.4.6.orig/anthy.cpp gcin-1.4.6/anthy.cpp
--- gcin-1.4.6.orig/anthy.cpp	2009-12-17 22:02:20.000000000 +0900
+++ gcin-1.4.6/anthy.cpp	2010-04-22 12:50:00.300366245 +0900
@@ -993,7 +993,11 @@
 
 int anthy_visible()
 {
+#if GTK_CHECK_VERSION(2,18,0)
+  return gtk_widget_get_visible(win_anthy);
+#else
   return GTK_WIDGET_VISIBLE(win_anthy);
+#endif
 }
 
 extern gboolean force_show;
diff -urN --exclude configure gcin-1.4.6.orig/eggtrayicon.cpp gcin-1.4.6/eggtrayicon.cpp
--- gcin-1.4.6.orig/eggtrayicon.cpp	2009-08-07 13:25:45.000000000 +0900
+++ gcin-1.4.6/eggtrayicon.cpp	2010-04-22 12:51:35.247365986 +0900
@@ -352,7 +352,11 @@
 
       gdk_window_add_filter (gdkwin, egg_tray_icon_manager_filter, icon);
 
+#if GTK_CHECK_VERSION(2,20,0)
+      if (dock_if_realized && gtk_widget_get_realized (icon))
+#else
       if (dock_if_realized && GTK_WIDGET_REALIZED (icon))
+#endif
 	egg_tray_icon_send_dock_request (icon);
 
       egg_tray_icon_get_orientation_property (icon);
@@ -398,7 +402,11 @@
 static void
 make_transparent (GtkWidget *widget, gpointer user_data)
 {
+#if GTK_CHECK_VERSION(2,18,0)
+	if (!gtk_widget_get_has_window (widget) || gtk_widget_get_app_paintable (widget))
+#else
 	if (GTK_WIDGET_NO_WINDOW (widget) || GTK_WIDGET_APP_PAINTABLE (widget))
+#endif
 		return;
 
 	gtk_widget_set_app_paintable (widget, TRUE);
diff -urN --exclude configure gcin-1.4.6.orig/eve.cpp gcin-1.4.6/eve.cpp
--- gcin-1.4.6.orig/eve.cpp	2009-12-17 18:24:58.000000000 +0900
+++ gcin-1.4.6/eve.cpp	2010-04-22 12:54:10.853365974 +0900
@@ -661,10 +661,18 @@
     return FALSE;
   switch (current_CS->in_method) {
     case 3:
+#if GTK_CHECK_VERSION(2,18,0)
+      return gwin_pho && gtk_widget_get_visible(gwin_pho);
+#else
       return gwin_pho && GTK_WIDGET_VISIBLE(gwin_pho);
+#endif
 #if USE_TSIN
     case 6:
+# if GTK_CHECK_VERSION(2,18,0)
+      return gwin0 && gtk_widget_get_visible(gwin0);
+# else
       return gwin0 && GTK_WIDGET_VISIBLE(gwin0);
+# endif
 #endif
     case 10:
       break;
@@ -675,7 +683,11 @@
     default:
       if (!gwin_gtab)
         return FALSE;
+#if GTK_CHECK_VERSION(2,18,0)
+      return gwin_gtab && gtk_widget_get_visible(gwin_gtab);
+#else
       return gwin_gtab && GTK_WIDGET_VISIBLE(gwin_gtab);
+#endif
   }
 
   return FALSE;
diff -urN --exclude configure gcin-1.4.6.orig/gtab.cpp gcin-1.4.6/gtab.cpp
--- gcin-1.4.6.orig/gtab.cpp	2009-12-19 16:40:13.000000000 +0900
+++ gcin-1.4.6/gtab.cpp	2010-04-22 12:54:48.344366001 +0900
@@ -1230,7 +1230,11 @@
     return feedkey_pho(key, 0);
 
   if (same_pho_query_state == SAME_PHO_QUERY_none && gwin_pho &&
+#if GTK_CHECK_VERSION(2,18,0)
+    gtk_widget_get_visible(gwin_pho))
+#else
     GTK_WIDGET_VISIBLE(gwin_pho))
+#endif
      hide_win_pho();
 
 
diff -urN --exclude configure gcin-1.4.6.orig/tray.cpp gcin-1.4.6/tray.cpp
--- gcin-1.4.6.orig/tray.cpp	2009-12-06 15:54:56.000000000 +0900
+++ gcin-1.4.6/tray.cpp	2010-04-22 12:56:31.115370364 +0900
@@ -286,7 +286,11 @@
   gtk_widget_show_all (GTK_WIDGET (tray_icon));
   tray_da_win = da->window;
   // tray window is not ready ??
+#if GTK_CHECK_VERSION(2,18,0)
+  if (!tray_da_win || !gtk_widget_is_drawable(da)) {
+#else
   if (!tray_da_win || !GTK_WIDGET_DRAWABLE(da)) {
+#endif
     gtk_widget_destroy(GTK_WIDGET(tray_icon));
     da = NULL;
     return FALSE;
diff -urN --exclude configure gcin-1.4.6.orig/win0.cpp gcin-1.4.6/win0.cpp
--- gcin-1.4.6.orig/win0.cpp	2009-12-07 10:57:36.000000000 +0900
+++ gcin-1.4.6/win0.cpp	2010-04-22 12:58:58.305366453 +0900
@@ -215,7 +215,11 @@
 void disp_pho_sub(GtkWidget *label, int index, char *pho);
 void disp_tsin_pho(int index, char *pho)
 {
+#if GTK_CHECK_VERSION(2,18,0)
+  if (button_pho && !gtk_widget_get_visible(button_pho))
+#else
   if (button_pho && !GTK_WIDGET_VISIBLE(button_pho))
+#endif
     gtk_widget_show(button_pho);
 
   disp_pho_sub(label_pho, index, pho);
@@ -603,7 +607,11 @@
   if (gcin_pop_up_win && !tsin_has_input() && !force_show)
     return;
 #if UNIX
+# if GTK_CHECK_VERSION(2,18,0)
+  if (!gtk_widget_get_visible(gwin0))
+# else
   if (!GTK_WIDGET_VISIBLE(gwin0))
+# endif
 #endif
   {
     gtk_widget_show(gwin0);
diff -urN --exclude configure gcin-1.4.6.orig/win1.cpp gcin-1.4.6/win1.cpp
--- gcin-1.4.6.orig/win1.cpp	2009-08-19 11:23:53.000000000 +0900
+++ gcin-1.4.6/win1.cpp	2010-04-22 13:00:07.778365894 +0900
@@ -166,7 +166,11 @@
 
 void disp_selections(int x, int y)
 {
+#if GTK_CHECK_VERSION(2,18,0)
+  if (!gtk_widget_get_visible(gwin1)) {
+#else
   if (!GTK_WIDGET_VISIBLE(gwin1)) {
+#endif
     gtk_widget_show(gwin1);
   }
 
@@ -186,7 +190,11 @@
 
 void raise_tsin_selection_win()
 {
+#if GTK_CHECK_VERSION(2,18,0)
+  if (gwin1 && gtk_widget_get_visible(gwin1))
+#else
   if (gwin1 && GTK_WIDGET_VISIBLE(gwin1))
+#endif
     gtk_window_present(GTK_WINDOW(gwin1));
 }
 
diff -urN --exclude configure gcin-1.4.6.orig/win-gtab.cpp gcin-1.4.6/win-gtab.cpp
--- gcin-1.4.6.orig/win-gtab.cpp	2009-12-19 16:19:58.000000000 +0900
+++ gcin-1.4.6/win-gtab.cpp	2010-04-22 13:01:17.766366021 +0900
@@ -526,7 +526,11 @@
 
 //  dbg("show_win_gtab()\n");
 #if UNIX
+# if GTK_CHECK_VERSION(2,18,0)
+  if (!gtk_widget_get_visible(gwin_gtab))
+# else
   if (!GTK_WIDGET_VISIBLE(gwin_gtab))
+# endif
 #endif
     gtk_widget_show(gwin_gtab);
 

configure.patch:
 configure |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Index: configure.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gcin/F-13/configure.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- configure.patch	5 Jan 2010 06:57:23 -0000	1.4
+++ configure.patch	5 May 2010 02:00:12 -0000	1.5
@@ -11,3 +11,12 @@ diff -urN gcin-1.4.6.orig/configure gcin
  
  if [ -z $CC ]; then
    CC=gcc
+@@ -239,7 +239,7 @@
+ echo "libdir=\$(DESTDIR)$libdir" >> config.mak
+ echo "gcinlibdir=\$(libdir)/gcin" >> config.mak
+ echo "includedir=\$(DESTDIR)$includedir" >> config.mak
+-echo "LDFLAGS=$GTKLDFLAGS -lX11" >> config.mak
++echo "LDFLAGS=$GTKLDFLAGS -lX11 -lm" >> config.mak
+ echo "GCIN_VERSION=$GCIN_VERSION" >> config.mak
+ echo "GCIN_TABLE_DIR=\$(datadir_r)/gcin/table" >> config.mak
+ echo "GCIN_OGG_DIR=\$(datadir_r)/gcin/ogg" >> config.mak


Index: gcin.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gcin/F-13/gcin.spec,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -p -r1.51 -r1.52
--- gcin.spec	5 Jan 2010 06:57:23 -0000	1.51
+++ gcin.spec	5 May 2010 02:00:12 -0000	1.52
@@ -1,6 +1,6 @@
 Name:           gcin
 Version:        1.4.6
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Input method for Traditional Chinese
 
 Group:          System Environment/Libraries
@@ -16,6 +16,7 @@ Patch3:         configure.patch
 Patch4:         newcj3.patch
 Patch5:         gcin_gtab.patch
 Patch6:         gcin-1.4.2-gtk-immodules-lang.patch
+Patch7:         gtk-deprecated.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -37,6 +38,7 @@ Gcin is an input method for Traditional 
 %patch3 -p1 -b .configure
 %patch4 -p1 -b .newcj3
 %patch5 -p1 -b .gtab
+%patch7 -p1 -b .gtk
 #%patch6 -p1 -b .gtk-immodules
 #cp -f gcinicon/gtab.list data/
 #cp -f gcinicon/*.png icons/
@@ -111,6 +113,10 @@ fi
 %{_libdir}/libgcin-im-client.so*
 
 %changelog
+* Wed May 05 2010 Chung-Yen Chang <candyz0416 at gmail.com> - 1.4.6-2
+- patch to add -lm to LDFLAGS
+- patch to stop using GTK+ deprecated AP
+
 * Tue Jan 05 2010 Chung-Yen Chang <candyz0416 at gmail.com> - 1.4.6-1
 - update to 1.4.6
 



More information about the scm-commits mailing list