/[beaver]/beaver/src/interface.c
ViewVC logotype

Diff of /beaver/src/interface.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.20 by mikix, Fri May 16 06:01:50 2003 UTC revision 1.21 by mikix, Sun May 18 04:23:20 2003 UTC
# Line 478  void menu_items_treatment (GtkWidget *Wi Line 478  void menu_items_treatment (GtkWidget *Wi
478                                              (GTK_NOTEBOOK(MainNotebook), i)),                                              (GTK_NOTEBOOK(MainNotebook), i)),
479                                             GTK_CORNER_TOP_LEFT);                                             GTK_CORNER_TOP_LEFT);
480        break;        break;
481        case TAB_WIDTH_1          : set_tab_width (1); break;
482        case TAB_WIDTH_2          : set_tab_width (2); break;
483        case TAB_WIDTH_3          : set_tab_width (3); break;
484        case TAB_WIDTH_4          : set_tab_width (4); break;
485        case TAB_WIDTH_8          : set_tab_width (8); break;
486      case PREFS                : display_prefs (&Settings);     break;      case PREFS                : display_prefs (&Settings);     break;
487      case HELP                 :      case HELP                 :
488        print_msg (_("No help available yet."));        print_msg (_("No help available yet."));
# Line 561  static GtkItemFactoryEntry MenuEntries[] Line 566  static GtkItemFactoryEntry MenuEntries[]
566    {N_("/View/_Margin"), NULL, menu_items_treatment, SHOW_MARGIN, "<CheckItem>"},    {N_("/View/_Margin"), NULL, menu_items_treatment, SHOW_MARGIN, "<CheckItem>"},
567    {N_("/View/_Word-wrap"), NULL, menu_items_treatment, WORDWRAP, "<CheckItem>"},    {N_("/View/_Word-wrap"), NULL, menu_items_treatment, WORDWRAP, "<CheckItem>"},
568    {N_("/View/sep"), NULL, NULL, 0, "<Separator>"},    {N_("/View/sep"), NULL, NULL, 0, "<Separator>"},
569      {N_("/View/Tab Wi_dth"), NULL, NULL, 0, "<Branch>"},
570      {N_("/View/Tab Width/_1"), NULL, menu_items_treatment, TAB_WIDTH_1, "<RadioItem>"},
571      {N_("/View/Tab Width/_2"), NULL, menu_items_treatment, TAB_WIDTH_2, N_("/View/Tab Width/1")},
572      {N_("/View/Tab Width/_3"), NULL, menu_items_treatment, TAB_WIDTH_3, N_("/View/Tab Width/1")},
573      {N_("/View/Tab Width/_4"), NULL, menu_items_treatment, TAB_WIDTH_4, N_("/View/Tab Width/1")},
574      {N_("/View/Tab Width/_8"), NULL, menu_items_treatment, TAB_WIDTH_8, N_("/View/Tab Width/1")},
575    {N_("/View/Ta_bs"), NULL, NULL, 0, "<Branch>"},    {N_("/View/Ta_bs"), NULL, NULL, 0, "<Branch>"},
576    {N_("/View/Tabs/_Top"), NULL, menu_items_treatment,    {N_("/View/Tabs/_Top"), NULL, menu_items_treatment,
577     TAB_POS_TOP, "<RadioItem>"},     TAB_POS_TOP, "<RadioItem>"},
# Line 681  GtkWidget *menubar_new (GtkWidget *Windo Line 692  GtkWidget *menubar_new (GtkWidget *Windo
692                                       (MainFactory,                                       (MainFactory,
693                                        _("/View/Margin"))),                                        _("/View/Margin"))),
694                                      Settings.show_margin);                                      Settings.show_margin);
695      switch (Settings.tab_width)
696      {
697      case 1: str = _("/View/Tab Width/1"); break;
698      case 2: str = _("/View/Tab Width/2"); break;
699      case 3: str = _("/View/Tab Width/3"); break;
700      case 4: str = _("/View/Tab Width/4"); break;
701      default:
702      case 8: str = _("/View/Tab Width/8"); break;
703      }
704      gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM
705                                        (gtk_item_factory_get_widget
706                                         (MainFactory,
707                                          str)),
708                                        TRUE);
709                                        
710    switch (Settings.tab_position)    switch (Settings.tab_position)
711    {    {
712    default:    default:
# Line 852  void add_page_in_notebook (GtkNotebook * Line 878  void add_page_in_notebook (GtkNotebook *
878  }  }
879    
880    
881    void set_tab_width (gint width)
882    {
883            gint i;
884            
885            for (i = 0; i < OpenedFilesCnt; i++)
886            {
887                    gtk_source_view_set_tabs_width (
888                            GTK_SOURCE_VIEW (FPROPS (i, Text)), width);
889            }
890            
891            Settings.tab_width = width;
892            set_int_conf ("General/Editor/TabWidth", width);
893    }
894    
895    
896  /* Set the current page Tab & Menu Labels */  /* Set the current page Tab & Menu Labels */
897    

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26