Commit 2d442d48 authored by Manish Singh's avatar Manish Singh

Added Nathan Summers fix for the about dialog (and put my name in the

credits :) )
Added Michael Natterer's escaped menu accelerator fix
Added Andy Thomas's active_tool NULL check for undo
parent 4af44db2
Mon Dec 8 02:13:36 PST 1997 Manish Singh <yosh@gimp.org>
* app/about_dialog.c: Added Nathan Summers patch to make it
work better
* app/menus.c: Added Michael Natterer's patch to save menu
accelerators with chars that need to be escaped properly
* app/undo.c: Added Andy Thomas's patch to check for a NULL
active_tool in the undo (so it can work with plugins)
Sun Dec 7 17:05:32 PST 1997 Manish Singh <yosh@gimp.org>
* added Sven Neumann's patch to the scale and resize dialogs for ratio input fields (app/resize.h, app/resize.c)
......
......@@ -6,13 +6,12 @@
#include "interface.h"
#define ANIMATION_STEPS 16
#define ANIMATION_SIZE 2
static int about_dialog_load_logo (GtkWidget *window);
static void about_dialog_destroy (void);
static void about_dialog_unmap (void);
static int about_dialog_logo_expose (GtkWidget *widget, GdkEventExpose *event);
static int about_dialog_scroll_expose (GtkWidget *widget, GdkEventExpose *event);
static int about_dialog_button (GtkWidget *widget, GdkEventButton *event);
static int about_dialog_timer (gpointer data);
......@@ -79,6 +78,7 @@ static char *scroll_text[] =
"James Robinson",
"Mike Schaeffer",
"Tracy Scott",
"Manish Singh",
"Eiichi Takamori",
"Tristan Tarrant",
"Owen Taylor",
......@@ -98,7 +98,7 @@ about_dialog_create (int timeout)
{
GtkStyle *style;
GtkWidget *vbox;
GtkWidget *frame;
GtkWidget *aboutframe;
GtkWidget *label;
GtkWidget *alignment;
gint max_width;
......@@ -132,18 +132,18 @@ about_dialog_create (int timeout)
gtk_container_add (GTK_CONTAINER (about_dialog), vbox);
gtk_widget_show (vbox);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 0);
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
aboutframe = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (aboutframe), GTK_SHADOW_IN);
gtk_container_border_width (GTK_CONTAINER (aboutframe), 0);
gtk_box_pack_start (GTK_BOX (vbox), aboutframe, TRUE, TRUE, 0);
gtk_widget_show (aboutframe);
logo_area = gtk_drawing_area_new ();
gtk_signal_connect (GTK_OBJECT (logo_area), "expose_event",
(GtkSignalFunc) about_dialog_logo_expose, NULL);
gtk_drawing_area_size (GTK_DRAWING_AREA (logo_area), logo_width, logo_height);
gtk_widget_set_events (logo_area, GDK_EXPOSURE_MASK);
gtk_container_add (GTK_CONTAINER (frame), logo_area);
gtk_container_add (GTK_CONTAINER (aboutframe), logo_area);
gtk_widget_show (logo_area);
gtk_widget_realize (logo_area);
......@@ -170,28 +170,26 @@ about_dialog_create (int timeout)
gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, TRUE, 0);
gtk_widget_show (alignment);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 0);
gtk_container_add (GTK_CONTAINER (alignment), frame);
gtk_widget_show (frame);
aboutframe = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (aboutframe), GTK_SHADOW_IN);
gtk_container_border_width (GTK_CONTAINER (aboutframe), 0);
gtk_container_add (GTK_CONTAINER (alignment), aboutframe);
gtk_widget_show (aboutframe);
max_width = 0;
for (i = 0; i < nscroll_texts; i++)
{
scroll_text_widths[i] = gdk_string_width (frame->style->font, scroll_text[i]);
scroll_text_widths[i] = gdk_string_width (aboutframe->style->font, scroll_text[i]);
max_width = MAX (max_width, scroll_text_widths[i]);
}
scroll_area = gtk_drawing_area_new ();
gtk_signal_connect (GTK_OBJECT (scroll_area), "expose_event",
(GtkSignalFunc) about_dialog_scroll_expose, NULL);
gtk_drawing_area_size (GTK_DRAWING_AREA (scroll_area),
max_width + 10,
frame->style->font->ascent +
frame->style->font->descent);
gtk_widget_set_events (scroll_area, GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK);
gtk_container_add (GTK_CONTAINER (frame), scroll_area);
aboutframe->style->font->ascent +
aboutframe->style->font->descent);
gtk_widget_set_events (scroll_area, GDK_BUTTON_PRESS_MASK);
gtk_container_add (GTK_CONTAINER (aboutframe), scroll_area);
gtk_widget_show (scroll_area);
gtk_widget_realize (scroll_area);
......@@ -300,8 +298,8 @@ about_dialog_load_logo (GtkWidget *window)
fclose (fp);
dissolve_width = logo_width / 2;
dissolve_height = logo_height / 2;
dissolve_width = (logo_width / ANIMATION_SIZE)+(logo_width % ANIMATION_SIZE ==0 ?0 : 1);
dissolve_height = (logo_height / ANIMATION_SIZE)+(logo_height % ANIMATION_SIZE ==0 ?0 : 1);
dissolve_map = g_new (guchar, dissolve_width * dissolve_height);
......@@ -363,21 +361,6 @@ about_dialog_logo_expose (GtkWidget *widget,
return FALSE;
}
static int
about_dialog_scroll_expose (GtkWidget *widget,
GdkEventExpose *event)
{
if (!scroll_pixmap)
scroll_pixmap = gdk_pixmap_new (widget->window,
widget->allocation.width,
widget->allocation.height,
-1);
gdk_window_clear (scroll_area->window);
return FALSE;
}
static int
about_dialog_button (GtkWidget *widget,
GdkEventButton *event)
......@@ -401,16 +384,18 @@ about_dialog_timer (gpointer data)
return_val = TRUE;
if (do_animation)
{
if(logo_area->allocation.width != 1)
{
for (i = 0, k = 0; i < dissolve_height; i++)
for (j = 0; j < dissolve_width; j++, k++)
if (frame == dissolve_map[k])
if (frame >= dissolve_map[k])
{
gdk_draw_pixmap (logo_area->window,
logo_area->style->black_gc,
logo_pixmap,
j * 2, i * 2, j * 2, i * 2,
2, 2);
j * ANIMATION_SIZE, i * ANIMATION_SIZE, j * ANIMATION_SIZE, i * ANIMATION_SIZE,
ANIMATION_SIZE, ANIMATION_SIZE);
}
frame += 1;
......@@ -426,9 +411,17 @@ about_dialog_timer (gpointer data)
return FALSE;
}
}
}
if (do_scrolling)
{
if (!scroll_pixmap)
scroll_pixmap = gdk_pixmap_new (scroll_area->window,
scroll_area->allocation.width,
scroll_area->allocation.height,
-1);
switch (scroll_state)
{
case 1:
......
......@@ -865,6 +865,10 @@ undo_pop_transform (GImage *gimage,
double d;
int i;
/* Can't have ANY tool selected - maybe a plugin running */
if (active_tool == NULL)
return TRUE;
tc = (TransformCore *) active_tool->private;
tu = (TransformUndo *) tu_ptr;
......@@ -952,6 +956,10 @@ undo_pop_paint (GImage *gimage,
PaintUndo * pu;
double tmp;
/* Can't have ANY tool selected - maybe a plugin running */
if (active_tool == NULL)
return TRUE;
pc = (PaintCore *) active_tool->private;
pu = (PaintUndo *) pu_ptr;
......
......@@ -6,13 +6,12 @@
#include "interface.h"
#define ANIMATION_STEPS 16
#define ANIMATION_SIZE 2
static int about_dialog_load_logo (GtkWidget *window);
static void about_dialog_destroy (void);
static void about_dialog_unmap (void);
static int about_dialog_logo_expose (GtkWidget *widget, GdkEventExpose *event);
static int about_dialog_scroll_expose (GtkWidget *widget, GdkEventExpose *event);
static int about_dialog_button (GtkWidget *widget, GdkEventButton *event);
static int about_dialog_timer (gpointer data);
......@@ -79,6 +78,7 @@ static char *scroll_text[] =
"James Robinson",
"Mike Schaeffer",
"Tracy Scott",
"Manish Singh",
"Eiichi Takamori",
"Tristan Tarrant",
"Owen Taylor",
......@@ -98,7 +98,7 @@ about_dialog_create (int timeout)
{
GtkStyle *style;
GtkWidget *vbox;
GtkWidget *frame;
GtkWidget *aboutframe;
GtkWidget *label;
GtkWidget *alignment;
gint max_width;
......@@ -132,18 +132,18 @@ about_dialog_create (int timeout)
gtk_container_add (GTK_CONTAINER (about_dialog), vbox);
gtk_widget_show (vbox);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 0);
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
aboutframe = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (aboutframe), GTK_SHADOW_IN);
gtk_container_border_width (GTK_CONTAINER (aboutframe), 0);
gtk_box_pack_start (GTK_BOX (vbox), aboutframe, TRUE, TRUE, 0);
gtk_widget_show (aboutframe);
logo_area = gtk_drawing_area_new ();
gtk_signal_connect (GTK_OBJECT (logo_area), "expose_event",
(GtkSignalFunc) about_dialog_logo_expose, NULL);
gtk_drawing_area_size (GTK_DRAWING_AREA (logo_area), logo_width, logo_height);
gtk_widget_set_events (logo_area, GDK_EXPOSURE_MASK);
gtk_container_add (GTK_CONTAINER (frame), logo_area);
gtk_container_add (GTK_CONTAINER (aboutframe), logo_area);
gtk_widget_show (logo_area);
gtk_widget_realize (logo_area);
......@@ -170,28 +170,26 @@ about_dialog_create (int timeout)
gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, TRUE, 0);
gtk_widget_show (alignment);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 0);
gtk_container_add (GTK_CONTAINER (alignment), frame);
gtk_widget_show (frame);
aboutframe = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (aboutframe), GTK_SHADOW_IN);
gtk_container_border_width (GTK_CONTAINER (aboutframe), 0);
gtk_container_add (GTK_CONTAINER (alignment), aboutframe);
gtk_widget_show (aboutframe);
max_width = 0;
for (i = 0; i < nscroll_texts; i++)
{
scroll_text_widths[i] = gdk_string_width (frame->style->font, scroll_text[i]);
scroll_text_widths[i] = gdk_string_width (aboutframe->style->font, scroll_text[i]);
max_width = MAX (max_width, scroll_text_widths[i]);
}
scroll_area = gtk_drawing_area_new ();
gtk_signal_connect (GTK_OBJECT (scroll_area), "expose_event",
(GtkSignalFunc) about_dialog_scroll_expose, NULL);
gtk_drawing_area_size (GTK_DRAWING_AREA (scroll_area),
max_width + 10,
frame->style->font->ascent +
frame->style->font->descent);
gtk_widget_set_events (scroll_area, GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK);
gtk_container_add (GTK_CONTAINER (frame), scroll_area);
aboutframe->style->font->ascent +
aboutframe->style->font->descent);
gtk_widget_set_events (scroll_area, GDK_BUTTON_PRESS_MASK);
gtk_container_add (GTK_CONTAINER (aboutframe), scroll_area);
gtk_widget_show (scroll_area);
gtk_widget_realize (scroll_area);
......@@ -300,8 +298,8 @@ about_dialog_load_logo (GtkWidget *window)
fclose (fp);
dissolve_width = logo_width / 2;
dissolve_height = logo_height / 2;
dissolve_width = (logo_width / ANIMATION_SIZE)+(logo_width % ANIMATION_SIZE ==0 ?0 : 1);
dissolve_height = (logo_height / ANIMATION_SIZE)+(logo_height % ANIMATION_SIZE ==0 ?0 : 1);
dissolve_map = g_new (guchar, dissolve_width * dissolve_height);
......@@ -363,21 +361,6 @@ about_dialog_logo_expose (GtkWidget *widget,
return FALSE;
}
static int
about_dialog_scroll_expose (GtkWidget *widget,
GdkEventExpose *event)
{
if (!scroll_pixmap)
scroll_pixmap = gdk_pixmap_new (widget->window,
widget->allocation.width,
widget->allocation.height,
-1);
gdk_window_clear (scroll_area->window);
return FALSE;
}
static int
about_dialog_button (GtkWidget *widget,
GdkEventButton *event)
......@@ -401,16 +384,18 @@ about_dialog_timer (gpointer data)
return_val = TRUE;
if (do_animation)
{
if(logo_area->allocation.width != 1)
{
for (i = 0, k = 0; i < dissolve_height; i++)
for (j = 0; j < dissolve_width; j++, k++)
if (frame == dissolve_map[k])
if (frame >= dissolve_map[k])
{
gdk_draw_pixmap (logo_area->window,
logo_area->style->black_gc,
logo_pixmap,
j * 2, i * 2, j * 2, i * 2,
2, 2);
j * ANIMATION_SIZE, i * ANIMATION_SIZE, j * ANIMATION_SIZE, i * ANIMATION_SIZE,
ANIMATION_SIZE, ANIMATION_SIZE);
}
frame += 1;
......@@ -426,9 +411,17 @@ about_dialog_timer (gpointer data)
return FALSE;
}
}
}
if (do_scrolling)
{
if (!scroll_pixmap)
scroll_pixmap = gdk_pixmap_new (scroll_area->window,
scroll_area->allocation.width,
scroll_area->allocation.height,
-1);
switch (scroll_state)
{
case 1:
......
......@@ -6,13 +6,12 @@
#include "interface.h"
#define ANIMATION_STEPS 16
#define ANIMATION_SIZE 2
static int about_dialog_load_logo (GtkWidget *window);
static void about_dialog_destroy (void);
static void about_dialog_unmap (void);
static int about_dialog_logo_expose (GtkWidget *widget, GdkEventExpose *event);
static int about_dialog_scroll_expose (GtkWidget *widget, GdkEventExpose *event);
static int about_dialog_button (GtkWidget *widget, GdkEventButton *event);
static int about_dialog_timer (gpointer data);
......@@ -79,6 +78,7 @@ static char *scroll_text[] =
"James Robinson",
"Mike Schaeffer",
"Tracy Scott",
"Manish Singh",
"Eiichi Takamori",
"Tristan Tarrant",
"Owen Taylor",
......@@ -98,7 +98,7 @@ about_dialog_create (int timeout)
{
GtkStyle *style;
GtkWidget *vbox;
GtkWidget *frame;
GtkWidget *aboutframe;
GtkWidget *label;
GtkWidget *alignment;
gint max_width;
......@@ -132,18 +132,18 @@ about_dialog_create (int timeout)
gtk_container_add (GTK_CONTAINER (about_dialog), vbox);
gtk_widget_show (vbox);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 0);
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
aboutframe = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (aboutframe), GTK_SHADOW_IN);
gtk_container_border_width (GTK_CONTAINER (aboutframe), 0);
gtk_box_pack_start (GTK_BOX (vbox), aboutframe, TRUE, TRUE, 0);
gtk_widget_show (aboutframe);
logo_area = gtk_drawing_area_new ();
gtk_signal_connect (GTK_OBJECT (logo_area), "expose_event",
(GtkSignalFunc) about_dialog_logo_expose, NULL);
gtk_drawing_area_size (GTK_DRAWING_AREA (logo_area), logo_width, logo_height);
gtk_widget_set_events (logo_area, GDK_EXPOSURE_MASK);
gtk_container_add (GTK_CONTAINER (frame), logo_area);
gtk_container_add (GTK_CONTAINER (aboutframe), logo_area);
gtk_widget_show (logo_area);
gtk_widget_realize (logo_area);
......@@ -170,28 +170,26 @@ about_dialog_create (int timeout)
gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, TRUE, 0);
gtk_widget_show (alignment);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 0);
gtk_container_add (GTK_CONTAINER (alignment), frame);
gtk_widget_show (frame);
aboutframe = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (aboutframe), GTK_SHADOW_IN);
gtk_container_border_width (GTK_CONTAINER (aboutframe), 0);
gtk_container_add (GTK_CONTAINER (alignment), aboutframe);
gtk_widget_show (aboutframe);
max_width = 0;
for (i = 0; i < nscroll_texts; i++)
{
scroll_text_widths[i] = gdk_string_width (frame->style->font, scroll_text[i]);
scroll_text_widths[i] = gdk_string_width (aboutframe->style->font, scroll_text[i]);
max_width = MAX (max_width, scroll_text_widths[i]);
}
scroll_area = gtk_drawing_area_new ();
gtk_signal_connect (GTK_OBJECT (scroll_area), "expose_event",
(GtkSignalFunc) about_dialog_scroll_expose, NULL);
gtk_drawing_area_size (GTK_DRAWING_AREA (scroll_area),
max_width + 10,
frame->style->font->ascent +
frame->style->font->descent);
gtk_widget_set_events (scroll_area, GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK);
gtk_container_add (GTK_CONTAINER (frame), scroll_area);
aboutframe->style->font->ascent +
aboutframe->style->font->descent);
gtk_widget_set_events (scroll_area, GDK_BUTTON_PRESS_MASK);
gtk_container_add (GTK_CONTAINER (aboutframe), scroll_area);
gtk_widget_show (scroll_area);
gtk_widget_realize (scroll_area);
......@@ -300,8 +298,8 @@ about_dialog_load_logo (GtkWidget *window)
fclose (fp);
dissolve_width = logo_width / 2;
dissolve_height = logo_height / 2;
dissolve_width = (logo_width / ANIMATION_SIZE)+(logo_width % ANIMATION_SIZE ==0 ?0 : 1);
dissolve_height = (logo_height / ANIMATION_SIZE)+(logo_height % ANIMATION_SIZE ==0 ?0 : 1);
dissolve_map = g_new (guchar, dissolve_width * dissolve_height);
......@@ -363,21 +361,6 @@ about_dialog_logo_expose (GtkWidget *widget,
return FALSE;
}
static int
about_dialog_scroll_expose (GtkWidget *widget,
GdkEventExpose *event)
{
if (!scroll_pixmap)
scroll_pixmap = gdk_pixmap_new (widget->window,
widget->allocation.width,
widget->allocation.height,
-1);
gdk_window_clear (scroll_area->window);
return FALSE;
}
static int
about_dialog_button (GtkWidget *widget,
GdkEventButton *event)
......@@ -401,16 +384,18 @@ about_dialog_timer (gpointer data)
return_val = TRUE;
if (do_animation)
{
if(logo_area->allocation.width != 1)
{
for (i = 0, k = 0; i < dissolve_height; i++)
for (j = 0; j < dissolve_width; j++, k++)
if (frame == dissolve_map[k])
if (frame >= dissolve_map[k])
{
gdk_draw_pixmap (logo_area->window,
logo_area->style->black_gc,
logo_pixmap,
j * 2, i * 2, j * 2, i * 2,
2, 2);
j * ANIMATION_SIZE, i * ANIMATION_SIZE, j * ANIMATION_SIZE, i * ANIMATION_SIZE,
ANIMATION_SIZE, ANIMATION_SIZE);
}
frame += 1;
......@@ -426,9 +411,17 @@ about_dialog_timer (gpointer data)
return FALSE;
}
}
}
if (do_scrolling)
{
if (!scroll_pixmap)
scroll_pixmap = gdk_pixmap_new (scroll_area->window,
scroll_area->allocation.width,
scroll_area->allocation.height,
-1);
switch (scroll_state)
{
case 1:
......
......@@ -415,7 +415,19 @@ menus_foreach (gpointer key,
gpointer value,
gpointer user_data)
{
fprintf ((FILE*) user_data, "(menu-path \"%s\" \"%s\")\n", (char*) key, (char*) value);
char accel[64];
int i, j;
for (i = j = 0; ((char*) value)[i] != '\0'; i++, j++)
{
if (((char *) value)[i] == '"' || ((char *) value)[i] == '\\')
accel[j++] = '\\';
accel[j] = ((char *) value)[i];
}
accel[j] = '\0';
fprintf ((FILE*) user_data, "(menu-path \"%s\" \"%s\")\n", (char*) key, accel);
}
static gint
......
......@@ -415,7 +415,19 @@ menus_foreach (gpointer key,
gpointer value,
gpointer user_data)
{
fprintf ((FILE*) user_data, "(menu-path \"%s\" \"%s\")\n", (char*) key, (char*) value);
char accel[64];
int i, j;
for (i = j = 0; ((char*) value)[i] != '\0'; i++, j++)
{
if (((char *) value)[i] == '"' || ((char *) value)[i] == '\\')
accel[j++] = '\\';
accel[j] = ((char *) value)[i];
}
accel[j] = '\0';
fprintf ((FILE*) user_data, "(menu-path \"%s\" \"%s\")\n", (char*) key, accel);
}
static gint
......
......@@ -415,7 +415,19 @@ menus_foreach (gpointer key,
gpointer value,
gpointer user_data)
{
fprintf ((FILE*) user_data, "(menu-path \"%s\" \"%s\")\n", (char*) key, (char*) value);
char accel[64];
int i, j;
for (i = j = 0; ((char*) value)[i] != '\0'; i++, j++)
{
if (((char *) value)[i] == '"' || ((char *) value)[i] == '\\')
accel[j++] = '\\';
accel[j] = ((char *) value)[i];
}
accel[j] = '\0';
fprintf ((FILE*) user_data, "(menu-path \"%s\" \"%s\")\n", (char*) key, accel);
}
static gint
......
......@@ -865,6 +865,10 @@ undo_pop_transform (GImage *gimage,
double d;
int i;
/* Can't have ANY tool selected - maybe a plugin running */
if (active_tool == NULL)
return TRUE;
tc = (TransformCore *) active_tool->private;
tu = (TransformUndo *) tu_ptr;
......@@ -952,6 +956,10 @@ undo_pop_paint (GImage *gimage,
PaintUndo * pu;
double tmp;
/* Can't have ANY tool selected - maybe a plugin running */
if (active_tool == NULL)
return TRUE;
pc = (PaintCore *) active_tool->private;
pu = (PaintUndo *) pu_ptr;
......
......@@ -415,7 +415,19 @@ menus_foreach (gpointer key,
gpointer value,
gpointer user_data)
{
fprintf ((FILE*) user_data, "(menu-path \"%s\" \"%s\")\n", (char*) key, (char*) value);
char accel[64];
int i, j;
for (i = j = 0; ((char*) value)[i] != '\0'; i++, j++)
{
if (((char *) value)[i] == '"' || ((char *) value)[i] == '\\')
accel[j++] = '\\';
accel[j] = ((char *) value)[i];
}
accel[j] = '\0';
fprintf ((FILE*) user_data, "(menu-path \"%s\" \"%s\")\n", (char*) key, accel);
}
static gint
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment