changeset 32955:e12d6cd72b75

Go without gtk functions. Normal string function are sufficient to handle item->text, there is no need to use gtk functions.
author ib
date Mon, 07 Mar 2011 20:27:29 +0000
parents 682b370ac832
children cde5d1cbb4bc
files gui/mplayer/gui_common.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/gui/mplayer/gui_common.c	Mon Mar 07 20:15:30 2011 +0000
+++ b/gui/mplayer/gui_common.c	Mon Mar 07 20:27:29 2011 +0000
@@ -18,7 +18,6 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include <gtk/gtk.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <inttypes.h>
@@ -291,10 +290,10 @@
            int x;
            unsigned int d;
            char * t = Translate( item->label );
-           if ( g_strcmp0( item->text, t ) != 0 )
+           if ( !item->text || ( strcmp( item->text, t ) != 0 ) )
             {
-             g_free( item->text );
-             item->text = g_strdup( t );
+             free( item->text );
+             item->text = strdup( t );
              item->textwidth = fntTextWidth( item->fontid, t );
              item->starttime = GetTimerMS();
              item->last_x = 0;