[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Antiright-devel] antiright/gtkshell image_button.c terminal.c
From: |
Jeffrey Bedard |
Subject: |
[Antiright-devel] antiright/gtkshell image_button.c terminal.c |
Date: |
Wed, 09 May 2007 17:45:27 +0000 |
CVSROOT: /sources/antiright
Module name: antiright
Changes by: Jeffrey Bedard <jefbed> 07/05/09 17:45:27
Modified files:
gtkshell : image_button.c terminal.c
Log message:
Fixed double free in terminal class destructor. Simplified image button
code by eliminating function stubs.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/image_button.c?cvsroot=antiright&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/terminal.c?cvsroot=antiright&r1=1.13&r2=1.14
Patches:
Index: image_button.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/image_button.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- image_button.c 9 May 2007 17:20:53 -0000 1.14
+++ image_button.c 9 May 2007 17:45:27 -0000 1.15
@@ -43,21 +43,14 @@
gtk_widget_show(label);
}
-static void
-set_button_image(struct GSH * gsh, GtkWidget * image)
-{
- gtk_button_set_image(GTK_BUTTON(gsh->widgets.button), image);
- gtk_button_set_relief(GTK_BUTTON(gsh->widgets.button),
- GTK_RELIEF_NONE);
-}
-static void
-generic_image_button(struct GSH * gsh, const gchar *command,
- GtkWidget * image)
-{
+#define SET_BUTTON_IMAGE(gsh, image) \
+{\
+ gtk_button_set_image(GTK_BUTTON(gsh->widgets.button), image);\
+ gtk_button_set_relief(GTK_BUTTON(gsh->widgets.button),\
+ GTK_RELIEF_NONE);\
}
-
/* Get an image from the antiright icon distribution or the GTK stock
icon set. */
static GtkWidget *
@@ -89,7 +82,9 @@
void
gsh_image_button(struct GSH * gsh, char *command, char *name)
{
- //generic_image_button(gsh, command, get_image(gsh, name));
+ GtkWidget * image;
+
+ image = get_image(gsh, name);
gsh_command_button(gsh, command);
ARIFP(image)
{
@@ -97,7 +92,9 @@
if(!GTK_IS_MENU_BAR(gsh->rows->v)
&& !GTK_IS_MENU_ITEM(gsh->rows->v)
&& !GTK_IS_MENU(gsh->rows->v))
- set_button_image(gsh, image);
+ {
+ SET_BUTTON_IMAGE(gsh, image);
+ }
else
set_menu_item_image(gsh, image);
}
Index: terminal.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/terminal.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- terminal.c 9 May 2007 16:13:49 -0000 1.13
+++ terminal.c 9 May 2007 17:45:27 -0000 1.14
@@ -48,7 +48,8 @@
static void
gsh_delete_GSH_Terminal(struct GSH_Terminal * term)
{
- GSH_FREE_IF(term->font);
+ /* Freeing the terminal font causes a segmentation fault under
+ * linux, so likely a double free. */
/* The terminal widget itself is freed by gobject system
* reference counting. */
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Antiright-devel] antiright/gtkshell image_button.c terminal.c,
Jeffrey Bedard <=