summaryrefslogtreecommitdiff
path: root/cad/gschem/patches/patch-aa
blob: 983e874e09dd8bbed16f7a350d2516275f8aba7c (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-aa,v 1.7 2005/09/09 12:07:23 dmcmahill Exp $

--- noweb/x_dialog.nw.orig	2005-08-20 14:13:28.000000000 +0000
+++ noweb/x_dialog.nw
@@ -901,6 +901,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);
   
@@ -977,7 +978,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));
     gtk_option_menu_set_history(GTK_OPTION_MENU(optionmenu), select_index);
@@ -3466,14 +3466,15 @@ create_color_menu (TOPLEVEL * w_current,
   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;
 
@@ -3651,6 +3652,7 @@ color_edit_dialog (TOPLEVEL *w_current)
   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);
@@ -3679,7 +3681,6 @@ color_edit_dialog (TOPLEVEL *w_current)
 #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);