/[antiright]/antiright/src/arshell/menubar.c
ViewVC logotype

Diff of /antiright/src/arshell/menubar.c

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

revision 1.2 by jefbed, Fri Aug 13 19:32:51 2004 UTC revision 1.3 by jefbed, Fri Aug 13 19:53:54 2004 UTC
# Line 108  arshell_handle_menubar_sub_arguments(int Line 108  arshell_handle_menubar_sub_arguments(int
108  }  }
109    
110  void  void
111    arshell_hide_sticky_note_toolbar()
112    {
113      char *title;
114      ARCLARG;
115      antiright_set(XmNtitle, (XtArgVal)&title);
116      antiright_get_values(antiright.parent_widget);
117      puts(title);
118      if((title[0]=='S') & (title[1]=='t') & (title[2]=='i'))
119        {
120          XtUnmanageChild(arshell.edit.toolbar);
121        }
122      ARCLARG;
123    }
124    
125    void
126    arshell_setup_editor_toolbar()
127    {
128      Widget button;
129      arshell_initialize_row_manager();
130      ARCLARG;
131      antiright_set(XmNmarginWidth, 0);
132      antiright_set(XmNmarginHeight, 0);
133      antiright_set(XmNpacking, XmPACK_TIGHT);
134      antiright_set(XmNorientation, XmHORIZONTAL);
135      antiright_set(XmNspacing, 0);
136      arshell.edit.toolbar=
137        antiright_row(arshell.gui.layout.row_manager_widget);
138    
139      arshell_hide_sticky_note_toolbar();
140            
141      ARCLARG;
142      button=antiright_button(arshell.edit.toolbar, "Open", arshell_open_cb,
143                              NULL);
144      antiright_set_tooltip(button, "Open a file.  ");
145      button=antiright_button(arshell.edit.toolbar, "Save",
146                              arshell_save_work_area, NULL);
147      antiright_set_tooltip(button, "Save the current file.  ");
148      button=antiright_button(arshell.edit.toolbar, "Print",
149                              arshell_print_cb, NULL);
150      antiright_set_tooltip(button, "Print the current file.  ");
151      button=antiright_button(arshell.edit.toolbar, "Cut", antiright_cut_cb,
152                              arshell.gui.widgets.work);
153      antiright_set_tooltip(button, "Cut a selection into the clipboard.");
154      button=antiright_button(arshell.edit.toolbar, "Copy",
155                              antiright_copy_cb,
156                              arshell.gui.widgets.work);
157      antiright_set_tooltip(button, "Copy a selection into the clipboard");
158      button=antiright_button(arshell.edit.toolbar, "Paste",
159                              antiright_paste_cb,
160                              arshell.gui.widgets.work);
161      antiright_set_tooltip(button, "Paste the contents of the clipboard.");
162      button=antiright_button(arshell.edit.toolbar, "Search",
163                              arshell_search_cb, NULL);
164      antiright_set_tooltip(button, "Search for text.");
165      button=antiright_button(arshell.edit.toolbar, "Replace",
166                              arshell_replace_cb, NULL);
167      antiright_set_tooltip(button, "Find and replace text.");
168    }
169    
170    void
171  arshell_setup_work_menubar()  arshell_setup_work_menubar()
172  {  {
173    ARCLARG;    ARCLARG;
174    if(arshell.gui.menubar.file_widget != NULL)    if(arshell.gui.menubar.menubar_widget != NULL)
175      {      {
176        antiright_button(arshell.gui.menubar.file_widget, "Save",        antiright_button(arshell.gui.menubar.file_widget, "Save",
177                         arshell_save_work_area, NULL);                         arshell_save_work_area, NULL);
# Line 134  arshell_setup_work_menubar() Line 194  arshell_setup_work_menubar()
194        antiright_button(arshell.gui.menubar.edit_widget, "Find at Cursor",        antiright_button(arshell.gui.menubar.edit_widget, "Find at Cursor",
195                         arshell_find_at_cursor_cb, NULL);                         arshell_find_at_cursor_cb, NULL);
196        antiright_separator(arshell.gui.menubar.view_widget);        antiright_separator(arshell.gui.menubar.view_widget);
       {  
         Widget button;  
         arshell_initialize_row_manager();  
         ARCLARG;  
         antiright_set(XmNmarginWidth, 0);  
         antiright_set(XmNmarginHeight, 0);  
         antiright_set(XmNpacking, XmPACK_TIGHT);  
         antiright_set(XmNorientation, XmHORIZONTAL);  
         antiright_set(XmNspacing, 0);  
         arshell.edit.toolbar=  
           antiright_row(arshell.gui.layout.row_manager_widget);  
         {  
           char *title;  
           ARCLARG;  
           antiright_set(XmNtitle, (XtArgVal)&title);  
           antiright_get_values(antiright.parent_widget);  
           puts(title);  
           if((title[0]=='S') & (title[1]=='t') & (title[2]=='i'))  
             {  
               XtUnmanageChild(arshell.edit.toolbar);  
             }  
           ARCLARG;  
         }  
           
         ARCLARG;  
         button=antiright_button(arshell.edit.toolbar, "Open", arshell_open_cb,  
                                 NULL);  
         antiright_set_tooltip(button, "Open a file.  ");  
         button=antiright_button(arshell.edit.toolbar, "Save",  
                                 arshell_save_work_area, NULL);  
         antiright_set_tooltip(button, "Save the current file.  ");  
         button=antiright_button(arshell.edit.toolbar, "Print",  
                                 arshell_print_cb, NULL);  
         antiright_set_tooltip(button, "Print the current file.  ");  
         button=antiright_button(arshell.edit.toolbar, "Cut", antiright_cut_cb,  
                                 arshell.gui.widgets.work);  
         antiright_set_tooltip(button, "Cut a selection into the clipboard.");  
         button=antiright_button(arshell.edit.toolbar, "Copy",  
                                 antiright_copy_cb,  
                                 arshell.gui.widgets.work);  
         antiright_set_tooltip(button, "Copy a selection into the clipboard");  
         button=antiright_button(arshell.edit.toolbar, "Paste",  
                                 antiright_paste_cb,  
                                 arshell.gui.widgets.work);  
         antiright_set_tooltip(button, "Paste the contents of the clipboard.");  
         button=antiright_button(arshell.edit.toolbar, "Search",  
                                 arshell_search_cb, NULL);  
         antiright_set_tooltip(button, "Search for text.");  
         button=antiright_button(arshell.edit.toolbar, "Replace",  
                                 arshell_replace_cb, NULL);  
         antiright_set_tooltip(button, "Find and replace text.");  
       }  
197      }      }
198      arshell_setup_editor_toolbar(0);
199  }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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