emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/gtkutil.c


From: Jan Djärv
Subject: [Emacs-diffs] Changes to emacs/src/gtkutil.c
Date: Sat, 08 Mar 2003 10:57:57 -0500

Index: emacs/src/gtkutil.c
diff -c emacs/src/gtkutil.c:1.11 emacs/src/gtkutil.c:1.12
*** emacs/src/gtkutil.c:1.11    Mon Feb 17 13:39:53 2003
--- emacs/src/gtkutil.c Sat Mar  8 10:57:47 2003
***************
*** 2769,2775 ****
        struct image *img;
        Lisp_Object image;
        GtkWidget *wicon = iter ? GTK_WIDGET (iter->data) : 0;
!       
        if (iter) iter = g_list_next (iter);
  
        /* If image is a vector, choose the image according to the
--- 2769,2775 ----
        struct image *img;
        Lisp_Object image;
        GtkWidget *wicon = iter ? GTK_WIDGET (iter->data) : 0;
! 
        if (iter) iter = g_list_next (iter);
  
        /* If image is a vector, choose the image according to the
***************
*** 2825,2831 ****
            /* Save the image so we can see if an update is needed when
               this function is called again.  */
            g_object_set_data (G_OBJECT (w), XG_TOOL_BAR_IMAGE_DATA,
!                              (gpointer)img);
  
            /* Catch expose events to overcome an annoying redraw bug, see
               comment for xg_tool_bar_expose_callback.  */
--- 2825,2831 ----
            /* Save the image so we can see if an update is needed when
               this function is called again.  */
            g_object_set_data (G_OBJECT (w), XG_TOOL_BAR_IMAGE_DATA,
!                              (gpointer)img->pixmap);
  
            /* Catch expose events to overcome an annoying redraw bug, see
               comment for xg_tool_bar_expose_callback.  */
***************
*** 2867,2879 ****
            GtkWidget *wvbox = gtk_bin_get_child (GTK_BIN (wicon));
            GList *chlist = gtk_container_get_children (GTK_CONTAINER (wvbox));
            GtkImage *wimage = GTK_IMAGE (chlist->data);
!           struct image *old_img = g_object_get_data (G_OBJECT (wimage),
!                                                      XG_TOOL_BAR_IMAGE_DATA);
            g_list_free (chlist);
  
!           if (! old_img
!               || old_img->pixmap != img->pixmap
!               || old_img->mask != img->mask)
              {
                GdkPixmap *gpix = gdk_pixmap_foreign_new (img->pixmap);
                GdkBitmap *gmask = img->mask ?
--- 2867,2877 ----
            GtkWidget *wvbox = gtk_bin_get_child (GTK_BIN (wicon));
            GList *chlist = gtk_container_get_children (GTK_CONTAINER (wvbox));
            GtkImage *wimage = GTK_IMAGE (chlist->data);
!           Pixmap old_img = (Pixmap)g_object_get_data (G_OBJECT (wimage),
!                                                       XG_TOOL_BAR_IMAGE_DATA);
            g_list_free (chlist);
  
!           if (old_img != img->pixmap)
              {
                GdkPixmap *gpix = gdk_pixmap_foreign_new (img->pixmap);
                GdkBitmap *gmask = img->mask ?
***************
*** 2883,2889 ****
              }
  
            g_object_set_data (G_OBJECT (wimage), XG_TOOL_BAR_IMAGE_DATA,
!                              (gpointer)img);
  
            gtk_widget_set_sensitive (wicon, enabled_p);
            gtk_widget_show (wicon);
--- 2881,2887 ----
              }
  
            g_object_set_data (G_OBJECT (wimage), XG_TOOL_BAR_IMAGE_DATA,
!                              (gpointer)img->pixmap);
  
            gtk_widget_set_sensitive (wicon, enabled_p);
            gtk_widget_show (wicon);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]