summaryrefslogtreecommitdiff
path: root/cad/gschem/patches/patch-ab
blob: 7c867a67c1c287bac23e8e86ac6eccdb88754229 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
$NetBSD: patch-ab,v 1.6 2005/09/09 12:07:23 dmcmahill Exp $

--- src/x_dialog.c.orig	2005-08-20 14:27:39.000000000 +0000
+++ src/x_dialog.c
@@ -555,6 +555,7 @@ text_edit_dialog(TOPLEVEL * w_current, c
   char *text_size_string;
   int len;
   int num_selected;
+  int select_index = 0;
 
   num_selected =
       o_selection_return_num(w_current->page_current->selection2_head);
@@ -632,7 +633,6 @@ text_edit_dialog(TOPLEVEL * w_current, c
     gtk_widget_show(label);
 
     optionmenu = gtk_option_menu_new();
-    int select_index = 0;
 
     gtk_option_menu_set_menu(GTK_OPTION_MENU(optionmenu),
 			     create_color_menu(w_current, &select_index));
@@ -2638,14 +2638,15 @@ static GtkWidget *create_color_menu(TOPL
   char *temp = NULL;
   int found = 0;
 
-  menu = gtk_menu_new();
-  group = NULL;
-
   /* first lets see if we have a selected object, if so select its color */
   int select_col = -1;
   int item_index = 0;
   SELECTION *s_current = NULL;
   OBJECT *object = NULL;
+
+  menu = gtk_menu_new();
+  group = NULL;
+
   /* skip over head */
   s_current = w_current->page_current->selection2_head->next;
 
@@ -2788,6 +2789,7 @@ void color_edit_dialog(TOPLEVEL * w_curr
   GtkWidget *buttonapply = NULL;
   GtkWidget *optionmenu;
   GtkWidget *vbox, *action_area;
+  int select_index = 0;
 
   if (!w_current->clwindow) {
     w_current->clwindow = x_create_dialog_box(&vbox, &action_area);
@@ -2815,7 +2817,6 @@ void color_edit_dialog(TOPLEVEL * w_curr
 #endif
 
     optionmenu = gtk_option_menu_new();
-    int select_index = 0;
     gtk_option_menu_set_menu(GTK_OPTION_MENU(optionmenu),
 			     create_color_menu(w_current, &select_index));
     gtk_option_menu_set_history(GTK_OPTION_MENU(optionmenu), select_index);