[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: CVS update: i_basic.c



  User: ahvezda 
  Date: 06/12/04 22:04:31

  Modified:    .        i_basic.c i_callbacks.c x_dialog.c x_menus.c
  Log:
  Added Control-x, Control-c, and Control-v hotkeys and menu items for
  
  cut buffer, copy buffer, and paste buffer.  Fixed a few bugs dealing with
  
  enabling and disabling menu items.  Removed the right justification of the
  
  help menu.
  
  
  
  
  Revision  Changes    Path
  1.15      +42 -2     eda/geda/gaf/gschem/src/i_basic.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: i_basic.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/i_basic.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -b -r1.14 -r1.15
  --- i_basic.c	19 Nov 2006 18:08:42 -0000	1.14
  +++ i_basic.c	5 Dec 2006 03:04:31 -0000	1.15
  @@ -428,9 +428,12 @@
     if (o_selection_return_num(w_current->page_current->selection2_head)) {
       /* since one or more things are selected, we set these TRUE */
       /* These strings should NOT be internationalized */
  +    x_menus_sensitivity(w_current, "Edit/Cut Buffer", TRUE);
  +    x_menus_sensitivity(w_current, "Edit/Copy Buffer", TRUE);
       x_menus_sensitivity(w_current, "Edit/Edit...", TRUE);
       x_menus_sensitivity(w_current, "Edit/Edit Text...", TRUE);
       x_menus_sensitivity(w_current, "Edit/Copy Mode", TRUE);
  +    x_menus_sensitivity(w_current, "Edit/Multiple Copy Mode", TRUE);
       x_menus_sensitivity(w_current, "Edit/Move Mode", TRUE);
       x_menus_sensitivity(w_current, "Edit/Delete", TRUE);
       x_menus_sensitivity(w_current, "Edit/Rotate 90 Mode", TRUE);
  @@ -472,9 +475,12 @@
     } else {
       /* Nothing is slected.  grey these out */
       /* These strings should NOT be internationalized */
  +    x_menus_sensitivity(w_current, "Edit/Cut Buffer", FALSE);
  +    x_menus_sensitivity(w_current, "Edit/Copy Buffer", FALSE);
       x_menus_sensitivity(w_current, "Edit/Edit...", FALSE);
       x_menus_sensitivity(w_current, "Edit/Edit Text...", FALSE);
       x_menus_sensitivity(w_current, "Edit/Copy Mode", FALSE);
  +    x_menus_sensitivity(w_current, "Edit/Multiple Copy Mode", FALSE);
       x_menus_sensitivity(w_current, "Edit/Move Mode", FALSE);
       x_menus_sensitivity(w_current, "Edit/Delete", FALSE);
       x_menus_sensitivity(w_current, "Edit/Rotate 90 Mode", FALSE);
  @@ -513,6 +519,40 @@
       x_menus_popup_sensitivity(w_current, "/Down Symbol", FALSE);
       /* x_menus_popup_sensitivity(w_current, "/Up", FALSE);	*/
     }
  +
  +  if ((object_buffer[0] != NULL) && (object_buffer[0]->next != NULL)) {
  +    x_menus_sensitivity(w_current, "Edit/Paste Buffer", TRUE);
  +    x_menus_sensitivity(w_current, "Buffer/Paste from 1", TRUE);
  +  } else {
  +    x_menus_sensitivity(w_current, "Edit/Paste Buffer", FALSE);
  +    x_menus_sensitivity(w_current, "Buffer/Paste from 1", FALSE);
  +  }
  +
  +  if ((object_buffer[1] != NULL) && (object_buffer[1]->next != NULL)) {
  +    x_menus_sensitivity(w_current, "Buffer/Paste from 2", TRUE);
  +  } else {
  +    x_menus_sensitivity(w_current, "Buffer/Paste from 2", FALSE);
  +  }
  +
  +  if ((object_buffer[2] != NULL) && (object_buffer[2]->next != NULL)) {
  +    x_menus_sensitivity(w_current, "Buffer/Paste from 3", TRUE);
  +  } else {
  +    x_menus_sensitivity(w_current, "Buffer/Paste from 3", FALSE);
  +  }
  +
  +  if ((object_buffer[3] != NULL) && (object_buffer[3]->next != NULL)) {
  +    x_menus_sensitivity(w_current, "Buffer/Paste from 4", TRUE);
  +  } else {
  +    x_menus_sensitivity(w_current, "Buffer/Paste from 4", FALSE);
  +  }
  +
  +  if ((object_buffer[4] != NULL) && (object_buffer[4]->next != NULL)) {
  +    x_menus_sensitivity(w_current, "Buffer/Paste from 5", TRUE);
  +  } else {
  +    x_menus_sensitivity(w_current, "Buffer/Paste from 5", FALSE);
  +  }
  + 
  +
   }
    
   #if 0
  @@ -647,7 +687,6 @@
   {
     gchar *print_string=NULL;
     gchar *filename=NULL;
  -  int max_len = 70;
   
     if (!w_current->main_window)
       return;
  @@ -659,7 +698,8 @@
     print_string = g_strdup_printf("%s - gschem", filename);
     
     /* alternativ code with length limited pathname */
  -/*  if (strlen(string) > max_len) {
  +/*  int max_len = 70;
  +    if (strlen(string) > max_len) {
       print_string = g_strdup_printf("gschem: ...%s",
   				   &(string[strlen(string)-max_len]));
     }
  
  
  
  1.70      +10 -0     eda/geda/gaf/gschem/src/i_callbacks.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: i_callbacks.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/i_callbacks.c,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -b -r1.69 -r1.70
  --- i_callbacks.c	20 Oct 2006 22:59:05 -0000	1.69
  +++ i_callbacks.c	5 Dec 2006 03:04:31 -0000	1.70
  @@ -1859,6 +1859,7 @@
   
     i_update_middle_button(w_current, i_callback_buffer_copy1, _("Copy 1"));
     o_buffer_copy(w_current, 0);
  +  i_update_menus(w_current);
   }
   
   /*! \todo Finish function documentation!!!
  @@ -1877,6 +1878,7 @@
   
     i_update_middle_button(w_current, i_callback_buffer_copy2, _("Copy 2"));
     o_buffer_copy(w_current, 1);
  +  i_update_menus(w_current);
   }
   
   /*! \todo Finish function documentation!!!
  @@ -1895,6 +1897,7 @@
   
     i_update_middle_button(w_current, i_callback_buffer_copy3, _("Copy 3"));
     o_buffer_copy(w_current, 2);
  +  i_update_menus(w_current);
   }
   
   /*! \todo Finish function documentation!!!
  @@ -1913,6 +1916,7 @@
   
     i_update_middle_button(w_current, i_callback_buffer_copy4, _("Copy 4"));
     o_buffer_copy(w_current, 3);
  +  i_update_menus(w_current);
   }
   
   /*! \todo Finish function documentation!!!
  @@ -1931,6 +1935,7 @@
   
     i_update_middle_button(w_current, i_callback_buffer_copy5, _("Copy 5"));
     o_buffer_copy(w_current, 4);
  +  i_update_menus(w_current);
   }
   
   /*! \todo Finish function documentation!!!
  @@ -1949,6 +1954,7 @@
   
     i_update_middle_button(w_current, i_callback_buffer_cut1, _("Cut 1"));
     o_buffer_cut(w_current, 0);
  +  i_update_menus(w_current);
   }
   
   /*! \todo Finish function documentation!!!
  @@ -1967,6 +1973,7 @@
   
     i_update_middle_button(w_current, i_callback_buffer_cut2, _("Cut 2"));
     o_buffer_cut(w_current, 1);
  +  i_update_menus(w_current);
   }
   
   /*! \todo Finish function documentation!!!
  @@ -1985,6 +1992,7 @@
   
     i_update_middle_button(w_current, i_callback_buffer_cut3, _("Cut 3"));
     o_buffer_cut(w_current, 2);
  +  i_update_menus(w_current);
   }
   
   /*! \todo Finish function documentation!!!
  @@ -2003,6 +2011,7 @@
   
     i_update_middle_button(w_current, i_callback_buffer_cut4, _("Cut 4"));
     o_buffer_cut(w_current, 3);
  +  i_update_menus(w_current);
   }
   
   /*! \todo Finish function documentation!!!
  @@ -2021,6 +2030,7 @@
   
     i_update_middle_button(w_current, i_callback_buffer_cut5, _("Cut 5"));
     o_buffer_cut(w_current, 4);
  +  i_update_menus(w_current);
   }
   
   /*! \todo Finish function documentation!!!
  
  
  
  1.63      +3 -3      eda/geda/gaf/gschem/src/x_dialog.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_dialog.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_dialog.c,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -b -r1.62 -r1.63
  --- x_dialog.c	21 Oct 2006 01:46:29 -0000	1.62
  +++ x_dialog.c	5 Dec 2006 03:04:31 -0000	1.63
  @@ -2903,8 +2903,8 @@
   
   /***************** Start of help/keymapping dialog box **************/
   
  -/* limit this to 128 hotkeys */
  -static char *hotkey_strings[128];
  +#define MAX_HOTKEY_BUFFER  256
  +static char *hotkey_strings[MAX_HOTKEY_BUFFER];
   static int hotkey_counter=0;
   
   /*! \todo Finish function documentation!!!
  @@ -2958,7 +2958,7 @@
   void x_dialog_hotkeys_fill(char *string) 
   {
   
  -  if (hotkey_counter > 127) {
  +  if (hotkey_counter > MAX_HOTKEY_BUFFER-1) {
       printf(_("Ran out of space in the hotkey buffer...\n"));
       return;
     }	
  
  
  
  1.40      +2 -4      eda/geda/gaf/gschem/src/x_menus.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_menus.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_menus.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -b -r1.39 -r1.40
  --- x_menus.c	4 Dec 2006 22:10:09 -0000	1.39
  +++ x_menus.c	5 Dec 2006 03:04:31 -0000	1.40
  @@ -220,10 +220,8 @@
       root_menu = gtk_menu_item_new_with_label (menu_name);
       /* do not free *raw_menu_name */
   
  -    help_string = gettext("Help");
  -    if (strcmp(menu_name, help_string) == 0) {
  -      gtk_menu_item_right_justify (GTK_MENU_ITEM(root_menu));
  -    }
  +    /* no longer right justify the help menu since that has gone out of style */
  +
       gtk_widget_show (root_menu);
       gtk_menu_item_set_submenu (GTK_MENU_ITEM (root_menu), menu);
       gtk_menu_bar_append (GTK_MENU_BAR (menu_bar), root_menu);
  
  
  


_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs