Changeset d36f2cb for functions.c
- Timestamp:
- Jun 29, 2002, 7:42:37 PM (23 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 8ee73f8d
- Parents:
- 7360fab
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
r7360fab rd36f2cb 218 218 skip_deleted?" non-deleted":"", 219 219 filter?" in ":"", filter?filter:""); 220 owl_function_beep();220 if (!skip_deleted) owl_function_beep(); 221 221 } 222 222 … … 267 267 skip_deleted?" non-deleted":"", 268 268 filter?" in ":"", filter?filter:""); 269 owl_function_beep();269 if (!skip_deleted) owl_function_beep(); 270 270 } 271 271 … … 1843 1843 } 1844 1844 1845 void owl_function_smartzpunt(int type) { 1846 /* Starts a zpunt command based on the current class,instance pair. 1847 * If type=0, uses just class. If type=1, uses instance as well. */ 1848 owl_view *v; 1849 owl_message *m; 1850 char *cmd, *cmdprefix, *mclass, *minst; 1851 1852 v=owl_global_get_current_view(&g); 1853 m=owl_view_get_element(v, owl_global_get_curmsg(&g)); 1854 1855 if (owl_view_get_size(v)==0) { 1856 owl_function_makemsg("No message selected\n"); 1857 return; 1858 } 1859 1860 /* for now we skip admin messages. */ 1861 if (owl_message_is_admin(m) 1862 || owl_message_is_login(m) 1863 || !owl_message_is_zephyr(m)) { 1864 owl_function_makemsg("smartzpunt doesn't support this message type."); 1865 return; 1866 } 1867 1868 mclass = owl_message_get_class(m); 1869 minst = owl_message_get_instance(m); 1870 if (!mclass || !*mclass || *mclass==' ' 1871 || (!strcasecmp(mclass, "message") && !strcasecmp(minst, "personal")) 1872 || (type && (!minst || !*minst|| *minst==' '))) { 1873 owl_function_makemsg("smartzpunt can't safely do this for <%s,%s>", 1874 mclass, minst); 1875 } else { 1876 cmdprefix = "start-command zpunt "; 1877 cmd = owl_malloc(strlen(cmdprefix)+strlen(mclass)+strlen(minst)+3); 1878 strcpy(cmd, cmdprefix); 1879 strcat(cmd, mclass); 1880 if (type) { 1881 strcat(cmd, " "); 1882 strcat(cmd, minst); 1883 } else { 1884 strcat(cmd, " *"); 1885 } 1886 owl_function_command(cmd); 1887 owl_free(cmd); 1888 } 1889 } 1890 1891 1892 1845 1893 void owl_function_color_current_filter(char *color) { 1846 1894 owl_filter *f;
Note: See TracChangeset
for help on using the changeset viewer.